//
// cocos2d::CCDirector::toggleShowFPS from 0x5c3404 to 0x5c34cc (200 bytes)
//
// 5 xrefs:
// > LoadingLayer::loadAssets @ 0x30bacc
// > GraphicsReloadLayer::performReload @ 0x422342
// > MoreOptionsLayer::onToggle @ 0x422642
// > MoreVideoOptionsLayer::onToggle @ 0x426444
// > cocos2d::CCDirector::removeStatsLabel @ 0x5c3cda
//
// 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::CCDirector::toggleShowFPS(int a1, int a2, int a3, float *a4)
{
cocos2d::CCObject *v6; // r0
cocos2d::CCLabelBMFont *v8; // r0
cocos2d::CCLabelBMFont_vtbl *v9; // r3
int v10; // r8
void (__fastcall *v11)(int, cocos2d::CCPoint *); // r9
cocos2d::CCDirector *v12; // r0
int v13; // r4
void (__fastcall *v14)(int, cocos2d::CCPoint *); // r8
cocos2d::CCSize v15; // [sp+4h] [bp-18h] BYREF
cocos2d::CCPoint v16; // [sp+Ch] [bp-10h] BYREF
v6 = *(cocos2d::CCObject **)(a1 + 264);
if ( v6 )
{
cocos2d::CCObject::release(v6);
*(_DWORD *)(a1 + 264) = 0;
}
*(_BYTE *)(a1 + 260) = a2;
if ( a2 )
{
v8 = cocos2d::CCLabelBMFont::create();
v9 = v8->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*(_DWORD *)(a1 + 264) = v8;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v9->setScale)(v8, 1056964608);
v10 = *(_DWORD *)(a1 + 264);
v11 = *(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v10 + 140);
cocos2d::CCPoint::CCPoint(&v16, 0.0, 1.0);
v11(v10, &v16);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 264));
v12 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v15, v12);
v13 = *(_DWORD *)(a1 + 264);
v14 = *(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint(&v16, *a4 + 1.0, v15.height + a4[1]);
v14(v13, &v16);
}
}