From 4f8fe1f374c13c0f88c36ecd9cff2b0821dc1da5 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Mon, 25 Dec 2023 11:07:34 +0100 Subject: editor placing objects --- include/objects.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/objects.h b/include/objects.h index cc66ff0..b4c6a1b 100644 --- a/include/objects.h +++ b/include/objects.h @@ -23,6 +23,8 @@ typedef enum t_object_type { OBJECT_COBBLESTONEWALL1, OBJECT_PLANTBOX1, OBJECT_METAL_WALL_FRONT, + + OBJECT_END, } object_type; typedef struct t_object { @@ -44,8 +46,15 @@ typedef struct t_box { vec2f br_u; } box; +object object_dict[OBJECT_END] = { + {0,(vec3f){0, 0, 0},{1,1,1},OBJECT_COBBLESTONEWALL1}, + {0,(vec3f){0, 0, 0},{1,1,2},OBJECT_PLANTBOX1}, + {0,(vec3f){0, 0, 0},{1,1,1},OBJECT_METAL_WALL_FRONT}, +}; + object get_object_at_tile(float x, float y); void create_objects(); +void add_object(object obj); 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); -- cgit v1.2.3-70-g09d2