basic name improvements (#930)

* basic name improvements

* clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Cameron
2024-05-18 20:20:05 +01:00
committed by GitHub
parent 73844f14fa
commit d106aada11
23 changed files with 90 additions and 89 deletions

View File

@@ -54,8 +54,8 @@ public:
virtual MxResult Tickle(); // vtable+0x00
LegoCacheSound* FUN_1003d170(const char* p_key);
LegoCacheSound* FUN_1003d290(LegoCacheSound* p_sound);
LegoCacheSound* FindSoundByKey(const char* p_key);
LegoCacheSound* ManageSoundEntry(LegoCacheSound* p_sound);
LegoCacheSound* FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three);
LegoCacheSound* FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three);
void FUN_1003dc40(LegoCacheSound** p_und);

View File

@@ -32,13 +32,13 @@ public:
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
void VTable0xe4() override; // vtable+0xe4
void FUN_10010510();
void ActivateSceneActions();
// SYNTHETIC: LEGO1 0x1000ff60
// SkateBoard::`scalar deleting destructor'
private:
void FUN_10010270(MxBool p_enable);
void EnableScenePresentation(MxBool p_enable);
MxBool m_unk0x160; // 0x160
Act1State* m_act1state; // 0x164

View File

@@ -340,7 +340,7 @@ MxU32 Helicopter::VTable0xd8(LegoEndAnimNotificationParam& p_param)
void Helicopter::VTable0x74(Matrix4& p_transform)
{
if (m_userNavFlag) {
m_roi->FUN_100a46b0(p_transform);
m_roi->UpdateTransformationRelativeToParent(p_transform);
FUN_10010c30();
}
else {

View File

@@ -98,7 +98,7 @@ MxU32 SkateBoard::VTable0xcc()
ControlManager()->Register(this);
}
FUN_10010270(m_unk0x160);
EnableScenePresentation(m_unk0x160);
Vector3 position = m_roi->GetWorldPosition();
AnimationManager()->FUN_10064670(&position);
@@ -122,7 +122,7 @@ MxU32 SkateBoard::VTable0xd4(LegoControlManagerEvent& p_param)
// FUNCTION: LEGO1 0x10010270
// FUNCTION: BETA10 0x100f5366
void SkateBoard::FUN_10010270(MxBool p_enable)
void SkateBoard::EnableScenePresentation(MxBool p_enable)
{
m_act1state = (Act1State*) GameState()->GetState("Act1State");
if (!m_act1state) {
@@ -142,12 +142,12 @@ void SkateBoard::FUN_10010270(MxBool p_enable)
// FUNCTION: BETA10 0x100f5472
MxU32 SkateBoard::VTable0xd0()
{
FUN_10010270(m_unk0x160);
EnableScenePresentation(m_unk0x160);
return 1;
}
// FUNCTION: LEGO1 0x10010510
void SkateBoard::FUN_10010510()
void SkateBoard::ActivateSceneActions()
{
if (m_act1state->m_unk0x018 != 3) {
PlayMusic(JukeboxScript::c_BeachBlvd_Music);

View File

@@ -61,7 +61,7 @@ MxResult LegoCacheSoundManager::Tickle()
}
// STUB: LEGO1 0x1003d170
LegoCacheSound* LegoCacheSoundManager::FUN_1003d170(const char* p_key)
LegoCacheSound* LegoCacheSoundManager::FindSoundByKey(const char* p_key)
{
// TODO
char* x = new char[strlen(p_key) + 1];
@@ -78,7 +78,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003d170(const char* p_key)
}
// FUNCTION: LEGO1 0x1003d290
LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
LegoCacheSound* LegoCacheSoundManager::ManageSoundEntry(LegoCacheSound* p_sound)
{
Set100d6b4c::iterator it = m_set.find(LegoCacheSoundEntry(p_sound));
if (it != m_set.end()) {
@@ -107,7 +107,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
LegoCacheSound* LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
{
// DECOMP: Second parameter is LegoRoi::m_name (0xe4)
return FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
return FUN_1003db10(FindSoundByKey(p_one), p_two, p_three);
}
// FUNCTION: LEGO1 0x1003db10
@@ -121,7 +121,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003db10(LegoCacheSound* p_one, const
LegoCacheSound* result = p_one->FUN_10006960();
if (result) {
LegoCacheSound* t = FUN_1003d290(result);
LegoCacheSound* t = ManageSoundEntry(result);
t->FUN_10006a30(p_two, p_three);
return t;
}

View File

@@ -79,7 +79,7 @@ MxResult LegoLoadCacheSoundPresenter::PutData()
m_criticalSection.Enter();
if (m_currentTickleState == e_done) {
m_cacheSound = SoundManager()->GetCacheSoundManager()->FUN_1003d290(m_cacheSound);
m_cacheSound = SoundManager()->GetCacheSoundManager()->ManageSoundEntry(m_cacheSound);
m_unk0x7c = 1;
}

View File

@@ -298,7 +298,7 @@ void LegoBuildingManager::UpdatePosition(MxS32 p_index, LegoWorld* p_world)
AdjustHeight(p_index);
MxMatrix mat = roi->GetLocal2World();
mat[3][1] = g_buildingInfo[p_index].m_unk0x014;
roi->FUN_100a46b0(mat);
roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*roi);
}
}
@@ -618,7 +618,7 @@ void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxU32 p_length
m_world = CurrentWorld();
if (p_haveSound) {
m_sound = SoundManager()->GetCacheSoundManager()->FUN_1003d170("bcrash");
m_sound = SoundManager()->GetCacheSoundManager()->FindSoundByKey("bcrash");
m_sound->FUN_10006cb0(35, 60);
}
@@ -674,7 +674,7 @@ void LegoBuildingManager::FUN_10030590()
LegoROI* roi = g_buildingInfo[i].m_entity->GetROI();
MxMatrix mat = roi->GetLocal2World();
mat[3][1] = g_buildingInfo[i].m_unk0x014;
roi->FUN_100a46b0(mat);
roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*roi);
}
}

View File

@@ -609,7 +609,7 @@ MxBool LegoCharacterManager::FUN_100849a0(LegoROI* p_roi, LegoTextureInfo* p_tex
lodList = dupLodList;
if (head->GetUnknown0xe0() >= 0) {
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->FUN_100a66a0(head);
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveROIDetailFromScene(head);
}
head->SetLODList(lodList);
@@ -744,7 +744,7 @@ MxBool LegoCharacterManager::SwitchHat(LegoROI* p_roi)
lodList = dupLodList;
if (childROI->GetUnknown0xe0() >= 0) {
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->FUN_100a66a0(childROI);
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveROIDetailFromScene(childROI);
}
childROI->SetLODList(lodList);

View File

@@ -130,7 +130,7 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
mat
);
m_roi->FUN_100a46b0(mat);
m_roi->UpdateTransformationRelativeToParent(mat);
}
m_roi->SetEntity(this);
@@ -170,7 +170,7 @@ void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_directi
mat
);
m_roi->FUN_100a46b0(mat);
m_roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_roi);
if (p_und) {

View File

@@ -135,7 +135,7 @@ MxResult LegoPathActor::VTable0x88(
}
right.EqualsCross(&up, &dir);
m_roi->FUN_100a46b0(matrix);
m_roi->UpdateTransformationRelativeToParent(matrix);
if (!m_cameraFlag || !m_userNavFlag) {
p5.EqualsCross(p_boundary->GetUnknown0x14(), &p3);
@@ -201,7 +201,7 @@ MxResult LegoPathActor::VTable0x84(
}
right.EqualsCross(&up, &dir);
m_roi->FUN_100a46b0(matrix);
m_roi->UpdateTransformationRelativeToParent(matrix);
if (!m_cameraFlag || !m_userNavFlag) {
p5.EqualsCross(p_boundary->GetUnknown0x14(), &p3);

View File

@@ -180,7 +180,7 @@ MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
Mx3DPointFloat(m_action->GetUp().GetX(), m_action->GetUp().GetY(), m_action->GetUp().GetZ()),
mat
);
m_roi->FUN_100a46b0(mat);
m_roi->UpdateTransformationRelativeToParent(mat);
result = SUCCESS;

View File

@@ -940,7 +940,7 @@ MxLong Isle::HandleTransitionEnd()
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
if (!m_act1state->m_unk0x01f) {
m_skateboard->FUN_10010510();
m_skateboard->ActivateSceneActions();
}
break;
case LegoGameState::e_ambulance: