// // cocos2d::extension::CCControlSwitch::setOn from 0x18000cef0 to 0x18000cfaa (186 bytes) // // 2 xrefs: // > @ 0x18002fdf8 // > @ 0x180049dbc // // 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 __fastcall cocos2d::extension::CCControlSwitch::setOn(cocos2d::extension::CCControlSwitch *this, char a2, char a3) { float *v4; // rax float v5; // xmm3_4 struct cocos2d::CCAction *v6; // rax float *v7; // rcx float v8; // xmm1_4 float v9; // xmm0_4 *((_BYTE *)this + 485) = a2; if ( a3 ) { v4 = *((float **)this + 59); if ( a2 ) v5 = v4[153]; else v5 = v4[154]; v6 = cocos2d::CCActionTween::create(0.2, "sliderXPosition", v4[152], v5); cocos2d::CCNode::runAction(*((cocos2d::CCNode **)this + 59), v6); } else { v7 = *((float **)this + 59); if ( a2 ) v8 = v7[153]; else v8 = v7[154]; v9 = v7[154]; if ( v9 < v8 ) v9 = fminf(v7[153], v8); v7[152] = v9; sub_18000C670((__int64)v7); } (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 1072LL))(this, 256); }