// // cocos2d::extension::CCControlSlider::initWithSprites from 0x5a3a7c to 0x5a3c86 (522 bytes) // // 0 xrefs: // // 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 // bool cocos2d::extension::CCControlSlider::initWithSprites( cocos2d::extension::CCControlSlider *a1, cocos2d::CCSprite *a2, cocos2d::CCSprite *a3, cocos2d::CCSprite *a4) { _BOOL4 v8; // r9 cocos2d::CCObject *m_uIndexInArray; // r0 cocos2d::CCObject *m_eObjType; // r0 cocos2d::CCObject *m_uAutoReleaseCount; // r0 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r6 int v13; // r6 void (__fastcall *v14)(int, cocos2d::CCRect *); // r7 int v15; // r6 void (__fastcall *v16)(int, cocos2d::CCRect *); // r7 float width; // s17 const cocos2d::CCSize *v18; // r0 cocos2d::CCObjectType v19; // r7 void (__fastcall *v20)(cocos2d::CCObjectType, cocos2d::CCRect *); // r10 cocos2d::CCObjectType v21; // r7 void (__fastcall *v22)(cocos2d::CCObjectType, cocos2d::CCRect *); // r10 const cocos2d::CCSize *v23; // r0 unsigned int v24; // r7 void (__fastcall *v25)(unsigned int, cocos2d::CCRect *); // r10 const cocos2d::CCSize *v26; // r0 cocos2d::extension::CCControlSlider_vtbl *v27; // r3 cocos2d::CCRect v29; // [sp+4h] [bp-34h] BYREF cocos2d::CCRect v30; // [sp+14h] [bp-24h] BYREF cocos2d::CCRect v31; // [sp+24h] [bp-14h] BYREF v8 = cocos2d::extension::CCControl::init(a1); if ( v8 ) { a1->ignoreAnchorPointForPosition(a1, 0); a1->setTouchEnabled(a1, 1); if ( (cocos2d::CCSprite *)a1[1].m_uIndexInArray != a2 ) { if ( a2 ) cocos2d::CCObject::retain(a2); m_uIndexInArray = (cocos2d::CCObject *)a1[1].m_uIndexInArray; if ( m_uIndexInArray ) cocos2d::CCObject::release(m_uIndexInArray); a1[1].m_uIndexInArray = (int)a2; } if ( (cocos2d::CCSprite *)a1[1].m_eObjType != a3 ) { if ( a3 ) cocos2d::CCObject::retain(a3); m_eObjType = (cocos2d::CCObject *)a1[1].m_eObjType; if ( m_eObjType ) cocos2d::CCObject::release(m_eObjType); a1[1].m_eObjType = (cocos2d::CCObjectType)a3; } if ( (cocos2d::CCSprite *)a1[1].m_uAutoReleaseCount != a4 ) { if ( a4 ) cocos2d::CCObject::retain(a4); m_uAutoReleaseCount = (cocos2d::CCObject *)a1[1].m_uAutoReleaseCount; if ( m_uAutoReleaseCount ) cocos2d::CCObject::release(m_uAutoReleaseCount); a1[1].m_uAutoReleaseCount = (unsigned int)a4; } cocos2d::CCNode::boundingBox(&v30, a2); cocos2d::CCNode::boundingBox(&v31, a4); cocos2d::extension::CCControlUtils::CCRectUnion(&v29, &v30, &v31); setContentSize = a1->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v31, v29.size.width, v29.size.height); setContentSize(a1, (const cocos2d::CCSize *)&v31); v13 = a1[1].m_uIndexInArray; v14 = *(void (__fastcall **)(int, cocos2d::CCRect *))(*(_DWORD *)v13 + 140); cocos2d::CCPoint::CCPoint(&v31.origin, 0.5, 0.5); v14(v13, &v31); v15 = a1[1].m_uIndexInArray; v16 = *(void (__fastcall **)(int, cocos2d::CCRect *))(*(_DWORD *)v15 + 92); width = a1->getContentSize(a1)->width; v18 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v31.origin, width * 0.5, v18->height * 0.5); v16(v15, &v31); a1->addChild(a1, (cocos2d::CCNode *)a1[1].m_uIndexInArray); v19 = a1[1].m_eObjType; v20 = *(void (__fastcall **)(cocos2d::CCObjectType, cocos2d::CCRect *))(*(_DWORD *)v19 + 140); cocos2d::CCPoint::CCPoint(&v31.origin, 0.0, 0.5); v20(v19, &v31); v21 = a1[1].m_eObjType; v22 = *(void (__fastcall **)(cocos2d::CCObjectType, cocos2d::CCRect *))(*(_DWORD *)v21 + 92); v23 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v31.origin, 0.0, v23->height * 0.5); v22(v21, &v31); a1->addChild(a1, (cocos2d::CCNode *)a1[1].m_eObjType); v24 = a1[1].m_uAutoReleaseCount; v25 = *(void (__fastcall **)(unsigned int, cocos2d::CCRect *))(*(_DWORD *)v24 + 92); v26 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v31.origin, 0.0, v26->height * 0.5); v25(v24, &v31); a1->addChild(a1, (cocos2d::CCNode *)a1[1].m_uAutoReleaseCount); a1[1].m_nLuaID = 1065353216; v27 = a1->cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1[1].m_uID = 0; ((void (__fastcall *)(cocos2d::extension::CCControlSlider *, _DWORD))v27->setValue)(a1, 0); } return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source