// // GJTransformControl::updateButtons from 0x6b8538 to 0x6b91a4 (3180 bytes) // // 17 xrefs: // > GJTransformControl::refreshControl @ 0x6b928c // > GJTransformControl::refreshControl @ 0x6b929c // > GJTransformControl::refreshControl @ 0x6b9318 // > GJTransformControl::refreshControl @ 0x6b9328 // > GJTransformControl::refreshControl @ 0x6b9364 // > GJTransformControl::ccTouchMoved @ 0x6b9798 // > GJTransformControl::ccTouchEnded @ 0x6b9bc4 // > GJTransformControl::ccTouchEnded @ 0x6b9bd8 // > GJTransformControl::ccTouchEnded @ 0x6b9c88 // > GJTransformControl::ccTouchEnded @ 0x6b9c9c // > GJTransformControl::ccTouchEnded @ 0x6b9d18 // > GJTransformControl::ccTouchEnded @ 0x6b9d28 // > GJTransformControl::applyRotation @ 0x6b9d6c // > GJTransformControl::applyRotation @ 0x6b9db4 // > EditorUI::transformObjectCall @ 0x6b9fd8 // > GJTransformControl::loadValues @ 0x6ba718 // > @ 0x6dd70 // // 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 GJTransformControl::updateButtons(GJTransformControl *a1, bool a2, bool a3) { GJTransformControlDelegate *m_delegate; // x0 EditorUI *v5; // x0 GameManager *v6; // x0 float v7; // s13 GameManager *v8; // x0 const cocos2d::CCPoint *v9; // x0 GameManager *v10; // x0 GameManager *v11; // x0 cocos2d::CCArray *m_objects; // x0 float v13; // s10 float v14; // s9 float v15; // s12 float v16; // s11 float y; // s2 float v18; // s3 const cocos2d::CCPoint *v19; // x0 float v20; // s0 float v21; // s1 float v22; // s0 float v23; // s1 float v24; // s0 float v25; // s1 float v26; // s0 float v27; // s1 float x; // s2 float v29; // s4 float v30; // s5 float v31; // s4 float v32; // s3 float v33; // s6 float v34; // s6 float v35; // s7 cocos2d::CCNode *v36; // x21 float c; // s15 float d; // s14 const cocos2d::CCPoint *v39; // x0 const cocos2d::CCPoint *v40; // x0 float v41; // s0 float v42; // s1 GJTransformControlDelegate *v43; // x0 float v44; // s2 float m_scaleY; // s1 float v46; // s0 float v47; // s8 float v48; // s0 bool v49; // nf float v50; // s2 float v51; // s12 bool v52; // nf float v53; // s11 float v54; // s9 float v55; // s14 float v56; // s10 float v57; // s9 float v58; // s8 cocos2d::CCSprite *v59; // x21 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v61; // x21 void (__fastcall *v62)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v63; // x21 void (__fastcall *v64)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v65; // x21 void (__fastcall *v66)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v67; // x21 void (__fastcall *v68)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v69; // x21 void (__fastcall *v70)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v71; // x21 void (__fastcall *v72)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v73; // x21 void (__fastcall *v74)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v75; // x21 void (__fastcall *v76)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v77; // x24 float v78; // s1 float v79; // s0 void (__fastcall *v80)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCNode *v81; // x21 void (__fastcall *v82)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 float v83; // s0 float v84; // s1 cocos2d::CCSprite *v85; // x21 void (__fastcall *v86)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 EditorUI *v87; // x0 float v88; // s0 float v89; // s1 GameManager *v90; // x0 GameManager *v91; // x0 float v92; // s7 float v93; // s4 float v94; // s6 float v95; // s4 float v96; // s0 float v97; // s1 float v98; // s0 float v99; // s1 float v100; // s0 float v101; // s1 float v102; // s0 float v103; // s1 cocos2d::CCNode *m_mainNode; // x0 void (__fastcall *setRotation)(cocos2d::CCNode *__hidden, float); // x1 float m_scaleX; // s2 cocos2d::CCSprite *v107; // x0 float *v108; // x0 cocos2d::CCSprite *v109; // x0 __int64 v110; // x0 _BOOL4 v111; // [xsp+A8h] [xbp+A8h] _BOOL4 v112; // [xsp+ACh] [xbp+ACh] unsigned int v113; // [xsp+C0h] [xbp+C0h] float v114; // [xsp+C0h] [xbp+C0h] cocos2d::CCPoint v115; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCPoint v116; // [xsp+E0h] [xbp+E0h] BYREF _BYTE v117[8]; // [xsp+E8h] [xbp+E8h] BYREF float v118; // [xsp+F0h] [xbp+F0h] BYREF float v119; // [xsp+F4h] [xbp+F4h] float v120; // [xsp+F8h] [xbp+F8h] BYREF float v121; // [xsp+FCh] [xbp+FCh] float v122; // [xsp+100h] [xbp+100h] BYREF float v123; // [xsp+104h] [xbp+104h] cocos2d::CCPoint v124; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCPoint v125; // [xsp+110h] [xbp+110h] BYREF cocos2d::CCPoint v126; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCPoint v127; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCRect v128; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCPoint v129; // 0:kr20_8.8 cocos2d::CCPoint v130; // 0:kr30_8.8 v112 = a2; v111 = a3; m_delegate = a1->m_delegate; if ( m_delegate ) { if ( a3 ) { v5 = m_delegate->getUI(m_delegate); EditorUI::transformObjectsReset(v5); } else { m_delegate->transformResetRotation(m_delegate); } } v6 = GameManager::sharedState(); v7 = v6->m_levelEditorLayer->m_objectLayer->getScale(v6->m_levelEditorLayer->m_objectLayer); v8 = GameManager::sharedState(); v9 = v8->m_levelEditorLayer->m_objectLayer->getPosition(v8->m_levelEditorLayer->m_objectLayer); cocos2d::CCPoint::CCPoint(&v115, v9); v10 = GameManager::sharedState(); v10->m_levelEditorLayer->m_objectLayer->setScale(v10->m_levelEditorLayer->m_objectLayer, 1.0); v11 = GameManager::sharedState(); v11->m_levelEditorLayer->m_objectLayer->setPosition( v11->m_levelEditorLayer->m_objectLayer, (const cocos2d::CCPoint *)&dword_1242110); m_objects = a1->m_objects; v13 = 10000000.0; if ( m_objects && (unsigned int)cocos2d::CCArray::count(m_objects) ) { v14 = -10000000.0; v113 = 0; v15 = 10000000.0; v16 = -10000000.0; while ( 1 ) { if ( v113 >= (unsigned int)cocos2d::CCArray::count(a1->m_objects) ) goto LABEL_50; v36 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(a1->m_objects, v113); cocos2d::CCPoint::CCPoint(&v116, (const cocos2d::CCPoint *)&v36[1].m_sAdditionalTransform.c); c = v36[2].m_sAdditionalTransform.c; d = v36[2].m_sAdditionalTransform.d; if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCNode *))v36->__vftable[1].removeComponent)(v36) ) { if ( c < d ) c = d; y = v116.y; if ( v116.x >= v116.y ) y = v116.x; v18 = y; d = c; v116.x = y; v116.y = y; } else { y = v116.x; v18 = v116.y; } cocos2d::CCRect::CCRect(&v128, 0.0, 0.0, c + y, d + v18); cocos2d::CCPoint::CCPoint(&v127, 0.0, 0.0); cocos2d::CCNode::convertToWorldSpace(v36, &v127); cocos2d::CCPoint::CCPoint(&v127, (float)-v128.size.width * 0.5, v128.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v36, &v127); cocos2d::CCPoint::CCPoint(&v127, v128.size.width * 0.5, v128.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v36, &v127); cocos2d::CCPoint::CCPoint(&v127, (float)-v128.size.width * 0.5, (float)-v128.size.height * 0.5); cocos2d::CCNode::convertToWorldSpace(v36, &v127); cocos2d::CCPoint::CCPoint(&v127, v128.size.width * 0.5, (float)-v128.size.height * 0.5); v129 = cocos2d::CCNode::convertToWorldSpace(v36, &v127); v19 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCNode *, float, float))v36->getPosition)( v36, v129.x, v129.y); cocos2d::CCPoint::CCPoint(&v125, v19); cocos2d::CCPoint::operator-(&v126, &v118, v117); cocos2d::CCPoint::operator+(&v127, &v125, &v126); cocos2d::CCPoint::operator=(&v118, v20, v21); cocos2d::CCPoint::operator-(&v126, &v120, v117); cocos2d::CCPoint::operator+(&v127, &v125, &v126); cocos2d::CCPoint::operator=(&v120, v22, v23); cocos2d::CCPoint::operator-(&v126, &v122, v117); cocos2d::CCPoint::operator+(&v127, &v125, &v126); cocos2d::CCPoint::operator=(&v122, v24, v25); cocos2d::CCPoint::operator-(&v126, &v124, v117); cocos2d::CCPoint::operator+(&v127, &v125, &v126); cocos2d::CCPoint::operator=(&v124, v26, v27); if ( v118 < v120 ) break; if ( v118 < v122 ) goto LABEL_93; v93 = v118; if ( v118 < v120 ) { LABEL_10: x = v124.x; v29 = v120; v30 = v124.x; if ( v120 < v124.x ) goto LABEL_14; goto LABEL_11; } LABEL_79: x = v124.x; v30 = v124.x; if ( v93 < v124.x ) goto LABEL_14; v29 = v120; if ( v118 >= v120 ) v29 = v118; LABEL_11: v30 = v122; if ( v29 >= v122 ) { v30 = v120; if ( v118 >= v120 ) v30 = v118; } LABEL_14: if ( v118 > v120 ) { if ( v120 <= v122 ) goto LABEL_16; LABEL_92: v95 = v122; goto LABEL_89; } if ( v118 > v122 ) goto LABEL_92; v95 = v118; if ( v118 > v120 ) { LABEL_16: v31 = v120; if ( v120 > x ) goto LABEL_20; goto LABEL_17; } LABEL_89: if ( v95 > x ) goto LABEL_20; v31 = v120; if ( v118 <= v120 ) v31 = v118; LABEL_17: x = v122; if ( v31 <= v122 ) { x = v120; if ( v118 <= v120 ) x = v118; } LABEL_20: if ( v119 < v121 ) { if ( v121 >= v123 ) goto LABEL_22; LABEL_95: v94 = v123; goto LABEL_84; } if ( v119 < v123 ) goto LABEL_95; v94 = v119; if ( v119 < v121 ) { LABEL_22: v32 = v124.y; v33 = v124.y; if ( v121 < v124.y ) goto LABEL_27; v34 = v121; goto LABEL_24; } LABEL_84: v32 = v124.y; v49 = v94 < v124.y; v33 = v124.y; if ( v49 ) goto LABEL_27; v34 = v121; if ( v119 >= v121 ) v34 = v119; LABEL_24: v49 = v34 < v123; v33 = v123; if ( !v49 ) { v33 = v121; if ( v119 >= v121 ) v33 = v119; } LABEL_27: if ( v119 > v121 ) { if ( v121 <= v123 ) goto LABEL_29; LABEL_94: v92 = v123; goto LABEL_74; } if ( v119 > v123 ) goto LABEL_94; v92 = v119; if ( v119 > v121 ) { LABEL_29: v35 = v121; if ( v121 > v32 ) goto LABEL_33; goto LABEL_30; } LABEL_74: if ( v92 > v32 ) goto LABEL_33; v35 = v121; if ( v119 <= v121 ) v35 = v119; LABEL_30: v32 = v123; if ( v35 <= v123 ) { v32 = v121; if ( v119 <= v121 ) v32 = v119; } LABEL_33: if ( v16 < v30 ) v16 = v30; if ( v15 > x ) v15 = x; if ( v14 < v33 ) v14 = v33; if ( v13 > v32 ) v13 = v32; ++v113; } if ( v120 >= v122 ) goto LABEL_10; LABEL_93: v93 = v122; goto LABEL_79; } v14 = -10000000.0; v15 = 10000000.0; v16 = -10000000.0; LABEL_50: cocos2d::CCPoint::CCPoint(&v128.origin, v16, v14); v39 = a1->getPosition(a1); cocos2d::CCPoint::operator-(&v124, &v128, v39); cocos2d::CCPoint::CCPoint(&v128.origin, v15, v13); v40 = a1->getPosition(a1); cocos2d::CCPoint::operator-(&v125, &v128, v40); v43 = a1->m_delegate; if ( v43 ) { if ( !v111 ) { v43->transformRestoreRotation(v43); goto LABEL_53; } v87 = v43->getUI(v43); EditorUI::transformObjectsActive(v87); LABEL_69: cocos2d::CCPoint::operator=(&a1->m_topRight, v41, v42); cocos2d::CCPoint::operator=(&a1->m_bottomLeft, v88, v89); goto LABEL_70; } if ( v111 ) goto LABEL_69; LABEL_53: if ( v112 ) { cocos2d::CCPoint::CCPoint(&v126, &v124); cocos2d::CCPoint::CCPoint(&v127, &v125); cocos2d::CCPoint::operator-(&v128, &v124, &v126); cocos2d::CCPoint::operator=(&a1->m_topRightOrigin, v96, v97); cocos2d::CCPoint::operator-(&v128, &v125, &v127); cocos2d::CCPoint::operator=(&a1->m_bottomLeftOrigin, v98, v99); cocos2d::CCPoint::operator=(&a1->m_topRight, v100, v101); cocos2d::CCPoint::operator=(&a1->m_bottomLeft, v102, v103); m_mainNode = a1->m_mainNode; setRotation = m_mainNode->setRotation; a1->m_scaleX = 1.0; a1->m_scaleY = 1.0; a1->m_rotationX = 0.0; a1->m_rotationY = 0.0; setRotation(m_mainNode, 0.0); m_scaleX = a1->m_scaleX; m_scaleY = a1->m_scaleY; v49 = m_scaleX < 0.0; v48 = v125.y; v47 = v124.y; if ( m_scaleX >= 0.0 ) goto LABEL_61; LABEL_97: v51 = v124.x; v50 = v125.x; v54 = v124.x; v53 = v125.x; goto LABEL_98; } v44 = a1->m_scaleX; if ( a1->m_topRightOrigin.x > 0.0 ) v124.x = a1->m_scaleX; if ( a1->m_bottomLeftOrigin.x >= 0.0 ) { m_scaleY = a1->m_scaleY; if ( a1->m_topRightOrigin.y > 0.0 ) goto LABEL_58; LABEL_103: v47 = v124.y; if ( a1->m_bottomLeftOrigin.y >= 0.0 ) goto LABEL_59; goto LABEL_104; } m_scaleY = a1->m_scaleY; v125.x = -v44; if ( a1->m_topRightOrigin.y <= 0.0 ) goto LABEL_103; LABEL_58: v46 = a1->m_bottomLeftOrigin.y; v124.y = m_scaleY; v47 = m_scaleY; if ( v46 >= 0.0 ) { LABEL_59: v48 = v125.y; goto LABEL_60; } LABEL_104: v48 = -m_scaleY; v125.y = -m_scaleY; LABEL_60: v49 = v44 < 0.0; if ( v44 < 0.0 ) goto LABEL_97; LABEL_61: v50 = v125.x; v51 = v125.x; if ( !v49 ) { v52 = m_scaleY < 0.0; v53 = v124.x; v54 = v124.x; if ( m_scaleY >= 0.0 ) goto LABEL_63; LABEL_99: v55 = v48; goto LABEL_100; } v54 = v124.x; v53 = v125.x; LABEL_98: v52 = m_scaleY < 0.0; if ( m_scaleY < 0.0 ) goto LABEL_99; LABEL_63: v55 = v47; if ( v52 ) { LABEL_100: v56 = v47; goto LABEL_65; } v56 = v48; LABEL_65: v57 = v54 - v50; v58 = (float)(v47 - v48) * 0.5; v59 = GJTransformControl::spriteByTag(a1, 3); setPosition = v59->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v53, v58 + v125.y); setPosition(v59, &v128.origin); v61 = GJTransformControl::spriteByTag(a1, 2); v62 = v61->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v51, v58 + v125.y); v62(v61, &v128.origin); v63 = GJTransformControl::spriteByTag(a1, 4); v64 = v63->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v125.x + (float)(v57 * 0.5), v55); v64(v63, &v128.origin); v65 = GJTransformControl::spriteByTag(a1, 5); v66 = v65->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v125.x + (float)(v57 * 0.5), v56); v66(v65, &v128.origin); v67 = GJTransformControl::spriteByTag(a1, 6); v68 = v67->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v51, v55); v68(v67, &v128.origin); v69 = GJTransformControl::spriteByTag(a1, 7); v70 = v69->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v53, v55); v70(v69, &v128.origin); v71 = GJTransformControl::spriteByTag(a1, 8); v72 = v71->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v51, v56); v72(v71, &v128.origin); v73 = GJTransformControl::spriteByTag(a1, 9); v74 = v73->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v53, v56); v74(v73, &v128.origin); v75 = GJTransformControl::spriteByTag(a1, 10); v76 = v75->setPosition; if ( v112 ) { cocos2d::CCPoint::CCPoint(&v128.origin, 0.0, v124.y + 30.0); v76(v75, &v128.origin); v77 = GJTransformControl::spriteByTag(a1, 11); v78 = 0.0; v79 = v124.x + 30.0; v80 = v77->setPosition; } else { v107 = GJTransformControl::spriteByTag(a1, 10); v108 = (float *)v107->getPosition(v107); cocos2d::CCPoint::CCPoint(&v128.origin, *v108, v124.y + 30.0); v76(v75, &v128.origin); v77 = GJTransformControl::spriteByTag(a1, 11); v80 = v77->setPosition; v114 = v124.x + 30.0; v109 = GJTransformControl::spriteByTag(a1, 11); v110 = (__int64)v109->getPosition(v109); v79 = v114; v78 = *(float *)(v110 + 4); } cocos2d::CCPoint::CCPoint(&v128.origin, v79, v78); v80(v77, &v128.origin); v81 = a1->m_warpLockButton->getParent(a1->m_warpLockButton); v82 = v81->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v124.x + 40.0, v124.y + 40.0); v82(v81, &v128.origin); cocos2d::CCPoint::CCPoint(&v128.origin, v124.x + 60.0, v56 + v58); cocos2d::CCPoint::operator=(&a1->m_rotatePosition, v83, v84); GJTransformControl::calculateRotationOffset(a1); v85 = GJTransformControl::spriteByTag(a1, 12); v86 = v85->setPosition; cocos2d::CCNode::convertToWorldSpace(a1->m_mainNodeParent, &a1->m_rotatePosition); v130 = cocos2d::CCNode::convertToNodeSpace(a1, &v127); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *, float, float))v86)(v85, &v128, v130.x, v130.y); LABEL_70: v90 = GameManager::sharedState(); v90->m_levelEditorLayer->m_objectLayer->setScale(v90->m_levelEditorLayer->m_objectLayer, v7); v91 = GameManager::sharedState(); v91->m_levelEditorLayer->m_objectLayer->setPosition(v91->m_levelEditorLayer->m_objectLayer, &v115); }
GD Web Decomp Icon

GD Web Decomp

Raw Source