summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-07-13 19:51:31 +0000
committerludde <ludde@openttd.org>2005-07-13 19:51:31 +0000
commit6013b327f7d54f9d5a331b105011c238da97046f (patch)
tree24c82eee7c186426a35f3ee245d8d753a296d7e2 /main_gui.c
parent4b006aa6cff4b25f6e9421d3693c2ea51e6b5220 (diff)
downloadopenttd-6013b327f7d54f9d5a331b105011c238da97046f.tar.xz
(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.
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main_gui.c b/main_gui.c
index e2c05df3b..9a62ef065 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -42,7 +42,7 @@ static int _rename_what;
static byte _terraform_size = 1;
static byte _last_built_railtype;
-extern void GenerateWorld(int mode, uint log_x, uint log_y);
+extern void GenerateWorld(int mode, uint size_x, uint size_y);
extern void GenerateIndustries(void);
extern void GenerateTowns(void);
@@ -1080,7 +1080,7 @@ static void ResetLandscape(void)
_random_seeds[0][0] = InteractiveRandom();
_random_seeds[0][1] = InteractiveRandom();
- GenerateWorld(1, _patches.map_x, _patches.map_y);
+ GenerateWorld(1, 1<<_patches.map_x, 1<<_patches.map_y);
MarkWholeScreenDirty();
}