// // GJTransformControl::updateButtons from 0x14012b680 to 0x14012c4d6 (3670 bytes) // // 16 xrefs: // > EditorUI::updateTransformControl @ 0x14011583c // > EditorUI::updateTransformControl @ 0x1401158c6 // > EditorUI::transformObjectCall_1 @ 0x1401203b0 // > EditorUI::transformObjectCall_1 @ 0x14012043a // > GJTransformControl::refreshControl @ 0x14012b462 // > GJTransformControl::refreshControl @ 0x14012b46f // > GJTransformControl::refreshControl @ 0x14012b4f4 // > GJTransformControl::refreshControl @ 0x14012b501 // > GJTransformControl::refreshControl @ 0x14012b51c // > GJTransformControl::ccTouchMoved @ 0x14012cbbb // > GJTransformControl::ccTouchEnded @ 0x14012cd25 // > GJTransformControl::ccTouchEnded @ 0x14012cd3c // > GJTransformControl::ccTouchEnded @ 0x14012cdc5 // > GJTransformControl::ccTouchEnded @ 0x14012cdd6 // > GJTransformControl::ccTouchEnded @ 0x14012cdfa // > @ 0x1406c9bf4 // // 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 // // Hidden C++ exception states: #wind=8 void GJTransformControl::updateButtons(GJTransformControl *a1, bool a2, bool a3) { GJTransformControlDelegate *m_delegate; // rcx float v7; // xmm8_4 GJTransformControlDelegate_vtbl *v8; // rax EditorUI *v9; // rbx cocos2d::CCArray *m_selectedObjects; // rcx cocos2d::CCArray *v11; // rdi struct cocos2d::CCObject *m_selectedObject; // rcx cocos2d::CCPoint v13; // rax __int64 v14; // rax __int64 v15; // rax __int64 v16; // rax __int64 v17; // rax float v18; // xmm9_4 float v19; // xmm10_4 float v20; // xmm11_4 float v21; // xmm12_4 cocos2d::CCArray *m_objects; // rcx unsigned int i; // edi cocos2d::CCNode *v24; // rbx float c; // xmm7_4 float d; // xmm6_4 float x; // xmm3_4 float y; // xmm0_4 float v29; // xmm4_4 float v30; // xmm3_4 float v31; // xmm2_4 float v32; // xmm3_4 float v33; // xmm1_4 float v34; // xmm6_4 float v35; // xmm0_4 float v36; // xmm6_4 const cocos2d::CCPoint *v37; // rbx __int64 v38; // rax const cocos2d::CCPoint *v39; // rbx __int64 v40; // rax GJTransformControlDelegate *v41; // rcx GJTransformControlDelegate_vtbl *v42; // rax EditorUI *v43; // rax float *p_m_scaleX; // rbx float *p_m_scaleY; // rdi float v46; // xmm6_4 float v47; // xmm7_4 float v48; // xmm1_4 float v49; // xmm0_4 float v50; // xmm12_4 __int64 v51; // rax __int64 v52; // rax float *v53; // rax float v54; // xmm11_4 float v55; // xmm10_4 float v56; // xmm9_4 float v57; // xmm7_4 float v58; // xmm6_4 struct cocos2d::CCObject *v59; // rbx cocos2d::CCObject_vtbl *v60; // rdi DS_Dictionary *v61; // rax struct cocos2d::CCObject *v62; // rbx cocos2d::CCObject_vtbl *v63; // rdi DS_Dictionary *v64; // rax struct cocos2d::CCObject *v65; // rbx cocos2d::CCObject_vtbl *v66; // rdi DS_Dictionary *v67; // rax struct cocos2d::CCObject *v68; // rbx cocos2d::CCObject_vtbl *v69; // rdi DS_Dictionary *v70; // rax struct cocos2d::CCObject *v71; // rbx cocos2d::CCObject_vtbl *v72; // rdi DS_Dictionary *v73; // rax struct cocos2d::CCObject *v74; // rbx cocos2d::CCObject_vtbl *v75; // rdi DS_Dictionary *v76; // rax struct cocos2d::CCObject *v77; // rbx cocos2d::CCObject_vtbl *v78; // rdi DS_Dictionary *v79; // rax struct cocos2d::CCObject *v80; // rbx cocos2d::CCObject_vtbl *v81; // rdi DS_Dictionary *v82; // rax float v83; // xmm7_4 struct cocos2d::CCObject *v84; // rax struct cocos2d::CCObject *v85; // rbx cocos2d::CCObject_vtbl *v86; // rdi DS_Dictionary *v87; // rax struct cocos2d::CCObject *v88; // rax struct cocos2d::CCObject *v89; // rbx cocos2d::CCObject_vtbl *v90; // rdi DS_Dictionary *v91; // rax cocos2d::CCNode *v92; // rbx cocos2d::CCNode_vtbl *v93; // rdi const cocos2d::CCPoint *v94; // rax __int64 v95; // rax struct cocos2d::CCObject *v96; // rbx cocos2d::CCObject_vtbl *v97; // rdi struct cocos2d::CCPoint v98; // rax __int64 v99; // rax __int64 *v100; // rax __int64 v101; // rdx cocos2d::CCPoint v102; // [rsp+58h] [rbp-B0h] BYREF cocos2d::CCPoint v103; // [rsp+60h] [rbp-A8h] BYREF cocos2d::CCPoint v104; // [rsp+68h] [rbp-A0h] BYREF void *v105; // [rsp+70h] [rbp-98h] BYREF struct cocos2d::CCPoint v106; // [rsp+78h] [rbp-90h] BYREF cocos2d::CCPoint v107; // [rsp+80h] [rbp-88h] BYREF struct cocos2d::CCPoint v108; // [rsp+88h] [rbp-80h] BYREF struct cocos2d::CCPoint v109; // [rsp+90h] [rbp-78h] BYREF struct cocos2d::CCPoint v110; // [rsp+98h] [rbp-70h] BYREF struct cocos2d::CCPoint v111; // [rsp+A0h] [rbp-68h] BYREF cocos2d::CCRect v112; // [rsp+A8h] [rbp-60h] BYREF cocos2d::CCPoint v113; // [rsp+B8h] [rbp-50h] BYREF cocos2d::CCPoint v114; // [rsp+C0h] [rbp-48h] BYREF char v115[8]; // [rsp+C8h] [rbp-40h] BYREF char v116[8]; // [rsp+D0h] [rbp-38h] BYREF char v117[8]; // [rsp+D8h] [rbp-30h] BYREF char v118[8]; // [rsp+E0h] [rbp-28h] BYREF char v119[8]; // [rsp+E8h] [rbp-20h] BYREF cocos2d::CCPoint v120; // [rsp+F0h] [rbp-18h] BYREF cocos2d::CCPoint v121; // [rsp+F8h] [rbp-10h] BYREF cocos2d::CCPoint v122; // [rsp+100h] [rbp-8h] BYREF cocos2d::CCPoint v123; // [rsp+108h] [rbp+0h] BYREF float v124; // [rsp+1E8h] [rbp+E0h] BYREF float v125; // [rsp+1ECh] [rbp+E4h] float v126; // [rsp+200h] [rbp+F8h] BYREF float v127; // [rsp+204h] [rbp+FCh] m_delegate = a1->m_delegate; v7 = 0.0; if ( m_delegate ) { v8 = m_delegate->__vftable; if ( a3 ) { v9 = (EditorUI *)((__int64 (*)(void))v8->getUI)(); m_selectedObjects = v9->m_selectedObjects; if ( m_selectedObjects && cocos2d::CCArray::count(m_selectedObjects) ) { v11 = v9->m_selectedObjects; } else { m_selectedObject = v9->m_selectedObject; if ( !m_selectedObject ) goto LABEL_11; v11 = cocos2d::CCArray::createWithObject(m_selectedObject); } if ( v11 ) { cocos2d::CCPoint::CCPoint(&v103); EditorUI::transformObjects( v9, v11, v13, 1.0, 1.0, 0.0, 0.0, v9->m_transformState.m_skewX, v9->m_transformState.m_skewY); } } else { ((void (*)(void))v8->transformResetRotation)(); } } LABEL_11: v14 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v105 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(v105); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v14 + 528) + 4072LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(v14 + 528) + 4072LL)); v15 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v103 = (cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v103); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v15 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v15 + 528) + 4072LL) + 200LL))(*(_QWORD *)(*(_QWORD *)(v15 + 528) + 4072LL)); cocos2d::CCPoint::CCPoint(&v114); v16 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v103 = (cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v103); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v16 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v16 + 528) + 4072LL) + 160LL))(*(_QWORD *)(*(_QWORD *)(v16 + 528) + 4072LL)); v17 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v103 = (cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v103); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v17 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD, int *))(**(_QWORD **)(*(_QWORD *)(v17 + 528) + 4072LL) + 184LL))( *(_QWORD *)(*(_QWORD *)(v17 + 528) + 4072LL), &dword_1406C1AA8); v18 = -9999999.0; v19 = 9999999.0; v20 = -9999999.0; v21 = 9999999.0; m_objects = a1->m_objects; if ( m_objects ) { if ( cocos2d::CCArray::count(m_objects) ) { for ( i = 0; i < cocos2d::CCArray::count(a1->m_objects); ++i ) { v24 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(a1->m_objects, i); cocos2d::CCPoint::CCPoint(&v104); c = v24[2].m_sAdditionalTransform.c; d = v24[2].m_sAdditionalTransform.d; if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCNode *))v24->__vftable[1].onExit)(v24) ) { d = fmaxf(d, c); c = d; x = fmaxf(v104.y, v104.x); v104.x = x; y = x; v104.y = x; } else { y = v104.y; x = v104.x; } cocos2d::CCRect::CCRect(&v112, 0.0, 0.0, x + c, y + d); cocos2d::CCPoint::CCPoint(&v122, 0.0, 0.0); cocos2d::CCNode::convertToWorldSpace(v24, &v106); cocos2d::CCPoint::CCPoint(&v123, (float)-v112.size.width * 0.5, v112.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v24, &v108); cocos2d::CCPoint::CCPoint(&v120, v112.size.width * 0.5, v112.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v24, &v109); cocos2d::CCPoint::CCPoint(&v121, (float)-v112.size.width * 0.5, (float)-v112.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v24, &v110); cocos2d::CCPoint::CCPoint(&v102, v112.size.width * 0.5, (float)-v112.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v24, &v111); v24->getPosition_0(v24); cocos2d::CCPoint::CCPoint(&v107); cocos2d::CCPoint::operator-(&v108, v115, &v106); cocos2d::CCPoint::operator+(&v107, v116); cocos2d::CCPoint::operator=(&v108, v116); cocos2d::CCPoint::operator-(&v109, v117, &v106); cocos2d::CCPoint::operator+(&v107, v118); cocos2d::CCPoint::operator=(&v109, v118); cocos2d::CCPoint::operator-(&v110, v119, &v106); cocos2d::CCPoint::operator+(&v107, &v113); cocos2d::CCPoint::operator=(&v110, &v113); cocos2d::CCPoint::operator-(&v111, &v105, &v106); cocos2d::CCPoint::operator+(&v107, &v103); cocos2d::CCPoint::operator=(&v111, &v103); v29 = fmaxf(v108.x, v109.x); if ( v29 <= v110.x ) v30 = v110.x; else v30 = v29; if ( v30 <= v111.x ) { v29 = v111.x; } else if ( v29 <= v110.x ) { v29 = v110.x; } v31 = fminf(v108.x, v109.x); if ( v110.x <= v31 ) v32 = v110.x; else v32 = v31; if ( v111.x <= v32 ) { v31 = v111.x; } else if ( v110.x <= v31 ) { v31 = v110.x; } v33 = fmaxf(v108.y, v109.y); if ( v33 <= v110.y ) v34 = v110.y; else v34 = v33; if ( v34 <= v111.y ) { v33 = v111.y; } else if ( v33 <= v110.y ) { v33 = v110.y; } v35 = fminf(v108.y, v109.y); if ( v110.y <= v35 ) v36 = v110.y; else v36 = v35; if ( v111.y <= v36 ) { v35 = v111.y; } else if ( v110.y <= v35 ) { v35 = v110.y; } v18 = fmaxf(v29, v18); v19 = fminf(v31, v19); v20 = fmaxf(v33, v20); v21 = fminf(v35, v21); } } } v37 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(&v102, v18, v20); cocos2d::CCPoint::operator-(v38, &v124, v37); v39 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(&v102, v19, v21); cocos2d::CCPoint::operator-(v40, &v126, v39); v41 = a1->m_delegate; if ( v41 ) { v42 = v41->__vftable; if ( a3 ) { v43 = (EditorUI *)((__int64 (*)(void))v42->getUI)(); EditorUI::transformObjectsActive(v43); goto LABEL_64; } ((void (*)(void))v42->transformRestoreRotation)(); LABEL_58: if ( a2 ) { cocos2d::CCPoint::CCPoint(&v103); cocos2d::CCPoint::CCPoint(&v113); cocos2d::CCPoint::operator-(&v124, &v105, &v103); cocos2d::CCPoint::operator=(&a1->m_topRightOrigin, &v105); cocos2d::CCPoint::operator-(&v126, &v105, &v113); cocos2d::CCPoint::operator=(&a1->m_bottomLeftOrigin, &v105); cocos2d::CCPoint::operator=(&a1->m_topRight, &v124); cocos2d::CCPoint::operator=(&a1->m_bottomLeft, &v126); p_m_scaleX = &a1->m_scaleX; a1->m_scaleX = 1.0; p_m_scaleY = &a1->m_scaleY; a1->m_scaleY = 1.0; *(_QWORD *)&a1->m_rotationX = 0; ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainNode->setRotation)(a1->m_mainNode); v46 = v125; v47 = v124; v48 = v126; } else { p_m_scaleX = &a1->m_scaleX; if ( a1->m_topRightOrigin.x <= 0.0 ) { v47 = v124; } else { v47 = *p_m_scaleX; v124 = *p_m_scaleX; } if ( a1->m_bottomLeftOrigin.x >= 0.0 ) { v48 = v126; } else { v48 = *p_m_scaleX * -1.0; v126 = v48; } p_m_scaleY = &a1->m_scaleY; if ( a1->m_topRightOrigin.y <= 0.0 ) { v53 = &a1->m_scaleX; v46 = v125; } else { v46 = *p_m_scaleY; v125 = *p_m_scaleY; v53 = &a1->m_scaleX; } if ( a1->m_bottomLeftOrigin.y < 0.0 ) { v49 = *p_m_scaleY * -1.0; v127 = v49; p_m_scaleX = v53; LABEL_61: if ( *p_m_scaleX >= 0.0 ) v50 = v48; else v50 = v47; if ( *p_m_scaleX >= 0.0 ) v54 = v47; else v54 = v48; if ( *p_m_scaleY >= 0.0 ) v55 = v46; else v55 = v49; if ( *p_m_scaleY >= 0.0 ) v56 = v49; else v56 = v46; v57 = (float)(v47 - v48) * 0.5; v58 = (float)(v46 - v49) * 0.5; v59 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 2u); v60 = v59->__vftable; cocos2d::CCPoint::CCPoint(&v102, v54, v58 + v127); v60[2].encodeWithCoder(v59, v61); v62 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 1u); v63 = v62->__vftable; cocos2d::CCPoint::CCPoint(&v102, v50, v58 + v127); v63[2].encodeWithCoder(v62, v64); v65 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 3u); v66 = v65->__vftable; cocos2d::CCPoint::CCPoint(&v102, v57 + v126, v55); v66[2].encodeWithCoder(v65, v67); v68 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 4u); v69 = v68->__vftable; cocos2d::CCPoint::CCPoint(&v102, v57 + v126, v56); v69[2].encodeWithCoder(v68, v70); v71 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 5u); v72 = v71->__vftable; cocos2d::CCPoint::CCPoint(&v102, v50, v55); v72[2].encodeWithCoder(v71, v73); v74 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 6u); v75 = v74->__vftable; cocos2d::CCPoint::CCPoint(&v102, v54, v55); v75[2].encodeWithCoder(v74, v76); v77 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 7u); v78 = v77->__vftable; cocos2d::CCPoint::CCPoint(&v102, v50, v56); v78[2].encodeWithCoder(v77, v79); v80 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 8u); v81 = v80->__vftable; cocos2d::CCPoint::CCPoint(&v102, v54, v56); v81[2].encodeWithCoder(v80, v82); if ( a2 ) { v83 = 0.0; } else { v84 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 9u); v83 = *(float *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v84->__vftable[2].getTag)(v84); } v85 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 9u); v86 = v85->__vftable; cocos2d::CCPoint::CCPoint(&v102, v83, v125 + 30.0); v86[2].encodeWithCoder(v85, v87); if ( !a2 ) { v88 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 0xAu); v7 = *(float *)(((__int64 (__fastcall *)(struct cocos2d::CCObject *))v88->__vftable[2].getTag)(v88) + 4); } v89 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 0xAu); v90 = v89->__vftable; cocos2d::CCPoint::CCPoint(&v102, v124 + 30.0, v7); v90[2].encodeWithCoder(v89, v91); v92 = a1->m_warpLockButton->getParent(a1->m_warpLockButton); v93 = v92->__vftable; cocos2d::CCPoint::CCPoint(&v102, v124 + 40.0, v125 + 40.0); v93->setPosition_0(v92, v94); cocos2d::CCPoint::CCPoint(&v102, v124 + 60.0, v58 + v56); cocos2d::CCPoint::operator=(&a1->m_rotatePosition, v95); a1->m_rotation = (float)((float)-(float)(atan2f(a1->m_rotatePosition.y, a1->m_rotatePosition.x) * 57.29578) * 100.0) / 100.0; v96 = cocos2d::CCArray::objectAtIndex(a1->m_warpSprites, 0xBu); v97 = v96->__vftable; cocos2d::CCNode::convertToWorldSpace(a1->m_mainNodeParent, &v102); v98 = cocos2d::CCNode::convertToNodeSpace(a1, &v121); ((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v97[2].encodeWithCoder)(v96, v98); v99 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v120 = (cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v120); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v99 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v99 + 528) + 4072LL) + 160LL))(*(_QWORD *)(*(_QWORD *)(v99 + 528) + 4072LL)); v52 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) goto LABEL_97; goto LABEL_98; } } v49 = v127; goto LABEL_61; } if ( !a3 ) goto LABEL_58; LABEL_64: cocos2d::CCPoint::operator=(&a1->m_topRight, &v124); cocos2d::CCPoint::operator=(&a1->m_bottomLeft, &v126); v51 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v102 = (cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v102); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v51 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v51 + 528) + 4072LL) + 160LL))(*(_QWORD *)(*(_QWORD *)(v51 + 528) + 4072LL)); v52 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { LABEL_97: v102 = (cocos2d::CCPoint)operator new(0x668u); v100 = (__int64 *)((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v102); v101 = *v100; qword_1406C2ED8 = (__int64)v100; (*(void (__fastcall **)(__int64 *))(v101 + 72))(v100); v52 = qword_1406C2ED8; } LABEL_98: (*(void (__fastcall **)(_QWORD, cocos2d::CCPoint *))(**(_QWORD **)(*(_QWORD *)(v52 + 528) + 4072LL) + 184LL))( *(_QWORD *)(*(_QWORD *)(v52 + 528) + 4072LL), &v114); }
GD Web Decomp Icon

GD Web Decomp

Raw Source