diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 22:54:52 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 22:54:52 +0100 |
| commit | e2c44a3ac39b229dfef93833828be697cf104bba (patch) | |
| tree | cef3d0cacd4a5cceefb62fcad52ff668cb2145aa /include | |
| parent | 2a85823f96ec4e9fa62905490ac93910187dfefc (diff) | |
only draw what is on screen
Diffstat (limited to 'include')
| -rw-r--r-- | include/map.h | 6 | ||||
| -rw-r--r-- | include/objects.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/map.h b/include/map.h index ea5d619..ed8cbed 100644 --- a/include/map.h +++ b/include/map.h @@ -31,8 +31,8 @@ typedef struct t_tile { vec2f br; } tile; -#define MAP_SIZE_X 40 -#define MAP_SIZE_Y 40 +#define MAP_SIZE_X 1000 +#define MAP_SIZE_Y 1000 #define MAX_LIGHT_EMITTERS 100 typedef struct t_map_info { @@ -61,7 +61,7 @@ typedef struct t_light_data { typedef struct t_extracted_map_data { int width; int height; - tile heightmap[MAP_SIZE_Y][MAP_SIZE_X]; + tile heightmap[MAP_SIZE_Y][MAP_SIZE_X]; // tilemap object objects[MAX_OBJECTS]; light_data lightmap[MAP_SIZE_Y][MAP_SIZE_X]; light_emitter light_emitters[MAX_LIGHT_EMITTERS]; diff --git a/include/objects.h b/include/objects.h index d30a8f0..cc66ff0 100644 --- a/include/objects.h +++ b/include/objects.h @@ -46,7 +46,7 @@ typedef struct t_box { object get_object_at_tile(float x, float y); void create_objects(); -void draw_objects_at_row(platform_window* window, int row); +void draw_objects(platform_window* window); box get_box_of_object(platform_window* window, object o); void render_quad_with_outline(vec2f tl, vec2f tr, vec2f bl, vec2f br, color c); void render_box_with_outline(box box, color c); |
