mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r3356) - Remove unused parameter of AfterLoadGame().
- Initialize _sl_version after loading an old savegame.
This commit is contained in:
parent
10c6d4c738
commit
2a94a64711
|
@ -1096,7 +1096,7 @@ static void UpdateSignOwner(void)
|
||||||
extern void UpdateOldAircraft( void );
|
extern void UpdateOldAircraft( void );
|
||||||
extern void UpdateOilRig( void );
|
extern void UpdateOilRig( void );
|
||||||
|
|
||||||
bool AfterLoadGame(uint version)
|
bool AfterLoadGame(void)
|
||||||
{
|
{
|
||||||
Window *w;
|
Window *w;
|
||||||
ViewPort *vp;
|
ViewPort *vp;
|
||||||
|
|
|
@ -1233,7 +1233,7 @@ static const SaveLoadFormat *GetSavegameFormat(const char *s)
|
||||||
|
|
||||||
// actual loader/saver function
|
// actual loader/saver function
|
||||||
void InitializeGame(uint size_x, uint size_y);
|
void InitializeGame(uint size_x, uint size_y);
|
||||||
extern bool AfterLoadGame(uint version);
|
extern bool AfterLoadGame(void);
|
||||||
extern void BeforeSaveGame(void);
|
extern void BeforeSaveGame(void);
|
||||||
extern bool LoadOldSaveGame(const char *file);
|
extern bool LoadOldSaveGame(const char *file);
|
||||||
|
|
||||||
|
@ -1365,7 +1365,8 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode)
|
||||||
if (mode == SL_OLD_LOAD) {
|
if (mode == SL_OLD_LOAD) {
|
||||||
InitializeGame(256, 256); // 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;
|
if (!LoadOldSaveGame(filename)) return SL_REINIT;
|
||||||
AfterLoadGame(0);
|
_sl_version = 0;
|
||||||
|
AfterLoadGame();
|
||||||
return SL_OK;
|
return SL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1494,7 +1495,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode)
|
||||||
|
|
||||||
/* After loading fix up savegame for any internal changes that
|
/* After loading fix up savegame for any internal changes that
|
||||||
* might've occured since then. If it fails, load back the old game */
|
* 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;
|
return SL_OK;
|
||||||
|
|
Loading…
Reference in New Issue