//
// cocos2d::CCDirector::toggleShowFPS from 0x1800c3790 to 0x1800c38c3 (307 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c36cc
//
// 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 11:22:26 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCDirector::toggleShowFPS(__int64 a1, char a2, const char *a3, float *a4)
{
cocos2d::CCObject *v8; // rcx
const char *v9; // rdx
struct cocos2d::CCLabelBMFont *v10; // rax
__int64 *v11; // rdi
__int64 v12; // rbx
float *v13; // rax
struct cocos2d::CCDirector *v14; // rax
__int64 *v15; // rdi
__int64 v16; // rbx
float *v17; // rax
_DWORD v18[2]; // [rsp+20h] [rbp-48h] BYREF
float v19; // [rsp+28h] [rbp-40h] BYREF
const char *v20; // [rsp+30h] [rbp-38h]
v20 = a3;
v8 = *(cocos2d::CCObject **)(a1 + 376);
if ( v8 )
{
cocos2d::CCObject::release(v8);
*(_QWORD *)(a1 + 376) = 0;
}
*(_BYTE *)(a1 + 368) = a2;
if ( a2 )
{
v9 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v9 = *(const char **)a3;
v10 = cocos2d::CCLabelBMFont::create("FPS: 0", v9);
*(_QWORD *)(a1 + 376) = v10;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v10 + 160LL))(v10);
v11 = *(__int64 **)(a1 + 376);
v12 = *v11;
v13 = kmVec2Fill(&v19, 0.0, 1.0);
(*(void (__fastcall **)(__int64 *, float *))(v12 + 288))(v11, v13);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 376));
v14 = cocos2d::CCDirector::sharedDirector();
cocos2d::cc_timeval::operator=(v18, (_DWORD *)v14 + 80);
v15 = *(__int64 **)(a1 + 376);
v16 = *v15;
v17 = kmVec2Fill(&v19, *a4 + 1.0, *(float *)&v18[1] + a4[1]);
(*(void (__fastcall **)(__int64 *, float *))(v16 + 184))(v15, v17);
}
sub_180005C70((__int64)a3);
}