diff options
author | aap <aap@papnet.eu> | 2019-08-04 00:31:00 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-08-04 00:31:00 +0200 |
commit | a3e3527a3b8f260db285c76dc1044baab8a2f773 (patch) | |
tree | 17869d4d50729e13497f7769679bdec0fef0a069 /src/vehicles/Heli.h | |
parent | Merge pull request #181 from Nick007J/master (diff) | |
download | re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.gz re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.bz2 re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.lz re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.xz re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.zst re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.zip |
Diffstat (limited to 'src/vehicles/Heli.h')
-rw-r--r-- | src/vehicles/Heli.h | 87 |
1 files changed, 85 insertions, 2 deletions
diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h index db873ae2..bb10345d 100644 --- a/src/vehicles/Heli.h +++ b/src/vehicles/Heli.h @@ -2,15 +2,98 @@ #include "Vehicle.h" +class CObject; + +enum eHeliNodes +{ + HELI_CHASSIS = 1, + HELI_TOPROTOR, + HELI_BACKROTOR, + HELI_TAIL, + HELI_TOPKNOT, + HELI_SKID_LEFT, + HELI_SKID_RIGHT, + NUM_HELI_NODES +}; + +enum +{ + HELI_RANDOM0, + HELI_RANDOM1, + HELI_SCRIPT, + HELI_CATALINA, + NUM_HELIS +}; + +enum +{ + HELI_TYPE_RANDOM, + HELI_TYPE_SCRIPT, + HELI_TYPE_CATALINA, +}; + + class CHeli : public CVehicle { public: // 0x288 - uint8 stuff[180]; + RwFrame *m_aHeliNodes[NUM_HELI_NODES]; + int8 m_heliStatus; + float m_fSearchLightX; + float m_fSearchLightY; + uint32 m_nExplosionTimer; + float m_fRotation; + float m_fAngularSpeed; + float m_fTargetZ; + float m_fSearchLightIntensity; + int8 m_nHeliId; + int8 m_heliType; + int8 m_pathState; + float m_aSearchLightHistoryX[6]; + float m_aSearchLightHistoryY[6]; + uint32 m_nSearchLightTimer; + uint32 m_nShootTimer; + uint32 m_nLastShotTime; + uint32 m_nBulletDamage; + float m_fRotorRotation; + float m_fHeliDustZ[8]; + uint32 m_nPoliceShoutTimer; + float m_fTargetOffset; + bool m_bTestRight; + + static CHeli **pHelis; //[NUM_HELIS] + static int16 &NumRandomHelis; + static uint32 &TestForNewRandomHelisTimer; + static int16 NumScriptHelis; // unused + static bool &CatalinaHeliOn; + static bool &CatalinaHasBeenShotDown; + static bool &ScriptHeliOn; - CHeli(int, uint8); + CHeli(int32 id, uint8 CreatedBy); CHeli* ctor(int, uint8); + // from CEntity + void SetModelIndex(uint32 id); + void ProcessControl(void); + void PreRender(void); + void Render(void); + + void PreRenderAlways(void); + CObject *SpawnFlyingComponent(int32 component); + + static void InitHelis(void); + static void UpdateHelis(void); static void SpecialHeliPreRender(void); + static bool TestRocketCollision(CVector *coors); + static bool TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, int32 damage); + + static void StartCatalinaFlyBy(void); + static void RemoveCatalinaHeli(void); + static CHeli *FindPointerToCatalinasHeli(void); + static void CatalinaTakeOff(void); + static void MakeCatalinaHeliFlyAway(void); + static bool HasCatalinaBeenShotDown(void); + + static void ActivateHeli(bool activate); }; static_assert(sizeof(CHeli) == 0x33C, "CHeli: error"); |