11/* ****************************************************************************
22 *
3- * PROJECT: Multi Theft Auto v1.0
3+ * PROJECT: Multi Theft Auto
44 * LICENSE: See LICENSE in the top level directory
55 * FILE: game_sa/C3DMarkerSA.h
66 * PURPOSE: Header file for 3D Marker entity class
77 *
8- * Multi Theft Auto is available from http ://www.multitheftauto.com/
8+ * Multi Theft Auto is available from https ://www.multitheftauto.com/
99 *
1010 *****************************************************************************/
1111
1212#pragma once
1313
1414#include < game/C3DMarker.h>
15- #include < CMatrix_Pad.h>
16-
17- class C3DMarkerSAInterface
18- {
19- public:
20- CMatrix_Padded m_mat; // local space to world space transform // 0
21- DWORD dwPad, dwPad2; // not sure why we need these, it appears to be this way though (eAi) // 64/68
22- RpClump* m_pRwObject; // 72
23- DWORD* m_pMaterial; // 76
24-
25- WORD m_nType; // 80
26- bool m_bIsUsed; // has this marker been allocated this frame? // 82
27- DWORD m_nIdentifier; // 84
28-
29- DWORD rwColour; // 88
30- WORD m_nPulsePeriod; // 92
31- short m_nRotateRate; // deg per frame (in either direction) // 94
32- DWORD m_nStartTime; // 96
33- float m_fPulseFraction; // 100
34- float m_fStdSize; // 104
35- float m_fSize; // 108
36- float m_fBrightness; // 112
37- float m_fCameraRange; // 116
38-
39- CVector m_normal; // Normal of the object point at // 120
40- // the following variables remember the last time we read the heigh of the
41- // map. Using this we don't have to do this every frame and we can still have moving markers.
42- WORD m_LastMapReadX, m_LastMapReadY; // 132 / 134
43- float m_LastMapReadResultZ; // 136
44- float m_roofHeight; // 140
45- CVector m_lastPosition; // 144
46- DWORD m_OnScreenTestTime; // time last screen check was done // 156
47- };
15+ #include " interfaces/C3DMarkerSAInterface.h"
4816
4917class C3DMarkerSA : public C3DMarker
5018{
@@ -55,16 +23,16 @@ class C3DMarkerSA : public C3DMarker
5523 C3DMarkerSA (C3DMarkerSAInterface* markerInterface) { internalInterface = markerInterface; };
5624
5725 C3DMarkerSAInterface* GetInterface () { return internalInterface; }
26+ C3DMarkerSAInterface* GetInterface () const { return internalInterface; }
5827
5928 void GetMatrix (CMatrix* pMatrix);
6029 void SetMatrix (CMatrix* pMatrix);
6130 void SetPosition (CVector* vecPosition);
6231 CVector* GetPosition ();
63- DWORD GetType (); // need enum?
64- void SetType (DWORD dwType ); // doesn't work propperly (not virtualed)
32+ e3DMarkerType GetType () const override ;
33+ void SetType (e3DMarkerType type ); // doesn't work propperly (not virtualed)
6534 bool IsActive ();
6635 DWORD GetIdentifier ();
67- SharedUtil::SColor GetColor ();
6836 void SetColor (const SharedUtil::SColor color); // actually BGRA
6937 void SetPulsePeriod (WORD wPulsePeriod);
7038 void SetRotateRate (short RotateRate);
@@ -78,5 +46,5 @@ class C3DMarkerSA : public C3DMarker
7846 void Disable ();
7947 void Reset ();
8048 void SetActive () { internalInterface->m_bIsUsed = true ; }
81- RpClump* GetRwObject () { return internalInterface->m_pRwObject ; }
49+ RpClump* GetRwObject () { return reinterpret_cast <RpClump*>( internalInterface->m_pRwObject ) ; }
8250};
0 commit comments