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 /src/objects.c | |
| parent | e2c44a3ac39b229dfef93833828be697cf104bba (diff) | |
editor placing objects
Diffstat (limited to 'src/objects.c')
| -rw-r--r-- | src/objects.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/objects.c b/src/objects.c index 6715e0d..2084b4d 100644 --- a/src/objects.c +++ b/src/objects.c @@ -38,6 +38,17 @@ object get_object_at_tile(float x, float y) { return (object){0}; } +void add_object(object obj) { + for (int i = 0; i < MAX_OBJECTS; i++) { + object o = map_to_load.objects[i]; + if (o.active) continue; + map_to_load.objects[i] = obj; + map_to_load.objects[i].active = true; + return; + } + log_info("OBJECT LIMIT REACHED!"); +} + image* get_image_from_objecttype(object_type tile) { switch (tile) { |
