//
// SetupSmartBlockLayer::onCreateTemplate from 0xb142b4 to 0xb14320 (108 bytes)
//
// 3 xrefs:
// > ??> @ 0xd0fa8
// > SetupSmartBlockLayer::init @ 0xb150c8
// > ??> @ 0x15462c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:01:31 +0000
//
__int64 __fastcall SetupSmartBlockLayer::onCreateTemplate(cocos2d::CCObject **this, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // x0
cocos2d::CCArray *v4; // x20
cocos2d::CCObject *v5; // x1
GameLevelManager *v6; // x0
__int64 v7; // x0
cocos2d::CCArray *v9; // x1
GameManager *ActiveSmartTemplate; // [xsp+28h] [xbp+28h]
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)this);
v4 = v3;
v5 = *(this + 86);
if ( v5 )
{
v3 = (cocos2d::CCArray *)cocos2d::CCArray::addObject(v3, v5);
}
else
{
v9 = *(this + 87);
if ( v9 )
v3 = (cocos2d::CCArray *)cocos2d::CCArray::addObjectsFromArray(v3, v9);
}
v6 = (GameLevelManager *)GameLevelManager::sharedState(v3);
ActiveSmartTemplate = (GameManager *)GameLevelManager::getActiveSmartTemplate(v6);
v7 = GameManager::sharedState(ActiveSmartTemplate);
EditorUI::addObjectsToSmartTemplate(*(EditorUI **)(*(_QWORD *)(v7 + 552) + 14248LL), ActiveSmartTemplate, v4);
return SetupSmartBlockLayer::onClose(this, nullptr);
}