//
// PlayLayer::markCheckpoint from 0x31f0fc to 0x31f16c (112 bytes)
//
// 3 xrefs:
// > PlayLayer::processCheckpoints @ 0x31f18c
// > PlayLayer::processCheckpoints @ 0x31f1ae
// > PlayerObject::tryPlaceCheckpoint @ 0x344ecc
//
// 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; // r5
GameObject *Object; // r0
cocos2d::CCArray *m_checkpointArray; // r6
int v5; // r0
int v6; // r0
if ( a1->m_player1->m_isDead )
return nullptr;
Checkpoint = PlayLayer::createCheckpoint(a1);
PlayLayer::storeCheckpoint(a1, Checkpoint);
Object = CheckpointObject::getObject(Checkpoint);
Object->activateObject(Object);
if ( a1->m_isPlatformer && a1->m_isPracticeMode && cocos2d::CCArray::count(a1->m_checkpointArray) > 1u )
{
m_checkpointArray = a1->m_checkpointArray;
v5 = cocos2d::CCArray::count(m_checkpointArray);
v6 = cocos2d::CCArray::objectAtIndex(m_checkpointArray, v5 - 2);
GameObject::makeInvisible(*(GameObject **)(v6 + 2576));
}
a1->m_tryPlaceCheckpoint = 0;
return Checkpoint;
}