mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Refactor non-existent getters
This commit is contained in:
parent
af47737e81
commit
4cccf35d4a
@ -20,9 +20,7 @@ class LegoControlManagerNotificationParam : public LegoEventNotificationParam {
|
|||||||
|
|
||||||
// TODO: Most likely getters/setters are not used according to BETA.
|
// TODO: Most likely getters/setters are not used according to BETA.
|
||||||
|
|
||||||
MxS32 GetClickedObjectId() const { return m_clickedObjectId; }
|
|
||||||
const char* GetClickedAtom() const { return m_clickedAtom; }
|
const char* GetClickedAtom() const { return m_clickedAtom; }
|
||||||
MxS16 GetUnknown0x28() const { return m_unk0x28; }
|
|
||||||
|
|
||||||
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
|
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
|
||||||
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
||||||
|
|||||||
@ -437,8 +437,8 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_AmbulanceArms_Ctl:
|
case IsleScript::c_AmbulanceArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||||
@ -454,7 +454,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
case IsleScript::c_AmbulanceHorn_Ctl:
|
case IsleScript::c_AmbulanceHorn_Ctl:
|
||||||
MxSoundPresenter* presenter =
|
MxSoundPresenter* presenter =
|
||||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
|
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
|
||||||
presenter->Enable(p_param.GetUnknown0x28());
|
presenter->Enable(p_param.m_unk0x28);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,8 +81,8 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_BikeArms_Ctl:
|
case IsleScript::c_BikeArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||||
@ -97,7 +97,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
case IsleScript::c_BikeHorn_Ctl:
|
case IsleScript::c_BikeHorn_Ctl:
|
||||||
MxSoundPresenter* presenter =
|
MxSoundPresenter* presenter =
|
||||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
|
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
|
||||||
presenter->Enable(p_param.GetUnknown0x28());
|
presenter->Enable(p_param.m_unk0x28);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,8 +121,8 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_DuneCarArms_Ctl:
|
case IsleScript::c_DuneCarArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||||
@ -137,7 +137,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
case IsleScript::c_DuneCarHorn_Ctl:
|
case IsleScript::c_DuneCarHorn_Ctl:
|
||||||
MxSoundPresenter* presenter =
|
MxSoundPresenter* presenter =
|
||||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
|
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
|
||||||
presenter->Enable(p_param.GetUnknown0x28());
|
presenter->Enable(p_param.m_unk0x28);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,8 +137,8 @@ void Jetski::RemoveFromWorld()
|
|||||||
// FUNCTION: LEGO1 0x1007e8e0
|
// FUNCTION: LEGO1 0x1007e8e0
|
||||||
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (p_param.GetUnknown0x28() == 1 && CurrentWorld()->IsA("Isle")) {
|
if (p_param.m_unk0x28 == 1 && CurrentWorld()->IsA("Isle")) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_JetskiArms_Ctl:
|
case IsleScript::c_JetskiArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
((IslePathActor*) UserActor())
|
((IslePathActor*) UserActor())
|
||||||
|
|||||||
@ -115,8 +115,8 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_MotoBikeArms_Ctl:
|
case IsleScript::c_MotoBikeArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||||
|
|||||||
@ -144,7 +144,7 @@ void Radio::Stop()
|
|||||||
MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
MxDSAction action; // Unused
|
MxDSAction action; // Unused
|
||||||
MxS32 objectId = p_param.GetClickedObjectId();
|
MxS32 objectId = p_param.m_clickedObjectId;
|
||||||
|
|
||||||
if (objectId == IsleScript::c_Radio_Ctl) {
|
if (objectId == IsleScript::c_Radio_Ctl) {
|
||||||
if (m_state->IsActive()) {
|
if (m_state->IsActive()) {
|
||||||
|
|||||||
@ -110,7 +110,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxU32 result = 0;
|
MxU32 result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1 && p_param.GetClickedObjectId() == IsleScript::c_SkateArms_Ctl) {
|
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|||||||
@ -482,8 +482,8 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_TowTrackArms_Ctl:
|
case IsleScript::c_TowTrackArms_Ctl:
|
||||||
Exit();
|
Exit();
|
||||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||||
@ -498,7 +498,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||||||
break;
|
break;
|
||||||
case IsleScript::c_TowHorn_Ctl:
|
case IsleScript::c_TowHorn_Ctl:
|
||||||
MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
|
MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
|
||||||
presenter->Enable(p_param.GetUnknown0x28());
|
presenter->Enable(p_param.m_unk0x28);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -185,7 +185,7 @@ MxBool LegoControlManager::FUN_10029630()
|
|||||||
|
|
||||||
while (cursor.Next(presenter)) {
|
while (cursor.Next(presenter)) {
|
||||||
if (((MxControlPresenter*) presenter)->FUN_10044480(&m_event, m_unk0x14)) {
|
if (((MxControlPresenter*) presenter)->FUN_10044480(&m_event, m_unk0x14)) {
|
||||||
g_unk0x100f31b0 = m_event.GetClickedObjectId();
|
g_unk0x100f31b0 = m_event.m_clickedObjectId;
|
||||||
g_unk0x100f31b4 = m_event.GetClickedAtom();
|
g_unk0x100f31b4 = m_event.GetClickedAtom();
|
||||||
FUN_100292e0();
|
FUN_100292e0();
|
||||||
m_unk0x08 = 1;
|
m_unk0x08 = 1;
|
||||||
|
|||||||
@ -128,9 +128,9 @@ MxLong LegoRaceMap::Notify(MxParam& p_param)
|
|||||||
|
|
||||||
if (param.GetNotification() == c_notificationControl &&
|
if (param.GetNotification() == c_notificationControl &&
|
||||||
m_Map_Ctl->GetAction()->GetObjectId() ==
|
m_Map_Ctl->GetAction()->GetObjectId() ==
|
||||||
((LegoControlManagerNotificationParam&) p_param).GetClickedObjectId()) {
|
((LegoControlManagerNotificationParam&) p_param).m_clickedObjectId) {
|
||||||
|
|
||||||
if (((LegoControlManagerNotificationParam&) p_param).GetUnknown0x28() == 1) {
|
if (((LegoControlManagerNotificationParam&) p_param).m_unk0x28 == 1) {
|
||||||
m_unk0x08 = TRUE;
|
m_unk0x08 = TRUE;
|
||||||
FUN_1005d4b0();
|
FUN_1005d4b0();
|
||||||
m_stillPresenter->Enable(TRUE);
|
m_stillPresenter->Enable(TRUE);
|
||||||
|
|||||||
@ -87,8 +87,8 @@ MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_para
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case ElevbottScript::c_LeftArrow_Ctl:
|
case ElevbottScript::c_LeftArrow_Ctl:
|
||||||
m_destLocation = LegoGameState::e_infodoor;
|
m_destLocation = LegoGameState::e_infodoor;
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
|||||||
@ -387,10 +387,10 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param
|
|||||||
// FUNCTION: BETA10 0x10029445
|
// FUNCTION: BETA10 0x10029445
|
||||||
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
MxDSAction action;
|
MxDSAction action;
|
||||||
|
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case GarageScript::c_LeftArrow_Ctl:
|
case GarageScript::c_LeftArrow_Ctl:
|
||||||
case GarageScript::c_RightArrow_Ctl:
|
case GarageScript::c_RightArrow_Ctl:
|
||||||
m_state->m_unk0x14 = 0;
|
m_state->m_unk0x14 = 0;
|
||||||
|
|||||||
@ -553,8 +553,8 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||||||
// FUNCTION: LEGO1 0x10075f90
|
// FUNCTION: LEGO1 0x10075f90
|
||||||
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case HospitalScript::c_Info_Ctl:
|
case HospitalScript::c_Info_Ctl:
|
||||||
BackgroundAudioManager()->RaiseVolume();
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
|
DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
|
||||||
|
|||||||
@ -96,10 +96,10 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_para
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
DeleteObjects(&m_atomId, InfodoorScript::c_iic037in_PlayWav, 510);
|
DeleteObjects(&m_atomId, InfodoorScript::c_iic037in_PlayWav, 510);
|
||||||
|
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case InfodoorScript::c_LeftArrow_Ctl:
|
case InfodoorScript::c_LeftArrow_Ctl:
|
||||||
m_destLocation = LegoGameState::e_infoscor;
|
m_destLocation = LegoGameState::e_infoscor;
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
|||||||
@ -289,10 +289,10 @@ void Isle::ReadyWorld()
|
|||||||
// FUNCTION: LEGO1 0x10031030
|
// FUNCTION: LEGO1 0x10031030
|
||||||
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
MxDSAction action;
|
MxDSAction action;
|
||||||
|
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case IsleScript::c_ElevRide_Info_Ctl:
|
case IsleScript::c_ElevRide_Info_Ctl:
|
||||||
m_act1state->m_unk0x018 = 2;
|
m_act1state->m_unk0x018 = 2;
|
||||||
|
|
||||||
|
|||||||
@ -101,8 +101,8 @@ void Police::ReadyWorld()
|
|||||||
// FUNCTION: LEGO1 0x1005e550
|
// FUNCTION: LEGO1 0x1005e550
|
||||||
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (p_param.GetUnknown0x28() == 1) {
|
if (p_param.m_unk0x28 == 1) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case PoliceScript::c_LeftArrow_Ctl:
|
case PoliceScript::c_LeftArrow_Ctl:
|
||||||
case PoliceScript::c_RightArrow_Ctl:
|
case PoliceScript::c_RightArrow_Ctl:
|
||||||
if (m_policeState->GetUnknown0x0c() == 1) {
|
if (m_policeState->GetUnknown0x0c() == 1) {
|
||||||
|
|||||||
@ -226,10 +226,10 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
|||||||
// FUNCTION: LEGO1 0x100774a0
|
// FUNCTION: LEGO1 0x100774a0
|
||||||
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
MxS16 unk0x28 = p_param.m_unk0x28;
|
||||||
|
|
||||||
if (unk0x28 >= 1 && unk0x28 <= 28) {
|
if (unk0x28 >= 1 && unk0x28 <= 28) {
|
||||||
if (p_param.GetClickedObjectId() == RegbookScript::c_Alphabet_Ctl) {
|
if (p_param.m_clickedObjectId == RegbookScript::c_Alphabet_Ctl) {
|
||||||
if (unk0x28 == 28) {
|
if (unk0x28 == 28) {
|
||||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
|||||||
|
|
||||||
MxS16 i;
|
MxS16 i;
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
if (m_checkmark[i]->GetAction()->GetObjectId() == p_param.GetClickedObjectId()) {
|
if (m_checkmark[i]->GetAction()->GetObjectId() == p_param.m_clickedObjectId) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,10 +165,10 @@ void Score::ReadyWorld()
|
|||||||
// FUNCTION: LEGO1 0x100016d0
|
// FUNCTION: LEGO1 0x100016d0
|
||||||
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
MxS16 unk0x28 = p_param.m_unk0x28;
|
||||||
|
|
||||||
if (unk0x28 == 1 || p_param.GetClickedObjectId() == InfoscorScript::c_LegoBox_Ctl) {
|
if (unk0x28 == 1 || p_param.m_clickedObjectId == InfoscorScript::c_LegoBox_Ctl) {
|
||||||
switch (p_param.GetClickedObjectId()) {
|
switch (p_param.m_clickedObjectId) {
|
||||||
case InfoscorScript::c_LeftArrow_Ctl:
|
case InfoscorScript::c_LeftArrow_Ctl:
|
||||||
m_destLocation = LegoGameState::e_infomain;
|
m_destLocation = LegoGameState::e_infomain;
|
||||||
DeleteScript();
|
DeleteScript();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user