Add SDL2_mixer support.
[runemen.git] / src / draw.h
blob59d069fefb3d6a08bd278bc3b0afacac48b53652
1 #ifndef _RUNEDRAW_H
2 #define _RUNEDRAW_H
4 extern SDL_Texture *tiles;
5 extern SDL_Texture *uibg;
6 extern SDL_Texture *large_font;
7 extern SDL_Texture *mid_font;
8 extern SDL_Texture *small_font;
10 /* Color names ... */
11 extern SDL_Color white;
12 extern SDL_Color black;
13 extern SDL_Color magenta;
15 extern SDL_Color reds[16];
17 /* Hardcoded locations on the tileset */
19 #define TILE_BUILD_X 20
20 #define TILE_BUILD_Y 0
22 #define TILE_SEL_X 6
23 #define TILE_SEL_Y 15
25 #define TILE_BTN_X 7
26 #define TILE_BTN_Y 19
28 #define TILE_STAT_X 5
29 #define TILE_STAT_Y 18
31 #define TILE_UICO_X 7
32 #define TILE_UICO_Y 16
34 #define TILE_BALOON_X 5
35 #define TILE_BALOON_Y 17
37 #define TILE_FOG_X 1
38 #define TILE_FOG_Y 16
40 #define TILE_RES_X 5
41 #define TILE_RES_Y 16
43 #define TILE_BUTTON_X 5
44 #define TILE_BUTTON_Y 20
46 #define TILE_FLAG_X 5
47 #define TILE_FLAG_Y 24
49 /* Externals */
50 extern void draw_particles(SDL_Renderer *target, Uint32 bx, Uint32 by);
52 /* Public */
53 extern void prepare_colors();
54 extern void draw_tile(SDL_Renderer *screen, Uint8 id, Uint8 frame, Uint32 x, Uint32 y);
56 extern void draw_ui(SDL_Renderer *screen);
57 extern void draw_screen(SDL_Renderer *screen);
59 extern int rprintf(SDL_Renderer *renderer, Uint32 x, Uint32 y, const char *fmt, ...);
61 #endif