mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Match ~98%
This commit is contained in:
parent
d57cb26477
commit
8535a48e73
@ -186,10 +186,11 @@ class LegoGameState {
|
|||||||
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
||||||
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
||||||
MxU16 m_unk0x24; // 0x24
|
MxU16 m_unk0x24; // 0x24
|
||||||
MxS16 m_playerCount; // 0x26
|
|
||||||
// This member is accessed directly by foreign classes
|
// Member visibility needs to be refactored, since most members are accessed directly.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
MxS16 m_playerCount; // 0x26
|
||||||
Username m_players[9]; // 0x28
|
Username m_players[9]; // 0x28
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -69,8 +69,6 @@ class LegoWorld : public LegoEntity {
|
|||||||
inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; }
|
inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; }
|
||||||
inline list<LegoROI*>& GetROIList() { return m_roiList; }
|
inline list<LegoROI*>& GetROIList() { return m_roiList; }
|
||||||
|
|
||||||
inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; }
|
|
||||||
|
|
||||||
MxBool PresentersPending();
|
MxBool PresentersPending();
|
||||||
void Remove(MxCore* p_object);
|
void Remove(MxCore* p_object);
|
||||||
void FUN_1001fc80(IslePathActor* p_actor);
|
void FUN_1001fc80(IslePathActor* p_actor);
|
||||||
@ -78,6 +76,8 @@ class LegoWorld : public LegoEntity {
|
|||||||
MxCore* Find(const char* p_class, const char* p_name);
|
MxCore* Find(const char* p_class, const char* p_name);
|
||||||
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
|
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
|
||||||
|
|
||||||
|
inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1001dee0
|
// SYNTHETIC: LEGO1 0x1001dee0
|
||||||
// LegoWorld::`scalar deleting destructor'
|
// LegoWorld::`scalar deleting destructor'
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,8 @@ class RegistrationBook : public LegoWorld {
|
|||||||
MxBool VTable0x64() override; // vtable+0x64
|
MxBool VTable0x64() override; // vtable+0x64
|
||||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||||
|
|
||||||
|
inline void PlayAction(MxU32 p_objectId);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10076f30
|
// SYNTHETIC: LEGO1 0x10076f30
|
||||||
// RegistrationBook::`scalar deleting destructor'
|
// RegistrationBook::`scalar deleting destructor'
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
DECOMP_SIZE_ASSERT(RegistrationBook, 0x2d0)
|
DECOMP_SIZE_ASSERT(RegistrationBook, 0x2d0)
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x100d9924
|
||||||
|
const char* g_infoman = "infoman";
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10076d20
|
// FUNCTION: LEGO1 0x10076d20
|
||||||
RegistrationBook::RegistrationBook() : m_unk0xf8(0x80000000), m_unk0xfc(1)
|
RegistrationBook::RegistrationBook() : m_unk0xf8(0x80000000), m_unk0xfc(1)
|
||||||
{
|
{
|
||||||
@ -48,6 +51,7 @@ RegistrationBook::~RegistrationBook()
|
|||||||
MxResult RegistrationBook::Create(MxDSAction& p_dsAction)
|
MxResult RegistrationBook::Create(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
MxResult result = LegoWorld::Create(p_dsAction);
|
MxResult result = LegoWorld::Create(p_dsAction);
|
||||||
|
|
||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
InputManager()->SetWorld(this);
|
InputManager()->SetWorld(this);
|
||||||
ControlManager()->Register(this);
|
ControlManager()->Register(this);
|
||||||
@ -59,6 +63,7 @@ MxResult RegistrationBook::Create(MxDSAction& p_dsAction)
|
|||||||
|
|
||||||
m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,11 +123,11 @@ void RegistrationBook::ReadyWorld()
|
|||||||
{
|
{
|
||||||
LegoGameState* gameState = GameState();
|
LegoGameState* gameState = GameState();
|
||||||
gameState->GetHistory()->WriteScoreHistory();
|
gameState->GetHistory()->WriteScoreHistory();
|
||||||
|
MxS16 i;
|
||||||
|
|
||||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||||
|
|
||||||
char letterBuffer[] = "A_Bitmap";
|
char letterBuffer[] = "A_Bitmap";
|
||||||
MxS16 i = 0;
|
|
||||||
for (i = 0; i < 26; i++) {
|
for (i = 0; i < 26; i++) {
|
||||||
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", letterBuffer);
|
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", letterBuffer);
|
||||||
|
|
||||||
@ -142,52 +147,48 @@ void RegistrationBook::ReadyWorld()
|
|||||||
checkmarkBuffer[5]++;
|
checkmarkBuffer[5]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
MxS16 playerCount = GameState()->GetPlayerCount();
|
LegoGameState::Username* players = GameState()->m_players;
|
||||||
|
|
||||||
// Optimization: Just skip the whole loop if there's no player data
|
for (i = 1; i <= GameState()->m_playerCount; i++) {
|
||||||
if (playerCount > 0) {
|
for (MxS16 j = 0; j < 7; j++) {
|
||||||
for (i = 1; i <= playerCount; i++) {
|
if (players[i - 1].m_letters[j] != -1) {
|
||||||
for (MxS16 j = 0; j < 7; j++) {
|
if (j == 0) {
|
||||||
if (gameState->m_players[i].m_letters[j] != -1) {
|
m_checkmark[i]->Enable(TRUE);
|
||||||
if (!j) {
|
|
||||||
m_checkmark[i]->Enable(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start building the player names using a two-dimensional array
|
|
||||||
m_name[i][j] = m_alphabet[gameState->m_players[i].m_letters[j]]->Clone();
|
|
||||||
|
|
||||||
// Enable the presenter to actually show the letter in the grid
|
|
||||||
m_name[i][j]->Enable(TRUE);
|
|
||||||
|
|
||||||
m_name[i][j]->SetTickleState(MxPresenter::e_repeating);
|
|
||||||
m_name[i][j]->SetPosition(23 * j + 343, 27 * i + 121);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start building the player names using a two-dimensional array
|
||||||
|
m_name[i][j] = m_alphabet[players[i - 1].m_letters[j]]->Clone();
|
||||||
|
|
||||||
|
// Enable the presenter to actually show the letter in the grid
|
||||||
|
m_name[i][j]->Enable(TRUE);
|
||||||
|
|
||||||
|
m_name[i][j]->SetTickleState(MxPresenter::e_repeating);
|
||||||
|
m_name[i][j]->SetPosition(23 * j + 343, 27 * i + 121);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_infocenterState->HasRegistered()) {
|
if (m_infocenterState->HasRegistered()) {
|
||||||
MxDSAction action;
|
PlayAction(RegbookScript::c_iic008in_PlayWav);
|
||||||
action.SetAtomId(*g_regbookScript);
|
|
||||||
action.SetObjectId(RegbookScript::c_iic006in_RunAnim);
|
|
||||||
|
|
||||||
BackgroundAudioManager()->LowerVolume();
|
|
||||||
Start(&action);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LegoROI* infoman = FindROI("infoman");
|
|
||||||
|
|
||||||
MxDSAction action;
|
|
||||||
action.SetAtomId(*g_regbookScript);
|
|
||||||
action.SetObjectId(RegbookScript::c_iic008in_PlayWav);
|
|
||||||
|
|
||||||
BackgroundAudioManager()->LowerVolume();
|
|
||||||
Start(&action);
|
|
||||||
|
|
||||||
|
LegoROI* infoman = FindROI(g_infoman);
|
||||||
if (infoman != NULL) {
|
if (infoman != NULL) {
|
||||||
infoman->SetUnknown0x0c(0);
|
infoman->SetUnknown0x0c(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
PlayAction(RegbookScript::c_iic006in_RunAnim);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void RegistrationBook::PlayAction(MxU32 p_objectId)
|
||||||
|
{
|
||||||
|
MxDSAction action;
|
||||||
|
action.SetAtomId(*g_regbookScript);
|
||||||
|
action.SetObjectId(p_objectId);
|
||||||
|
|
||||||
|
BackgroundAudioManager()->LowerVolume();
|
||||||
|
Start(&action);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10077fd0
|
// STUB: LEGO1 0x10077fd0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user