4#include <SDL2/SDL_image.h>
5#include <SDL2/SDL_ttf.h>
8#include <SDL2/SDL2_gfxPrimitives.h>
11#include "../libs/SDL_FontCache/SDL_FontCache.h"
16 #include <SDL2/SDL_mixer.h>
18 typedef Mix_Music CST_Music;
21typedef SDL_Window CST_Window;
22typedef SDL_Renderer CST_Renderer;
23typedef SDL_Texture CST_Texture;
25typedef SDL_Surface CST_Surface;
26typedef SDL_Color CST_Color;
27typedef SDL_Rect CST_Rect;
32#define CST_CURSOR_NONE -1
33#define CST_CURSOR_ARROW 0
34#define CST_CURSOR_HAND 1
35#define CST_CURSOR_TEXT 2
36#define CST_CURSOR_SPINNER 3
43void CST_RenderPresent(CST_Renderer* render);
44void CST_FreeSurface(CST_Surface* surface);
46void CST_RenderCopy(CST_Renderer* dest, CST_Texture* src, CST_Rect* src_rect, CST_Rect* dest_rect);
47void CST_RenderCopyRotate(CST_Renderer* dest, CST_Texture* src, CST_Rect* src_rect, CST_Rect* dest_rect,
int angle);
50void CST_SetDrawColor(CST_Renderer* renderer, CST_Color c);
51void CST_SetDrawColorRGBA(CST_Renderer* renderer, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
52void CST_FillRect(CST_Renderer* renderer, CST_Rect* dimens);
53void CST_DrawRect(CST_Renderer* renderer, CST_Rect* dimens);
54void CST_SetDrawBlend(CST_Renderer* renderer,
bool enabled);
55void CST_DrawLine(CST_Renderer* renderer,
int x,
int y,
int w,
int h);
57void CST_QueryTexture(CST_Texture* texture,
int* w,
int* h);
58CST_Texture* CST_CreateTextureFromSurface(CST_Renderer* renderer, CST_Surface* surface,
bool isAccessible);
59void CST_SetQualityHint(
const char* quality);
61void CST_filledCircleRGBA(CST_Renderer* renderer, uint32_t x, uint32_t y, uint32_t radius, uint32_t r, uint32_t g, uint32_t b, uint32_t a);
62void CST_roundedBoxRGBA (
63 CST_Renderer *renderer,
64 Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
65 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a
67void CST_roundedRectangleRGBA (
68 CST_Renderer *renderer,
69 Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
70 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a
72void CST_rectangleRGBA (
73 CST_Renderer *renderer,
74 Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
75 Uint8 r, Uint8 g, Uint8 b, Uint8 a
77float CST_GetDpiScale();
78void CST_SetWindowSize(CST_Window* renderer,
int w,
int h);
79void CST_Delay(
int time);
82bool CST_isRectOffscreen(CST_Rect* rect);
84void CST_GetRGBA(Uint32 pixel, SDL_PixelFormat* format, CST_Color* cstColor);
85bool CST_SavePNG(CST_Texture* texture,
const char* filename);
86void CST_SetWindowTitle(
const char* title);
88void CST_SetCursor(
int cursor);
92std::vector<std::string> CST_GetMusicInfo(CST_Music* music);
97#define CST_Font FC_Font
98#define CST_CreateFont FC_CreateFont
99#define CST_LoadFont FC_LoadFont
100#define CST_MakeColor FC_MakeColor
101#define CST_GetFontLineHeight FC_GetLineHeight
102#define CST_GetFontWidth FC_GetWidth
103#define CST_GetFontHeight FC_GetHeight
104#define CST_DrawFont FC_Draw
106void chdirForPlatform();
107std::string replaceAll(std::string str,
const std::string& from,
const std::string& to);