//
// PlayLayer::dtRebuildLiveMarkers from 0x100961130 to 0x10096135e (558 bytes)
//
// 3 xrefs:
// > PlayLayer::resetLevel @ 0x10008c726
// > PlayLayer::dtLiveMarkersChanged @ 0x10096111c
// > PlayLayer::tryShowDeathMarkers @ 0x100961618
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:38:45 +0000
//
void __fastcall PlayLayer::dtRebuildLiveMarkers(__int64 a1)
{
__int64 v2; // rdi
__int64 v3; // rdi
__int64 v4; // rax
__int64 v5; // rax
unsigned __int8 GameVariable; // r14
__int64 v7; // rax
unsigned __int8 v8; // r15
__m128 v9; // xmm3
__m128 v10; // xmm2
__int64 v11; // rax
__int64 v12; // rax
__int64 v13; // rdi
__int64 v14; // rdi
_BYTE v15[16]; // [rsp+20h] [rbp-40h] BYREF
void *__p[2]; // [rsp+30h] [rbp-30h] BYREF
__int64 v17; // [rsp+40h] [rbp-20h]
v2 = *(_QWORD *)(a1 + 1952);
if ( v2 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 520LL))(v2);
*(_QWORD *)(a1 + 1952) = 0;
}
v3 = *(_QWORD *)(a1 + 1944);
if ( v3 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 520LL))(v3);
*(_QWORD *)(a1 + 1944) = 0;
}
if ( *(_BYTE *)(a1 + 14524) == 1 )
{
v4 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getGameVariable(v4, "0207") )
{
v5 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v5, "0200");
v7 = GameManager::sharedState();
v8 = GameManager::getGameVariable(v7, "0202");
if ( ((v8 | GameVariable) & 1) != 0 )
{
v9 = (__m128)0x42200000u;
v10 = (__m128)*(unsigned int *)(a1 + 12668);
v10.f32[0] = v10.f32[0] + 40.0;
v9.f32[0] = *(float *)(a1 + 12672) + 40.0;
sub_100278270((__int64)v15, *(float *)(a1 + 1204) + -20.0, *(float *)(a1 + 1208) + -20.0, v10, v9);
*(_OWORD *)__p = 0;
v17 = 0;
if ( GameVariable )
sub_100960A30(a1, (__int64)__p);
if ( v8 )
{
*(_QWORD *)(a1 + 1952) = GJBaseGameLayer::addDeathMarkerLayer(
a1,
*(_QWORD *)(a1 + 3936),
1,
(_QWORD *)(a1 + 14416),
0,
(int)v15,
0x80000000,
0x80000000,
0);
if ( GameVariable )
{
LABEL_12:
v11 = GJBaseGameLayer::addDeathMarkerLayer(
a1,
*(_QWORD *)(a1 + 3936),
0,
__p,
0,
(int)v15,
0x80000000,
0x80000000,
0);
LABEL_15:
*(_QWORD *)(a1 + 1944) = v11;
v12 = GameManager::sharedState();
if ( (unsigned __int8)GameManager::getGameVariable(v12, "0208") )
{
v13 = *(_QWORD *)(a1 + 1952);
if ( v13 )
sub_1008C1A90(v13, 0);
v14 = *(_QWORD *)(a1 + 1944);
if ( v14 )
sub_1008C1A90(v14, 0);
}
if ( __p[0] )
{
__p[1] = __p[0];
operator delete(__p[0]);
}
return;
}
}
else
{
*(_QWORD *)(a1 + 1952) = 0;
if ( GameVariable )
goto LABEL_12;
}
v11 = 0;
goto LABEL_15;
}
}
}
}