Cleared up InitBuildPlatform

This commit is contained in:
mastertimethief 2025-06-11 17:08:28 -04:00
parent 9993618aa8
commit 8dc4936720
2 changed files with 7 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
void FUN_10079050(MxS16 p_index); void FUN_10079050(MxS16 p_index);
void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2); void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2);
void FUN_10079160(); void InitBuildPlatform();
void FUN_100795d0(LegoChar* p_param); void FUN_100795d0(LegoChar* p_param);
void FUN_10079680(LegoChar* p_param); void FUN_10079680(LegoChar* p_param);
LegoAnimNodeData* FindNodeDataByName(LegoTreeNode* p_treeNode, const LegoChar* p_name); LegoAnimNodeData* FindNodeDataByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);

View File

@ -192,7 +192,7 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
strcpy(m_mainSourceId, m_action->GetAtomId().GetInternal()); strcpy(m_mainSourceId, m_action->GetAtomId().GetInternal());
m_mainSourceId[strlen(m_mainSourceId) - 1] = 'M'; m_mainSourceId[strlen(m_mainSourceId) - 1] = 'M';
FUN_10079160(); InitBuildPlatform();
if (GameState()->GetCurrentAct() == LegoGameState::e_act2) { if (GameState()->GetCurrentAct() == LegoGameState::e_act2) {
m_placedPartCount = 10; m_placedPartCount = 10;
@ -344,7 +344,7 @@ void LegoCarBuildAnimPresenter::SwapNodesByName(LegoChar* p_name1, LegoChar* p_n
// FUNCTION: LEGO1 0x10079160 // FUNCTION: LEGO1 0x10079160
// FUNCTION: BETA10 0x1007165d // FUNCTION: BETA10 0x1007165d
void LegoCarBuildAnimPresenter::FUN_10079160() void LegoCarBuildAnimPresenter::InitBuildPlatform()
{ {
LegoTreeNode* root; LegoTreeNode* root;
LegoAnimNodeData* data2; LegoAnimNodeData* data2;
@ -355,6 +355,7 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
LegoAnimNodeData* destData; LegoAnimNodeData* destData;
LegoTreeNode** children; LegoTreeNode** children;
//Get Platform data, Shelf Frame data, and number of build parts
for (i = 0; i < totalNodes; i++) { for (i = 0; i < totalNodes; i++) {
LegoAnimNodeData* data = (LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData(); LegoAnimNodeData* data = (LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData();
name = data->GetName(); name = data->GetName();
@ -384,6 +385,7 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
m_parts = new UnknownListEntry[m_numberOfParts]; m_parts = new UnknownListEntry[m_numberOfParts];
assert(m_parts); assert(m_parts);
//Go through and add the wired name of each part
for (i = 0; i < totalNodes; i++) { for (i = 0; i < totalNodes; i++) {
name = ((LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData())->GetName(); name = ((LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData())->GetName();
@ -402,6 +404,7 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
MxS16 counter = 0; MxS16 counter = 0;
//Go through and add the normal name of each part
for (i = 0; i < totalNodes; i++) { for (i = 0; i < totalNodes; i++) {
name = ((LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData())->GetName(); name = ((LegoAnimNodeData*) GetTreeNode(m_anim->GetRoot(), i)->GetData())->GetName();
if (StringEndsOnYOrN(name)) { if (StringEndsOnYOrN(name)) {
@ -420,6 +423,7 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
} }
} }
//Set Platform root node
destNode = new LegoTreeNode(); destNode = new LegoTreeNode();
assert(destNode); assert(destNode);
destData = new LegoAnimNodeData(); destData = new LegoAnimNodeData();