// // EditorUI::spriteFromObjectString from 0xbde0ac to 0xbde76c (1728 bytes) // // 4 xrefs: // > KeyframeGameObject::updateShadowObjects @ 0x888de0 // > GJSmartBlockPreview::addPreview @ 0xb0d750 // > EditorUI::menuItemFromObjectString @ 0xbdf2e0 // > @ 0x6fd60 // // 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:03:44 +0000 // cocos2d::CCNode *__fastcall EditorUI::spriteFromObjectString( __int64 *a1, unsigned __int8 *a2, bool a3, unsigned __int8 a4, int a5, cocos2d::CCArray *a6, cocos2d::CCArray *a7, __int64 a8) { int v9; // w20 cocos2d::CCNode *v13; // x22 cocos2d::CCArray *ObjectsFromString; // x19 __int64 v15; // x26 unsigned int i; // w21 GameObject *Object; // x0 float v18; // s8 unsigned int v19; // w21 float v20; // s9 float v21; // s11 float v22; // s10 __int64 v23; // x0 GameObject *v24; // x0 int v25; // w26 int ObjectZOrder; // w0 void (__fastcall *v27)(__int64); // x26 void (__fastcall *v28)(__int64); // x26 void (__fastcall *v29)(__int64); // x26 void (__fastcall *v30)(__int64, __int64); // x26 __int64 v31; // x0 void (__fastcall *v32)(__int64, __int64 *); // x26 const cocos2d::CCPoint *v33; // x0 cocos2d::CCRect *v34; // x23 float v35; // s0 float v36; // s12 float v37; // s0 float v38; // s13 float v39; // s0 float v40; // s14 float v41; // s0 __int64 v42; // x23 void (__fastcall *v43)(__int64, __int64 *); // x26 __int64 v44; // x0 long double v45; // q0 int ObjectZLayer; // w0 __int64 v47; // x2 __int64 v48; // x23 __int64 v49; // x27 int SecondaryColorMode; // w0 char v51; // w6 char v52; // w5 void (__fastcall *v53)(__int64, __int64 *); // x4 char v54; // w6 char v55; // w5 void (__fastcall *v56)(__int64, __int64 *); // x4 unsigned int v57; // w23 void (__fastcall *v58)(cocos2d::CCNode *, __int64 *); // x21 unsigned int v59; // w1 unsigned __int8 *v60; // x21 void (__fastcall *v61)(unsigned __int8 *, __int64 *); // x24 const cocos2d::CCPoint *v62; // x0 cocos2d::CCArray *v66; // [xsp+A8h] [xbp+A8h] __int64 v68; // [xsp+B0h] [xbp+B0h] __int64 v69; // [xsp+B0h] [xbp+B0h] __int64 v70; // [xsp+B0h] [xbp+B0h] __int64 v71; // [xsp+B0h] [xbp+B0h] int MainColorMode; // [xsp+B8h] [xbp+B8h] ColorAction *v74; // [xsp+B8h] [xbp+B8h] ColorAction *ColorAction; // [xsp+B8h] [xbp+B8h] _BYTE v76[8]; // [xsp+C8h] [xbp+C8h] BYREF __int64 v77; // [xsp+D0h] [xbp+D0h] BYREF v9 = a4; v13 = (cocos2d::CCNode *)cocos2d::CCSprite::create(_stack_chk_guard); ObjectsFromString = LevelEditorLayer::createObjectsFromString(a1[180], a2, 1u, 1u); v15 = *(_QWORD *)(a1[180] + 3272); if ( a7 && v9 ) { for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(ObjectsFromString) && i < (unsigned int)cocos2d::CCArray::count(a7); ++i ) { v48 = cocos2d::CCArray::objectAtIndex(a7, i); v49 = cocos2d::CCArray::objectAtIndex(ObjectsFromString, i); MainColorMode = GameObject::getMainColorMode((GameObject *)v49); if ( GJEffectManager::colorExists(*(GJEffectManager **)(v15 + 320), MainColorMode) ) { ColorAction = GJEffectManager::getColorAction(*(GJEffectManager **)(v15 + 320), MainColorMode); v54 = *((_BYTE *)ColorAction + 73); v55 = *((_BYTE *)ColorAction + 74); v56 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v49 + 1584LL); LOBYTE(v77) = *((_BYTE *)ColorAction + 72); BYTE1(v77) = v54; BYTE2(v77) = v55; v56(v49, &v77); *(_DWORD *)(*(_QWORD *)(v49 + 1096) + 8LL) = *((_DWORD *)ColorAction + 24); } if ( *(_QWORD *)(v48 + 888) ) { SecondaryColorMode = GameObject::getSecondaryColorMode((GameObject *)v49); v74 = GJEffectManager::getColorAction(*(GJEffectManager **)(v15 + 320), SecondaryColorMode); v51 = *((_BYTE *)v74 + 73); v52 = *((_BYTE *)v74 + 74); v53 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v49 + 1592LL); LOBYTE(v77) = *((_BYTE *)v74 + 72); BYTE1(v77) = v51; BYTE2(v77) = v52; v53(v49, &v77); *(_DWORD *)(*(_QWORD *)(v49 + 1104) + 8LL) = *((_DWORD *)v74 + 24); } (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v49 + 912LL))(v49, 0xFFFFFFFFLL); if ( a8 ) *(_BYTE *)(v49 + 1150) = v48 == a8; } } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, 1000.0, 1000.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v77, (const cocos2d::CCPoint *)v76); EditorUI::repositionObjectsToCenter((EditorUI *)a1, ObjectsFromString, (__int64)&v77, a3); EditorUI::deleteSmartBlocksFromObjects((GJBaseGameLayer **)a1, ObjectsFromString); EditorUI::deleteTypeFromObjects((GJBaseGameLayer **)a1, 2065, ObjectsFromString); if ( a5 > 0 ) { while ( a5 < (unsigned int)cocos2d::CCArray::count(ObjectsFromString) ) { Object = (GameObject *)cocos2d::CCArray::lastObject(ObjectsFromString); LevelEditorLayer::removeObject(a1[180], Object, 1); cocos2d::CCArray::removeLastObject(ObjectsFromString, 1); } } v18 = 0.0; v19 = 0; v20 = 0.0; v21 = 0.0; v22 = 0.0; while ( v19 < (unsigned int)cocos2d::CCArray::count(ObjectsFromString) ) { v42 = cocos2d::CCArray::objectAtIndex(ObjectsFromString, v19); LevelEditorLayer::removeObject(a1[180], (GameObject *)v42, 1); v43 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v42 + 184LL); v44 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 192LL))(v42); cocos2d::CCPoint::operator-(&v77, v44, v76, v45); v43(v42, &v77); LODWORD(v43) = GameObject::getObjectZOrder((GameObject *)v42); ObjectZLayer = GameObject::getObjectZLayer((GameObject *)v42); (*(void (__fastcall **)(cocos2d::CCNode *, __int64, _QWORD))(*(_QWORD *)v13 + 464LL))( v13, v42, (unsigned int)((_DWORD)v43 + 10000 * ObjectZLayer)); if ( a6 ) cocos2d::CCArray::addObject(a6, (cocos2d::CCObject *)v42); GameObject::updateBlendMode((int **)v42); v47 = *(_QWORD *)v42; if ( *(_BYTE *)(v42 + 884) ) (*(void (__fastcall **)(__int64, __int64))(v47 + 1080))(v42, 0x100000302LL); else (*(void (__fastcall **)(__int64, __int64))(v47 + 1080))(v42, 0x30300000001LL); v23 = *(_QWORD *)(v42 + 888); if ( v23 && !*(_BYTE *)(v42 + 652) ) { if ( *(_BYTE *)(v42 + 885) ) { (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v23 + 1080LL))(v23, 0x100000302LL); v24 = (GameObject *)v42; if ( *(unsigned __int8 *)(v42 + 884) == *(unsigned __int8 *)(v42 + 885) ) goto LABEL_38; } else { (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v23 + 1080LL))(v23, 0x30300000001LL); v24 = (GameObject *)v42; if ( *(unsigned __int8 *)(v42 + 884) == *(unsigned __int8 *)(v42 + 885) ) { LABEL_38: GameObject::addColorSpriteToSelf(v24); goto LABEL_19; } } v25 = GameObject::getObjectZLayer(v24); if ( *(_BYTE *)(v42 + 885) && *(_BYTE *)(v42 + 1053) ) ++v25; ObjectZOrder = GameObject::getObjectZOrder((GameObject *)v42); *(_BYTE *)(v42 + 866) = 0; v66 = (cocos2d::CCArray *)(unsigned int)(ObjectZOrder + 10000 * v25); v68 = *(_QWORD *)(v42 + 888); v27 = *(void (__fastcall **)(__int64))(*(_QWORD *)v68 + 128LL); (*(void (__fastcall **)(__int64))(*(_QWORD *)v42 + 136LL))(v42); v27(v68); v69 = *(_QWORD *)(v42 + 888); v28 = *(void (__fastcall **)(__int64))(*(_QWORD *)v69 + 144LL); (*(void (__fastcall **)(__int64))(*(_QWORD *)v42 + 152LL))(v42); v28(v69); v70 = *(_QWORD *)(v42 + 888); v29 = *(void (__fastcall **)(__int64))(*(_QWORD *)v70 + 360LL); (*(void (__fastcall **)(__int64))(*(_QWORD *)v42 + 368LL))(v42); v29(v70); v71 = *(_QWORD *)(v42 + 888); v30 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v71 + 184LL); v31 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 192LL))(v42); v30(v71, v31); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v42 + 888) + 528LL))(*(_QWORD *)(v42 + 888), 0); (*(void (__fastcall **)(cocos2d::CCNode *, _QWORD, cocos2d::CCArray *))(*(_QWORD *)v13 + 464LL))( v13, *(_QWORD *)(v42 + 888), v66); } LABEL_19: v32 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v42 + 1368LL); v33 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 192LL))(v42); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v77, v33); v32(v42, &v77); v34 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 1352LL))(v42); cocos2d::CCRect::getMinX(v34); v36 = v35; cocos2d::CCRect::getMaxX(v34); v38 = v37; cocos2d::CCRect::getMinY(v34); v40 = v39; cocos2d::CCRect::getMaxY(v34); if ( v22 != 0.0 && v22 <= v36 ) v36 = v22; if ( v21 != 0.0 && v21 >= v38 ) v38 = v21; if ( v20 != 0.0 && v20 <= v40 ) v40 = v20; if ( v18 != 0.0 && v18 >= v41 ) v41 = v18; v18 = v41; ++v19; v20 = v40; v21 = v38; v22 = v36; } v57 = 0; v58 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v13 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v77, v21 - v22, v18 - v20); v58(v13, &v77); while ( v57 < (unsigned int)cocos2d::CCArray::count(ObjectsFromString) ) { v59 = v57++; v60 = (unsigned __int8 *)cocos2d::CCArray::objectAtIndex(ObjectsFromString, v59); v61 = *(void (__fastcall **)(unsigned __int8 *, __int64 *))(*(_QWORD *)v60 + 184LL); v62 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(unsigned __int8 *))(*(_QWORD *)v60 + 192LL))(v60); cocos2d::CCNode::convertToNodeSpace(&v77, v13, v62); v61(v60, &v77); (*(void (__fastcall **)(unsigned __int8 *, _QWORD))(*(_QWORD *)v60 + 344LL))(v60, v60[1294] ^ 1u); } return v13; }
GD Web Decomp Icon

GD Web Decomp

Raw Source