summaryrefslogtreecommitdiff
path: root/saveload.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 /saveload.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 'saveload.c')
-rw-r--r--saveload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/saveload.c b/saveload.c
index b120f0535..d2fc3748f 100644
--- a/saveload.c
+++ b/saveload.c
@@ -1183,7 +1183,7 @@ static const SaveLoadFormat *GetSavegameFormat(const char *s)
}
// actual loader/saver function
-void InitializeGame(uint log_x, uint log_y);
+void InitializeGame(uint size_x, uint size_y);
extern bool AfterLoadGame(uint version);
extern void BeforeSaveGame(void);
extern bool LoadOldSaveGame(const char *file);
@@ -1307,7 +1307,7 @@ int SaveOrLoad(const char *filename, int mode)
/* Load a TTDLX or TTDPatch game */
if (mode == SL_OLD_LOAD) {
- InitializeGame(8, 8); // set a mapsize of 256x256 for TTDPatch games or it might get confused
+ InitializeGame(256, 256); // set a mapsize of 256x256 for TTDPatch games or it might get confused
if (!LoadOldSaveGame(filename)) return SL_REINIT;
AfterLoadGame(0);
return SL_OK;
@@ -1426,7 +1426,7 @@ int SaveOrLoad(const char *filename, int mode)
/* Old maps were hardcoded to 256x256 and thus did not contain
* any mapsize information. Pre-initialize to 256x256 to not to
* confuse old games */
- InitializeGame(8, 8);
+ InitializeGame(256, 256);
SlLoadChunks();
fmt->uninit_read();