//
// EditorUI::replaceGroupID from 0x68a540 to 0x68a7a4 (612 bytes)
//
// 2 xrefs:
// > EditorUI::dynamicGroupUpdate @ 0x6c414c
// > ??> @ 0x85608
//
// 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
//
void EditorUI::replaceGroupID(EditorUI *a1, GameObject *a2, int a3, int a4)
{
int v7; // w19
int v8; // w1
float height; // w19
int m_objectID; // w0
cocos2d::CCNode *v11; // x0
cocos2d::CCNode *v12; // x23
const char *v13; // x0
int v14; // w0
const char *height_low; // x1
cocos2d::CCString *v16; // x0
const char *CString; // x0
int v18; // w0
v7 = 0;
if ( a2->m_groupCount > 0 )
{
while ( 1 )
{
v8 = v7++;
if ( GameObject::getGroupID(a2, v8) == a3 )
break;
if ( a2->m_groupCount <= v7 )
goto LABEL_6;
}
a2->removeFromGroup(a2, a3);
a2->addToGroup(a2, a4);
}
LABEL_6:
if ( a2->m_classType == Effect )
{
height = a2[1].m_obContentSize.height;
if ( a3 == LODWORD(height) )
EffectGameObject::setTargetID((EffectGameObject *)a2, a4);
if ( a3 == LODWORD(a2[1].m_sAdditionalTransform.a) )
EffectGameObject::setTargetID2((EffectGameObject *)a2, a4);
if ( a3 == *(_DWORD *)&a2[1]._displayedOpacity )
{
v18 = *(_DWORD *)(&a2[1].m_bUnkBool2 + 3);
*(_DWORD *)&a2[1]._displayedOpacity = a4;
if ( a3 != v18 )
goto LABEL_14;
}
else if ( a3 != *(_DWORD *)(&a2[1].m_bUnkBool2 + 3) )
{
goto LABEL_14;
}
*(_DWORD *)(&a2[1].m_bUnkBool2 + 3) = a4;
LABEL_14:
m_objectID = a2->m_objectID;
if ( m_objectID != 1615 && m_objectID != 899 )
{
v11 = a2->getChildByTag(a2, 999);
v12 = v11;
if ( v11 )
{
v13 = (const char *)((__int64 (__fastcall *)(cocos2d::CCNode *))v11->__vftable[1].encodeWithCoder)(v11);
v14 = atoi(v13);
height_low = (const char *)LODWORD(a2[1].m_obContentSize.height);
if ( LODWORD(height) == v14 && LODWORD(height) != (_DWORD)height_low )
{
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", height_low);
CString = cocos2d::CCString::getCString(v16);
v12->__vftable[1].acceptVisitor(v12, (cocos2d::CCDataVisitor *)CString);
}
}
m_objectID = a2->m_objectID;
}
if ( m_objectID == 1268 )
{
SpawnTriggerGameObject::changeRemap((SpawnTriggerGameObject *)a2, a3, a4, 0);
SpawnTriggerGameObject::changeRemap((SpawnTriggerGameObject *)a2, a3, a4, 1);
}
else if ( m_objectID <= 1268 )
{
if ( m_objectID == 901 && a3 == LODWORD(a2[1].m_sInverse.d) )
LODWORD(a2[1].m_sInverse.d) = a4;
}
else if ( m_objectID == 2068 )
{
ChanceTriggerGameObject::editChanceObject((ChanceTriggerGameObject *)a2, a3, a4);
}
else if ( m_objectID == 2903 )
{
if ( a3 == *(_DWORD *)&a2[1].m_sQuad.bl.colors )
a2[1].m_sQuad.bl.colors = (cocos2d::ccColor4B)a4;
if ( a3 == LODWORD(a2[1].m_sQuad.bl.texCoords.u) )
LODWORD(a2[1].m_sQuad.bl.texCoords.u) = a4;
if ( a3 == LODWORD(a2[1].m_sQuad.bl.texCoords.v) )
LODWORD(a2[1].m_sQuad.bl.texCoords.v) = a4;
if ( a3 == LODWORD(a2[1].m_sQuad.tr.vertices.x) )
LODWORD(a2[1].m_sQuad.tr.vertices.x) = a4;
}
}
}