//
// PlayerObject::updateTimeMod from 0x1404ff370 to 0x1404ff6fd (909 bytes)
//
// 10 xrefs:
// > GJBaseGameLayer::setupLevelStart @ 0x140319d12
// > GJBaseGameLayer::setupLevelStart @ 0x140319d2d
// > GJBaseGameLayer::update @ 0x140340d2d
// > GJBaseGameLayer::update @ 0x140340d49
// > MenuGameLayer::resetPlayer @ 0x1404715ce
// > PlayerObject::init @ 0x1404e5627
// > PlayerObject::resetObject @ 0x1404f56b4
// > PlayerObject::copyAttributes @ 0x1404feb6a
// > PlayerObject::loadFromCheckpoint @ 0x1405010f7
// > ??> @ 0x14092a68c
//
// 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:33:24 +0000
//
// Hidden C++ exception states: #wind=4
void __fastcall PlayerObject::updateTimeMod(__int64 a1, float a2, char a3)
{
__int64 v4; // rax
_BYTE *v5; // r14
const char *v6; // rbx
__int64 v7; // rax
cocos2d::CCParticleSystem *v8; // rdi
__int64 v9; // rdx
__int64 v10; // rbx
float v11; // xmm6_4
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
float v14; // xmm0_4
__int64 v15; // rax
__int64 v16; // rbx
__int64 v17; // rcx
cocos2d::CCDirector *v18; // rax
float v19; // xmm0_4
__int64 v20; // rax
__int64 v21; // rax
cocos2d::CCMotionStreak *v22; // rcx
void *v23; // [rsp+60h] [rbp+8h] BYREF
char v24; // [rsp+78h] [rbp+20h] BYREF
if ( !*(_BYTE *)(a1 + 2025) && *(_BYTE *)(a1 + 2028) && !a3 && *(float *)(a1 + 2556) != a2 )
{
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v23 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v23);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
v5 = *(_BYTE **)(v4 + 560);
if ( !*(_BYTE *)(v4 + 957) && !v5[13085] )
{
if ( a2 == 0.69999999 )
{
v6 = "speedEffect_slow.plist";
}
else if ( a2 == 1.1 )
{
v6 = "speedEffect_fast.plist";
}
else if ( a2 == 1.3 )
{
v6 = "speedEffect_vfast.plist";
}
else
{
v6 = "speedEffect_vvfast.plist";
if ( a2 != 1.6 )
v6 = "speedEffect_normal.plist";
}
v7 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v7, &v23);
v8 = cocos2d::CCParticleSystemQuad::create(v6, 0);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v8 + 1528LL))(v8, 2);
v9 = *(_QWORD *)v8;
LOBYTE(v9) = 1;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v8 + 1544LL))(v8, v9);
(*(void (__fastcall **)(_BYTE *, cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v5 + 456LL))(v5, v8, 100);
v10 = *(_QWORD *)v8;
v11 = *((float *)&v23 + 1) * 0.5;
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
v14 = cocos2d::CCDirector::getScreenRight(v13) + 10.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, v14, v11);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(v10 + 184))(v8, v15);
v16 = *(_QWORD *)v8;
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17);
v19 = (float)(cocos2d::CCDirector::getScreenScaleFactorH(v18) * 320.0) * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, 10.0, v19);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(v16 + 952))(v8, v20);
cocos2d::CCParticleSystem::resetSystem(v8);
}
}
*(float *)(a1 + 2556) = a2;
if ( a2 == 0.89999998 )
{
*(_QWORD *)(a1 + 1992) = 0x40265C2D20000000LL;
*(_QWORD *)(a1 + 2000) = 0x3FEEA99100000000LL;
LABEL_27:
v21 = 0x4017147B60000000LL;
goto LABEL_28;
}
if ( a2 == 0.69999999 )
{
*(_QWORD *)(a1 + 1992) = 0x40253D74D594F26BLL;
*(_QWORD *)(a1 + 2000) = 0x3FEE161C36976BC2LL;
v21 = 0x4017EB85A4F00EF1LL;
}
else if ( a2 == 1.1 )
{
*(_QWORD *)(a1 + 1992) = 0x4026D70E6F2E8C05LL;
*(_QWORD *)(a1 + 2000) = 0x3FEEA15FCC1871E7LL;
v21 = 0x40177AE1CDE5D181LL;
}
else
{
if ( a2 != 1.3 && a2 != 1.6 )
goto LABEL_27;
*(_QWORD *)(a1 + 1992) = 0x402675C6C11A1123LL;
*(_QWORD *)(a1 + 2000) = 0x3FEEC22467BE553BLL;
v21 = 0x401800008637BD06LL;
}
LABEL_28:
*(_QWORD *)(a1 + 1984) = v21;
PlayerObject::updateRobotAnimationSpeed(a1);
if ( *(_BYTE *)(a1 + 2499) && !*(_BYTE *)(a1 + 2610) && !*(_BYTE *)(a1 + 2540) )
{
*(_WORD *)(a1 + 1840) = 0;
*(_BYTE *)(a1 + 1648) = 0;
*(_DWORD *)(a1 + 1832) = 0;
PlayerObject::runBallRotation(a1, 1.0);
}
v22 = *(cocos2d::CCMotionStreak **)(a1 + 1968);
if ( v22 )
sub_1404E4520(v22, *(_DWORD *)(a1 + 2356), a1);
}