Merge branch 'openttd'
This commit is contained in:
@@ -211,7 +211,6 @@ struct SaveLoadParams {
|
||||
StringID error_str; ///< the translatable error message to show
|
||||
char *extra_msg; ///< the error message
|
||||
|
||||
uint16 game_speed; ///< The game speed when saving started.
|
||||
bool saveinprogress; ///< Whether there is currently a save in progress.
|
||||
};
|
||||
|
||||
@@ -241,6 +240,7 @@ static const std::vector<ChunkHandlerRef> &ChunkHandlers()
|
||||
extern const ChunkHandlerTable _cargomonitor_chunk_handlers;
|
||||
extern const ChunkHandlerTable _goal_chunk_handlers;
|
||||
extern const ChunkHandlerTable _story_page_chunk_handlers;
|
||||
extern const ChunkHandlerTable _league_chunk_handlers;
|
||||
extern const ChunkHandlerTable _ai_chunk_handlers;
|
||||
extern const ChunkHandlerTable _game_chunk_handlers;
|
||||
extern const ChunkHandlerTable _animated_tile_chunk_handlers;
|
||||
@@ -272,6 +272,7 @@ static const std::vector<ChunkHandlerRef> &ChunkHandlers()
|
||||
_cargomonitor_chunk_handlers,
|
||||
_goal_chunk_handlers,
|
||||
_story_page_chunk_handlers,
|
||||
_league_chunk_handlers,
|
||||
_engine_chunk_handlers,
|
||||
_town_chunk_handlers,
|
||||
_sign_chunk_handlers,
|
||||
@@ -3137,15 +3138,9 @@ static inline void ClearSaveLoadState()
|
||||
_sl.lf = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the gui accordingly when starting saving
|
||||
* and set locks on saveload. Also turn off fast-forward cause with that
|
||||
* saving takes Aaaaages
|
||||
*/
|
||||
/** Update the gui accordingly when starting saving and set locks on saveload. */
|
||||
static void SaveFileStart()
|
||||
{
|
||||
_sl.game_speed = _game_speed;
|
||||
_game_speed = 100;
|
||||
SetMouseCursorBusy(true);
|
||||
|
||||
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SAVELOAD_START);
|
||||
@@ -3155,7 +3150,6 @@ static void SaveFileStart()
|
||||
/** Update the gui accordingly when saving is done and release locks on saveload. */
|
||||
static void SaveFileDone()
|
||||
{
|
||||
if (_game_mode != GM_MENU) _game_speed = _sl.game_speed;
|
||||
SetMouseCursorBusy(false);
|
||||
|
||||
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SAVELOAD_FINISH);
|
||||
@@ -3544,7 +3538,7 @@ SaveOrLoadResult SaveOrLoad(const std::string &filename, SaveLoadOperation fop,
|
||||
ClearSaveLoadState();
|
||||
|
||||
/* Skip the "colour" character */
|
||||
if (fop != SLO_CHECK) Debug(sl, 0, "{}", GetSaveLoadErrorString());
|
||||
if (fop != SLO_CHECK) Debug(sl, 0, "{}", GetSaveLoadErrorString() + 3);
|
||||
|
||||
/* A saver/loader exception!! reinitialize all variables to prevent crash! */
|
||||
return (fop == SLO_LOAD) ? SL_REINIT : SL_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user