//
// UILayer::editorPlaytest from 0x1004c8ea0 to 0x1004c8fb8 (280 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x1000f21cd
// > LevelEditorLayer::onPausePlaytest @ 0x1000f2a72
// > LevelEditorLayer::onResumePlaytest @ 0x1000f2c5a
// > LevelEditorLayer::onStopPlaytest @ 0x1000f2d92
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall UILayer::editorPlaytest(UILayer *a1, bool a2)
{
cocos2d::CCArray *m_uiNodes; // rax
cocos2d::ccArray *data; // rax
cocos2d::CCObject **arr; // r13
cocos2d::CCObject **v6; // r14
cocos2d::CCObject *v7; // r15
__int64 v8; // rdi
__int64 v9; // rdi
__int16 v10; // [rsp+10h] [rbp-30h] BYREF
char v11; // [rsp+12h] [rbp-2Eh]
__int16 v12; // [rsp+14h] [rbp-2Ch] BYREF
char v13; // [rsp+16h] [rbp-2Ah]
*(_QWORD *)&a1->m_p1TouchId = -1;
*(_WORD *)&a1->m_p1Jumping = 0;
a1->m_checkpointBtnDown = 0;
m_uiNodes = a1->m_uiNodes;
if ( m_uiNodes )
{
data = m_uiNodes->data;
if ( data->num )
{
arr = data->arr;
v6 = &arr[data->num - 1];
do
{
v7 = *arr;
if ( !*arr )
break;
v7[6].m_nTag = -1;
*(_WORD *)((char *)&v7[6].m_nZOrder + 3) = 0;
v8 = *(_QWORD *)&v7[5].m_unknown2;
if ( v8 )
{
v13 = -1;
v12 = -1;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v8 + 944LL))(v8, &v12);
}
v9 = *((_QWORD *)&v7[5].m_unknown2 + (BYTE1(v7[6].m_nZOrder) ^ 1u));
if ( v9 )
{
v11 = -1;
v10 = -1;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v9 + 944LL))(v9, &v10);
}
++arr;
}
while ( arr <= v6 );
}
}
UILayer::toggleMenuVisibility(a1, a2);
((void (__fastcall *)(UILayer *, bool))a1->setVisible)(a1, a2);
}