//
// DeathMarkerLayer::updateVisibility from 0x76bc14 to 0x76be00 (492 bytes)
//
// 7 xrefs:
// > LevelEditorLayer::postUpdate @ 0x46ad6c
// > LevelEditorLayer::postUpdate @ 0x46ad78
// > LevelEditorLayer::updateEditor @ 0x47330a
// > LevelEditorLayer::updateEditor @ 0x473316
// > PlayLayer::dtUpdateLiveMarkers @ 0x72cb2a
// > PlayLayer::dtUpdateLiveMarkers @ 0x72cb36
// > DeathMarkerLayer::init @ 0x76cf4e
//
// 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:59:11 +0000
//
void __fastcall DeathMarkerLayer::updateVisibility(DeathMarkerLayer *this, const cocos2d::CCRect *a2)
{
float v4; // s17
float v5; // s19
float v6; // s16
float v7; // s18
_DWORD *m; // r5
int v9; // r7
int v10; // r9
int v11; // r8
int v12; // r5
int v13; // r6
int n; // r10
int ii; // r10
int jj; // r7
int i; // r5
int j; // r6
_DWORD *k; // r5
if ( *((float *)a2 + 2) <= 0.0 || *((float *)a2 + 3) <= 0.0 )
{
if ( !*((_BYTE *)this + 312) )
{
for ( i = *((_DWORD *)this + 74); i <= *((_DWORD *)this + 75); ++i )
{
for ( j = *((_DWORD *)this + 76); j <= *((_DWORD *)this + 77); ++j )
DeathMarkerLayer::unmountSection(this, j | (i << 16));
}
for ( k = *((_DWORD **)this + 71); k; k = (_DWORD *)*k )
DeathMarkerLayer::mountSection(this, k[2]);
*((_DWORD *)this + 74) = 0;
*((_BYTE *)this + 312) = 1;
*((_DWORD *)this + 76) = 0;
*((_DWORD *)this + 75) = -1;
*((_DWORD *)this + 77) = -1;
}
}
else
{
v4 = COERCE_FLOAT(cocos2d::CCRect::getMinX(a2));
v5 = COERCE_FLOAT(cocos2d::CCRect::getMaxX(a2));
v6 = COERCE_FLOAT(cocos2d::CCRect::getMinY(a2));
v7 = COERCE_FLOAT(cocos2d::CCRect::getMaxY(a2));
if ( *((_BYTE *)this + 312) )
{
for ( m = *((_DWORD **)this + 71); m; m = (_DWORD *)*m )
DeathMarkerLayer::unmountSection(this, m[2]);
*((_BYTE *)this + 312) = 0;
*((_DWORD *)this + 74) = 0;
*((_DWORD *)this + 75) = -1;
*((_DWORD *)this + 76) = 0;
*((_DWORD *)this + 77) = -1;
}
v9 = *((_DWORD *)this + 74);
v10 = (int)(float)(v5 / 240.0) + 1;
v11 = (int)(float)(v7 / 240.0) + 1;
v12 = ((int)(float)(v4 / 240.0) - 1) & ~(((int)(float)(v4 / 240.0) - 1) >> 31);
v13 = ((int)(float)(v6 / 240.0) - 1) & ~(((int)(float)(v6 / 240.0) - 1) >> 31);
if ( v12 == v9 )
{
if ( v10 == *((_DWORD *)this + 75) && v13 == *((_DWORD *)this + 76) && v11 == *((_DWORD *)this + 77) )
return;
v9 = ((int)(float)(v4 / 240.0) - 1) & ~(((int)(float)(v4 / 240.0) - 1) >> 31);
}
while ( v9 <= *((_DWORD *)this + 75) )
{
for ( n = *((_DWORD *)this + 76); n <= *((_DWORD *)this + 77); ++n )
{
if ( v9 < v12 || v9 > v10 || n < v13 || n > v11 )
DeathMarkerLayer::unmountSection(this, n | (v9 << 16));
}
++v9;
}
for ( ii = ((int)(float)(v4 / 240.0) - 1) & ~(((int)(float)(v4 / 240.0) - 1) >> 31); ii <= v10; ++ii )
{
for ( jj = ((int)(float)(v6 / 240.0) - 1) & ~(((int)(float)(v6 / 240.0) - 1) >> 31); jj <= v11; ++jj )
{
if ( ii < *((_DWORD *)this + 74)
|| ii > *((_DWORD *)this + 75)
|| jj < *((_DWORD *)this + 76)
|| jj > *((_DWORD *)this + 77) )
{
DeathMarkerLayer::mountSection(this, jj | (ii << 16));
}
}
}
*((_DWORD *)this + 74) = v12;
*((_DWORD *)this + 75) = v10;
*((_DWORD *)this + 76) = v13;
*((_DWORD *)this + 77) = v11;
}
}