//
// GJBaseGameLayer::promoteGroupParent from 0x14032c4d0 to 0x14032c599 (201 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::addToGroupParents @ 0x14032cb84
// > GJBaseGameLayer::loadGroupParentsFromString @ 0x14032d08c
// > SetGroupIDLayer::onAddGroupParent @ 0x14059345d
// > ??> @ 0x1408b60f4
// > ??> @ 0x1408b6104
// > ??> @ 0x14091f2ec
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:30:30 +0000
//
void __fastcall GJBaseGameLayer::promoteGroupParent(__int64 a1, cocos2d::CCObject *a2, int a3)
{
cocos2d::CCArray *v6; // rax
cocos2d::CCArray *v7; // rdi
if ( a3 > 0 && a2 )
{
v6 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 3968), a3);
v7 = v6;
if ( v6 && cocos2d::CCArray::count(v6) && cocos2d::CCArray::containsObject(v7, a2) )
{
if ( cocos2d::CCArray::objectAtIndex(v7, 0) != a2 )
{
cocos2d::CCObject::retain(a2);
cocos2d::CCArray::removeObject(v7, a2, 1);
cocos2d::CCArray::insertObject(v7, a2, 0);
cocos2d::CCObject::release(a2);
}
}
else
{
GJBaseGameLayer::setGroupParent(a1, (__int64)a2, a3);
}
}
}