//
// GJBaseGameLayer::addDeathMarkerLayer from 0x592dec to 0x592f18 (300 bytes)
//
// 6 xrefs:
// > LevelEditorLayer::rebuildDeathOverlay @ 0x46a366
// > LevelEditorLayer::rebuildDeathOverlay @ 0x46a44a
// > PlayLayer::dtRebuildLiveMarkers @ 0x72ce90
// > PlayLayer::dtRebuildLiveMarkers @ 0x72cebe
// > PlayLayer::tryShowDeathMarkers @ 0x72d4b4
// > PlayLayer::tryShowDeathMarkers @ 0x72d506
//
// 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:53:07 +0000
//
int __fastcall GJBaseGameLayer::addDeathMarkerLayer(
cocos2d::CCNode *a1,
int a2,
int a3,
_DWORD *a4,
unsigned __int8 a5,
int a6,
int a7,
int a8,
float a9,
float a10,
float a11,
int a12)
{
cocos2d::CCNode *v12; // r4
int v17; // r0
GameManager *v18; // r0
GameManager *GameVariable; // r0
GameManager *v20; // r0
int v21; // r3
int v22; // r5
int v23; // r5
GameManager *v24; // r0
int v25; // r0
int v26; // r2
int v27; // r0
int v28; // r4
int v29; // r2
int v30; // [sp+34h] [bp-4h]
v12 = a1;
if ( !a2 || *a4 == a4[1] )
return 0;
if ( !*((_DWORD *)a1 + 355) )
{
v17 = cocos2d::CCNode::create(a1);
*((_DWORD *)v12 + 355) = v17;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 36))(v17, -9999);
a1 = (cocos2d::CCNode *)(*(int (__fastcall **)(int, _DWORD, int))(*(_DWORD *)a2 + 232))(
a2,
*((_DWORD *)v12 + 355),
1401);
}
LOWORD(v30) = -1;
BYTE2(v30) = -1;
if ( !a3 )
{
v18 = (GameManager *)GameManager::sharedState(a1);
GameVariable = (GameManager *)GameManager::getGameVariable(v18, "0204");
if ( GameVariable )
{
v20 = (GameManager *)GameManager::sharedState(GameVariable);
v21 = *((_DWORD *)v20 + 153);
v22 = *((_DWORD *)v20 + 154);
}
else
{
v20 = (GameManager *)GameManager::sharedState(nullptr);
v21 = *((_DWORD *)v20 + 156);
v22 = *((_DWORD *)v20 + 157);
}
v23 = v21 - v22;
v24 = (GameManager *)GameManager::sharedState(v20);
v25 = GameManager::colorForIdx(v24, v23);
LOWORD(v30) = v25;
BYTE2(v30) = BYTE2(v25);
}
v26 = a3 ? 9 : 3;
v27 = DeathMarkerLayer::create(
(int)a4,
v30,
a3,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
v26,
*((_DWORD *)v12 + 355),
*((_BYTE *)v12 + 1425),
*((float *)v12 + 2700) == -1.0);
v28 = v27;
if ( !v27 )
return 0;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 36))(v27, -9999);
v29 = 1399;
if ( !a3 )
v29 = 1400;
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)a2 + 232))(a2, v28, v29);
return v28;
}