aboutsummaryrefslogtreecommitdiff
path: root/src/sdl/draw.h
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-01-15 00:10:46 -0500
committerPaul Duncan <pabs@pablotron.org>2019-01-15 00:10:46 -0500
commitdec30a82819f93903004a3e9d46bf22f352942b4 (patch)
tree46b06f9f7de3d0b3a5fa446dc13cf7727d0e87c3 /src/sdl/draw.h
parent7fdd6f36c8181115c60b781dc97b71107fb7da65 (diff)
downloadsok-dec30a82819f93903004a3e9d46bf22f352942b4.tar.bz2
sok-dec30a82819f93903004a3e9d46bf22f352942b4.zip
add theme.[hc] and refactor draw.c
Diffstat (limited to 'src/sdl/draw.h')
-rw-r--r--src/sdl/draw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sdl/draw.h b/src/sdl/draw.h
index 19d8837..1c44320 100644
--- a/src/sdl/draw.h
+++ b/src/sdl/draw.h
@@ -6,12 +6,15 @@
#include <SDL_ttf.h>
#include "../libsok/sok.h"
#include "../text/levels.h"
+#include "theme.h"
// arbitrary
#define MAX_SPRITES 32
typedef struct {
SDL_Renderer * const renderer;
+
+ // FIXME: move to theme eventually
SDL_Texture *sprites[MAX_SPRITES];
TTF_Font *font;
@@ -23,6 +26,8 @@ typedef struct {
// render offset
int render_ofs_x, render_ofs_y;
Uint32 ticks;
+
+ const theme_t * const theme;
} draw_ctx_t;
void draw(draw_ctx_t * const);