//
// GJBaseGameLayer::groupStickyObjects from 0x592bfe to 0x592c9e (160 bytes)
//
// 2 xrefs:
// > EditorUI::onGroupSticky @ 0x486536
// > GJBaseGameLayer::assignNewStickyGroups @ 0x592d20
//
// 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:53:07 +0000
//
int __fastcall GJBaseGameLayer::groupStickyObjects(cocos2d::CCDictionary **this, cocos2d::CCArray *a2)
{
cocos2d::CCArray *v4; // r0
unsigned int v5; // r6
unsigned int v6; // r1
int v7; // r4
cocos2d::CCArray *v8; // r8
int v9; // r0
int v10; // r3
unsigned int i; // r6
cocos2d::CCObject *v12; // r0
int v13; // r3
v4 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2);
v5 = 0;
v7 = 0;
v8 = (cocos2d::CCArray *)cocos2d::CCArray::createWithCapacity(v4, v6);
while ( v5 < cocos2d::CCArray::count(a2) )
{
v9 = cocos2d::CCArray::objectAtIndex(a2, v5);
v10 = *(_DWORD *)(v9 + 740);
if ( v7 )
{
if ( v10 > 0 && v10 != v7 )
{
GJBaseGameLayer::ungroupStickyObjects(this, a2);
goto LABEL_9;
}
}
else
{
v7 = *(_DWORD *)(v9 + 740);
}
++v5;
}
if ( v7 )
goto LABEL_10;
LABEL_9:
v7 = (int)*(this + 605) + 1;
*(this + 605) = (cocos2d::CCDictionary *)v7;
LABEL_10:
for ( i = 0; i < cocos2d::CCArray::count(a2); ++i )
{
v12 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a2, i);
v13 = *((_DWORD *)v12 + 223);
if ( v13 != 747 && v13 != 749 )
{
*((_DWORD *)v12 + 185) = v7;
cocos2d::CCArray::addObject(v8, v12);
}
}
return cocos2d::CCDictionary::setObject(*(this + 604), v8, v7);
}