diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-25 11:07:34 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-25 11:07:34 +0100 |
| commit | 4f8fe1f374c13c0f88c36ecd9cff2b0821dc1da5 (patch) | |
| tree | 87201e8a2594156f2d7efbbe0a7a92d07806bf95 /include | |
| parent | e2c44a3ac39b229dfef93833828be697cf104bba (diff) | |
editor placing objects
Diffstat (limited to 'include')
| -rw-r--r-- | include/objects.h | 9 |
1 files changed, 9 insertions, 0 deletions
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); |
