//
// PlayLayer::markCheckpoint from 0x5e4220 to 0x5e42dc (188 bytes)
//
// 4 xrefs:
// > PlayLayer::processCheckpoints @ 0x5e43c8
// > PlayLayer::processCheckpoints @ 0x5e443c
// > PlayerObject::tryPlaceCheckpoint @ 0x62e3dc
// > ??> @ 0x8b578
//
// 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; // x20
float *v3; // x21
GameObject *Object; // x0
cocos2d::CCArray *m_checkpointArray; // x19
int v7; // w0
__int64 v8; // x0
if ( a1->m_player1->m_isDead )
return nullptr;
Checkpoint = PlayLayer::createCheckpoint(a1);
v3 = &a1->m_varianceValues.__elems_[1975];
PlayLayer::storeCheckpoint(a1, Checkpoint);
Object = CheckpointObject::getObject(Checkpoint);
Object->activateObject(Object);
if ( a1->m_isPlatformer && a1->m_isPracticeMode && (unsigned int)cocos2d::CCArray::count(a1->m_checkpointArray) > 1 )
{
m_checkpointArray = a1->m_checkpointArray;
v7 = cocos2d::CCArray::count(m_checkpointArray);
v8 = cocos2d::CCArray::objectAtIndex(m_checkpointArray, v7 - 2);
GameObject::makeInvisible(*(GameObject **)(v8 + 3688));
}
*((_BYTE *)v3 + 2620) = 0;
return Checkpoint;
}