//
// GJBaseGameLayer::applyTimeWarp from 0x99883c to 0x998914 (216 bytes)
//
// 4 xrefs:
// > ??> @ 0x55888
// > ??> @ 0x1428a00
// > ??> @ 0x1435f60
// > ??> @ 0x1475830
//
// This function is hookable on this platform (idp: arm, 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:58:03 +0000
//
__int64 __fastcall GJBaseGameLayer::applyTimeWarp(GJBaseGameLayer *this, float a2)
{
GJBaseGameLayer *v2; // x19
float v3; // s1
float v4; // s8
__int64 v5; // x0
__int64 result; // x0
__int64 v7; // x0
float v8; // s0
FMODAudioEngine *v9; // x0
float v10; // [xsp+20h] [xbp+20h]
v2 = this;
v3 = *((float *)this + 3278);
v4 = a2;
*((float *)this + 206) = a2;
if ( vabds_f32(v3, 1.0) >= 0.01 )
{
this = (GJBaseGameLayer *)*((unsigned __int8 *)this + 1982);
if ( !(_DWORD)this )
v4 = a2 * v3;
}
v5 = cocos2d::CCDirector::sharedDirector(this);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 128LL))(v5);
if ( v4 != *(float *)(result + 56) )
{
result = *((unsigned __int8 *)v2 + 12664);
if ( *((_BYTE *)v2 + 12664) )
{
v7 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)result);
*(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 128LL))(v7) + 56) = v4;
if ( *((_BYTE *)v2 + 1982) )
v8 = 1.0;
else
v8 = *((float *)v2 + 3279);
v10 = v8;
v9 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)*((unsigned __int8 *)v2 + 1982));
return FMODAudioEngine::updateSystemPitch(v9, v10);
}
}
return result;
}