//
// cocos2d::CCDirector::calculateDeltaTime from 0x1800c1840 to 0x1800c18e7 (167 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c3408
//
// 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:25 +0000
//
void __fastcall cocos2d::CCDirector::calculateDeltaTime(
cocos2d::CCDirector *this,
__int64 a2,
struct cocos2d::timezone *a3)
{
__int64 v4; // rbx
float v5; // xmm0_4
__int64 v6; // [rsp+38h] [rbp+10h] BYREF
if ( (unsigned int)cocos2d::CCTime::gettimeofdayCocos2d((struct cocos2d::cc_timeval *)&v6, nullptr, a3) )
{
*((_QWORD *)this + 21) = 0;
}
else
{
v4 = v6;
if ( *((_BYTE *)this + 312) )
{
*((_BYTE *)this + 312) = 0;
v5 = 0.0;
}
else
{
v5 = fmaxf(
0.0,
(float)((float)(HIDWORD(v6) - *(_DWORD *)(*((_QWORD *)this + 38) + 4LL)) / 1000000.0)
+ (float)(v6 - **((_DWORD **)this + 38)));
}
*((float *)this + 42) = v5;
*((float *)this + 43) = v5;
cocos2d::CCDirector::applySmoothFix(this);
**((_QWORD **)this + 38) = v4;
}
}