//
// PlayLayer::addToGroupOld from 0x400a80 to 0x400af2 (114 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:24 +0000
//
GJBaseGameLayer *__fastcall PlayLayer::addToGroupOld(GJBaseGameLayer *this, GameObject *a2)
{
GJBaseGameLayer *v2; // r6
int i; // r5
int GroupID; // r7
cocos2d::CCArray *Group; // r8
cocos2d::CCArray *OptimizedGroup; // r0
cocos2d::CCArray *v8; // r7
v2 = this;
if ( *((__int16 *)a2 + 510) > 0 )
{
for ( i = 0; i < *((__int16 *)a2 + 510); ++i )
{
GroupID = GameObject::getGroupID(a2, i);
Group = (cocos2d::CCArray *)GJBaseGameLayer::getGroup(v2, GroupID);
if ( !cocos2d::CCArray::containsObject(Group, a2) )
cocos2d::CCArray::addObject(Group, a2);
if ( *((_DWORD *)a2 + 196) == 7 )
OptimizedGroup = (cocos2d::CCArray *)GJBaseGameLayer::getOptimizedGroup(v2, GroupID);
else
OptimizedGroup = (cocos2d::CCArray *)GJBaseGameLayer::getStaticGroup(v2, GroupID);
v8 = OptimizedGroup;
this = (GJBaseGameLayer *)cocos2d::CCArray::containsObject(OptimizedGroup, a2);
if ( !this )
this = (GJBaseGameLayer *)cocos2d::CCArray::addObject(v8, a2);
}
}
return this;
}