From 63046894b099598c41096651a9816ee3adc032a4 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 8 Aug 2021 16:57:37 +0300 Subject: small refactoring --- src/control/Script.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/control/Script.h') diff --git a/src/control/Script.h b/src/control/Script.h index 470de444..7b0f9a2e 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -584,6 +584,11 @@ public: static void SwitchToMission(int32 mission); #endif +#ifdef USE_DEBUG_SCRIPT_LOADER + static int ScriptToLoad; + static int OpenScript(); +#endif + #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT static void LogAfterScriptInitializing(); static void LogBeforeScriptProcessing(); @@ -601,9 +606,21 @@ extern bool doingMissionRetry; uint32 AddExtraDeathDelay(); void RetryMission(int, int); -#endif -#ifdef USE_DEBUG_SCRIPT_LOADER -int open_script(); -extern int scriptToLoad; -#endif \ No newline at end of file +enum { + MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER = 0, + MISSION_RETRY_TYPE_1, + MISSION_RETRY_TYPE_BEGIN_RESTARTING +}; + +enum { + MISSION_RETRY_STAGE_NORMAL = 0, + MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE, + MISSION_RETRY_STAGE_START_PROCESSING, + MISSION_RETRY_STAGE_WAIT_FOR_DELAY, + MISSION_RETRY_STAGE_WAIT_FOR_MENU, + MISSION_RETRY_STAGE_WAIT_FOR_USER, + MISSION_RETRY_STAGE_START_RESTARTING, + MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART, +}; +#endif -- cgit v1.2.3 From 947f67dfb770669bae81920a0a1525b0666bfe9c Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 8 Aug 2021 17:17:20 +0300 Subject: small fix --- src/control/Script.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/control/Script.h') diff --git a/src/control/Script.h b/src/control/Script.h index 7b0f9a2e..eedf17d4 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -605,7 +605,7 @@ extern int missionRetryScriptIndex; extern bool doingMissionRetry; uint32 AddExtraDeathDelay(); -void RetryMission(int, int); +void RetryMission(int, int unk = 0); enum { MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER = 0, -- cgit v1.2.3