//
// cocos2d::CCDirector::toggleShowFPS from 0x100483750 to 0x100483863 (275 bytes)
//
// 4 xrefs:
// > LoadingLayer::loadAssets @ 0x1003a319e
// > MoreOptionsLayer::onToggle @ 0x10079e391
// > MoreVideoOptionsLayer::onToggle @ 0x1007a278e
// > GraphicsReloadLayer::performReload @ 0x1007a5223
//
// 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(__int64 a1, char a2, __int64 a3, float *a4)
{
cocos2d::CCObject *v7; // rdi
const char *v8; // r15
cocos2d::CCLabelBMFont *v9; // rax
__int64 v10; // r15
cocos2d::CCDirector *v11; // rax
__int64 v12; // r14
float v13; // [rsp+0h] [rbp-30h] BYREF
_QWORD v14[5]; // [rsp+8h] [rbp-28h] BYREF
v7 = *(cocos2d::CCObject **)(a1 + 368);
if ( v7 )
{
cocos2d::CCObject::release(v7);
*(_QWORD *)(a1 + 368) = 0;
}
*(_BYTE *)(a1 + 360) = a2;
if ( a2 )
{
if ( (*(_BYTE *)a3 & 1) != 0 )
v8 = *(const char **)(a3 + 16);
else
v8 = (const char *)(a3 + 1);
v9 = cocos2d::CCLabelBMFont::create_3("FPS: 0", v8);
*(_QWORD *)(a1 + 368) = v9;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v9->setScale)(v9, 0.5);
v10 = *(_QWORD *)(a1 + 368);
sub_10028CBE0((float *)v14, 0.0, 1.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v10 + 280LL))(v10, v14);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 368));
v11 = cocos2d::CCDirector::sharedDirector();
sub_10028CFC0(v14, &v11->m_obWinSizeInPoints);
v12 = *(_QWORD *)(a1 + 368);
sub_10028CBE0(&v13, *a4 + 1.0, *((float *)v14 + 1) + a4[1]);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v12 + 184LL))(v12, &v13);
}
}