//
// PlayLayer::removeCheckpoint from 0x1000bd1d0 to 0x1000bd2b5 (229 bytes)
//
// 3 xrefs:
// > PlayLayer::removeAllCheckpoints @ 0x1000bdb25
// > PlayerObject::removePlacedCheckpoint @ 0x100413a40
// > UILayer::onDeleteCheck @ 0x1004c8517
//
// 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
//
void __fastcall PlayLayer::removeCheckpoint(PlayLayer *a1, bool a2)
{
cocos2d::CCArray *m_checkpointArray; // rdi
__int64 v4; // rax
GameObject *v5; // r15
cocos2d::CCArray *v6; // rdi
__int64 v7; // r14
if ( (unsigned int)sub_100720070(a1->m_checkpointArray) )
{
m_checkpointArray = a1->m_checkpointArray;
if ( a2 )
v4 = sub_1007200C0(m_checkpointArray, 0);
else
v4 = sub_1007200E0(m_checkpointArray);
v5 = *(GameObject **)(v4 + 3104);
GJBaseGameLayer::removeObjectFromSection(a1, v5);
GameObject::removeGlow(v5);
((void (__fastcall *)(GameObject *))v5->removeMeAndCleanup)(v5);
v6 = a1->m_checkpointArray;
if ( a2 )
{
sub_100720230(v6, 0, 1);
}
else
{
sub_100720200(v6, 1);
if ( a1->m_isPlatformer && a1->m_isPracticeMode )
{
if ( (unsigned int)sub_100720070(a1->m_checkpointArray) )
{
v7 = sub_1007200E0(a1->m_checkpointArray);
GameObject::makeVisible(*(GameObject **)(v7 + 3104));
*(_DWORD *)(v7 + 3872) = a1->m_gameState.m_commandIndex;
}
}
}
}
}