Clear unknown in LegoControlManagerNotificationParam (#1633)

This commit is contained in:
Fabian Neundorf
2025-07-19 01:09:37 +02:00
committed by GitHub
parent cfd36ec88f
commit bd71370602
24 changed files with 31 additions and 31 deletions

View File

@@ -24,11 +24,11 @@ public:
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; }
void SetEnabledChild(MxS16 p_enabledChild) { m_enabledChild = p_enabledChild; }
MxS32 m_clickedObjectId; // 0x20
const char* m_clickedAtom; // 0x24
MxS16 m_unk0x28; // 0x28
MxS16 m_enabledChild; // 0x28
};
// SYNTHETIC: LEGO1 0x10028bf0

View File

@@ -437,7 +437,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_AmbulanceArms_Ctl:
Exit();
@@ -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.m_unk0x28);
presenter->Enable(p_param.m_enabledChild);
break;
}
}

View File

@@ -81,7 +81,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_BikeArms_Ctl:
Exit();
@@ -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.m_unk0x28);
presenter->Enable(p_param.m_enabledChild);
break;
}
}

View File

@@ -121,7 +121,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_DuneCarArms_Ctl:
Exit();
@@ -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.m_unk0x28);
presenter->Enable(p_param.m_enabledChild);
break;
}
}

View File

@@ -189,7 +189,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
break;
}
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
MxU32 isPizza = FALSE;
switch (p_param.m_clickedObjectId) {

View File

@@ -137,7 +137,7 @@ void Jetski::RemoveFromWorld()
// FUNCTION: LEGO1 0x1007e8e0
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1 && CurrentWorld()->IsA("Isle")) {
if (p_param.m_enabledChild == 1 && CurrentWorld()->IsA("Isle")) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_JetskiArms_Ctl:
Exit();

View File

@@ -115,7 +115,7 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_MotoBikeArms_Ctl:
Exit();

View File

@@ -110,7 +110,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxU32 result = 0;
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
if (p_param.m_enabledChild == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
Exit();
GameState()->m_currentArea = LegoGameState::Area::e_vehicleExited;
result = 1;

View File

@@ -483,7 +483,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case IsleScript::c_TowTrackArms_Ctl:
Exit();
@@ -499,7 +499,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.m_unk0x28);
presenter->Enable(p_param.m_enabledChild);
break;
}
}

View File

@@ -953,7 +953,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
LegoControlManagerNotificationParam* param = (LegoControlManagerNotificationParam*) p_param;
assert(m_buildState);
if (param->m_unk0x28) {
if (param->m_enabledChild) {
switch (param->m_clickedObjectId) {
// The enum values are all identical between CopterScript, DunecarScript, JetskiScript, and RacecarScript
case CopterScript::c_Info_Ctl:
@@ -1009,7 +1009,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
case CopterScript::c_Platform_Ctl:
FUN_10024f50();
m_unk0xf8 = c_unknown8;
m_unk0xfc = param->m_unk0x28;
m_unk0xfc = param->m_enabledChild;
result = 1;
break;
default:

View File

@@ -154,7 +154,7 @@ MxBool MxControlPresenter::Notify(LegoControlManagerNotificationParam* p_param,
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
UpdateEnabledChild(0);
p_param->SetNotification(c_notificationControl);
p_param->SetUnknown0x28(m_enabledChild);
p_param->SetEnabledChild(m_enabledChild);
return TRUE;
}
break;
@@ -164,7 +164,7 @@ MxBool MxControlPresenter::Notify(LegoControlManagerNotificationParam* p_param,
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
UpdateEnabledChild(m_stateOrCellIndex);
p_param->SetNotification(c_notificationControl);
p_param->SetUnknown0x28(m_enabledChild);
p_param->SetEnabledChild(m_enabledChild);
return TRUE;
}
break;

View File

@@ -335,7 +335,7 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
// FUNCTION: LEGO1 0x10017650
MxLong CarRace::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case 3:
InvokeAction(Extra::e_stop, *g_carraceScript, CarraceScript::c_irtx08ra_PlayWav, NULL);

View File

@@ -124,7 +124,7 @@ MxLong JetskiRace::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case JetraceScript::c_JetskiArms_Ctl:
m_act1State->m_state = Act1State::e_none;

View File

@@ -129,7 +129,7 @@ MxLong LegoRaceMap::Notify(MxParam& p_param)
if (param.GetNotification() == c_notificationControl &&
m_Map_Ctl->GetAction()->GetObjectId() == ((LegoControlManagerNotificationParam&) p_param).m_clickedObjectId) {
if (((LegoControlManagerNotificationParam&) p_param).m_unk0x28 == 1) {
if (((LegoControlManagerNotificationParam&) p_param).m_enabledChild == 1) {
m_unk0x08 = TRUE;
FUN_1005d4b0();
m_stillPresenter->Enable(TRUE);

View File

@@ -87,7 +87,7 @@ MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_para
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case ElevbottScript::c_LeftArrow_Ctl:
m_destLocation = LegoGameState::e_infodoor;

View File

@@ -387,7 +387,7 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param
// FUNCTION: BETA10 0x10029445
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
MxDSAction action;
switch (p_param.m_clickedObjectId) {

View File

@@ -553,7 +553,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
// FUNCTION: LEGO1 0x10075f90
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case HospitalScript::c_Info_Ctl:
BackgroundAudioManager()->RaiseVolume();

View File

@@ -941,7 +941,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
// FUNCTION: BETA10 0x1002ffd4
MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
m_infoManDialogueTimer = 0;
InfomainScript::Script actionToPlay = InfomainScript::c_noneInfomain;

View File

@@ -96,7 +96,7 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_para
{
MxLong result = 0;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
DeleteObjects(&m_atomId, InfodoorScript::c_iic037in_PlayWav, 510);
switch (p_param.m_clickedObjectId) {

View File

@@ -284,7 +284,7 @@ void Isle::ReadyWorld()
// FUNCTION: LEGO1 0x10031030
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
MxDSAction action;
switch (p_param.m_clickedObjectId) {

View File

@@ -123,7 +123,7 @@ MxBool JukeBox::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxStillPresenter* presenter;
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case JukeboxwScript::c_Dback_Ctl:
switch (m_state->m_music) {

View File

@@ -101,7 +101,7 @@ void Police::ReadyWorld()
// FUNCTION: LEGO1 0x1005e550
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
{
if (p_param.m_unk0x28 == 1) {
if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) {
case PoliceScript::c_LeftArrow_Ctl:
case PoliceScript::c_RightArrow_Ctl:

View File

@@ -226,7 +226,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
// FUNCTION: LEGO1 0x100774a0
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
{
MxS16 buttonId = p_param.m_unk0x28;
MxS16 buttonId = p_param.m_enabledChild;
if (buttonId >= 1 && buttonId <= 28) {
if (p_param.m_clickedObjectId == RegbookScript::c_Alphabet_Ctl) {

View File

@@ -165,7 +165,7 @@ void Score::ReadyWorld()
// FUNCTION: LEGO1 0x100016d0
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
{
MxS16 unk0x28 = p_param.m_unk0x28;
MxS16 unk0x28 = p_param.m_enabledChild;
if (unk0x28 == 1 || p_param.m_clickedObjectId == InfoscorScript::c_LegoBox_Ctl) {
switch (p_param.m_clickedObjectId) {