// // cocos2d::extension::CCScale9Sprite::updatePositions from 0xaa25cc to 0xaa2ae8 (1308 bytes) // // 2 xrefs: // > cocos2d::extension::CCScale9Sprite::visit @ 0xaa34ac // > @ 0x3a8f0 // // 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 cocos2d::extension::CCScale9Sprite::updatePositions(cocos2d::extension::CCScale9Sprite *a1) { float width; // s8 float v3; // s8 float v4; // s8 float height; // s9 float v6; // s9 float v7; // s9 float v8; // s8 float v9; // s9 float v10; // s11 float v11; // s10 float v12; // s13 const cocos2d::CCSize *v13; // x0 cocos2d::CCSprite *bottomLeft; // x22 float v15; // s12 void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *bottomRight; // x22 void (__fastcall *v18)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *topLeft; // x22 void (__fastcall *v20)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *topRight; // x22 void (__fastcall *v22)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *left; // x22 void (__fastcall *v24)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *right; // x22 void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *top; // x22 void (__fastcall *v28)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *bottom; // x22 void (__fastcall *v30)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *centre; // x22 void (__fastcall *v32)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v33; // x22 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v35; // x22 float v36; // s11 void (__fastcall *v37)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v38; // x22 float v39; // s10 void (__fastcall *v40)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v41; // x22 void (__fastcall *v42)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v43; // x22 void (__fastcall *v44)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v45; // x22 void (__fastcall *v46)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v47; // x22 void (__fastcall *v48)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v49; // x22 void (__fastcall *v50)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCSprite *v51; // x19 void (__fastcall *v52)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCSize v53; // [xsp+78h] [xbp+78h] BYREF cocos2d::CCPoint v54; // [xsp+80h] [xbp+80h] BYREF if ( a1->_topLeft && a1->_topRight && a1->_bottomRight && a1->_bottomLeft ) { if ( a1->_centre ) { cocos2d::CCSize::CCSize(&v53, &a1->m_obContentSize); width = v53.width; v3 = width - a1->_topLeft->getContentSize(a1->_topLeft)->width; v4 = v3 - a1->_topRight->getContentSize(a1->_topRight)->width; height = v53.height; v6 = height - a1->_topLeft->getContentSize(a1->_topLeft)->height; v7 = v6 - a1->_bottomRight->getContentSize(a1->_bottomRight)->height; v8 = v4 / a1->_centre->getContentSize(a1->_centre)->width; v9 = v7 / a1->_centre->getContentSize(a1->_centre)->height; a1->_centre->setScaleX(a1->_centre, v8); a1->_centre->setScaleY(a1->_centre, v9); v10 = a1->_centre->getContentSize(a1->_centre)->width; v11 = a1->_centre->getContentSize(a1->_centre)->height; v12 = a1->_bottomLeft->getContentSize(a1->_bottomLeft)->width; v13 = a1->_bottomLeft->getContentSize(a1->_bottomLeft); bottomLeft = a1->_bottomLeft; v15 = v13->height; setAnchorPoint = bottomLeft->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); setAnchorPoint(bottomLeft, &v54); bottomRight = a1->_bottomRight; v18 = bottomRight->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v18(bottomRight, &v54); topLeft = a1->_topLeft; v20 = topLeft->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v20(topLeft, &v54); topRight = a1->_topRight; v22 = topRight->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v22(topRight, &v54); left = a1->_left; v24 = left->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v24(left, &v54); right = a1->_right; v26 = right->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v26(right, &v54); top = a1->_top; v28 = top->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v28(top, &v54); bottom = a1->_bottom; v30 = bottom->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v30(bottom, &v54); centre = a1->_centre; v32 = centre->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); v32(centre, &v54); v33 = a1->_bottomLeft; setPosition = v33->setPosition; cocos2d::CCPoint::CCPoint(&v54, 0.0, 0.0); setPosition(v33, &v54); v35 = a1->_bottomRight; v36 = v12 + (float)(v8 * v10); v37 = v35->setPosition; cocos2d::CCPoint::CCPoint(&v54, v36, 0.0); v37(v35, &v54); v38 = a1->_topLeft; v39 = v15 + (float)(v9 * v11); v40 = v38->setPosition; cocos2d::CCPoint::CCPoint(&v54, 0.0, v39); v40(v38, &v54); v41 = a1->_topRight; v42 = v41->setPosition; cocos2d::CCPoint::CCPoint(&v54, v36, v39); v42(v41, &v54); v43 = a1->_left; v44 = v43->setPosition; cocos2d::CCPoint::CCPoint(&v54, 0.0, v15); v44(v43, &v54); a1->_left->setScaleY(a1->_left, v9); v45 = a1->_right; v46 = v45->setPosition; cocos2d::CCPoint::CCPoint(&v54, v36, v15); v46(v45, &v54); a1->_right->setScaleY(a1->_right, v9); v47 = a1->_bottom; v48 = v47->setPosition; cocos2d::CCPoint::CCPoint(&v54, v12, 0.0); v48(v47, &v54); a1->_bottom->setScaleX(a1->_bottom, v8); v49 = a1->_top; v50 = v49->setPosition; cocos2d::CCPoint::CCPoint(&v54, v12, v39); v50(v49, &v54); a1->_top->setScaleX(a1->_top, v8); v51 = a1->_centre; v52 = v51->setPosition; cocos2d::CCPoint::CCPoint(&v54, v12, v15); v52(v51, &v54); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source