summaryrefslogtreecommitdiff
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c
index a0f25fc..be6d5d0 100644
--- a/src/world.c
+++ b/src/world.c
@@ -110,7 +110,7 @@ world_get(int x, int y)
}
int2
-world_find(int tile)
+world_find_cell(int tile)
{
rfor (y, 0, g_world.height) {
rfor (x, 0, g_world.width) {
@@ -126,3 +126,11 @@ world_find(int tile)
return I2(-1, -1);
}
+
+int2
+world_find(int tile)
+{
+ with (cell, g_world.cells[g_world.x + g_world.y * g_world.width])
+ return cell_find(cell, tile);
+ return I2(-1, -1);
+}