Update to 13.0-RC1

This commit is contained in:
Pavel Stupnikov
2023-01-03 15:58:14 +04:00
parent be23283677
commit 59c991fa52
326 changed files with 12923 additions and 8705 deletions
+4 -10
View File
@@ -210,7 +210,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.
};
@@ -240,6 +239,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;
@@ -271,6 +271,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,
@@ -2911,15 +2912,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);
@@ -2929,7 +2924,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);
@@ -3316,7 +3310,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;