From 2a94a647117dc14df22ff1fbfa367f890ad1aade Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 29 Dec 2005 22:28:19 +0000 Subject: [PATCH] (svn r3356) - Remove unused parameter of AfterLoadGame(). - Initialize _sl_version after loading an old savegame. --- openttd.c | 2 +- saveload.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openttd.c b/openttd.c index 68d83d2f07..7d1438d212 100644 --- a/openttd.c +++ b/openttd.c @@ -1096,7 +1096,7 @@ static void UpdateSignOwner(void) extern void UpdateOldAircraft( void ); extern void UpdateOilRig( void ); -bool AfterLoadGame(uint version) +bool AfterLoadGame(void) { Window *w; ViewPort *vp; diff --git a/saveload.c b/saveload.c index 55d987df06..339746342b 100644 --- a/saveload.c +++ b/saveload.c @@ -1233,7 +1233,7 @@ static const SaveLoadFormat *GetSavegameFormat(const char *s) // actual loader/saver function void InitializeGame(uint size_x, uint size_y); -extern bool AfterLoadGame(uint version); +extern bool AfterLoadGame(void); extern void BeforeSaveGame(void); extern bool LoadOldSaveGame(const char *file); @@ -1365,7 +1365,8 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode) if (mode == SL_OLD_LOAD) { InitializeGame(256, 256); // set a mapsize of 256x256 for TTDPatch games or it might get confused if (!LoadOldSaveGame(filename)) return SL_REINIT; - AfterLoadGame(0); + _sl_version = 0; + AfterLoadGame(); return SL_OK; } @@ -1494,7 +1495,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode) /* After loading fix up savegame for any internal changes that * might've occured since then. If it fails, load back the old game */ - if (!AfterLoadGame(version)) return SL_REINIT; + if (!AfterLoadGame()) return SL_REINIT; } return SL_OK;