diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-18 13:06:45 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-18 13:06:45 +0200 |
| commit | c548d74f4daac078c1338e5f8daf4afe980e08a9 (patch) | |
| tree | 003ded17200ae0bf19f8a56cd7276cf7e590cebb /src/zombies.c | |
| parent | f646ddb88ec19307d42729b7babdb77966449327 (diff) | |
move stuff from stack to heap
Diffstat (limited to 'src/zombies.c')
| -rw-r--r-- | src/zombies.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zombies.c b/src/zombies.c index a4fc94e..d553d4a 100644 --- a/src/zombies.c +++ b/src/zombies.c @@ -110,7 +110,7 @@ static vec2f get_random_target_for_zombie(zombie o) { if (target.x <= 0 || target.y <= 0) goto try_again; if (target.x >= MAP_SIZE_X-1 || target.y >= MAP_SIZE_Y-1) goto try_again; - if (loaded_map.heightmap[(int)target.y][(int)target.x].type == TILE_NONE) goto try_again; // Outside of map. + if (loaded_map->heightmap[(int)target.y][(int)target.x].type == TILE_NONE) goto try_again; // Outside of map. object obj = get_object_at_tile(target.x, target.y); if (obj.active && obj.active) goto try_again; @@ -243,7 +243,7 @@ void draw_spawners(platform_window* window) { int render_x = (info.tile_width * spawner.position.x) + (info.px_incline * spawner.position.y); int render_y = info.tile_height * spawner.position.y; - tile tile = loaded_map.heightmap[spawner.position.y][spawner.position.x]; + tile tile = loaded_map->heightmap[spawner.position.y][spawner.position.x]; sprite_frame frame = sprite_get_frame(img_spawner, &spawner.sprite); |
