summary refs log tree commit diff
path: root/src/tilemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tilemap.h')
-rw-r--r--src/tilemap.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/tilemap.h b/src/tilemap.h
index 587bdf6..912b67f 100644
--- a/src/tilemap.h
+++ b/src/tilemap.h
@@ -4,17 +4,24 @@
 extern struct tilemap {
 	void *tileset;
 	void *wang_tileset;
+	struct {
+		unsigned char r, g, b, a;
+	} backdrop;
 	unsigned width;
 	unsigned height;
 	unsigned layers;
-	unsigned behind;
+	unsigned middleground;
 	struct parallax {
 		float x, y;
 	} *parallax;
 	collision_T *collision;
 	void **tilemaps;
+	size_t input_bytes;
 } *tilemap, *next_tilemap;
 
-void init_tilemap(void);
-void free_tilemap(struct tilemap *tilemap);
-struct tilemap *load_tilemap(void *data, size_t size);
+// render the fore/back ground of the tilemap to `renderer`
+void tilemap_background(struct tilemap *tilemap, int x, int y, int w, int h);
+void tilemap_foreground(struct tilemap *tilemap, int x, int y, int w, int h);
+
+void tilemap_free(struct tilemap *tilemap);
+struct tilemap *tilemap_load(void *data, size_t size);