//
// sub_140319F40 from 0x140319f40 to 0x14031a02c (236 bytes)
//
// 2 xrefs:
// > PlayerObject::loadFromCheckpoint @ 0x140501600
// > ??> @ 0x14091eb90
//
// 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:30:19 +0000
//
__int64 __fastcall sub_140319F40(__int64 a1, __int64 a2, _BYTE *a3)
{
__int64 v6; // rdx
__int64 v7; // r8
const struct cocos2d::CCPoint *v8; // rax
__int64 v9; // rax
char v11; // [rsp+30h] [rbp+8h] BYREF
PlayerObject::toggleFlyMode(a2, 0, 0);
PlayerObject::toggleBirdMode(a2, 0, 0);
PlayerObject::toggleRollMode(a2, 0, 0);
PlayerObject::toggleDartMode(a2, 0, 0);
PlayerObject::toggleSpiderMode(a2, 0, 0);
PlayerObject::toggleSwingMode(a2, 0, 0);
if ( a3 )
{
v8 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a3 + 200LL))(a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, v8);
cocos2d::CCPoint::operator=(a2 + 2568, v9);
*(_QWORD *)(a2 + 2696) = a3;
}
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
a3 = *(_BYTE **)(a1 + 1032);
}
else if ( !a3 )
{
LABEL_9:
v7 = 0;
goto LABEL_10;
}
*(_QWORD *)(a1 + 1024) = a3;
if ( !a3[1052] )
goto LABEL_9;
LOBYTE(v7) = 1;
LABEL_10:
LOBYTE(v6) = 1;
return PlayerObject::toggleRobotMode(a2, v6, v7);
}