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.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/control/Garages.h b/src/control/Garages.h
index 00020eb3..a7dfa462 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -1,13 +1,12 @@
#pragma once
-#include "Automobile.h"
#include "audio_enums.h"
#include "Camera.h"
#include "config.h"
+#include "Lists.h"
class CVehicle;
-class CCamera;
-enum eGarageState : int8
+enum eGarageState
{
GS_FULLYCLOSED,
GS_OPENED,
@@ -18,7 +17,7 @@ enum eGarageState : int8
GS_AFTERDROPOFF,
};
-enum eGarageType : int8
+enum eGarageType
{
GARAGE_NONE,
GARAGE_MISSION,
@@ -81,8 +80,9 @@ VALIDATE_SIZE(CStoredCar, 0x28);
class CGarage
{
- eGarageType m_eGarageType;
- eGarageState m_eGarageState;
+public:
+ uint8 m_eGarageType;
+ uint8 m_eGarageState;
bool field_2; // unused
bool m_bClosingWithoutTargetCar;
bool m_bDeactivated;
@@ -166,10 +166,11 @@ class CGarage
void FindDoorsEntities();
void FindDoorsEntitiesSectorList(CPtrList&, bool);
void PlayerArrestedOrDied();
+ bool Does60SecondsNeedThisCarAtAll(int mi);
+ bool Does60SecondsNeedThisCar(int mi);
+ void MarkThisCarAsCollectedFor60Seconds(int mi);
+ bool IsPlayerEntirelyInsideGarage();
- friend class CGarages;
- friend class cAudioManager;
- friend class CCamera;
};
VALIDATE_SIZE(CGarage, 140);
@@ -179,6 +180,7 @@ class CGarages
enum {
MESSAGE_LENGTH = 8
};
+public:
static int32 BankVansCollected;
static bool BombsAreFree;
static bool RespraysAreFree;
@@ -198,18 +200,16 @@ class CGarages
static CStoredCar aCarsInSafeHouse1[NUM_GARAGE_STORED_CARS];
static CStoredCar aCarsInSafeHouse2[NUM_GARAGE_STORED_CARS];
static CStoredCar aCarsInSafeHouse3[NUM_GARAGE_STORED_CARS];
- static int32 AudioEntity;
static bool bCamShouldBeOutisde;
-public:
static void Init(void);
#ifndef PS2
static void Shutdown(void);
#endif
static void Update(void);
- static int16 AddOne(float X1, float Y1, float Z1, float X2, float Y2, float Z2, eGarageType type, int32 targetId);
- static void ChangeGarageType(int16, eGarageType, int32);
+ static int16 AddOne(CVector pos1, CVector pos2, uint8 type, int32 targetId);
+ static void ChangeGarageType(int16, uint8, int32);
static void PrintMessages(void);
static void TriggerMessage(const char* text, int16, uint16 time, int16);
static void SetTargetCarForMissonGarage(int16, CVehicle*);
@@ -240,16 +240,14 @@ public:
static bool IsModelIndexADoor(uint32 id);
static void SetFreeBombs(bool bValue) { BombsAreFree = bValue; }
static void SetFreeResprays(bool bValue) { RespraysAreFree = bValue; }
+ static void StopCarFromBlowingUp(CAutomobile*);
-private:
static bool IsCarSprayable(CVehicle*);
static float FindDoorHeightForMI(int32);
static void CloseHideOutGaragesBeforeSave(void);
- static int32 CountCarsInHideoutGarage(eGarageType);
- static int32 FindMaxNumStoredCarsForGarage(eGarageType);
- static int32 GetBombTypeForGarageType(eGarageType type) { return type - GARAGE_BOMBSHOP1 + 1; }
- static int32 GetCarsCollectedIndexForGarageType(eGarageType type) { return type - GARAGE_COLLECTCARS_1; }
+ static int32 CountCarsInHideoutGarage(uint8);
+ static int32 FindMaxNumStoredCarsForGarage(uint8);
+ static int32 GetBombTypeForGarageType(uint8 type) { return type - GARAGE_BOMBSHOP1 + 1; }
+ static int32 GetCarsCollectedIndexForGarageType(uint8 type) { return type - GARAGE_COLLECTCARS_1; }
- friend class cAudioManager;
- friend class CGarage;
};