summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-01-20 17:53:21 +0100
committerSergeanur <s.anureev@yandex.ua>2020-01-20 17:59:28 +0100
commitd52452e69f8dcf8df6fcc16dd841110c26ec18fa (patch)
treec0199ec20103ebb88060c9c8d8137d43bb41474d /src
parentTwo audio structs renamed to their original names (diff)
downloadre3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar.gz
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar.bz2
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar.lz
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar.xz
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.tar.zst
re3-d52452e69f8dcf8df6fcc16dd841110c26ec18fa.zip
Diffstat (limited to 'src')
-rw-r--r--src/control/PowerPoints.cpp22
-rw-r--r--src/control/PowerPoints.h26
-rw-r--r--src/control/Script.cpp37
3 files changed, 84 insertions, 1 deletions
diff --git a/src/control/PowerPoints.cpp b/src/control/PowerPoints.cpp
new file mode 100644
index 00000000..4bc773a9
--- /dev/null
+++ b/src/control/PowerPoints.cpp
@@ -0,0 +1,22 @@
+#include "common.h"
+#include "PowerPoints.h"
+
+// Some cut beta feature
+
+void CPowerPoint::Update()
+{}
+
+void CPowerPoints::Init()
+{}
+
+void CPowerPoints::Update()
+{}
+
+void CPowerPoints::GenerateNewOne(float, float, float, float, float, float, uint8)
+{}
+
+void CPowerPoints::Save(uint8**, uint32*)
+{}
+
+void CPowerPoints::Load(uint8*, uint32)
+{} \ No newline at end of file
diff --git a/src/control/PowerPoints.h b/src/control/PowerPoints.h
new file mode 100644
index 00000000..d7478076
--- /dev/null
+++ b/src/control/PowerPoints.h
@@ -0,0 +1,26 @@
+#pragma once
+
+enum
+{
+ POWERPOINT_NONE = 0,
+ POWERPOINT_HEALTH,
+ POWERPOINT_HIDEOUT_INDUSTRIAL,
+ POWERPOINT_HIDEOUT_COMMERCIAL,
+ POWERPOINT_HIDEOUT_SUBURBAN
+};
+
+class CPowerPoint
+{
+public:
+ void Update();
+};
+
+class CPowerPoints
+{
+public:
+ static void Init();
+ static void Update();
+ static void GenerateNewOne(float, float, float, float, float, float, uint8);
+ static void Save(uint8**, uint32*);
+ static void Load(uint8*, uint32);
+}; \ No newline at end of file
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index f3f9c5a8..f74c5656 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -40,6 +40,7 @@
#include "PointLights.h"
#include "Pools.h"
#include "Population.h"
+#include "PowerPoints.h"
#include "ProjectileInfo.h"
#include "Record.h"
#include "Remote.h"
@@ -4684,7 +4685,41 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
CollectParameters(&m_nIp, 1);
CGarages::BombsAreFree = (ScriptParams[0] != 0);
return 0;
- //case COMMAND_SET_POWERPOINT:
+#ifdef GTA_PS2
+ case COMMAND_SET_POWERPOINT:
+ {
+ CollectParameters(&m_nIp, 7);
+ float f1 = *(float*)&ScriptParams[0];
+ float f2 = *(float*)&ScriptParams[1];
+ float f3 = *(float*)&ScriptParams[2];
+ float f4 = *(float*)&ScriptParams[3];
+ float f5 = *(float*)&ScriptParams[4];
+ float f6 = *(float*)&ScriptParams[5];
+ float temp;
+
+ if (f1 > f4) {
+ temp = f1;
+ f1 = f4;
+ f4 = temp;
+ }
+
+ if (f2 > f5) {
+ temp = f2;
+ f2 = f5;
+ f5 = temp;
+ }
+
+ if (f3 > f6) {
+ temp = f3;
+ f3 = f6;
+ f6 = temp;
+ }
+
+ CPowerPoints::GenerateNewOne(f1, f2, f3, f4, f5, f6, *(uint8*)&ScriptParams[6]);
+
+ return 0;
+ }
+#endif // GTA_PS2
case COMMAND_SET_ALL_TAXI_LIGHTS:
CollectParameters(&m_nIp, 1);
CAutomobile::SetAllTaxiLights(ScriptParams[0] != 0);