//
// EditorUI::onPlayback from 0x7c2788 to 0x7c29c8 (576 bytes)
//
// 5 xrefs:
// > EditorUI::onStopPlaytest @ 0x7ce9c8
// > EditorUI::handleEditorAction @ 0xbd7cfc
// > ??> @ 0x65320
// > EditorUI::init @ 0x7cf99c
// > ??> @ 0x1542708
//
// 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:54:07 +0000
//
__int64 __fastcall EditorUI::onPlayback(EditorUI *this, cocos2d::CCObject *a2)
{
GJBaseGameLayer *v3; // x0
int v5; // w23
LevelEditorLayer *v6; // x0
int SelectedEditorOrder; // w24
int SelectedOrderChannel; // w25
__int64 v9; // x26
__int64 v10; // x2
int v11; // s0
__int64 v12; // x22
__int64 v13; // x0
int v14; // s0
__int64 v15; // x0
__int64 v16; // [xsp+58h] [xbp+58h] BYREF
_BYTE v17[8]; // [xsp+60h] [xbp+60h] BYREF
if ( !*((_BYTE *)this + 1588) )
{
v3 = *((GJBaseGameLayer **)this + 180);
if ( !*((_DWORD *)v3 + 493) )
{
GJBaseGameLayer::preResumeGame(v3);
v5 = 0;
*(_BYTE *)(*((_QWORD *)this + 180) + 1896LL) = 0;
if ( !*((_BYTE *)this + 616) )
{
v5 = 1;
GJBaseGameLayer::pauseAudio(*((GJBaseGameLayer **)this + 180));
}
LevelEditorLayer::resetPlayback(*((LevelEditorLayer **)this + 180));
if ( *((_BYTE *)this + 616) )
{
LevelEditorLayer::stopPlayback(*((LevelEditorLayer **)this + 180));
*(_BYTE *)(*((_QWORD *)this + 180) + 14184LL) = 1;
}
else
{
DrawGridLayer::updateTimeMarkers(*(DrawGridLayer **)(*((_QWORD *)this + 180) + 14288LL));
cocos2d::CCNode::convertToNodeSpace(
&v16,
*(cocos2d::CCNode **)(*((_QWORD *)this + 180) + 3920LL),
(const cocos2d::CCPoint *)&dword_155C778);
if ( (float)(*(float *)&v16 + 30.0) < 50.0 )
LODWORD(v16) = 0;
v6 = *((LevelEditorLayer **)this + 180);
if ( *((_QWORD *)v6 + 1852) )
{
LevelEditorLayer::getSelectedEffectPos(v6, (cocos2d::CCPoint *)v17);
cocos2d::CCPoint::operator=(&v16, v17);
SelectedEditorOrder = LevelEditorLayer::getSelectedEditorOrder(*((LevelEditorLayer **)this + 180));
SelectedOrderChannel = LevelEditorLayer::getSelectedOrderChannel(*((LevelEditorLayer **)this + 180));
*(_DWORD *)(*((_QWORD *)this + 180) + 14840LL) = SelectedEditorOrder;
v6 = *((LevelEditorLayer **)this + 180);
}
else
{
SelectedOrderChannel = 0;
SelectedEditorOrder = 0;
}
v9 = *((_QWORD *)v6 + 1786);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)&v16);
DrawGridLayer::timeForPos(
v9,
(const cocos2d::CCPoint *)v17,
SelectedEditorOrder,
SelectedOrderChannel,
0,
1u,
0,
0);
v10 = *((_QWORD *)this + 180);
*((_DWORD *)this + 168) = v11;
v12 = *(_QWORD *)(v10 + 14288);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)&v16);
DrawGridLayer::timeForPos(
v12,
(const cocos2d::CCPoint *)v17,
SelectedEditorOrder,
SelectedOrderChannel,
0,
0,
0,
0);
v13 = *((_QWORD *)this + 180);
*((_DWORD *)this + 169) = v14;
DrawGridLayer::updateMusicGuideTime(*(float **)(v13 + 14288), *((float *)this + 168));
}
*((_BYTE *)this + 616) ^= 1u;
EditorUI::updatePlaybackBtn(this);
if ( *((_BYTE *)this + 616) )
{
v15 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)*((unsigned __int8 *)this + 616));
FMODAudioEngine::updateReverb(v15, 0, 0);
LevelEditorLayer::updateGameObjects(*((LevelEditorLayer **)this + 180));
GJBaseGameLayer::processQueuedAudioTriggers(*((GJBaseGameLayer **)this + 180));
}
if ( v5 )
*(_BYTE *)(*((_QWORD *)this + 180) + 13806LL) = 1;
}
}
return _stack_chk_guard;
}