Merge branch 'master' into legoworld-213a0

This commit is contained in:
Christian Semmler 2024-01-26 12:14:48 -05:00
commit 0dc85ca95b
8 changed files with 78 additions and 39 deletions

View File

@ -29,7 +29,7 @@ jobs:
- name: Install python libraries - name: Install python libraries
shell: bash shell: bash
run: | run: |
pip install black pylint pytest -r tools/requirements.txt pip install black==23.* pylint==3.* pytest==7.* -r tools/requirements.txt
- name: Run pylint and black - name: Run pylint and black
shell: bash shell: bash

View File

@ -21,8 +21,15 @@ class HelicopterState : public LegoState {
return !strcmp(p_name, HelicopterState::ClassName()) || LegoState::IsA(p_name); return !strcmp(p_name, HelicopterState::ClassName()) || LegoState::IsA(p_name);
} }
virtual MxBool VTable0x14() override; // vtable+0x14 // FUNCTION: LEGO1 0x1000e0b0
virtual MxBool SetFlag() override; // vtable+0x18 virtual MxBool VTable0x14() override { return FALSE; }; // vtable+0x14
// FUNCTION: LEGO1 0x1000e0c0
virtual MxBool SetFlag() override
{
m_unk0x8 = 0;
return TRUE;
}; // vtable+0x18
inline void SetUnknown8(MxU32 p_unk0x8) { m_unk0x8 = p_unk0x8; } inline void SetUnknown8(MxU32 p_unk0x8) { m_unk0x8 = p_unk0x8; }
inline MxU32 GetUnkown8() { return m_unk0x8; } inline MxU32 GetUnkown8() { return m_unk0x8; }

View File

@ -86,7 +86,10 @@ class LegoEntityListCursor : public MxPtrListCursor<LegoEntity> {
// FUNCTION: LEGO1 0x1001f2b0 // FUNCTION: LEGO1 0x1001f2b0
// MxListCursor<LegoEntity *>::~MxListCursor<LegoEntity *> // MxListCursor<LegoEntity *>::~MxListCursor<LegoEntity *>
// FUNCTION: LEGO1 0x1001edc6 // FUNCTION: LEGO1 0x1001f300
// LegoEntityListCursor::~LegoEntityListCursor // LegoEntityListCursor::~LegoEntityListCursor
// TEMPLATE: LEGO1 0x100207d0
// MxListCursor<LegoEntity *>::MxListCursor<LegoEntity *>
#endif // LEGOENTITYLIST_H #endif // LEGOENTITYLIST_H

View File

@ -66,7 +66,7 @@ class LegoWorld : public LegoEntity {
void FUN_10073430(); void FUN_10073430();
MxS32 GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value); MxS32 GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
MxCore* FUN_100213a0(const char* p_class, const char* p_name); MxCore* FUN_100213a0(const char* p_class, const char* p_name);
MxPresenter* FUN_10021790(MxAtomId& p_atom, MxS32 p_entityId); MxCore* FUN_10021790(const MxAtomId& p_atom, MxS32 p_entityId);
// SYNTHETIC: LEGO1 0x1001dee0 // SYNTHETIC: LEGO1 0x1001dee0
// LegoWorld::`scalar deleting destructor' // LegoWorld::`scalar deleting destructor'

View File

@ -1,15 +1 @@
#include "helicopterstate.h" #include "helicopterstate.h"
// STUB: LEGO1 0x1000e0b0
MxBool HelicopterState::VTable0x14()
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1000e0c0
MxBool HelicopterState::SetFlag()
{
// TODO
return FALSE;
}

View File

@ -1,17 +1,21 @@
#include "racecar.h" #include "racecar.h"
#include "legocontrolmanager.h"
#include "legoomni.h"
DECOMP_SIZE_ASSERT(RaceCar, 0x164); DECOMP_SIZE_ASSERT(RaceCar, 0x164);
// FUNCTION: LEGO1 0x10028200 // FUNCTION: LEGO1 0x10028200
RaceCar::RaceCar() RaceCar::RaceCar()
{ {
this->m_unk0x13c = 40.0; m_unk0x13c = 40.0;
} }
// STUB: LEGO1 0x10028420 // FUNCTION: LEGO1 0x10028420
RaceCar::~RaceCar() RaceCar::~RaceCar()
{ {
// TODO ControlManager()->Unregister(this);
VTable0xe4();
} }
// STUB: LEGO1 0x10028490 // STUB: LEGO1 0x10028490

View File

@ -219,9 +219,48 @@ MxCore* LegoWorld::FUN_100213a0(const char* p_class, const char* p_name)
} }
} }
// STUB: LEGO1 0x10021790 // FUNCTION: LEGO1 0x10021790
MxPresenter* LegoWorld::FUN_10021790(MxAtomId& p_atom, MxS32 p_entityId) MxCore* LegoWorld::FUN_10021790(const MxAtomId& p_atom, MxS32 p_entityId)
{ {
LegoEntityListCursor entityCursor(m_entityList);
LegoEntity* entity;
while (entityCursor.Next(entity)) {
if (entity->GetAtom() == p_atom && entity->GetEntityId() == p_entityId)
return entity;
}
MxPresenterListCursor presenterCursor0xb8(&m_list0xb8);
MxPresenter* presenter;
while (presenterCursor0xb8.Next(presenter)) {
MxDSAction* action = presenter->GetAction();
if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
return presenter;
}
MxPresenterListCursor presenterCursor0x80(&m_list0x80);
while (presenterCursor0x80.Next(presenter)) {
MxDSAction* action = presenter->GetAction();
if (action && action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
return presenter;
}
for (MxPresenterSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
MxCore* core = *it;
if (core->IsA("MxPresenter")) {
MxPresenter* presenter = (MxPresenter*) *it;
MxDSAction* action = presenter->GetAction();
if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId)
return *it;
}
}
return NULL; return NULL;
} }

View File

@ -365,22 +365,22 @@ void Infocenter::InitializeBitmaps()
{ {
m_radio.Initialize(TRUE); m_radio.Initialize(TRUE);
FUN_10021790(m_atom, c_leftArrowCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_leftArrowCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_rightArrowCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_rightArrowCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_infoCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_infoCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_boatCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_boatCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_raceCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_raceCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_pizzaCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_pizzaCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_gasCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_gasCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_medCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_medCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_copCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_copCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_mamaCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_mamaCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_papaCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_papaCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_pepperCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_pepperCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_nickCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_nickCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_lauraCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_lauraCtl))->Enable(TRUE);
FUN_10021790(m_atom, c_radioCtl)->Enable(TRUE); ((MxPresenter*) FUN_10021790(m_atom, c_radioCtl))->Enable(TRUE);
m_mapAreas[0].m_presenter = (MxStillPresenter*) FUN_100213a0("MxStillPresenter", "Info_A_Bitmap"); m_mapAreas[0].m_presenter = (MxStillPresenter*) FUN_100213a0("MxStillPresenter", "Info_A_Bitmap");
m_mapAreas[0].m_unk0x08 = 391; m_mapAreas[0].m_unk0x08 = 391;