// // EditorUI::alignObjectsOnAxis from 0xc02ac8 to 0xc02f80 (1208 bytes) // // 5 xrefs: // > EditorUI::handleEditorAction @ 0xbd76c4 // > EditorUI::handleEditorAction @ 0xbd76e8 // > EditorCommandsPopup::onCommand @ 0xcbc03c // > EditorCommandsPopup::onCommand @ 0xcbc060 // > @ 0xe7760 // // 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:49 +0000 // __int64 __fastcall EditorUI::alignObjectsOnAxis( cocos2d::CCDictionary ***this, cocos2d::CCArray *a2, unsigned __int8 a3) { int v5; // w27 cocos2d::CCArray *v6; // x0 unsigned int v7; // w1 cocos2d::CCArray *v8; // x0 cocos2d::CCDictionary *v9; // x0 cocos2d::CCDictionary *v10; // x24 unsigned int v11; // w20 __int64 v12; // x23 cocos2d::CCObject *v13; // x0 unsigned int *v14; // x1 unsigned int *v15; // x1 _QWORD *v17; // x23 _QWORD *v18; // x25 const cocos2d::CCPoint *v19; // x0 const cocos2d::CCPoint *v20; // x0 unsigned int v21; // w20 cocos2d::CCArray *v22; // x24 int v23; // w23 cocos2d::CCArray *StickyGroup; // x0 const char *v25; // x1 cocos2d::CCObject *v26; // x28 __int64 v27; // x3 void (__fastcall *v28)(cocos2d::CCObject *, __int64 *); // x23 int **v29; // x25 int *v30; // x23 const cocos2d::CCPoint *v31; // x0 long double v32; // q0 unsigned int v33; // w19 cocos2d::CCArray *v34; // x23 unsigned int v35; // w1 __int64 v36; // x28 int **v37; // [xsp+68h] [xbp+68h] float v38; // [xsp+80h] [xbp+80h] BYREF float v39; // [xsp+84h] [xbp+84h] float v40; // [xsp+88h] [xbp+88h] BYREF float v41; // [xsp+8Ch] [xbp+8Ch] __int64 v42; // [xsp+90h] [xbp+90h] BYREF _BYTE v43[8]; // [xsp+98h] [xbp+98h] BYREF _DWORD v44[2]; // [xsp+A0h] [xbp+A0h] BYREF __int64 v45; // [xsp+A8h] [xbp+A8h] BYREF __int64 v46; // [xsp+B0h] [xbp+B0h] BYREF v5 = a3; if ( a2 && (unsigned int)cocos2d::CCArray::count(a2) > 1 ) { v6 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2); v8 = (cocos2d::CCArray *)cocos2d::CCArray::createWithCapacity(v6, v7); v9 = (cocos2d::CCDictionary *)cocos2d::CCArray::addObjectsFromArray(v8, a2); v10 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v9); if ( *((_BYTE *)this + 867) ) { v11 = 0; if ( !*((_BYTE *)this + 868) ) { while ( v11 < (unsigned int)cocos2d::CCArray::count(a2) ) { while ( 1 ) { v12 = cocos2d::CCArray::objectAtIndex(a2, v11); if ( *(int *)(v12 + 872) > 0 ) break; if ( ++v11 >= (unsigned int)cocos2d::CCArray::count(a2) ) goto LABEL_31; } cocos2d::CCArray::removeObjectAtIndex(a2, v11, 1); if ( !cocos2d::CCDictionary::objectForKey(v10, *(int *)(v12 + 872)) ) { v13 = (cocos2d::CCObject *)cocos2d::CCNode::create(nullptr); cocos2d::CCDictionary::setObject(v10, v13, *(int *)(v12 + 872)); } } LABEL_31: v21 = 0; v22 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v10); while ( v21 < (unsigned int)cocos2d::CCArray::count(v22) ) { v23 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v22, v21) + 56); StickyGroup = (cocos2d::CCArray *)GJBaseGameLayer::getStickyGroup(*(this + 180), v23); if ( StickyGroup ) { EditorUI::getGroupCenter((cocos2d::CCPoint *)&v45, StickyGroup, 1u); v26 = (cocos2d::CCObject *)GameObject::createWithFrame((GameObject *)"checkpoint_01_001.png", v25); v27 = *(_QWORD *)v26; *((_DWORD *)v26 + 257) = 44; *((_DWORD *)v26 + 218) = v23; v28 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(v27 + 1368); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, (const cocos2d::CCPoint *)&v45); v28(v26, &v46); cocos2d::CCArray::addObject(a2, v26); } ++v21; } } } if ( (unsigned int)cocos2d::CCArray::count(a2) > 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v40); v14 = *((unsigned int **)a2 + 7); if ( *v14 ) { v17 = *((_QWORD **)v14 + 2); v18 = &v17[*v14 - 1]; if ( v17 <= v18 ) { if ( *v17 ) { v19 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v17 + 192LL))(*v17); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, v19); cocos2d::CCPoint::operator=(&v38, &v46); cocos2d::CCPoint::operator=(&v40, &v46); while ( v18 >= ++v17 && *v17 ) { v20 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v17 + 192LL))(*v17); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, v20); if ( *(float *)&v46 < v38 ) v38 = *(float *)&v46; if ( *(float *)&v46 > v40 ) v40 = *(float *)&v46; if ( *((float *)&v46 + 1) < v39 ) v39 = *((float *)&v46 + 1); if ( *((float *)&v46 + 1) > v41 ) v41 = *((float *)&v46 + 1); } } } } if ( v5 ) { if ( v39 == v41 ) return _stack_chk_guard; } else if ( v38 == v40 ) { return _stack_chk_guard; } cocos2d::CCPoint::operator+(&v46, &v38); cocos2d::CCPoint::operator/(&v42, &v46, 2.0); EditorUI::createUndoObject((__int64)this, 5, 0); v15 = *((unsigned int **)a2 + 7); if ( *v15 ) { v29 = *((int ***)v15 + 2); v37 = &v29[*v15 - 1]; if ( v29 <= v37 ) { v30 = *v29; if ( *v29 ) { while ( 1 ) { v31 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)v30 + 192LL))(v30); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v31); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, (const cocos2d::CCPoint *)v43); if ( v5 ) { v44[1] = HIDWORD(v42); cocos2d::CCPoint::operator-(&v45, v44, v43, v32); if ( v30[257] == 44 ) goto LABEL_47; } else { v44[0] = v42; cocos2d::CCPoint::operator-(&v45, v44, v43, v32); if ( v30[257] == 44 ) { LABEL_47: v33 = 0; v34 = (cocos2d::CCArray *)GJBaseGameLayer::getStickyGroup(*(this + 180), v30[218]); if ( v34 ) { while ( v33 < (unsigned int)cocos2d::CCArray::count(v34) ) { v35 = v33++; v36 = cocos2d::CCArray::objectAtIndex(v34, v35); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, (const cocos2d::CCPoint *)&v45); EditorUI::moveObject((__int64)this, v36); } } goto LABEL_43; } } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, (const cocos2d::CCPoint *)&v45); EditorUI::moveObject((__int64)this, (__int64)v30); LABEL_43: if ( v37 >= ++v29 ) { v30 = *v29; if ( *v29 ) continue; } break; } } } } EditorUI::updateControlsAfterAlign((EditorUI *)this); } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source