summaryrefslogtreecommitdiffstats
path: root/src/render/WaterCreatures.h
diff options
context:
space:
mode:
authormajestic <majesticcoding@gmail.com>2020-10-08 03:43:50 +0200
committermajestic <majesticcoding@gmail.com>2020-10-08 14:59:08 +0200
commit7861992fe6c8bc02600917c80053e08d9dcaa501 (patch)
tree29d12a69b0817b3989bacb153e111484b0a043db /src/render/WaterCreatures.h
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
downloadre3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar.gz
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar.bz2
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar.lz
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar.xz
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.tar.zst
re3-7861992fe6c8bc02600917c80053e08d9dcaa501.zip
Diffstat (limited to '')
-rw-r--r--src/render/WaterCreatures.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/render/WaterCreatures.h b/src/render/WaterCreatures.h
new file mode 100644
index 00000000..b935b11d
--- /dev/null
+++ b/src/render/WaterCreatures.h
@@ -0,0 +1,49 @@
+#pragma once
+#include "Object.h"
+
+enum {
+ WATER_CREATURE_ALLOCATED = 0,
+ WATER_CREATURE_ACTIVE,
+ WATER_CREATURE_UPDATE,
+ WATER_CREATURE_TO_REMOVE,
+ WATER_CREATURE_DISABLED
+};
+
+class CWaterCreature {
+public:
+ CObject *m_pObj;
+ float m_fRightMult;
+ float m_fZTurnSpeed;
+ int32 m_alpha;
+ float m_fWaterDepth;
+ int32 m_state;
+
+ CWaterCreature();
+ ~CWaterCreature();
+ void Allocate(CObject *pObj, float fRightMult, float fZTurnSpeed, float fWaterDepth, uint32 alpha, int eFishSlotState);
+ void Free();
+ void Initialise(CObject *pObj, float fRightMult, float fZTurnSpeed, float fWaterDepth, uint32 alpha, int eFishSlotState);
+};
+
+class CWaterCreatures {
+
+public:
+ static CWaterCreature aWaterCreatures[NUM_WATER_CREATURES];
+ static int32 nNumActiveSeaLifeForms;
+ static CObject *CreateSeaLifeForm(CVector pos, int16 modelID, float zRotAngle);
+ static void CreateOne(CVector pos, int16 modelID);
+ static void UpdateAll();
+ static void FreeFishStructSlot(CWaterCreature *wc);
+ static bool IsSpaceForMoreWaterCreatures();
+ static float CalculateFishHeading(CVector const& pos1, CVector const& pos2);
+ static void RemoveAll();
+ static CWaterCreature* GetFishStructSlot();
+};
+
+struct WaterCreatureProperties {
+ int16 *modelID;
+ float fRightMult;
+ float fLevel;
+ float fUnk2;
+ float fWaterDepth;
+}; \ No newline at end of file