//
// GJBaseGameLayer::assignNewStickyGroups from 0x1001f2f00 to 0x1001f2ff4 (244 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::duplicateKeyframeAnimation @ 0x100364308
// > EditorUI::pasteObjects @ 0x1003ece50
//
// 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::assignNewStickyGroups(GJBaseGameLayer *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDictionary *v4; // x21
__int64 v5; // x22
__int64 v6; // x0
int v7; // w8
__int64 v8; // x23
cocos2d::CCObject *v9; // x24
cocos2d::CCDictElement *m_pElements; // x8
cocos2d::CCDictElement *next; // x21
cocos2d::CCArray *m_pObject; // x20
if ( a2 && (unsigned int)sub_10024A36C(a2) )
{
v4 = nullptr;
v5 = 0;
do
{
v6 = sub_10024A388(a2, v5);
v7 = *(_DWORD *)(v6 + 872);
if ( v7 >= 1 )
{
v8 = v6;
if ( !v4 )
{
v4 = cocos2d::CCDictionary::create();
v7 = *(_DWORD *)(v8 + 872);
}
v9 = cocos2d::CCDictionary::objectForKey(v4, v7);
if ( !v9 )
{
v9 = (cocos2d::CCObject *)sub_10024A15C(0);
cocos2d::CCDictionary::setObject(v4, v9, *(int *)(v8 + 872));
}
sub_10024A2D0(v9, v8);
}
v5 = (unsigned int)(v5 + 1);
}
while ( (unsigned int)v5 < (unsigned int)sub_10024A36C(a2) );
if ( v4 )
{
m_pElements = v4->m_pElements;
if ( m_pElements )
{
do
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
m_pObject = (cocos2d::CCArray *)m_pElements->m_pObject;
GJBaseGameLayer::ungroupStickyObjects(a1, m_pObject);
GJBaseGameLayer::groupStickyObjects(a1, m_pObject);
m_pElements = next;
}
while ( next );
}
}
}
}