push changes

This commit is contained in:
Misha 2024-01-20 08:38:20 -05:00
parent b19807cb14
commit 24c10f5cd9
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
7 changed files with 119 additions and 29 deletions

View File

@ -40,6 +40,8 @@ class ElevatorBottom : public LegoWorld {
private: private:
undefined4 m_unk0xf8; // 0xf8 undefined4 m_unk0xf8; // 0xf8
MxLong HandleNotification17(MxParam& p_param);
}; };
#endif // ELEVATORBOTTOM_H #endif // ELEVATORBOTTOM_H

View File

@ -170,10 +170,10 @@ class Infocenter : public LegoWorld {
InfocenterUnkDataEntry m_entries[7]; // 0x120 InfocenterUnkDataEntry m_entries[7]; // 0x120
MxS16 m_unk0x1c8; // 0x1c8 MxS16 m_unk0x1c8; // 0x1c8
undefined4 m_unk0x1cc; // 0x1cc undefined4 m_unk0x1cc; // 0x1cc
MxU16 m_unk0x1d0; // 0x1d0 MxS16 m_infoManDialogueTimer; // 0x1d0
MxU16 m_unk0x1d2; // 0x1d2 MxS16 m_bookAnimationTimer; // 0x1d2
MxU16 m_unk0x1d4; // 0x1d4 MxU16 m_unk0x1d4; // 0x1d4
MxU16 m_unk0x1d6; // 0x1d6 MxS16 m_unk0x1d6; // 0x1d6
}; };
#endif // INFOCENTER_H #endif // INFOCENTER_H

View File

@ -36,6 +36,9 @@ class InfocenterDoor : public LegoWorld {
// SYNTHETIC: LEGO1 0x100378d0 // SYNTHETIC: LEGO1 0x100378d0
// InfocenterDoor::`scalar deleting destructor' // InfocenterDoor::`scalar deleting destructor'
private:
MxS32 m_unk0xf8;
}; };
#endif // INFOCENTERDOOR_H #endif // INFOCENTERDOOR_H

View File

@ -43,11 +43,23 @@ MxResult ElevatorBottom::Create(MxDSAction& p_dsAction)
return result; return result;
} }
// STUB: LEGO1 0x10018150 // FUNCTION: LEGO1 0x10018150
MxLong ElevatorBottom::Notify(MxParam& p_param) MxLong ElevatorBottom::Notify(MxParam& p_param)
{ {
// TODO MxLong ret = 0;
return LegoWorld::Notify(p_param); LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetType()) {
case c_notificationType17:
ret = HandleNotification17(p_param);
break;
case c_notificationTransitioned:
GameState()->HandleAction(m_unk0xf8);
break;
}
}
return ret;
} }
// FUNCTION: LEGO1 0x100181b0 // FUNCTION: LEGO1 0x100181b0
@ -58,6 +70,12 @@ void ElevatorBottom::VTable0x50()
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
// STUB: LEGO1 0x100181d0
MxLong ElevatorBottom::HandleNotification17(MxParam& p_param)
{
return 0;
}
// FUNCTION: LEGO1 0x100182c0 // FUNCTION: LEGO1 0x100182c0
void ElevatorBottom::VTable0x68(MxBool p_add) void ElevatorBottom::VTable0x68(MxBool p_add)
{ {

View File

@ -41,8 +41,8 @@ Infocenter::Infocenter()
SetAppCursor(1); SetAppCursor(1);
NotificationManager()->Register(this); NotificationManager()->Register(this);
m_unk0x1d0 = 0; m_infoManDialogueTimer = 0;
m_unk0x1d2 = 0; m_bookAnimationTimer = 0;
m_unk0x1d4 = 0; m_unk0x1d4 = 0;
m_unk0x1d6 = 0; m_unk0x1d6 = 0;
} }
@ -130,7 +130,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
break; break;
case c_notificationTransitioned: case c_notificationTransitioned:
StopBookAnimation(); StopBookAnimation();
m_unk0x1d2 = 0; m_bookAnimationTimer = 0;
if (m_infocenterState->GetUnknown0x74() == 0xc) { if (m_infocenterState->GetUnknown0x74() == 0xc) {
StartCredits(); StartCredits();
@ -232,7 +232,7 @@ MxLong Infocenter::HandleEndAction(MxParam& p_param)
m_currentCutscene = e_noIntro; m_currentCutscene = e_noIntro;
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) { if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
m_unk0x1d2 = 1; m_bookAnimationTimer = 1;
return 1; return 1;
} }
break; break;
@ -278,7 +278,7 @@ MxLong Infocenter::HandleEndAction(MxParam& p_param)
if (m_infocenterState->GetInfocenterBufferElement(0) == 0 && m_currentInfomainScript != 40 && if (m_infocenterState->GetInfocenterBufferElement(0) == 0 && m_currentInfomainScript != 40 &&
m_currentInfomainScript != 41 && m_currentInfomainScript != 42 && m_currentInfomainScript != 43 && m_currentInfomainScript != 41 && m_currentInfomainScript != 42 && m_currentInfomainScript != 43 &&
m_currentInfomainScript != 44) { m_currentInfomainScript != 44) {
m_unk0x1d0 = 1; m_infoManDialogueTimer = 1;
PlayMusic(11); PlayMusic(11);
} }
@ -299,8 +299,8 @@ MxLong Infocenter::HandleEndAction(MxParam& p_param)
// STUB: LEGO1 0x1006f4e0 // STUB: LEGO1 0x1006f4e0
void Infocenter::VTable0x50() void Infocenter::VTable0x50()
{ {
m_unk0x1d0 = 0; m_infoManDialogueTimer = 0;
m_unk0x1d2 = 0; m_bookAnimationTimer = 0;
m_unk0x1d4 = 0; m_unk0x1d4 = 0;
m_unk0x1d6 = 0; m_unk0x1d6 = 0;
@ -319,7 +319,7 @@ void Infocenter::VTable0x50()
case 4: case 4:
m_infocenterState->SetUnknown0x74(2); m_infocenterState->SetUnknown0x74(2);
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) { if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
m_unk0x1d2 = 1; m_bookAnimationTimer = 1;
} }
PlayAction(c_letsGetStartedDialogue); PlayAction(c_letsGetStartedDialogue);
@ -337,7 +337,7 @@ void Infocenter::VTable0x50()
return; return;
case 0xf: case 0xf:
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) { if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
m_unk0x1d2 = 1; m_bookAnimationTimer = 1;
} }
PlayAction(c_clickOnInfomanDialogue); PlayAction(c_clickOnInfomanDialogue);
@ -383,7 +383,7 @@ MxLong Infocenter::HandleKeyPress(MxS8 p_key)
m_infocenterState->SetUnknown0x74(1); m_infocenterState->SetUnknown0x74(1);
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) { if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
m_unk0x1d2 = 1; m_bookAnimationTimer = 1;
return 1; return 1;
} }
break; break;
@ -452,11 +452,48 @@ void Infocenter::VTable0x68(MxBool p_add)
} }
} }
// STUB: LEGO1 0x10070af0 // FUNCTION: LEGO1 0x10070af0
MxResult Infocenter::Tickle() MxResult Infocenter::Tickle()
{ {
// TODO if (m_worldStarted == FALSE) {
return LegoWorld::Tickle(); LegoWorld::Tickle();
return 0;
}
if (m_infoManDialogueTimer != 0 && (m_infoManDialogueTimer += 100) > 25000) {
PlayAction(c_clickOnInfomanDialogue);
m_infoManDialogueTimer = 0;
}
if (m_bookAnimationTimer != 0 && (m_bookAnimationTimer += 100) > 3000) {
PlayBookAnimation();
m_bookAnimationTimer = 1;
}
if (m_unk0x1d6 != 0) {
m_unk0x1d6 += 100;
if (m_unk0x1d6 > 3400 && m_unk0x1d6 < 3650) {
ControlManager()->FUN_100293c0(0x10, m_atom, 1);
return 0;
}
if (m_unk0x1d6 > 3650 && m_unk0x1d6 < 3900) {
ControlManager()->FUN_100293c0(0x10, m_atom, 0);
return 0;
}
if (m_unk0x1d6 > 3900 && m_unk0x1d6 < 4150) {
ControlManager()->FUN_100293c0(0x10, m_atom, 1);
return 0;
}
if (4400 < m_unk0x1d6) {
ControlManager()->FUN_100293c0(0x10, m_atom, 0);
m_unk0x1d6 = 0;
}
}
return 0;
} }
// FUNCTION: LEGO1 0x10070c20 // FUNCTION: LEGO1 0x10070c20

View File

@ -1,24 +1,45 @@
#include "infocenterdoor.h" #include "infocenterdoor.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "legoomni.h" #include "legoomni.h"
#include "mxnotificationmanager.h"
// STUB: LEGO1 0x10037730 // FUNCTION: LEGO1 0x10037730
InfocenterDoor::InfocenterDoor() InfocenterDoor::InfocenterDoor()
{ {
// TODO m_unk0xf8 = 0;
NotificationManager()->Register(this);
} }
// STUB: LEGO1 0x100378f0 // FUNCTION: LEGO1 0x100378f0
InfocenterDoor::~InfocenterDoor() InfocenterDoor::~InfocenterDoor()
{ {
// TODO if (InputManager()->GetWorld() == this) {
InputManager()->ClearWorld();
} }
// STUB: LEGO1 0x10037980 ControlManager()->Unregister(this);
NotificationManager()->Unregister(this);
}
// FUNCTION: LEGO1 0x10037980
MxResult InfocenterDoor::Create(MxDSAction& p_dsAction) MxResult InfocenterDoor::Create(MxDSAction& p_dsAction)
{ {
return SUCCESS; MxResult result = LegoWorld::Create(p_dsAction);
if (result == SUCCESS) {
InputManager()->SetWorld(this);
ControlManager()->Register(this);
}
SetIsWorldActive(FALSE);
GameState()->SetUnknown424(3);
GameState()->FUN_1003a720(0);
return result;
} }
// STUB: LEGO1 0x100379e0 // STUB: LEGO1 0x100379e0
@ -52,8 +73,10 @@ void InfocenterDoor::VTable0x68(MxBool p_add)
} }
} }
// STUB: LEGO1 0x10037cd0 // FUNCTION: LEGO1 0x10037cd0
MxBool InfocenterDoor::VTable0x64() MxBool InfocenterDoor::VTable0x64()
{ {
DeleteObjects(&m_atom, 500, 510);
m_unk0xf8 = 2;
return TRUE; return TRUE;
} }

View File

@ -2,15 +2,22 @@
DECOMP_SIZE_ASSERT(InfocenterState, 0x94); DECOMP_SIZE_ASSERT(InfocenterState, 0x94);
// STUB: LEGO1 0x10071600 // FUNCTION: LEGO1 0x10071600
InfocenterState::InfocenterState() InfocenterState::InfocenterState()
{ {
// TODO // TODO
memset(m_buffer, 0, sizeof(m_buffer)); memset(m_buffer, 0, sizeof(m_buffer));
} }
// STUB: LEGO1 0x10071920 // FUNCTION: LEGO1 0x10071920
InfocenterState::~InfocenterState() InfocenterState::~InfocenterState()
{ {
// TODO MxS16 i = 0;
do {
if (GetInfocenterBufferElement(i) != NULL) {
delete GetInfocenterBufferElement(i)->GetAction();
delete GetInfocenterBufferElement(i);
}
i++;
} while (i < GetInfocenterBufferSize());
} }