diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:53:42 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:53:42 +0100 |
commit | 043efaf082a8ce5010e6ff974afea05d8d66e9d1 (patch) | |
tree | 40115f81c6a4b4756743a36485eacd4b7a5607b9 /src/control/Garages.h | |
parent | Merge branch 'master' of https://github.com/Nick007J/re3 (diff) | |
download | re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.gz re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.bz2 re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.lz re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.xz re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.tar.zst re3-043efaf082a8ce5010e6ff974afea05d8d66e9d1.zip |
Diffstat (limited to 'src/control/Garages.h')
-rw-r--r-- | src/control/Garages.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/control/Garages.h b/src/control/Garages.h index 945922fe..8945e311 100644 --- a/src/control/Garages.h +++ b/src/control/Garages.h @@ -42,6 +42,11 @@ enum eGarageType : int8 GARAGE_MISSION_KEEPCAR_REMAINCLOSED, }; +enum +{ + TOTAL_COLLECTCARS_GARAGES = GARAGE_COLLECTCARS_3 - GARAGE_COLLECTCARS_1 + 1 +}; + class CStoredCar { int32 m_nModelIndex; @@ -64,6 +69,7 @@ static_assert(sizeof(CStoredCar) == 0x28, "CStoredCar"); class CGarage { +public: eGarageType m_eGarageType; eGarageState m_eGarageState; char field_2; @@ -101,9 +107,11 @@ class CGarage CVehicle *m_pTarget; int field_96; CStoredCar m_sStoredCar; -public: + void OpenThisGarage(); void CloseThisGarage(); + bool IsOpen() { return m_eGarageState == GS_OPENED || m_eGarageState == GS_OPENEDCONTAINSCAR; } + bool IsClosed() { return m_eGarageState == GS_FULLYCLOSED; } }; static_assert(sizeof(CGarage) == 140, "CGarage"); @@ -115,7 +123,7 @@ public: static bool &BombsAreFree; static bool &RespraysAreFree; static int32 &CarsCollected; - static int32 &CarTypesCollected; + static int32 (&CarTypesCollected)[TOTAL_COLLECTCARS_GARAGES]; static int32 &CrushedCarId; static uint32 &LastTimeHelpMessage; static int32 &MessageNumberInString; @@ -146,7 +154,14 @@ public: static void DeActivateGarage(int16); static int32 QueryCarsCollected(int16); static bool HasThisCarBeenCollected(int16, uint8); - static void ChangeGarageType(int16, eGarageType); + static void ChangeGarageType(int16, eGarageType, int32); static bool HasResprayHappened(int16); static void GivePlayerDetonator(); + static bool IsGarageOpen(int16); + static bool IsGarageClosed(int16); + static void SetGarageDoorToRotate(int16); + static bool HasImportExportGarageCollectedThisCar(int16, int8); + static void SetLeaveCameraForThisGarage(int16); + + static int GetCarsCollectedIndexForGarageType(eGarageType type) { return type - GARAGE_COLLECTCARS_1; } }; |