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

@@ -6,6 +6,7 @@
#include "legostate.h"
#include "legoutil.h"
#include "legovideomanager.h"
#include "legoworld.h"
#include "mxbackgroundaudiomanager.h"
#include "mxobjectfactory.h"
#include "mxstring.h"
@@ -446,6 +447,8 @@ void LegoGameState::SwitchArea(MxU32 p_area)
VideoManager()->SetUnk0x554(FALSE);
MxAtomId* script = g_isleScript;
LegoWorld* world;
switch (p_area) {
case 1:
break;
@@ -461,6 +464,24 @@ void LegoGameState::SwitchArea(MxU32 p_area)
case 5:
script = g_elevbottScript;
break;
case 6:
case 7:
world = FindWorld(*g_isleScript, 0);
if (world == NULL) {
InvokeAction(Extra::ActionType::e_opendisk, *g_isleScript, 0, NULL);
}
else {
#ifdef COMPAT_MODE
{
MxNotificationParam param(c_notificationType20, NULL);
NotificationManager()->Send(world, &param);
}
#else
NotificationManager()->Send(world, &MxNotificationParam(c_notificationType20, NULL));
#endif
}
break;
case 12:
VideoManager()->SetUnk0x554(TRUE);
script = g_regbookScript;