Implement/match Infocenter::StartCredits (#537)

* Implement Infocenter::StartCredits

* Match
This commit is contained in:
Christian Semmler 2024-02-07 12:19:46 -05:00 committed by GitHub
parent 18dff31dbd
commit a12fdadd4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 2 deletions

View file

@ -37,6 +37,7 @@ class LegoVideoManager : public MxVideoManager {
void SetSkyColor(float p_red, float p_green, float p_blue);
void OverrideSkyColor(MxBool p_shouldOverride);
void FUN_1007c520();
inline Lego3DManager* Get3DManager() { return this->m_3dManager; }
inline MxDirect3D* GetDirect3D() { return this->m_direct3d; }

View file

@ -1163,10 +1163,57 @@ MxBool Infocenter::VTable0x64()
return FALSE;
}
// STUB: LEGO1 0x10071030
// FUNCTION: LEGO1 0x10071030
void Infocenter::StartCredits()
{
// TODO
MxPresenter* presenter;
while (!m_set0xa8.empty()) {
MxCoreSet::iterator it = m_set0xa8.begin();
MxCore* object = *it;
m_set0xa8.erase(it);
if (object->IsA("MxPresenter")) {
presenter = (MxPresenter*) object;
MxDSAction* action = presenter->GetAction();
if (action) {
FUN_100b7220(action, MxDSAction::c_world, FALSE);
presenter->EndAction();
}
}
else {
delete object;
}
}
MxPresenterListCursor cursor(&m_controlPresenters);
while (cursor.First(presenter)) {
cursor.Detach();
MxDSAction* action = presenter->GetAction();
if (action) {
FUN_100b7220(action, MxDSAction::c_world, FALSE);
presenter->EndAction();
}
}
BackgroundAudioManager()->Stop();
MxS16 i = 0;
do {
if (m_infocenterState->GetInfocenterBufferElement(i) != NULL) {
m_infocenterState->GetInfocenterBufferElement(i)->Enable(FALSE);
}
i++;
} while (i < m_infocenterState->GetInfocenterBufferSize());
VideoManager()->FUN_1007c520();
GetViewManager()->RemoveAll(NULL);
InvokeAction(Extra::e_opendisk, *g_creditsScript, c_unk499, NULL);
SetAppCursor(0);
}
// FUNCTION: LEGO1 0x10071250

View file

@ -471,6 +471,12 @@ void LegoVideoManager::UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_h
}
}
// STUB: LEGO1 0x1007c520
void LegoVideoManager::FUN_1007c520()
{
// TODO
}
// STUB: LEGO1 0x1007c560
int LegoVideoManager::EnableRMDevice()
{