summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-10 20:58:06 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-10 20:58:06 +0100
commit75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4 (patch)
treece37e57e645c0b33e1f1d4f645505ed34e09e6d7 /src/control/Script.h
parentenv map rendering (diff)
downloadre3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar.gz
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar.bz2
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar.lz
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar.xz
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.tar.zst
re3-75d1715442e2e21a6f7841e49b4b4b2bd8c4c0b4.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 3220a2b3..60902563 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -47,6 +47,14 @@ void FlushLog();
#define KEY_LENGTH_IN_SCRIPT (8)
+#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)))
+
+#define SET_INTEGER_PARAM(i, x) ScriptParams[i] = x
+#define SET_FLOAT_PARAM(i, x) *(float*)&ScriptParams[i] = x
+#define SET_VECTOR_PARAM(i, v) { *(float*)&ScriptParams[i] = (v).x; *(float*)&ScriptParams[i+1] = (v).y; *(float*)&ScriptParams[i+2] = (v).z; }
+
#define GTA_SCRIPT_COLLECTIVE
struct intro_script_rectangle