summaryrefslogtreecommitdiff
path: root/src/render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.cpp')
-rw-r--r--src/render.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/render.cpp b/src/render.cpp
index 9fb1625..313bc4d 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -5,7 +5,8 @@
static sf::RectangleShape wot_rect;
static sf::Font font;
-static void draw_tile(sf::RenderWindow *window, v2f_t x, world::tile_t *tile)
+static void draw_tile(sf::RenderWindow *window, v2f_t x, world::tile_t *tile,
+ world::tile_index_t local)
{
sf::Texture *texture;
@@ -30,7 +31,7 @@ static void draw_tile(sf::RenderWindow *window, v2f_t x, world::tile_t *tile)
window->draw(wot_rect);
std::stringstream ss;
- ss << tile->type << ":" << tile->neighbors;
+ ss << "L=" << local;
sf::Text text(ss.str(), font, 20);
text.setPosition(x);
text.setScale(0.005, 0.005);
@@ -42,7 +43,8 @@ static void draw_sector(sf::RenderWindow *window, world::sector_t *sector)
for (ssize_t y = 0; y < SECTOR_SIZE; y++)
for (ssize_t x = 0; x < SECTOR_SIZE; x++)
draw_tile(window, sector->bounds.v[0] + v2f_t(x, y),
- sector->tiles + y * SECTOR_SIZE + x);
+ sector->tiles + y * SECTOR_SIZE + x,
+ world::tile_index_t(x, y));
}
void interface::state_t::render()