// // SetupSmartBlockLayer::onPasteTemplate from 0x53d398 to 0x53d4f4 (348 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::onPasteTemplate(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2) { EditorUI *m_editorUI; // r5 cocos2d::CCArray *v4; // r7 cocos2d::CCDirector *v5; // r0 GameManager *v6; // r0 float v7; // s18 float v8; // s16 cocos2d::CCNode *m_objectLayer; // r11 GameManager *v10; // r0 EditorUI *v11; // r11 cocos2d::CCPoint v12; // r2 int v13; // r2 bool v14; // r3 EditorUI *v15; // r9 GameLevelManager *v16; // r0 GJSmartTemplate *ActiveSmartTemplate; // r4 GameManager *v18; // r0 bool v19; // [sp+0h] [bp-3Ch] cocos2d::CCSize v20; // [sp+14h] [bp-28h] BYREF cocos2d::CCPoint v21; // [sp+1Ch] [bp-20h] BYREF cocos2d::CCPoint v22; // [sp+24h] [bp-18h] BYREF cocos2d::CCPoint v23; // [sp+2Ch] [bp-10h] BYREF if ( GameManager::sharedState()->m_levelEditorLayer ) { m_editorUI = GameManager::sharedState()->m_levelEditorLayer->m_editorUI; sub_776584((int)&v23, a12895236453195); v4 = EditorUI::pasteObjects(m_editorUI, &v23, 0, 0); sub_774008(&v23); if ( v4 ) { if ( cocos2d::CCArray::count(v4) ) { v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v20, v5); v6 = GameManager::sharedState(); v7 = v20.width * 0.5; v8 = v20.height * 0.5; m_objectLayer = v6->m_levelEditorLayer->m_objectLayer; v10 = GameManager::sharedState(); cocos2d::CCPoint::CCPoint(&v23, v7, v8 + (float)(v10->m_levelEditorLayer->m_editorUI->m_toolbarHeight * 0.5)); cocos2d::CCNode::convertToNodeSpace(&v21, m_objectLayer, &v23); v11 = GameManager::sharedState()->m_levelEditorLayer->m_editorUI; cocos2d::CCPoint::CCPoint(&v22, &v21); LODWORD(v12.x) = &v22; EditorUI::getGridSnappedPos(&v23, v11, v12); cocos2d::CCPoint::operator=((PlayerObject *)&v21, COERCE_FLOAT(&v23), v13, v14); v15 = GameManager::sharedState()->m_levelEditorLayer->m_editorUI; cocos2d::CCPoint::CCPoint(&v23, &v21); EditorUI::repositionObjectsToCenter(v15, v4, (cocos2d::CCPoint)(unsigned int)&v23, v19); v16 = GameLevelManager::sharedState(); ActiveSmartTemplate = GameLevelManager::getActiveSmartTemplate(v16); if ( ActiveSmartTemplate ) { v18 = GameManager::sharedState(); EditorUI::createSmartObjectsFromTemplate( v18->m_levelEditorLayer->m_editorUI, ActiveSmartTemplate, v4, 0, 1, 1, 0); } } } } SetupSmartBlockLayer::onClose(a1, nullptr); }
GD Web Decomp Icon

GD Web Decomp

Raw Source