mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 02:14:18 +00:00
Match Infocenter::HandleControl (#1386)
* Add BETA10 references * Refactor non-existent getters * Infocenter::HandleControl maybe down to entropy * Rename variable * More refactoring * Refactor public variable * 100 % * Fix clang-format * Fix clang-format --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -437,8 +437,8 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_AmbulanceArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
@@ -454,7 +454,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_AmbulanceHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_BikeArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
@@ -97,7 +97,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_BikeHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +121,8 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_DuneCarArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
@@ -137,7 +137,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_DuneCarHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,8 @@ void Jetski::RemoveFromWorld()
|
||||
// FUNCTION: LEGO1 0x1007e8e0
|
||||
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_JetskiArms_Ctl:
|
||||
Exit();
|
||||
((IslePathActor*) UserActor())
|
||||
|
||||
@@ -115,8 +115,8 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_MotoBikeArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
||||
@@ -144,7 +144,7 @@ void Radio::Stop()
|
||||
MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxDSAction action; // Unused
|
||||
MxS32 objectId = p_param.GetClickedObjectId();
|
||||
MxS32 objectId = p_param.m_clickedObjectId;
|
||||
|
||||
if (objectId == IsleScript::c_Radio_Ctl) {
|
||||
if (m_state->IsActive()) {
|
||||
|
||||
@@ -110,7 +110,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
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();
|
||||
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
||||
result = 1;
|
||||
|
||||
@@ -482,8 +482,8 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_TowTrackArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
@@ -498,7 +498,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
break;
|
||||
case IsleScript::c_TowHorn_Ctl:
|
||||
MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user