//
// SetGroupIDLayer::addGroupID from 0x10003f008 to 0x10003f0ec (228 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::onAddGroup @ 0x10003d4e0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// local variable allocation has failed, the output may be wrong!
void __fastcall SetGroupIDLayer::addGroupID(SetGroupIDLayer *a1, int a2)
{
__int64 v2; // x20
GameObject *m_targetObject; // x0
GameManager *v5; // x0
__int64 v6; // x21
__int64 v7; // x22
GameManager *v8; // x0
v2 = *(_QWORD *)&a2;
a1->m_addedGroup = 1;
m_targetObject = a1->m_targetObject;
if ( m_targetObject )
{
if ( ((unsigned int (__fastcall *)(GameObject *, _QWORD))m_targetObject->addToGroup)(m_targetObject, *(_QWORD *)&a2) == 1 )
{
v5 = GameManager::sharedState();
((void (__fastcall *)(LevelEditorLayer *, GameObject *, __int64, _QWORD))v5->m_levelEditorLayer->addToGroup)(
v5->m_levelEditorLayer,
a1->m_targetObject,
v2,
0);
}
}
else if ( (unsigned int)sub_10024A36C(a1->m_targetObjects) )
{
v6 = 0;
do
{
v7 = sub_10024A388(a1->m_targetObjects, v6);
if ( (*(unsigned int (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1584LL))(v7, v2) == 1 )
{
v8 = GameManager::sharedState();
((void (__fastcall *)(LevelEditorLayer *, __int64, __int64, _QWORD))v8->m_levelEditorLayer->addToGroup)(
v8->m_levelEditorLayer,
v7,
v2,
0);
}
v6 = (unsigned int)(v6 + 1);
}
while ( (unsigned int)v6 < (unsigned int)sub_10024A36C(a1->m_targetObjects) );
}
SetGroupIDLayer::updateGroupIDButtons(a1);
}