//
// GJBaseGameLayer::sortStickyGroups from 0x1001e0b5c to 0x1001e0c74 (280 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateSpecialGroupData @ 0x1001dfbf4
// > LevelEditorLayer::init @ 0x1003576c0
//
// 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 __fastcall GJBaseGameLayer::sortStickyGroups(GJBaseGameLayer *a1)
{
cocos2d::CCDictionary *v2; // x20
__int64 v3; // x21
__int64 v4; // x0
intptr_t v5; // x1
__int64 v6; // x22
cocos2d::CCObject *v7; // x23
cocos2d::CCDictElement *m_pElements; // x22
cocos2d::CCObject *m_pObject; // x20
__int64 v10; // x21
v2 = cocos2d::CCDictionary::create();
if ( (unsigned int)sub_10024A36C(a1->m_objects) )
{
v3 = 0;
do
{
v4 = sub_10024A388(a1->m_objects, v3);
v5 = *(unsigned int *)(v4 + 872);
if ( (int)v5 >= 1 )
{
v6 = v4;
v7 = cocos2d::CCDictionary::objectForKey(v2, v5);
if ( !v7 )
{
v7 = (cocos2d::CCObject *)sub_10024A15C(0);
cocos2d::CCDictionary::setObject(v2, v7, *(int *)(v6 + 872));
}
sub_10024A2D0(v7, v6);
}
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(a1->m_objects) );
}
a1->m_lastUsedLinkedID = 0;
if ( v2 )
{
m_pElements = v2->m_pElements;
while ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
++a1->m_lastUsedLinkedID;
if ( (unsigned int)sub_10024A36C(m_pObject) )
{
v10 = 0;
do
{
*(_DWORD *)(sub_10024A388(m_pObject, v10) + 872) = a1->m_lastUsedLinkedID;
v10 = (unsigned int)(v10 + 1);
}
while ( (unsigned int)v10 < (unsigned int)sub_10024A36C(m_pObject) );
}
cocos2d::CCDictionary::setObject(a1->m_linkedGroupDict, m_pObject, (unsigned int)a1->m_lastUsedLinkedID);
}
}
}