//
// SetupSmartBlockLayer::onCreateTemplate from 0x9dc050 to 0x9dc0bc (108 bytes)
//
// 3 xrefs:
// > ??> @ 0x9ec40
// > SetupSmartBlockLayer::init @ 0x9dcfbc
// > ??> @ 0x122d710
//
// 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::onCreateTemplate(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // x0
cocos2d::CCArray *v4; // x20
SmartGameObject *m_gameObject; // x1
GameLevelManager *v6; // x0
GameManager *v7; // x0
cocos2d::CCArray *m_gameObjects; // x1
GJSmartTemplate *ActiveSmartTemplate; // [xsp+28h] [xbp+28h]
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)a1);
v4 = v3;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
cocos2d::CCArray::addObject(v3, m_gameObject);
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
cocos2d::CCArray::addObjectsFromArray(v3, m_gameObjects);
}
v6 = GameLevelManager::sharedState();
ActiveSmartTemplate = GameLevelManager::getActiveSmartTemplate(v6);
v7 = GameManager::sharedState();
EditorUI::addObjectsToSmartTemplate(v7->m_levelEditorLayer->m_editorUI, ActiveSmartTemplate, v4);
SetupSmartBlockLayer::onClose(a1, nullptr);
}