//
// PlayLayer::markCheckpoint from 0x1403b7570 to 0x1403b7633 (195 bytes)
//
// 4 xrefs:
// > PlayerObject::tryPlaceCheckpoint @ 0x1403a3657
// > PlayLayer::processCheckpoints @ 0x1403b492f
// > PlayLayer::processCheckpoints @ 0x1403b4997
// > ??> @ 0x1406d6fd4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
CheckpointObject *PlayLayer::markCheckpoint(PlayLayer *a1)
{
CheckpointObject *Checkpoint; // rdi
unsigned int v4; // eax
__int64 v5; // rcx
if ( a1->m_player1->m_isDead )
return nullptr;
Checkpoint = PlayLayer::createCheckpoint(a1);
PlayLayer::storeCheckpoint(a1, Checkpoint);
Checkpoint->m_physicalCheckpointObject->activateObject(Checkpoint->m_physicalCheckpointObject);
if ( a1->m_isPlatformer && a1->m_isPracticeMode && cocos2d::CCArray::count(a1->m_checkpointArray) > 1 )
{
v4 = cocos2d::CCArray::count(a1->m_checkpointArray);
v5 = *(_QWORD *)&cocos2d::CCArray::objectAtIndex(a1->m_checkpointArray, v4 - 2)[65].m_uIndexInArray;
*(_BYTE *)(v5 + 774) = 1;
*(_BYTE *)(v5 + 1007) = 1;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(v5 + 320) + 40LL))(v5 + 320, 0);
}
a1->m_tryPlaceCheckpoint = 0;
return Checkpoint;
}