6 #define CURSOR_ICON_WIDTH 32
7 #define CURSOR_ICON_HEIGHT 32
10 CURSOR_STYLE_POINTER = 0,
11 CURSOR_STYLE_RESIZE_VERT,
12 CURSOR_STYLE_RESIZE_HORIS,
13 CURSOR_STYLE_RESIZE_DIAG1,
14 CURSOR_STYLE_RESIZE_DIAG2,
19 static const char * const cursor_style_tex_files[CURSOR_STYLE_N] = {
20 "./assets/images/cursor.bmp",
21 "./assets/images/cursor-resize-vert.bmp",
22 "./assets/images/cursor-resize-horis.bmp",
23 "./assets/images/cursor-resize-diag1.bmp",
24 "./assets/images/cursor-resize-diag2.bmp"
27 static const int cursor_style_tex_pivots[CURSOR_STYLE_N][2] = {
29 {CURSOR_ICON_WIDTH / 2, CURSOR_ICON_HEIGHT / 2},
30 {CURSOR_ICON_WIDTH / 2, CURSOR_ICON_HEIGHT / 2},
31 {CURSOR_ICON_WIDTH / 2, CURSOR_ICON_HEIGHT / 2},
32 {CURSOR_ICON_WIDTH / 2, CURSOR_ICON_HEIGHT / 2}
36 SDL_Texture *texs[CURSOR_STYLE_N];
40 int cursor_render(const Cursor *cursor, SDL_Renderer *renderer);