JukeBox::notify

This commit is contained in:
Joshua Peisach 2024-02-24 17:20:06 -05:00
parent ac058cfcdf
commit 8b5b77c8f8
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A
2 changed files with 26 additions and 3 deletions

View File

@ -3,6 +3,7 @@
#include "decomp.h"
#include "jukeboxstate.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoworld.h"
@ -111,6 +112,8 @@ class JukeBox : public LegoWorld {
};
private:
MxBool HandleClick(LegoControlManagerEvent&);
LegoGameState::Area m_transitionDestination; // 0xf8
JukeBoxState* m_jukeBoxState; // 0xfc
undefined2 m_unk0x100; // 0x100

View File

@ -52,11 +52,24 @@ MxResult JukeBox::Create(MxDSAction& p_dsAction)
return ret;
}
// STUB: LEGO1 0x1005d980
// FUNCTION: LEGO1 0x1005d980
MxLong JukeBox::Notify(MxParam& p_param)
{
// TODO
return 0;
MxLong result = 0;
LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_transitionDestination);
break;
}
}
return result;
}
// FUNCTION: LEGO1 0x1005d9f0
@ -92,6 +105,13 @@ void JukeBox::ReadyWorld()
m_unk0x100 = 1;
}
// FUNCTION: LEGO1 0x1005da70
MxBool JukeBox::HandleClick(LegoControlManagerEvent& p_param)
{
// TODO
return true;
}
// FUNCTION: LEGO1 0x1005dde0
void JukeBox::Enable(MxBool p_enable)
{