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.cpp | |
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 '')
-rw-r--r-- | src/control/Garages.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index dc77a154..a1d5f94b 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -14,7 +14,7 @@ int32 &CGarages::BankVansCollected = *(int32 *)0x8F1B34; bool &CGarages::BombsAreFree = *(bool *)0x95CD7A; bool &CGarages::RespraysAreFree = *(bool *)0x95CD1D; int32 &CGarages::CarsCollected = *(int32 *)0x880E18; -int32 &CGarages::CarTypesCollected = *(int32 *)0x8E286C; +int32 (&CGarages::CarTypesCollected)[TOTAL_COLLECTCARS_GARAGES] = *(int32 (*)[TOTAL_COLLECTCARS_GARAGES])(uintptr*)0x8E286C; int32 &CGarages::CrushedCarId = *(int32 *)0x943060; uint32 &CGarages::LastTimeHelpMessage = *(uint32 *)0x8F1B58; int32 &CGarages::MessageNumberInString = *(int32 *)0x885BA8; @@ -97,7 +97,7 @@ void CGarages::GivePlayerDetonator() } WRAPPER bool CGarages::HasThisCarBeenCollected(int16 garage, uint8 id) { EAXJMP(0x426D50); } -WRAPPER void CGarages::ChangeGarageType(int16 garage, eGarageType type) { EAXJMP(0x4222A0); } +WRAPPER void CGarages::ChangeGarageType(int16 garage, eGarageType type, int32 mi) { EAXJMP(0x4222A0); } WRAPPER bool CGarages::HasResprayHappened(int16 garage) { EAXJMP(0x4274F0); } void CGarage::OpenThisGarage() @@ -106,12 +106,41 @@ void CGarage::OpenThisGarage() m_eGarageState = GS_OPENING; } +bool CGarages::IsGarageOpen(int16 garage) +{ + return Garages[garage].IsOpen(); +} + +bool CGarages::IsGarageClosed(int16 garage) +{ + return Garages[garage].IsClosed(); +} + void CGarage::CloseThisGarage() { if (m_eGarageState == GS_OPENED || m_eGarageState == GS_OPENING) m_eGarageState = GS_CLOSING; } +void CGarages::SetGarageDoorToRotate(int16 garage) +{ + if (Garages[garage].m_bRotatedDoor) + return; + Garages[garage].m_bRotatedDoor = true; + Garages[garage].m_fDoorHeight /= 2.0f; + Garages[garage].m_fDoorHeight -= 0.1f; +} + +bool CGarages::HasImportExportGarageCollectedThisCar(int16 garage, int8 car) +{ + return CarTypesCollected[GetCarsCollectedIndexForGarageType(Garages[garage].m_eGarageType)] & (1 << car); +} + +void CGarages::SetLeaveCameraForThisGarage(int16 garage) +{ + Garages[garage].m_bCameraFollowsPlayer = true; +} + #if 0 WRAPPER void CGarages::PrintMessages(void) { EAXJMP(0x426310); } #else |