// // EditorUI::createRockEdges from 0x66bbf4 to 0x66bdda (486 bytes) // // 1 xrefs: // > EditorUI::createSmartObjectsFromType @ 0x482d72 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:55:45 +0000 // cocos2d::CCArray *__fastcall EditorUI::createRockEdges(EditorUI *this, cocos2d::CCArray *a2) { cocos2d::CCArray *v4; // r0 unsigned int v6; // r9 cocos2d::CCArray *v7; // r7 cocos2d::CCArray *v8; // r4 int v9; // r5 GameObject *v10; // r6 float v11; // r1 float v12; // r2 unsigned int i; // r3 unsigned int v14; // r0 unsigned int v15; // r3 int v16; // r0 cocos2d::CCRect *v17; // r0 int v18; // r0 cocos2d::CCObject *EdgeForObject; // r1 GameObject *v20; // r8 _DWORD *v21; // r2 GameObject **v22; // r6 GameObject **v23; // r5 GameObject *v24; // r7 GameObject *v25; // t1 EditorUI *v26; // r0 GameObject *v27; // r1 int v28; // r2 cocos2d::CCObject *v29; // r1 cocos2d::CCObject *v30; // r1 int v31; // [sp+0h] [bp-3Ch] int v32; // [sp+4h] [bp-38h] int v33; // [sp+8h] [bp-34h] unsigned int v34; // [sp+14h] [bp-28h] _BYTE v35[8]; // [sp+1Ch] [bp-20h] BYREF _BYTE v36[8]; // [sp+24h] [bp-18h] BYREF _BYTE v37[8]; // [sp+2Ch] [bp-10h] BYREF if ( !a2 ) return nullptr; v4 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2); if ( !v4 ) return nullptr; v6 = 0; v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4); v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7); cocos2d::CCArray::addObjectsFromArray(v7, a2); LABEL_5: if ( v6 < cocos2d::CCArray::count(v7) ) { v9 = 0; v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(v7, v6); (*(void (__fastcall **)(_BYTE *, GameObject *))(*(_DWORD *)v10 + 680))(v35, v10); v33 = 0; v32 = 0; v31 = 0; while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, (const cocos2d::CCPoint *)&unk_D2D1E8); switch ( v9 ) { case 2: v11 = 0.0; v12 = -30.0; break; case 3: v11 = -30.0; goto LABEL_14; case 1: v11 = 30.0; LABEL_14: v12 = 0.0; break; default: v11 = 0.0; v12 = 30.0; break; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, v11, v12); cocos2d::CCPoint::operator=(v36, v37); cocos2d::CCPoint::operator+(v37, v35, v36); for ( i = 0; ; i = v15 + 1 ) { v34 = i; v14 = cocos2d::CCArray::count(v7); v15 = v34; if ( v34 >= v14 ) break; if ( v34 != v6 ) { v16 = cocos2d::CCArray::objectAtIndex(v7, v34); v17 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v16 + 664))(v16); v18 = cocos2d::CCRect::containsPoint(v17, (const cocos2d::CCPoint *)v37); v15 = v34; if ( v18 ) goto LABEL_26; } } EdgeForObject = EditorUI::createEdgeForObject(this, v10, v9); if ( EdgeForObject ) cocos2d::CCArray::addObject(v8, EdgeForObject); if ( v9 == 1 ) { v32 = 1; if ( v31 ) { v26 = this; v27 = v10; v28 = 4; goto LABEL_45; } } else if ( v9 == 2 ) { v33 = 1; if ( v32 ) { v26 = this; v27 = v10; v28 = 5; LABEL_45: v30 = EditorUI::createEdgeForObject(v26, v27, v28); if ( v30 ) cocos2d::CCArray::addObject(v8, v30); } } else { if ( v9 ) { if ( v9 != 3 ) goto LABEL_26; if ( v33 ) { v29 = EditorUI::createEdgeForObject(this, v10, 6); if ( v29 ) cocos2d::CCArray::addObject(v8, v29); } if ( !v31 ) goto LABEL_26; v26 = this; v27 = v10; v28 = 7; goto LABEL_45; } v31 = 1; } LABEL_26: if ( ++v9 == 4 ) { ++v6; goto LABEL_5; } } } if ( cocos2d::CCArray::count(v8) ) { v20 = (GameObject *)cocos2d::CCArray::objectAtIndex(v7, 0); if ( v20 ) { if ( v8 ) { v21 = *((_DWORD **)v8 + 13); if ( *v21 ) { v22 = (GameObject **)v21[3]; v23 = &v22[*v21] + 0x3FFFFFFF; while ( v22 <= v23 ) { v25 = *v22++; v24 = v25; if ( !v25 ) break; GameObject::duplicateColorMode(v24, v20); GameObject::duplicateAttributes(v24, v20); *((_BYTE *)v24 + 1004) = 1; } } } } } return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source