//
// LevelEditorLayer::postUpdate from 0x79af68 to 0x79b200 (664 bytes)
//
// 2 xrefs:
// > ??> @ 0x9c268
// > ??> @ 0x1435e20
//
// This function is hookable on this platform (idp: arm, 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:53:36 +0000
//
__int64 __fastcall LevelEditorLayer::postUpdate(LevelEditorLayer *this, float a2)
{
char *v3; // x22
GJEffectManager *v5; // x21
__int64 active; // x0
DeathMarkerLayer *v7; // x0
DeathMarkerLayer *v8; // x0
__int64 v9; // x21
__int64 v11; // x23
__int64 v12; // x0
__int64 (__fastcall *v13)(__int64); // x1
void (__fastcall *v14)(__int64, __int64); // x21
__int64 v15; // x0
EditorUI *v16; // x0
__int64 v17; // x0
const cocos2d::CCPoint *v18; // x0
const cocos2d::CCPoint *v19; // x0
const cocos2d::CCPoint *v20; // x0
int v21; // [xsp+40h] [xbp+40h]
_BYTE v22[16]; // [xsp+48h] [xbp+48h] BYREF
v3 = (char *)this + 12288;
if ( !*((_BYTE *)this + 1010) )
*((_BYTE *)this + 14244) = 1;
GJEffectManager::processColors(*((GJEffectManager **)this + 269));
v5 = *((GJEffectManager **)this + 269);
active = GJEffectManager::activeColorForIndex(v5, 1005);
LOWORD(v21) = active;
BYTE2(v21) = BYTE2(active);
GJEffectManager::calculateLightBGColor(v5, v21);
(*(void (__fastcall **)(LevelEditorLayer *, float))(*(_QWORD *)this + 1192LL))(this, a2);
if ( *((_QWORD *)this + 243) || *((_QWORD *)this + 244) )
{
GJBaseGameLayer::syncDeathMarkerFlip(this);
sub_786D34(*((_QWORD *)this + 490), (cocos2d::CCRect *)v22);
v7 = *((DeathMarkerLayer **)this + 243);
if ( v7 )
DeathMarkerLayer::updateVisibility(v7, (const cocos2d::CCRect *)v22);
v8 = *((DeathMarkerLayer **)this + 244);
if ( v8 )
DeathMarkerLayer::updateVisibility(v8, (const cocos2d::CCRect *)v22);
}
if ( v3[2009] )
{
GJBaseGameLayer::updateLevelColors(this);
if ( !*((_BYTE *)this + 12216) )
goto LABEL_10;
}
else if ( !*((_BYTE *)this + 12216) )
{
goto LABEL_10;
}
v20 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 407) + 192LL))(*((_QWORD *)this + 407));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, v20);
LevelEditorLayer::addTouchPoint((cocos2d::CCPoint **)this, (const cocos2d::CCPoint *)v22);
LABEL_10:
v9 = *((_QWORD *)this + 407);
*((float *)this + 3560) = *((float *)this + 3560) + a2;
if ( !*(_BYTE *)(v9 + 2364) )
{
if ( !*((_BYTE *)this + 1010) )
goto LABEL_12;
v9 = *((_QWORD *)this + 408);
if ( !*(_BYTE *)(v9 + 2364) )
goto LABEL_12;
}
PlayerObject::playerDestroyed((cocos2d::CCNode **)v9, 0);
v11 = *((_QWORD *)this + 1779);
v12 = v9;
v13 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 192LL);
v14 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 184LL);
v15 = v13(v12);
v14(v11, v15);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 1779) + 344LL))(*((_QWORD *)this + 1779), 1);
LevelEditorLayer::onStopPlaytest((UILayer **)this);
v16 = *((EditorUI **)this + 1781);
if ( v16 )
{
EditorUI::playtestStopped(v16);
if ( *((_DWORD *)this + 493) != 1 )
return _stack_chk_guard;
}
else
{
LABEL_12:
if ( *((_DWORD *)this + 493) != 1 )
return _stack_chk_guard;
}
if ( *((float *)this + 3560) >= 0.033333 )
{
v17 = *((_QWORD *)this + 407);
*((_DWORD *)this + 3560) = 0;
v18 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v17 + 192LL))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, v18);
LevelEditorLayer::addPlayerPoint((cocos2d::CCPoint **)this, (const cocos2d::CCPoint *)v22);
if ( *((_BYTE *)this + 1010) )
{
v19 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 408) + 192LL))(*((_QWORD *)this + 408));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, v19);
LevelEditorLayer::addPlayer2Point(this, (const cocos2d::CCPoint *)v22, v3[1956]);
v3[1956] = 0;
}
}
return _stack_chk_guard;
}