From a35b3b460271b7f465e3a4f0bba6e76814d294e3 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 24 Nov 2020 14:06:48 +0200 Subject: Script commands split to original files --- src/control/Script.h | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'src/control/Script.h') diff --git a/src/control/Script.h b/src/control/Script.h index c6ece50f..f7613d18 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; @@ -516,28 +534,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); -- cgit v1.2.3