fix incorrect location of functions (#341)

This commit is contained in:
Misha 2023-12-17 12:28:11 -05:00 committed by GitHub
parent 20daddde32
commit 9eebe18161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 29 deletions

View file

@ -102,7 +102,7 @@ MxU32 Helicopter::VTable0xcc()
FUN_10015820(1, 0);
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 50, FALSE, TRUE);
SetUnknownDC(4);
FUN_10015910(9);
PlayMusic(9);
break;
case 1:
m_script = *g_act2mainScript;

View file

@ -112,6 +112,9 @@ const char* g_current = "current";
// GLOBAL: LEGO1 0x101020e8
void (*g_omniUserMessage)(const char*, int);
// GLOBAL: LEGO1 0x100f4c54
MxBool g_isWorldActive;
// FUNCTION: LEGO1 0x10015700
LegoOmni* Lego()
{
@ -196,6 +199,12 @@ GifManager* GetGifManager()
return LegoOmni::GetInstance()->GetGifManager();
}
// STUB: LEGO1 0x10015820
void FUN_10015820(MxU32, MxU32)
{
// TODO
}
// FUNCTION: LEGO1 0x100158c0
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid)
{
@ -225,6 +234,14 @@ void PlayMusic(MxU32 p_index)
LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4);
}
// FUNCTION: LEGO1 0x100159c0
void SetIsWorldActive(MxBool p_isWorldActive)
{
if (!p_isWorldActive)
LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL);
g_isWorldActive = p_isWorldActive;
}
// STUB: LEGO1 0x1001a700
void FUN_1001a700()
{

View file

@ -158,9 +158,12 @@ LegoPlantManager* PlantManager();
MxBool KeyValueStringParse(char*, const char*, const char*);
LegoWorld* GetCurrentWorld();
GifManager* GetGifManager();
void FUN_10015820(MxU32, MxU32);
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid);
MxDSAction& GetCurrentAction();
void PlayMusic(MxU32 p_index);
void SetIsWorldActive(MxBool p_isWorldActive);
void RegisterScripts();
void UnregisterScripts();

View file

@ -9,28 +9,6 @@
DECOMP_SIZE_ASSERT(LegoWorld, 0xf8);
MxBool g_isWorldActive;
// STUB: LEGO1 0x10015820
void FUN_10015820(MxU32, MxU32)
{
// TODO
}
// STUB: LEGO1 0x10015910
void FUN_10015910(MxU32)
{
// TODO
}
// FUNCTION: LEGO1 0x100159c0
void SetIsWorldActive(MxBool p_isWorldActive)
{
if (!p_isWorldActive)
LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL);
g_isWorldActive = p_isWorldActive;
}
// STUB: LEGO1 0x1001ca40
LegoWorld::LegoWorld()
{

View file

@ -64,10 +64,6 @@ class LegoWorld : public LegoEntity {
undefined m_unk0xf7; // 0xf7
};
void FUN_10015820(MxU32, MxU32);
void FUN_10015910(MxU32);
void SetIsWorldActive(MxBool p_isWorldActive);
// SYNTHETIC: LEGO1 0x1001eed0
// MxPresenterListCursor::`scalar deleting destructor'

View file

@ -119,7 +119,7 @@ MxLong Score::FUN_10001510(MxEndActionNotificationParam& p_param)
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
break;
case 0x1f5:
FUN_10015910(0xb);
PlayMusic(11);
m_state->SetTutorialFlag(FALSE);
}
}
@ -145,7 +145,7 @@ void Score::Stop()
Start(&action);
}
else
FUN_10015910(0xb);
PlayMusic(11);
FUN_10015820(0, 7);
}