//
// LevelEditorLayer::onResumePlaytest from 0x1403ffcb0 to 0x1403ffea8 (504 bytes)
//
// 5 xrefs:
// > EditorUI::onPlaytest @ 0x1401b481a
// > EditorUI::handleAction @ 0x1401c1d18
// > ??> @ 0x1408c696c
// > ??> @ 0x1408c697c
// > ??> @ 0x1409259ac
//
// 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 11:31:54 +0000
//
__int64 __fastcall LevelEditorLayer::onResumePlaytest(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rdi
__int64 v4; // rdx
__int64 v5; // rdx
__int64 v6; // rdx
__int64 v7; // rcx
__int64 v8; // r8
__int64 v9; // r9
__int64 v10; // rax
__int64 v11; // rsi
__int64 v12; // rdi
__int64 v13; // rax
__int64 v14; // rcx
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rdx
cocos2d::CCDirector *v18; // rax
__int64 v19; // rcx
double v20; // xmm0_8
__int64 v21; // rcx
__int64 v22; // rax
cocos2d::CCNode *v23; // rcx
v2 = cocos2d::CCDirector::sharedDirector(a1);
*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 176LL))(v2) + 156) = 1;
v3 = *(_QWORD *)(a1 + 13888);
*(_QWORD *)(v3 + 584) = -1;
*(_WORD *)(v3 + 578) = 0;
*(_BYTE *)(v3 + 580) = 0;
UILayer::resetUINodeState(v3);
LOBYTE(v4) = 1;
UILayer::toggleMenuVisibility(v3, v4);
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 336LL))(v3, v5);
*(_BYTE *)(cocos2d::CCEGLView::sharedOpenGLView(v7, v6, v8, v9) + 237) = 1;
*(_BYTE *)(v3 + 627) = 1;
UILayer::resolveLevelControls(v3);
if ( (!*(_BYTE *)(v3 + 626) || *(_BYTE *)(v3 + 627))
&& *(_BYTE *)(v3 + 596)
&& (v10 = *(_QWORD *)(v3 + 640)) != 0
&& ((v11 = v10 + 72, v12 = v10 + 104, *(_QWORD *)(v10 + 88)) || *(_QWORD *)(v10 + 120)) )
{
v13 = GJKeybindManager::sharedState();
GJKeybindManager::applyMovementOverride(v13, v11, v12);
}
else
{
v15 = GJKeybindManager::sharedState();
GJKeybindManager::clearMovementOverride(v15);
}
if ( !*(_BYTE *)(a1 + 14680) )
{
v16 = *(_QWORD *)a1;
v17 = *(_QWORD *)(a1 + 12672);
*(_BYTE *)(a1 + 14680) = 1;
(*(void (__fastcall **)(__int64, __int64))(v16 + 1192))(a1, v17);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1192LL))(a1, *(_QWORD *)(a1 + 12680));
}
if ( *(_BYTE *)(a1 + 14673) )
{
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::resetSmoothFixCounter(v18);
*(_BYTE *)(cocos2d::CCDirector::sharedDirector(v19) + 178) = 1;
}
v20 = (*(double (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 4296) + 168LL))(*(_QWORD *)(a1 + 4296));
v21 = *(_QWORD *)(a1 + 4296);
*(_DWORD *)(a1 + 14868) = LODWORD(v20);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v21 + 160LL))(v21);
v22 = *(_QWORD *)a1;
*(_BYTE *)(a1 + 2214) = 0;
(*(void (__fastcall **)(__int64))(v22 + 1312))(a1);
v23 = *(cocos2d::CCNode **)(a1 + 3512);
*(_DWORD *)(a1 + 2204) = 1;
cocos2d::CCNode::resumeSchedulerAndActions(v23);
cocos2d::CCNode::pauseSchedulerAndActions(*(cocos2d::CCNode **)(a1 + 3520));
*(_DWORD *)(a1 + 424) = *(_DWORD *)(a1 + 14884);
LevelEditorLayer::recreateGroups(a1);
GJBaseGameLayer::optimizeMoveGroups(a1);
*(_DWORD *)(a1 + 14824) = 16843009;
*(_BYTE *)(a1 + 14828) = 1;
return GJBaseGameLayer::resumeAudio();
}