summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-24 13:06:48 +0100
committerSergeanur <s.anureev@yandex.ua>2020-11-24 13:06:48 +0100
commita35b3b460271b7f465e3a4f0bba6e76814d294e3 (patch)
tree6d6c4256994f0a11c1b9d5584ab35d26b90df1fe /src/control/Script.h
parentXbox message screen, disabled by default (diff)
downloadre3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar.gz
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar.bz2
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar.lz
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar.xz
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.tar.zst
re3-a35b3b460271b7f465e3a4f0bba6e76814d294e3.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.h43
1 files changed, 20 insertions, 23 deletions
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);