Implement more infocenter methods (#519)

* push changes

* format fix

* Update legogamestate.cpp

* Update legogamestate.cpp

* Fixes

* Match Infocenter::Create

* Style

* Fix InfocenterDoor::HandleClick

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2024-02-02 16:32:50 -05:00
committed by GitHub
parent a28113a26f
commit 0c47ed5056
10 changed files with 286 additions and 27 deletions

View File

@@ -1,6 +1,8 @@
#include "legocontrolmanager.h"
#include "legoeventnotificationparam.h"
#include "legoomni.h"
#include "legovideomanager.h"
#include "mxcontrolpresenter.h"
#include "mxpresenter.h"
#include "mxticklemanager.h"
@@ -121,9 +123,24 @@ void LegoControlManager::FUN_100293c0(undefined4, const char*, undefined2)
{
}
// STUB: LEGO1 0x100294e0
void LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y)
// FUNCTION: LEGO1 0x100294e0
MxControlPresenter* LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y)
{
if (m_presenterList) {
MxPresenterListCursor cursor(m_presenterList);
MxPresenter* control;
MxVideoPresenter* presenter = (MxVideoPresenter*) VideoManager()->GetPresenterAt(p_x, p_y);
if (presenter) {
while (cursor.Next(control)) {
if (((MxControlPresenter*) control)->FUN_10044270(p_x, p_y, presenter)) {
return (MxControlPresenter*) control;
}
}
}
}
return NULL;
}
// FUNCTION: LEGO1 0x10029600