summaryrefslogtreecommitdiff
path: root/src/include/data_game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/data_game.h')
-rw-r--r--src/include/data_game.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/data_game.h b/src/include/data_game.h
new file mode 100644
index 0000000..d9bd68e
--- /dev/null
+++ b/src/include/data_game.h
@@ -0,0 +1,38 @@
+#ifndef DATA_GAME_H
+#define DATA_GAME_H
+
+#include <SDL.h>
+
+#define MAX_RENDERLIST_SIZE 256
+
+typedef struct {
+ sprite_t *sprite;
+ int currframe;
+ int animate; /* Is currently animating ? */
+ int x,y; /* Level-based coords, not camera-based */
+} renderItem_t;
+
+typedef struct {
+ /* Game frame counter */
+ int tick;
+ /* Current camera position */
+ int cameraX;
+
+ /* terrain & stencil
+ generated by paint_terrain()
+ update by ???() */
+ SDL_Surface *terrain, *stencil;
+
+ /* streamTerrain : viewable portion of terrain, in texture format
+ updated by render_terrain() */
+ SDL_Texture *terrainStream;
+
+ /* Render list of all in-game sprites (for batch processing)
+ Items are in paint order
+ created by buildRenderList() */
+ int renderListSize;
+ renderItem_t renderList[MAX_RENDERLIST_SIZE];
+} gameState_t;
+
+#endif /*DATA_GAME_H*/
+