// // SetupSmartBlockLayer::onPasteTemplate from 0x10007867c to 0x100078828 (428 bytes) // // 1 xrefs: // > SetupSmartBlockLayer::init @ 0x100077bc0 // // 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 10:58:14 +0000 // __int64 __fastcall SetupSmartBlockLayer::onPasteTemplate(_QWORD *a1) { __int64 v2; // x0 __int64 v3; // x20 __int64 v4; // x0 __int64 v5; // x20 __int64 v6; // x0 __int64 v7; // x0 __int64 v8; // x0 _QWORD *WinSize; // x0 __int64 v10; // x0 __int64 v11; // x21 float v12; // s8 float v13; // s10 __int64 v14; // x0 __n128 v15; // q0 _QWORD *v16; // x0 __int64 v17; // x21 double v18; // d0 __int64 v19; // x0 __int64 v20; // x21 double v21; // d0 __int64 v22; // x0 __int64 v23; // x0 __int64 ActiveSmartTemplate; // x0 __int64 v25; // x21 __int64 v26; // x0 __int64 v28; // [xsp+8h] [xbp-78h] BYREF __int64 v29; // [xsp+10h] [xbp-70h] BYREF __int64 v30; // [xsp+18h] [xbp-68h] BYREF __int64 v31; // [xsp+20h] [xbp-60h] BYREF void *__p[2]; // [xsp+28h] [xbp-58h] BYREF char v33; // [xsp+3Fh] [xbp-41h] v2 = GameManager::sharedState(a1); if ( *(_QWORD *)(v2 + 552) ) { v3 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v2) + 552) + 14248LL); sub_100009900(__p, a12895236453195); v4 = EditorUI::pasteObjects(v3, (int)__p); v5 = v4; if ( v33 < 0 ) operator delete(__p[0]); v6 = GameManager::sharedState(v4); EditorBuildStats::noteAction(*(_QWORD *)(v6 + 552) + 14704LL); if ( v5 ) { v7 = sub_1002E757C(v5); if ( (_DWORD)v7 ) { v8 = cocos2d::CCDirector::sharedDirector(v7); WinSize = cocos2d::CCDirector::getWinSize(&v31, v8); v10 = GameManager::sharedState(WinSize); v11 = *(_QWORD *)(*(_QWORD *)(v10 + 552) + 3920LL); v12 = *(float *)&v31 * 0.5; v13 = *((float *)&v31 + 1) * 0.5; v14 = GameManager::sharedState(v10); sub_1000262BC( (float *)&v29, v12, v13 + (float)(*(float *)(*(_QWORD *)(*(_QWORD *)(v14 + 552) + 14248LL) + 856LL) * 0.5)); v16 = cocos2d::CCNode::convertToNodeSpace(&v30, v11, &v29, v15); v17 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v16) + 552) + 14248LL); v18 = sub_1000262F4(&v28, (double *)&v30); EditorUI::getGridSnappedPos(&v29, v17, &v28, v18); sub_10002630C(&v30, (double *)&v29); v20 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v19) + 552) + 14248LL); v21 = sub_1000262F4(&v29, (double *)&v30); v22 = EditorUI::repositionObjectsToCenter(v20, v5, &v29, 0, v21); v23 = GameLevelManager::sharedState(v22); ActiveSmartTemplate = GameLevelManager::getActiveSmartTemplate(v23); if ( ActiveSmartTemplate ) { v25 = ActiveSmartTemplate; v26 = GameManager::sharedState(ActiveSmartTemplate); EditorUI::createSmartObjectsFromTemplate(*(_QWORD *)(*(_QWORD *)(v26 + 552) + 14248LL), v25, v5, 0, 1, 1, 0); } } } } return SetupSmartBlockLayer::onClose(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source