summaryrefslogtreecommitdiff
path: root/src/render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.cpp')
-rw-r--r--src/render.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/render.cpp b/src/render.cpp
index 0840c9a..04700fd 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -224,7 +224,7 @@ bool visibility_order(const world::entity_t *x, const world::entity_t *y)
return x->render_bounds[1][1] > y->render_bounds[1][1];
}
-void state_t::render_layer(game::state_t *game, rect_t<world::coord_t, 2> &sectors,
+void state_t::render_layer(world::world_t *world, rect_t<world::coord_t, 2> &sectors,
std::list<world::entity_t*> &ents, layer_t layer)
{
std::list<world::entity_t*>::iterator ent;
@@ -236,7 +236,7 @@ void state_t::render_layer(game::state_t *game, rect_t<world::coord_t, 2> &secto
world::sector_index_t sector_index(sx, sy);
world::sector_t *sector;
- sector = game->world.get_sector(sector_index, world::SECTOR_FULL);
+ sector = world->get_sector(sector_index, world::SECTOR_FULL);
while (ent != ents.end() &&
(*ent)->render_bounds[1][1] < sy * SECTOR_SIZE + ty) {
@@ -259,7 +259,7 @@ void state_t::render_layer(game::state_t *game, rect_t<world::coord_t, 2> &secto
if (tiledata[tile->type].layer != layer)
continue;
- render_tile(&game->world, index, tile);
+ render_tile(world, index, tile);
}
if (layer == LAYER_COUNT - 1)
@@ -267,7 +267,7 @@ void state_t::render_layer(game::state_t *game, rect_t<world::coord_t, 2> &secto
}
}
-void state_t::render(game::state_t *game)
+void state_t::render(world::world_t *world)
{
rectf_t bounds;
std::list<world::entity_t*> ents;
@@ -277,14 +277,14 @@ void state_t::render(game::state_t *game)
sectors[0] = world::sector_index_at(bounds[0]);
sectors[1] = world::sector_index_at(bounds[1]);
- ents = game->world.get_render_entities(bounds);
+ ents = world->get_render_entities(bounds);
ents.sort(rendering_order);
for (layer_t layer = LAYER_FLAT; layer < LAYER_COUNT; layer++)
- render_layer(game, sectors, ents, layer);
+ render_layer(world, sectors, ents, layer);
if (debug_draw_tile_coords) {
- for (world::sector_t *sector : game->world.get_sectors(bounds, world::SECTOR_FULL))
+ for (world::sector_t *sector : world->get_sectors(bounds, world::SECTOR_FULL))
for (world::coord_t ty = 0; ty < SECTOR_SIZE; ty++)
for (world::coord_t tx = 0; tx < SECTOR_SIZE; tx++) {
std::stringstream ss;