mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 17:46:38 -05:00
Main HistoryBook function implementations (#575)
* Main HistoryBook function implementations * fix names
This commit is contained in:
parent
d71987b369
commit
4a7ab43b45
2 changed files with 51 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
||||||
#ifndef HISTORYBOOK_H
|
#ifndef HISTORYBOOK_H
|
||||||
#define HISTORYBOOK_H
|
#define HISTORYBOOK_H
|
||||||
|
|
||||||
|
#include "decomp.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100da328
|
// VTABLE: LEGO1 0x100da328
|
||||||
|
@ -31,6 +33,12 @@ class HistoryBook : public LegoWorld {
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100824b0
|
// SYNTHETIC: LEGO1 0x100824b0
|
||||||
// HistoryBook::`scalar deleting destructor'
|
// HistoryBook::`scalar deleting destructor'
|
||||||
|
|
||||||
|
private:
|
||||||
|
LegoGameState::Area m_transitionDestination; // 0xf8
|
||||||
|
undefined m_unk0xfc[104]; // 0xfc
|
||||||
|
undefined m_unk0x164[560]; // 0x164
|
||||||
|
undefined m_unk0x394[80]; // 0x394
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HISTORYBOOK_H
|
#endif // HISTORYBOOK_H
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
#include "historybook.h"
|
#include "historybook.h"
|
||||||
|
|
||||||
// STUB: LEGO1 0x100822f0
|
#include "legocontrolmanager.h"
|
||||||
|
#include "legoinputmanager.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "mxnotificationmanager.h"
|
||||||
|
#include "mxomni.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
|
DECOMP_SIZE_ASSERT(HistoryBook, 0x3e4)
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100822f0
|
||||||
HistoryBook::HistoryBook()
|
HistoryBook::HistoryBook()
|
||||||
{
|
{
|
||||||
// TODO
|
memset(m_unk0xfc, NULL, sizeof(m_unk0xfc));
|
||||||
|
memset(m_unk0x164, NULL, sizeof(m_unk0x164));
|
||||||
|
memset(m_unk0x394, NULL, sizeof(m_unk0x394));
|
||||||
|
NotificationManager()->Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100824d0
|
// STUB: LEGO1 0x100824d0
|
||||||
|
@ -12,17 +24,38 @@ HistoryBook::~HistoryBook()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10082610
|
// FUNCTION: LEGO1 0x10082610
|
||||||
MxResult HistoryBook::Create(MxDSAction& p_dsAction)
|
MxResult HistoryBook::Create(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
// TODO
|
MxResult result = LegoWorld::Create(p_dsAction);
|
||||||
return SUCCESS;
|
if (result == SUCCESS) {
|
||||||
|
InputManager()->SetWorld(this);
|
||||||
|
ControlManager()->Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10082680
|
InputManager()->SetCamera(NULL);
|
||||||
|
InputManager()->Register(this);
|
||||||
|
|
||||||
|
GameState()->SetCurrentArea(LegoGameState::Area::e_histbook);
|
||||||
|
GameState()->StopArea(LegoGameState::Area::e_previousArea);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10082680
|
||||||
MxLong HistoryBook::Notify(MxParam& p_param)
|
MxLong HistoryBook::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoWorld::Notify(p_param);
|
||||||
|
if (m_worldStarted) {
|
||||||
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
|
case c_notificationButtonUp:
|
||||||
|
m_transitionDestination = LegoGameState::Area::e_infoscor;
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_pixelation, 50, FALSE, FALSE);
|
||||||
|
break;
|
||||||
|
case c_notificationTransitioned:
|
||||||
|
GameState()->SwitchArea(m_transitionDestination);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -33,9 +66,9 @@ void HistoryBook::ReadyWorld()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10082a10
|
// FUNCTION: LEGO1 0x10082a10
|
||||||
MxBool HistoryBook::VTable0x64()
|
MxBool HistoryBook::VTable0x64()
|
||||||
{
|
{
|
||||||
// TODO
|
m_transitionDestination = LegoGameState::Area::e_infomain;
|
||||||
return FALSE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue