Add town variable for town tile X and Y coordinates

This commit is contained in:
Jonathan G Rennison
2023-04-13 21:19:53 +01:00
parent ce9480ee20
commit 64925aedf8
6 changed files with 21 additions and 0 deletions

View File

@@ -119,6 +119,9 @@
case A2VRI_TOWNS_ZONE_3:
case A2VRI_TOWNS_ZONE_4:
return this->t->cache.squared_town_zone_radius[variable - A2VRI_TOWNS_ZONE_0];
case A2VRI_TOWNS_XY:
return TileY(this->t->xy) << 16 | (TileX(this->t->xy) & 0xFFFF);
}
DEBUG(grf, 1, "Unhandled town variable 0x%X", variable);
@@ -180,6 +183,7 @@
case A2VRI_TOWNS_ZONE_2:
case A2VRI_TOWNS_ZONE_3:
case A2VRI_TOWNS_ZONE_4:
case A2VRI_TOWNS_XY:
return 0;
}