summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Garages.h')
-rw-r--r--src/control/Garages.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/control/Garages.h b/src/control/Garages.h
index e39a81fa..5d1063ca 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -45,7 +45,8 @@ enum eGarageType : int8
enum
{
- TOTAL_COLLECTCARS_GARAGES = GARAGE_COLLECTCARS_3 - GARAGE_COLLECTCARS_1 + 1
+ TOTAL_COLLECTCARS_GARAGES = GARAGE_COLLECTCARS_3 - GARAGE_COLLECTCARS_1 + 1,
+ TOTAL_COLLECTCARS_CARS = 16
};
class CStoredCar
@@ -66,6 +67,8 @@ class CStoredCar
int8 m_nCarBombType;
public:
void Init() { m_nModelIndex = 0; }
+ void Clear() { m_nModelIndex = 0; }
+ bool HasCar() { return m_nModelIndex != 0; }
CStoredCar(const CStoredCar& other);
void StoreCar(CVehicle*);
CVehicle* RestoreCar();
@@ -80,7 +83,7 @@ class CGarage
public:
eGarageType m_eGarageType;
eGarageState m_eGarageState;
- char field_2;
+ bool field_2;
bool m_bClosingWithoutTargetCar;
bool m_bDeactivated;
bool m_bResprayHappened;
@@ -109,13 +112,10 @@ public:
float m_fDoor1Z;
float m_fDoor2Z;
uint32 m_nTimeToStartAction;
- char m_bCollectedCarsState;
- char field_89;
- char field_90;
- char field_91;
+ uint8 m_bCollectedCarsState;
CVehicle *m_pTarget;
- int field_96;
- CStoredCar m_sStoredCar;
+ void* field_96;
+ CStoredCar m_sStoredCar; // not needed
void OpenThisGarage();
void CloseThisGarage();
@@ -125,7 +125,7 @@ public:
void Update();
float GetGarageCenterX() { return (m_fX1 + m_fX2) / 2; }
float GetGarageCenterY() { return (m_fY1 + m_fY2) / 2; }
- bool IsClose()
+ bool IsFar()
{
#ifdef FIX_BUGS
return Abs(TheCamera.GetPosition().x - GetGarageCenterX()) > SWITCH_GARAGE_DISTANCE_CLOSE ||
@@ -151,7 +151,7 @@ public:
bool IsAnyCarBlockingDoor();
void CenterCarInGarage(CVehicle*);
bool DoesCraigNeedThisCar(int32);
- void MarkThisCarAsCollectedForCraig(int32);
+ bool MarkThisCarAsCollectedForCraig(int32);
bool HasCraigCollectedThisCar(int32);
bool IsGarageEmpty();
void UpdateCrusherShake(float, float);
@@ -181,7 +181,7 @@ public:
static int32 &CrushedCarId;
static uint32 &LastTimeHelpMessage;
static int32 &MessageNumberInString;
- static const char *MessageIDString;
+ static char(&MessageIDString)[8];
static int32 &MessageNumberInString2;
static uint32 &MessageStartTime;
static uint32 &MessageEndTime;