// // EditorUI::transformObject from 0x1003f6f48 to 0x1003f7500 (1464 bytes) // // 4 xrefs: // > EditorUI::flipObjectsY @ 0x1003f1fe0 // > EditorUI::flipObjectsX @ 0x1003f2168 // > EditorUI::transformObjectCall_1 @ 0x1003f653c // > EditorUI::transformObjectCall_1 @ 0x1003f65dc // // 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 // void __fastcall EditorUI::transformObject(EditorUI *a1, GameObject *a2, EditCommand a3, bool a4) { bool isSpecialSnapObject; // w0 char v8; // w22 float v9; // s8 float v10; // s0 bool v11; // w9 unsigned __int64 v12; // t2 _BOOL4 v13; // w23 EditCommand v14; // w8 int v15; // w8 int v16; // w0 float v17; // s8 float v18; // s0 GameObject_vtbl *v19; // x8 float v20; // s0 float (__cdecl **p_getRotation)(cocos2d::CCNode *__hidden); // x8 __int64 v22; // x21 float v23; // s0 float v24; // s8 cocos2d::CCArray *m_selectedObjects; // x21 float v26; // s0 int v27; // w0 float v28; // s8 float v29; // s0 float v30; // s0 float v31; // s8 float v32; // s0 GameObject_vtbl *v33; // x8 float v34; // s8 float v35; // s0 __int64 v36; // x21 __int64 v37; // x8 float v38; // s8 float v39; // s0 float v40; // s8 __int64 v41; // [xsp+8h] [xbp-48h] BYREF cocos2d::CCPoint v42; // 0:s0.4,4:s1.4 cocos2d::CCPoint v43; // 0:s1.4,4:s2.4 if ( a4 || (isSpecialSnapObject = EditorUI::isSpecialSnapObject(a1, a2->m_objectID), (unsigned int)(a3 - 21) <= 1) && isSpecialSnapObject ) { v8 = 1; } else { ((void (__fastcall *)(GameObject *))a2->getRotation)(a2); v8 = 1; if ( a3 != RotateSnap && !((int)fabsf(v23) % 90) ) { EditorUI::removeOffset(a1, a2); v8 = 0; } } v9 = ((float (__fastcall *)(GameObject *))a2->getRotationX)(a2); if ( v9 == ((float (__fastcall *)(GameObject *))a2->getRotationY)(a2) ) { v10 = fabsf(((float (__fastcall *)(GameObject *))a2->getRotation)(a2)); v11 = v10 == 270.0 || v10 == 90.0; HIDWORD(v12) = -1527099483 * (int)v10 + 47721858; LODWORD(v12) = HIDWORD(v12); v13 = (unsigned int)(v12 >> 1) > 0x2D82D82; if ( a3 == FlipY && v11 ) v14 = FlipX; else v14 = a3; if ( a3 == FlipX && v11 ) goto LABEL_24; } else { v13 = 1; v14 = a3; } if ( v14 <= RotateCW ) { if ( v14 == FlipX ) { v27 = ((__int64 (__fastcall *)(GameObject *))a2->isFlipX)(a2); ((void (__fastcall *)(GameObject *, _QWORD))a2->setFlipX)(a2, v27 ^ 1u); goto LABEL_25; } if ( v14 != FlipY ) { if ( v14 != RotateCW ) goto LABEL_46; *(float *)&v15 = 90.0; goto LABEL_42; } LABEL_24: v16 = ((__int64 (__fastcall *)(GameObject *))a2->isFlipY)(a2); ((void (__fastcall *)(GameObject *, _QWORD))a2->setFlipY)(a2, v16 ^ 1u); LABEL_25: if ( v13 ) { v17 = ((float (__fastcall *)(GameObject *))a2->getRotationX)(a2); v18 = ((float (__fastcall *)(GameObject *))a2->getRotationY)(a2); v19 = a2->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v17 == v18 ) { p_getRotation = &v19->getRotation; v22 = 344; } else { v20 = ((float (__fastcall *)(GameObject *))v19->getRotationX)(a2); ((void (__fastcall *)(GameObject *, float))a2->setRotationX)(a2, -v20); p_getRotation = &a2->getRotationY; v22 = 376; } v26 = ((float (__fastcall *)(GameObject *))*p_getRotation)(a2); (*(void (__fastcall **)(GameObject *, float))((char *)&a2->copyWithZone + v22))(a2, -v26); } if ( a2->m_updateCustomContentSize ) ((void (__fastcall *)(GameObject *, __int64))a2->setObjectRectDirty)(a2, 1); goto LABEL_46; } if ( v14 <= RotateCW45 ) { if ( v14 == RotateCCW ) *(float *)&v15 = -90.0; else *(float *)&v15 = 45.0; goto LABEL_42; } if ( v14 == RotateCCW45 ) { *(float *)&v15 = -45.0; LABEL_42: v28 = *(float *)&v15; v29 = ((float (__fastcall *)(GameObject *))a2->getRotationX)(a2); ((void (__fastcall *)(GameObject *, float))a2->setRotationX)(a2, v28 + v29); v30 = ((float (__fastcall *)(GameObject *))a2->getRotationY)(a2); ((void (__fastcall *)(GameObject *, float))a2->setRotationY)(a2, v28 + v30); if ( fabsf(((float (__fastcall *)(GameObject *))a2->getRotationX)(a2)) == 360.0 ) ((void (__fastcall *)(GameObject *, float))a2->setRotationX)(a2, 0.0); if ( fabsf(((float (__fastcall *)(GameObject *))a2->getRotationY)(a2)) == 360.0 ) ((void (__fastcall *)(GameObject *, float))a2->setRotationY)(a2, 0.0); goto LABEL_46; } if ( v14 == RotateSnap ) { v24 = LevelEditorLayer::rotationForSlopeNearObject(a1->m_editorLayer, a2); if ( v24 != -1.0 ) { m_selectedObjects = a1->m_selectedObjects; sub_1000229B8(&v41, (__int64 *)&dword_10086E8B0); EditorUI::rotateObjects(a1, m_selectedObjects, v24, v43); } } LABEL_46: v31 = ((float (__fastcall *)(GameObject *))a2->getRotationX)(a2); v32 = ((float (__fastcall *)(GameObject *))a2->getRotationY)(a2); v33 = a2->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v31 != v32 ) { v38 = ((float (__fastcall *)(GameObject *))v33->getRotationX)(a2); ((void (__fastcall *)(GameObject *))a2->getRotationX)(a2); if ( v38 < 360.0 ) { if ( v39 > -360.0 ) { LABEL_54: v40 = ((float (__fastcall *)(GameObject *))a2->getRotationY)(a2); ((void (__fastcall *)(GameObject *))a2->getRotationY)(a2); if ( v40 >= 360.0 ) { v36 = 376; goto LABEL_60; } if ( v35 > -360.0 ) goto LABEL_61; v36 = 376; v37 = 384; goto LABEL_57; } v39 = ((float (__fastcall *)(GameObject *))a2->getRotationX)(a2); } ((void (__fastcall *)(GameObject *, float))a2->setRotationX)(a2, (float)((int)v39 % 360)); goto LABEL_54; } v34 = ((float (__fastcall *)(GameObject *))v33->getRotation)(a2); ((void (__fastcall *)(GameObject *))a2->getRotation)(a2); if ( v34 >= 360.0 ) { v36 = 344; goto LABEL_60; } if ( v35 > -360.0 ) goto LABEL_61; v36 = 344; v37 = 352; LABEL_57: (*(void (__fastcall **)(GameObject *))((char *)&a2->copyWithZone + v37))(a2); LABEL_60: (*(void (__fastcall **)(GameObject *, float))((char *)&a2->copyWithZone + v36))(a2, (float)((int)v35 % 360)); LABEL_61: if ( (v8 & 1) == 0 ) EditorUI::applyOffset(a1, a2); if ( a1->m_refreshPosition ) { v42.x = sub_1000229B8(&v41, (__int64 *)&dword_10086E8B0); EditorUI::moveObject(a1, a2, v42); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source