//
// PlayLayer::processCheckpoints from 0x411ef4 to 0x4120a0 (428 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:37 +0000
//
PlayLayer *__fastcall PlayLayer::processCheckpoints(PlayLayer *this)
{
PlayLayer *v1; // r4
int v2; // r5
void (__fastcall *v3)(PlayLayer *); // r3
GameManager *v4; // r0
CheckpointObject *v5; // r5
int v6; // r3
char **v7; // r1
int v8; // r1
int MainObject; // r0
int Object; // r9
void (__fastcall *v11)(int, char **); // r10
GameObject *v12; // r0
void (__fastcall *v13)(PlayLayer *); // r6
_BYTE v14[8]; // [sp+18h] [bp-1Ch] BYREF
char *v15; // [sp+20h] [bp-14h] BYREF
int v16; // [sp+24h] [bp-10h]
int v17; // [sp+28h] [bp-Ch]
v1 = this;
if ( *((_BYTE *)this + 12276) )
{
*((_BYTE *)this + 12276) = 0;
this = PlayLayer::markCheckpoint(this);
}
v2 = *((_DWORD *)v1 + 3070);
if ( v2 )
{
if ( *(int *)(v2 + 1656) > 0 )
{
v3 = *(void (__fastcall **)(PlayLayer *))(*(_DWORD *)v1 + 628);
v15 = nullptr;
v16 = 0;
v17 = 0;
v3(v1);
this = (PlayLayer *)std::__vector_base::~__vector_base(&v15);
}
v4 = (GameManager *)GameManager::sharedState(this);
if ( GameManager::getGameVariable(v4, "0146") )
goto LABEL_15;
v5 = PlayLayer::markCheckpoint(v1);
if ( !v5 )
goto LABEL_15;
(*(void (__fastcall **)(_BYTE *))(**((_DWORD **)v1 + 3070) + 680))(v14);
v6 = *((_DWORD *)v1 + 3070);
if ( *(_BYTE *)(v6 + 1504) )
{
v7 = (char **)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v1 + 519) + 96))(*((_DWORD *)v1 + 519));
}
else
{
v8 = *(_DWORD *)(v6 + 1288);
if ( v8 <= 0 )
goto LABEL_14;
MainObject = GJBaseGameLayer::tryGetMainObject(v1, v8);
if ( !MainObject )
goto LABEL_14;
(*(void (__fastcall **)(char **, int))(*(_DWORD *)MainObject + 680))(&v15, MainObject);
v7 = &v15;
}
cocos2d::CCPoint::operator=(v14, v7);
LABEL_14:
Object = CheckpointObject::getObject(v5);
v11 = *(void (__fastcall **)(int, char **))(*(_DWORD *)Object + 684);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const cocos2d::CCPoint *)v14);
v11(Object, &v15);
cocos2d::CCPoint::operator=(*((_DWORD *)v5 + 573) + 264, v14);
*(_BYTE *)(*((_DWORD *)v5 + 573) + 372) = 1;
v12 = (GameObject *)CheckpointObject::getObject(v5);
GameObject::makeInvisible(v12);
*((_DWORD *)v5 + 576) = *(_DWORD *)(*((_DWORD *)v1 + 3070) + 780);
*((_DWORD *)v5 + 577) = *(_DWORD *)(*((_DWORD *)v1 + 3070) + 1652);
PlayLayer::savePersistentCheckpoint((CheckpointObject **)v1, v5);
LABEL_15:
if ( *(int *)(*((_DWORD *)v1 + 3070) + 1284) > 0 )
{
v13 = *(void (__fastcall **)(PlayLayer *))(*(_DWORD *)v1 + 628);
v15 = nullptr;
v16 = 0;
v17 = 0;
v13(v1);
std::__vector_base::~__vector_base(&v15);
}
this = (PlayLayer *)GJBaseGameLayer::gameEventTriggered(v1, 60, 0, 0);
*((_DWORD *)v1 + 3070) = 0;
}
return this;
}