summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-01 11:21:42 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-01 11:21:42 +0100
commit575845772fc3f5385eab56044cf97ef0ce930e17 (patch)
tree1b51da6e1759bac72bec1392435c453eaee60158 /src/control/Script.h
parentlcs car ctrl 2 (diff)
parentMerge branch 'miami' of github.com:GTAmodding/re3 into miami (diff)
downloadre3-575845772fc3f5385eab56044cf97ef0ce930e17.tar
re3-575845772fc3f5385eab56044cf97ef0ce930e17.tar.gz
re3-575845772fc3f5385eab56044cf97ef0ce930e17.tar.bz2
re3-575845772fc3f5385eab56044cf97ef0ce930e17.tar.lz
re3-575845772fc3f5385eab56044cf97ef0ce930e17.tar.xz
re3-575845772fc3f5385eab56044cf97ef0ce930e17.tar.zst
re3-575845772fc3f5385eab56044cf97ef0ce930e17.zip
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h56
1 files changed, 33 insertions, 23 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index c6ece50f..983cf6e5 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -14,7 +14,15 @@ class CPlayerInfo;
class CRunningScript;
-#define KEY_LENGTH_IN_SCRIPT 8
+extern int32 ScriptParams[32];
+
+void FlushLog();
+#define script_assert(_Expression) FlushLog(); assert(_Expression);
+
+#define PICKUP_PLACEMENT_OFFSET 0.5f
+#define PED_FIND_Z_OFFSET 5.0f
+#define COP_PED_FIND_Z_OFFSET 10.0f
+
#define SPHERE_MARKER_R 252
#define SPHERE_MARKER_G 138
#define SPHERE_MARKER_B 242
@@ -22,6 +30,16 @@ class CRunningScript;
#define SPHERE_MARKER_PULSE_PERIOD 2048
#define SPHERE_MARKER_PULSE_FRACTION 0.1f
+#ifdef USE_PRECISE_MEASUREMENT_CONVERTION
+#define METERS_IN_FOOT 0.3048f
+#define FEET_IN_METER 3.28084f
+#else
+#define METERS_IN_FOOT 0.3f
+#define FEET_IN_METER 3.33f
+#endif
+
+#define KEY_LENGTH_IN_SCRIPT 8
+
struct intro_script_rectangle
{
bool m_bIsUsed;
@@ -288,6 +306,15 @@ class CTheScripts
static uint16 ScriptsUpdated;
static uint32 LastMissionPassedTime;
static uint16 NumberOfExclusiveMissionScripts;
+#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT)
+#define CARDS_IN_SUIT (13)
+#define NUM_SUITS (4)
+#define MAX_DECKS (6)
+#define CARDS_IN_DECK (CARDS_IN_SUIT * NUM_SUITS)
+#define CARDS_IN_STACK (CARDS_IN_DECK * MAX_DECKS)
+ static int16 CardStack[CARDS_IN_STACK];
+ static int16 CardStackPosition;
+#endif
public:
static bool bPlayerIsInTheStatium;
static uint8 RiotIntensity;
@@ -516,28 +543,7 @@ private:
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
- bool ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal) {
- switch (pedtype) {
- case PEDTYPE_CIVMALE:
- case PEDTYPE_CIVFEMALE:
- return civ;
- case PEDTYPE_GANG1:
- case PEDTYPE_GANG2:
- case PEDTYPE_GANG3:
- case PEDTYPE_GANG4:
- case PEDTYPE_GANG5:
- case PEDTYPE_GANG6:
- case PEDTYPE_GANG7:
- case PEDTYPE_GANG8:
- case PEDTYPE_GANG9:
- return gang;
- case PEDTYPE_CRIMINAL:
- case PEDTYPE_PROSTITUTE:
- return criminal;
- default:
- return false;
- }
- }
+ bool ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal);
bool CheckDamagedWeaponType(int32 actual, int32 type);
@@ -550,12 +556,16 @@ private:
extern int scriptToLoad;
#endif
#ifdef MISSION_REPLAY
+static_assert(false, "Mission replay is not supported");
extern int AllowMissionReplay;
extern uint32 WaitForMissionActivate;
extern uint32 WaitForSave;
extern uint32 MissionStartTime;
extern int missionRetryScriptIndex;
extern bool doingMissionRetry;
+extern bool gbTryingPorn4Again;
+extern int IsInAmmunation;
+extern int MissionSkipLevel;
uint32 AddExtraDeathDelay();
void RetryMission(int, int);