4 static SDL_Cursor *create_cursor(const char **image);
6 SDL_Cursor *cursor_std, *cursor_cross, *cursor_x;
8 static const char *cur_std[] = {
9 /* width height num_colors chars_per_pixel */
51 static const char *cur_cross[] = {
52 /* width height num_colors chars_per_pixel */
73 " ............ ............ ",
74 ".XXXXXXXXXXXX. .XXXXXXXXXXXX. ",
75 " ............ ............ ",
94 static const char *cur_x[] = {
95 /* width height num_colors chars_per_pixel */
139 void init_cursors() {
140 cursor_std = create_cursor(cur_std);
141 cursor_cross = create_cursor(cur_cross);
142 cursor_x = create_cursor(cur_x);
145 static SDL_Cursor *create_cursor(const char **image) {
152 for(row=0; row<32; ++row) {
153 for (col=0; col<32; ++col) {
159 data[i] = mask[i] = 0;
161 switch(image[4+row][col]) {
174 sscanf(image[4+row], "%d,%d", &hot_x, &hot_y);
175 return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y);