summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/objects.h9
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);