From 6013b327f7d54f9d5a331b105011c238da97046f Mon Sep 17 00:00:00 2001 From: ludde Date: Wed, 13 Jul 2005 19:51:31 +0000 Subject: (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. --- clear_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clear_cmd.c') diff --git a/clear_cmd.c b/clear_cmd.c index 45c6f72d7..773d05867 100644 --- a/clear_cmd.c +++ b/clear_cmd.c @@ -774,7 +774,7 @@ void GenerateClearTile(void) /* add hills */ i = ScaleByMapSize((Random() & 0x3FF) + 0x400); do { - tile = TILE_MASK(Random()); + tile = RandomTile(); if (IsTileType(tile, MP_CLEAR)) _m[tile].m5 = (byte)((_m[tile].m5 & ~(3<<2)) | (1<<2)); } while (--i); @@ -783,7 +783,7 @@ void GenerateClearTile(void) i = ScaleByMapSize((Random() & 0x7F) + 0x80); do { r = Random(); - tile = TILE_MASK(r); + tile = RandomTileSeed(r); if (IsTileType(tile, MP_CLEAR)) { j = ((r >> 16) & 0xF) + 5; for(;;) { -- cgit v1.2.3-54-g00ecf