diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-05-01 21:54:44 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-05-01 21:54:44 +0200 |
| commit | 7dd42a4af58f795dfced9a22b31855f276beecfc (patch) | |
| tree | e1f7177b9bfff62a0cc62b6483248549c7114003 /src/map.c | |
| parent | 314c92ea455c235f1becf71eb420b8461292eae8 (diff) | |
editor work
Diffstat (limited to 'src/map.c')
| -rw-r--r-- | src/map.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -129,8 +129,6 @@ void create_empty_map() { map_to_load.objects[2] = (object){.active = true, .h = 0, .position = (vec2f){0, 1}, .size = (vec3f){1,1,2}, .type = OBJECT_COBBLESTONEWALL1}; map_to_load.objects[3] = (object){.active = true, .h = 0, .position = (vec2f){0, 2}, .size = (vec3f){1,1,2}, .type = OBJECT_COBBLESTONEWALL1}; - printf("XDD: %d\n", map_to_load.tiles[0][0]); - load_mapdata_into_world(); } @@ -234,15 +232,13 @@ void draw_grid(platform_window* window) { vec2f topright; int highest_point_topleft = tile.topleft; - topleft = (vec2f){render_x, info.tile_width * y - highest_point_topleft*info.px_raised_per_h}; - int highest_point_topright = tile.topright; - topright = (vec2f){render_x + info.tile_width, info.tile_height * y - highest_point_topright*info.px_raised_per_h}; - int highest_point_bottomright = tile.bottomright; - bottomright = (vec2f){render_x + xdiff_between_bottom_and_top+info.tile_width, info.tile_height * y + info.tile_height - highest_point_bottomright*info.px_raised_per_h}; - int highest_point_bottomleft = tile.bottomleft; + + topleft = (vec2f){render_x, info.tile_width * y - highest_point_topleft*info.px_raised_per_h}; + topright = (vec2f){render_x + info.tile_width, info.tile_height * y - highest_point_topright*info.px_raised_per_h}; + bottomright = (vec2f){render_x + xdiff_between_bottom_and_top+info.tile_width, info.tile_height * y + info.tile_height - highest_point_bottomright*info.px_raised_per_h}; bottomleft = (vec2f){render_x + xdiff_between_bottom_and_top, info.tile_height * y + info.tile_height - highest_point_bottomleft*info.px_raised_per_h}; color c = rgb(205,205,205); |
