// // cocos2d::extension::CCControlSwitchSprite::initWithMaskSprite from 0xd110b4 to 0xd11428 (884 bytes) // // 2 xrefs: // > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0xd11618 // > @ 0xc7858 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:07:03 +0000 // __int64 __fastcall cocos2d::extension::CCControlSwitchSprite::initWithMaskSprite( cocos2d::extension::CCControlSwitchSprite *this, cocos2d::CCSprite *a2, cocos2d::CCSprite *a3, cocos2d::CCSprite *a4, cocos2d::CCSprite *a5, cocos2d::CCLabelTTF *a6, cocos2d::CCLabelTTF *a7) { cocos2d::CCTexture2D *v14; // x0 unsigned __int8 v15; // w0 unsigned int v16; // w23 float v18; // s8 float *v19; // x0 cocos2d::CCSprite *v20; // x1 float v21; // s0 cocos2d::CCObject *v22; // x0 cocos2d::CCObject *v23; // x0 cocos2d::CCObject *v24; // x0 cocos2d::CCObject *v25; // x0 cocos2d::CCObject *v26; // x0 cocos2d::CCObject *v27; // x0 cocos2d::CCObject *v28; // x21 cocos2d::CCObject *v29; // x1 cocos2d::CCGLProgram *v30; // x22 cocos2d::CCGLProgram *v31; // x0 cocos2d::CCGLProgram *v32; // x0 cocos2d::CCGLProgram *v33; // x0 cocos2d::CCGLProgram *v34; // x0 cocos2d::CCGLProgram *v35; // x0 void (__fastcall *v36)(cocos2d::extension::CCControlSwitchSprite *, __int64 *); // x21 __int64 v37; // [xsp+70h] [xbp+70h] BYREF v14 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a2 + 1072LL))(a2); v15 = cocos2d::CCSprite::initWithTexture(this, v14); v16 = v15; if ( v15 ) { *((_DWORD *)this + 153) = 0; v18 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a5 + 328LL))(a5); v19 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a3 + 328LL))(a3); v20 = *((cocos2d::CCSprite **)this + 80); v21 = *v19; *((_DWORD *)this + 152) = *((_DWORD *)this + 153); *((float *)this + 154) = -(float)(v21 - (float)(v18 * 0.5)); if ( a3 != v20 ) { cocos2d::CCObject::retain(a3); v22 = *((cocos2d::CCObject **)this + 80); if ( v22 ) cocos2d::CCObject::release(v22); *((_QWORD *)this + 80) = a3; } v23 = *((cocos2d::CCObject **)this + 81); if ( v23 != a4 ) { if ( a4 ) { cocos2d::CCObject::retain(a4); v23 = *((cocos2d::CCObject **)this + 81); } if ( v23 ) cocos2d::CCObject::release(v23); *((_QWORD *)this + 81) = a4; } if ( a5 != *((cocos2d::CCSprite **)this + 82) ) { cocos2d::CCObject::retain(a5); v24 = *((cocos2d::CCObject **)this + 82); if ( v24 ) cocos2d::CCObject::release(v24); *((_QWORD *)this + 82) = a5; } v25 = *((cocos2d::CCObject **)this + 83); if ( v25 != a6 ) { if ( a6 ) { cocos2d::CCObject::retain(a6); v25 = *((cocos2d::CCObject **)this + 83); } if ( v25 ) cocos2d::CCObject::release(v25); *((_QWORD *)this + 83) = a6; } v26 = *((cocos2d::CCObject **)this + 84); if ( v26 != a7 ) { if ( a7 ) { cocos2d::CCObject::retain(a7); v26 = *((cocos2d::CCObject **)this + 84); } if ( v26 ) cocos2d::CCObject::release(v26); *((_QWORD *)this + 84) = a7; } (*(void (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *, _QWORD))(*(_QWORD *)this + 456LL))( this, *((_QWORD *)this + 82)); v27 = (cocos2d::CCObject *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a2 + 1072LL))(a2); v28 = v27; v29 = *((cocos2d::CCObject **)this + 78); if ( v29 != v27 ) { if ( v27 ) { cocos2d::CCObject::retain(v27); v29 = *((cocos2d::CCObject **)this + 78); } if ( v29 ) cocos2d::CCObject::release(v29); *((_QWORD *)this + 78) = v28; } v30 = (cocos2d::CCGLProgram *)operator new(0x78u); cocos2d::CCGLProgram::CCGLProgram(v30); cocos2d::CCGLProgram::initWithVertexShaderByteArray( v30, cocos2d::ccPositionTextureColor_vert[0], cocos2d::ccExSwitchMask_frag[0]); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *, cocos2d::CCGLProgram *))(*(_QWORD *)this + 664LL))( this, v30); cocos2d::CCObject::release(v30); v31 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); cocos2d::CCGLProgram::addAttribute(v31, "a_position", 0); v32 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); cocos2d::CCGLProgram::addAttribute(v32, "a_color", 1u); v33 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); cocos2d::CCGLProgram::addAttribute(v33, "a_texCoord", 2u); v34 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); cocos2d::CCGLProgram::link(v34); v35 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); cocos2d::CCGLProgram::updateUniforms(v35); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); *((_DWORD *)this + 158) = glGetUniformLocation(); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *))(*(_QWORD *)this + 656LL))(this); *((_DWORD *)this + 159) = glGetUniformLocation(); v36 = *(void (__fastcall **)(cocos2d::extension::CCControlSwitchSprite *, __int64 *))(*(_QWORD *)this + 320LL); (*(void (__fastcall **)(__int64 *__return_ptr, _QWORD))(**((_QWORD **)this + 78) + 144LL))( &v37, *((_QWORD *)this + 78)); v36(this, &v37); cocos2d::extension::CCControlSwitchSprite::needsLayout(this); } return v16; }
GD Web Decomp Icon

GD Web Decomp

Raw Source