Implement LegoRaceCar::ParseAction()

This commit is contained in:
jonschz 2024-06-30 15:27:13 +02:00
parent c53c55d446
commit 540969341b
2 changed files with 30 additions and 23 deletions

View File

@ -87,13 +87,13 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
// LegoRaceCar::`scalar deleting destructor' // LegoRaceCar::`scalar deleting destructor'
private: private:
undefined m_unk0x54; // 0x54 undefined m_unk0x54; // 0x54
undefined4 m_unk0x58; // 0x58 undefined4 m_unk0x58; // 0x58
Mx3DPointFloat m_unk0x5c; // 0x5c Mx3DPointFloat m_unk0x5c; // 0x5c
undefined4 m_unk0x70; // 0x70 LegoAnimActorStruct* m_unk0x70; // 0x70
undefined4 m_unk0x74; // 0x74 LegoAnimActorStruct* m_unk0x74; // 0x74
LegoPathBoundary* m_unk0x78; // 0x78 LegoPathBoundary* m_unk0x78; // 0x78
LegoPathBoundary* m_unk0x7c; // 0x7c LegoPathBoundary* m_unk0x7c; // 0x7c
}; };
#endif // LEGORACECAR_H #endif // LEGORACECAR_H

View File

@ -63,29 +63,36 @@ void LegoRaceCar::SetMaxLinearVelocity(float p_maxLinearVelocity)
// FUNCTION: LEGO1 0x10012ef0 // FUNCTION: LEGO1 0x10012ef0
void LegoRaceCar::ParseAction(char* p_extra) void LegoRaceCar::ParseAction(char* p_extra)
{ {
char local_100[256]; char buffer[256];
LegoAnimActor::ParseAction(p_extra); LegoAnimActor::ParseAction(p_extra);
LegoRaceMap::ParseAction(p_extra); LegoRaceMap::ParseAction(p_extra);
LegoRace* current_world = (LegoRace*) CurrentWorld(); LegoRace* current_world = (LegoRace*) CurrentWorld();
if (KeyValueStringParse(local_100, g_strCOMP, p_extra) && current_world) {
current_world->VTable0x7c(this, atoi(local_100)); if (KeyValueStringParse(buffer, g_strCOMP, p_extra) && current_world) {
current_world->VTable0x7c(this, atoi(buffer));
} }
if (!m_userNavFlag) {
for (MxU32 i = 0; i++;) { if (m_userNavFlag) {
size_t temp = LegoAnimActor::m_animMaps.size(); for (MxU32 i = 0; i < m_animMaps.size(); i++) {
if (!temp LegoAnimActorStruct* animMap = m_animMaps[i];
) {
break; if (animMap->m_unk0x00 == -1.0f) {
m_unk0x70 = animMap;
}
else if (animMap->m_unk0x00 == -2.0f) {
m_unk0x74 = animMap;
} }
} }
}
// STRING: LEGO1 0x100f0bc4
m_unk0x78 = current_world->FindPathBoundary("EDG03_44");
// STRING: LEGO1 0x100f0bb8
m_unk0x7c = current_world->FindPathBoundary("EDG03_54");
for (MxS32 i = 0; i < sizeOfArray(g_edgeReferences); i++) { // STRING: LEGO1 0x100f0bc4
g_edgeReferences[i].data = current_world->FindPathBoundary(g_edgeReferences[i].name); m_unk0x78 = current_world->FindPathBoundary("EDG03_44");
// STRING: LEGO1 0x100f0bb8
m_unk0x7c = current_world->FindPathBoundary("EDG03_54");
for (MxS32 j = 0; j < sizeOfArray(g_edgeReferences); j++) {
g_edgeReferences[j].data = current_world->FindPathBoundary(g_edgeReferences[j].name);
}
} }
} }