//
// cocos2d::CCDirector::toggleShowFPS from 0x1004780e0 to 0x1004781f3 (275 bytes)
//
// 4 xrefs:
// > LoadingLayer::loadAssets @ 0x10038c7ae
// > MoreOptionsLayer::onToggle @ 0x10087f6f1
// > MoreVideoOptionsLayer::onToggle @ 0x10088389e
// > GraphicsReloadLayer::performReload @ 0x100888433
//
// This function is hookable on this platform (idp: pc, 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 12:30:36 +0000
//
void __fastcall cocos2d::CCDirector::toggleShowFPS(__int64 a1, char a2, __int64 a3, float *a4)
{
__int64 v7; // rdi
__int64 v8; // r15
__int64 v9; // rax
__int64 v10; // r15
__int64 v11; // rax
__int64 v12; // r14
float v13; // [rsp+0h] [rbp-30h] BYREF
_QWORD v14[5]; // [rsp+8h] [rbp-28h] BYREF
v7 = *(_QWORD *)(a1 + 376);
if ( v7 )
{
cocos2d::CCObject::release(v7);
*(_QWORD *)(a1 + 376) = 0;
}
*(_BYTE *)(a1 + 368) = a2;
if ( a2 )
{
if ( (*(_BYTE *)a3 & 1) != 0 )
v8 = *(_QWORD *)(a3 + 16);
else
v8 = a3 + 1;
v9 = cocos2d::CCLabelBMFont::create_3("FPS: 0", v8);
*(_QWORD *)(a1 + 376) = v9;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.5);
v10 = *(_QWORD *)(a1 + 376);
sub_100278250((float *)v14, 0.0, 1.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v10 + 296LL))(v10, v14);
cocos2d::CCObject::retain(*(_QWORD *)(a1 + 376));
v11 = cocos2d::CCDirector::sharedDirector();
sub_100278630(v14, (_QWORD *)(v11 + 320));
v12 = *(_QWORD *)(a1 + 376);
sub_100278250(&v13, *a4 + 1.0, *((float *)v14 + 1) + a4[1]);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v12 + 184LL))(v12, &v13);
}
}