diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-28 09:12:29 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-28 09:12:29 +0100 |
| commit | 007335a39baff05fb7cabb07457cd5972a013fda (patch) | |
| tree | 8f43623138789a261fa814213b63a4723a650835 /src/map.c | |
| parent | c6e7e4b1b1b72e0b67a64332033e3f41f2407f09 (diff) | |
sort objects by yaxis
Diffstat (limited to 'src/map.c')
| -rw-r--r-- | src/map.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -121,6 +121,10 @@ static bool ray_intersects_with_ground(vec3f begin, vec3f end) { return false; } +int sort_objects(const void * obj1, const void* obj2) { + return (((object*)obj1)->position.y - ((object*)obj2)->position.y); +} + void load_mapdata_into_world() { loaded_map.width = map_to_load.width; loaded_map.height = map_to_load.height; |
