diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-01-03 19:48:13 +0300 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-01-03 19:48:13 +0300 |
commit | 0723dade768ad6118db00c7bb908f39949fb7970 (patch) | |
tree | a477b1f04fe92af9619cb8495518691aa409abba /src/control/Garages.cpp | |
parent | 42ff0f7c586b6700dea7729e9f4e1fa5bd42fc96 (diff) |
script 800-899
Diffstat (limited to 'src/control/Garages.cpp')
-rw-r--r-- | src/control/Garages.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index ca1dae1b..dc77a154 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -6,7 +6,9 @@ #include "Timer.h" #include "Font.h" #include "Messages.h" +#include "PlayerPed.h" #include "Text.h" +#include "World.h" int32 &CGarages::BankVansCollected = *(int32 *)0x8F1B34; bool &CGarages::BombsAreFree = *(bool *)0x95CD7A; @@ -25,6 +27,8 @@ bool &CGarages::PlayerInGarage = *(bool *)0x95CD83; int32 &CGarages::PoliceCarsCollected = *(int32 *)0x941444; uint32 &CGarages::GarageToBeTidied = *(uint32 *)0x623570; +CGarage(&CGarages::Garages)[NUM_GARAGES] = *(CGarage(*)[NUM_GARAGES])(uintptr*)0x72BCD0; + WRAPPER void CGarages::Init(void) { EAXJMP(0x421C60); } WRAPPER void CGarages::Update(void) { EAXJMP(0x421E40); } @@ -86,8 +90,27 @@ int32 CGarages::QueryCarsCollected(int16 garage) return 0; } +void CGarages::GivePlayerDetonator() +{ + FindPlayerPed()->GiveWeapon(WEAPONTYPE_DETONATOR, 1); + FindPlayerPed()->m_weapons[FindPlayerPed()->GetWeaponSlot(WEAPONTYPE_DETONATOR)].m_eWeaponState = WEAPONSTATE_READY; +} + WRAPPER bool CGarages::HasThisCarBeenCollected(int16 garage, uint8 id) { EAXJMP(0x426D50); } -WRAPPER void CGarages::ChangeGarageType(int16 garage, int8 type) { EAXJMP(0x4222A0); } +WRAPPER void CGarages::ChangeGarageType(int16 garage, eGarageType type) { EAXJMP(0x4222A0); } +WRAPPER bool CGarages::HasResprayHappened(int16 garage) { EAXJMP(0x4274F0); } + +void CGarage::OpenThisGarage() +{ + if (m_eGarageState == GS_FULLYCLOSED || m_eGarageState == GS_CLOSING || m_eGarageState == GS_CLOSEDCONTAINSCAR) + m_eGarageState = GS_OPENING; +} + +void CGarage::CloseThisGarage() +{ + if (m_eGarageState == GS_OPENED || m_eGarageState == GS_OPENING) + m_eGarageState = GS_CLOSING; +} #if 0 WRAPPER void CGarages::PrintMessages(void) { EAXJMP(0x426310); } |