(svn r2560) Fix: various minor code changes.

Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
This commit is contained in:
ludde
2005-07-13 19:51:31 +00:00
parent 4b006aa6cf
commit 6013b327f7
15 changed files with 92 additions and 76 deletions

View File

@@ -1072,7 +1072,7 @@ Town *CreateRandomTown(uint attempts)
do {
// Generate a tile index not too close from the edge
tile = TILE_MASK(Random());
tile = RandomTile();
if (DistanceFromEdge(tile) < 20)
continue;