// // EditorUI::getGroupCenter from 0x140122d40 to 0x140122fc4 (644 bytes) // // 14 xrefs: // > EditorUI::onCreateObject @ 0x14010fcb6 // > EditorUI::repositionObjectsToCenter @ 0x1401142e0 // > EditorUI::activateScaleControl @ 0x140114c40 // > EditorUI::activateTransformControl @ 0x14011527a // > EditorUI::addObjectsToSmartTemplate @ 0x140116944 // > EditorUI::rotateObjects @ 0x140121076 // > EditorUI::scaleObjects @ 0x140121666 // > EditorUI::transformObjects @ 0x140121a99 // > EditorUI::alignObjects @ 0x140122059 // > EditorUI::activateRotationControl @ 0x14012304c // > KeyframeGameObject::updateShadowObjects @ 0x1404b5650 // > @ 0x1406704b8 // > @ 0x140670500 // > @ 0x1406c98a0 // // 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 // // local variable allocation has failed, the output may be wrong! cocos2d::CCPoint EditorUI::getGroupCenter(EditorUI *a1, cocos2d::CCArray *a2, bool a3) { char v3; // r9 char v4; // r15 _BOOL8 v5; // rbp GameObject *v7; // rbx GameObject *v8; // rbx unsigned int v9; // edi float v10; // xmm10_4 float v11; // xmm7_4 float v12; // xmm11_4 float v13; // xmm9_4 GameObject *v14; // rsi float MaxX; // xmm6_4 float MinX; // xmm13_4 float MaxY; // xmm8_4 float MinY; // xmm0_4 cocos2d::CCRect v20; // [rsp+20h] [rbp-B8h] BYREF EditorUI *v21; // [rsp+E0h] [rbp+8h] BYREF v21 = a1; v4 = v3; v5 = a3; if ( cocos2d::CCArray::count((cocos2d::CCArray *)a3) == 1 ) { v7 = (GameObject *)cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v5, 0); GameObject::updateStartPos(v7); v7->getPosition_0(v7); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a2); } else { v8 = nullptr; v9 = 0; v10 = 999999.0; v11 = 999999.0; v12 = -999999.0; v13 = -999999.0; if ( !cocos2d::CCArray::count((cocos2d::CCArray *)v5) ) goto LABEL_18; do { v14 = (GameObject *)cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v5, v9); GameObject::updateStartPos(v14); ((void (__fastcall *)(GameObject *, cocos2d::CCRect *))v14->getObjectRect)(v14, &v20); MaxX = cocos2d::CCRect::getMaxX(&v20); MinX = cocos2d::CCRect::getMinX(&v20); MaxY = cocos2d::CCRect::getMaxY(&v20); MinY = cocos2d::CCRect::getMinY(&v20); v12 = fmaxf(MaxX, v12); if ( v10 > MinX || v10 == 0.0 ) v10 = MinX; v13 = fmaxf(MaxY, v13); if ( v11 > MinY || v11 == 0.0 ) v11 = MinY; if ( v14->m_hasGroupParent ) { if ( v8 ) v4 = 1; else v8 = v14; } ++v9; } while ( v9 < cocos2d::CCArray::count((cocos2d::CCArray *)v5) ); if ( v8 && !v4 ) { ((void (__fastcall *)(GameObject *, cocos2d::CCArray *))v8->getRealPosition)(v8, a2); } else { LABEL_18: cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v21, (float)((float)(v12 - v10) * 0.5) + v10, (float)((float)(v13 - v11) * 0.5) + v11); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a2); } } return (cocos2d::CCPoint)a2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source