//
// SetupSmartBlockLayer::onCreateAll from 0x53d244 to 0x53d324 (224 bytes)
//
// 0 xrefs:
//
// 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 SetupSmartBlockLayer::onCreateAll(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v2; // r0
GJSmartTemplate *ActiveSmartTemplate; // r0
GJSmartTemplate *v4; // r7
cocos2d::CCDictionary *m_prefabArrays; // r9
unsigned int v6; // r4
cocos2d::CCArray *v7; // r10
cocos2d::CCString *v8; // r0
char *CString; // r0
cocos2d::CCArray *v10; // r11
unsigned int i; // r8
int v12; // [sp+4h] [bp-20h]
EditorUI *m_editorUI; // [sp+8h] [bp-1Ch]
std::string v14; // [sp+14h] [bp-10h] BYREF
_BYTE v15[4]; // [sp+18h] [bp-Ch] BYREF
v2 = GameLevelManager::sharedState();
ActiveSmartTemplate = GameLevelManager::getActiveSmartTemplate(v2);
v4 = ActiveSmartTemplate;
if ( ActiveSmartTemplate )
{
m_prefabArrays = ActiveSmartTemplate->m_prefabArrays;
v6 = 0;
ActiveSmartTemplate->m_prefabIndex = 0;
if ( m_prefabArrays )
{
v7 = cocos2d::CCDictionary::allKeys(m_prefabArrays);
while ( v6 < cocos2d::CCArray::count(v7) )
{
v8 = cocos2d::CCArray::stringAtIndex(v7, v6);
CString = (char *)cocos2d::CCString::getCString(v8);
sub_776584((int)&v14, CString);
v10 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(m_prefabArrays, &v14);
for ( i = 0; i < cocos2d::CCArray::count(v10); ++i )
{
v12 = cocos2d::CCArray::objectAtIndex(v10, i);
m_editorUI = GameManager::sharedState()->m_levelEditorLayer->m_editorUI;
sub_775C20(v15);
EditorUI::createPrefab(m_editorUI, v4, (int)v15, *(_DWORD *)(v12 + 60));
sub_774008(v15);
}
++v6;
sub_774008(&v14);
}
}
}
}