mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Add SetPartObjectIdByName()
This commit is contained in:
parent
16417861b8
commit
6c2b4073cb
@ -21,7 +21,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
|||||||
{
|
{
|
||||||
m_name = NULL;
|
m_name = NULL;
|
||||||
m_wiredName = NULL;
|
m_wiredName = NULL;
|
||||||
m_unk0x08 = 0;
|
m_objectId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// variable name verified by BETA10 0x10071b56
|
// variable name verified by BETA10 0x10071b56
|
||||||
@ -30,7 +30,8 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
|||||||
// variable name verified by BETA10 0x100719f0
|
// variable name verified by BETA10 0x100719f0
|
||||||
LegoChar* m_wiredName; // 0x04
|
LegoChar* m_wiredName; // 0x04
|
||||||
|
|
||||||
undefined2 m_unk0x08; // 0x08
|
// variable name guessed based on the setter at LEGO1 0x0x10079dc0 and its use in LEGO1 0x10024890
|
||||||
|
MxS16 m_objectId; // 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
LegoCarBuildAnimPresenter();
|
LegoCarBuildAnimPresenter();
|
||||||
@ -78,7 +79,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
|||||||
MxBool StringEndsOnY(const LegoChar* p_string);
|
MxBool StringEndsOnY(const LegoChar* p_string);
|
||||||
MxBool StringEndsOnZero(const LegoChar* p_string);
|
MxBool StringEndsOnZero(const LegoChar* p_string);
|
||||||
const LegoChar* GetWiredNameByPartName(const LegoChar* p_name);
|
const LegoChar* GetWiredNameByPartName(const LegoChar* p_name);
|
||||||
void FUN_10079dc0(const LegoChar* p_param1, MxS16 p_param2);
|
void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId);
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x10070180
|
// FUNCTION: BETA10 0x10070180
|
||||||
void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; }
|
void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; }
|
||||||
|
|||||||
@ -874,7 +874,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
|||||||
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||||
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||||
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
||||||
m_unk0x258->FUN_10079dc0(m_unk0x110->GetName(), param->m_clickedObjectId);
|
m_unk0x258->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||||
m_Decal_Sound->Enable(FALSE);
|
m_Decal_Sound->Enable(FALSE);
|
||||||
m_Decal_Sound->Enable(TRUE);
|
m_Decal_Sound->Enable(TRUE);
|
||||||
}
|
}
|
||||||
@ -981,7 +981,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
|||||||
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||||
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||||
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
||||||
m_unk0x258->FUN_10079dc0(m_unk0x110->GetName(), param->m_clickedObjectId);
|
m_unk0x258->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||||
m_Decal_Sound->Enable(FALSE);
|
m_Decal_Sound->Enable(FALSE);
|
||||||
m_Decal_Sound->Enable(TRUE);
|
m_Decal_Sound->Enable(TRUE);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -640,6 +640,17 @@ const LegoChar* LegoCarBuildAnimPresenter::GetWiredNameByPartName(const LegoChar
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10079dc0
|
||||||
|
// FUNCTION: BETA10 0x100728d1
|
||||||
|
void LegoCarBuildAnimPresenter::SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId)
|
||||||
|
{
|
||||||
|
for (MxS16 i = 0; i < m_numberOfParts; i++) {
|
||||||
|
if (strcmpi(p_name, m_parts[i].m_name) == 0) {
|
||||||
|
m_parts[i].m_objectId = p_objectId;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10079e20
|
// FUNCTION: LEGO1 0x10079e20
|
||||||
// FUNCTION: BETA10 0x10072959
|
// FUNCTION: BETA10 0x10072959
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user