summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h54
1 files changed, 46 insertions, 8 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 8b54f28f..bc16c99d 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -49,6 +49,7 @@ void FlushLog();
#define KEY_LENGTH_IN_SCRIPT (8)
+//#define GTA_SCRIPT_COLLECTIVE
#define GET_INTEGER_PARAM(i) (ScriptParams[i])
#define GET_FLOAT_PARAM(i) (*(float*)&ScriptParams[i])
#define GET_VECTOR_PARAM(i) (CVector(GET_FLOAT_PARAM(i), GET_FLOAT_PARAM(i+1), GET_FLOAT_PARAM(i+2)))
@@ -444,6 +445,13 @@ public:
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
int CollectParameterForDebug(char* buf, bool& var);
void GetStoredParameterForDebug(char* buf);
+ void LogOnStartProcessing();
+ void LogBeforeProcessingCommand(int32 command);
+ void LogAfterProcessingCommand(int32 command);
+
+ static char commandInfo[];
+ static uint32 storedIp;
+
#endif
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
@@ -653,19 +661,32 @@ public:
static void SetObjectiveForAllPedsInCollective(int, eObjective);
#endif
+#ifdef USE_MISSION_REPLAY_OVERRIDE_FOR_NON_MOBILE_SCRIPT
+ static bool MissionSupportsMissionReplay(int index)
+ {
+ return (index >= 48 && index <= 61) || (index >= 63 && index <= 117);
+ }
+#endif
static bool IsFortStauntonDestroyed() { return FSDestroyedFlag && *(int32*)&ScriptSpace[FSDestroyedFlag] == 1; }
+
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ static int ScriptToLoad;
+ static int OpenScript();
+#endif
+
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+ static void LogAfterScriptInitializing();
+ static void LogBeforeScriptProcessing();
+ static void LogAfterScriptProcessing();
+#endif
};
extern int ScriptParams[32];
VALIDATE_SIZE(uStackReturnValue, 4);
-#ifdef USE_DEBUG_SCRIPT_LOADER
-extern int scriptToLoad;
-#endif
#ifdef MISSION_REPLAY
-static_assert(false, "Mission replay is not supported");
extern int AllowMissionReplay;
extern uint32 WaitForMissionActivate;
extern uint32 WaitForSave;
@@ -676,12 +697,29 @@ extern bool gbTryingPorn4Again;
extern int IsInAmmunation;
extern int MissionSkipLevel;
-uint32 AddExtraDeathDelay();
-void RetryMission(int, int);
+#ifdef USE_MISSION_REPLAY_OVERRIDE_FOR_NON_MOBILE_SCRIPT
+extern bool AlreadySavedGame;
#endif
-#ifdef USE_DEBUG_SCRIPT_LOADER
-extern int scriptToLoad;
+uint32 AddExtraDeathDelay();
+void RetryMission(int, int unk = 0);
+
+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
extern int gScriptsFile;