//
// EditorUI::onPlayback from 0x100471208 to 0x1004713fc (500 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x100162c98
// > EditorUI::onStopPlaytest @ 0x1004715e0
// > EditorUI::init @ 0x10046f2c8
//
// 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 11:05:38 +0000
//
__int64 __fastcall EditorUI::onPlayback(__int64 result)
{
__int64 v1; // x19
__int64 v2; // x0
char v3; // w23
__int64 v4; // x0
int v5; // w20
int v6; // w21
__int64 v7; // x22
__int64 v8; // x22
__int64 v9; // x0
__int64 v10; // [xsp+0h] [xbp-40h] BYREF
__int64 v11; // [xsp+8h] [xbp-38h] BYREF
if ( (*(_BYTE *)(result + 1588) & 1) == 0 )
{
v1 = result;
result = *(_QWORD *)(result + 1440);
if ( !*(_DWORD *)(result + 1972) )
{
GJBaseGameLayer::preResumeGame(result);
v2 = *(_QWORD *)(v1 + 1440);
*(_BYTE *)(v2 + 1896) = 0;
v3 = *(_BYTE *)(v1 + 616);
if ( (v3 & 1) == 0 )
{
GJBaseGameLayer::pauseAudio();
v2 = *(_QWORD *)(v1 + 1440);
}
sub_1004022CC(v2);
if ( *(_BYTE *)(v1 + 616) == 1 )
{
sub_100404308();
*(_BYTE *)(*(_QWORD *)(v1 + 1440) + 14184LL) = 1;
}
else
{
DrawGridLayer::updateTimeMarkers(*(_QWORD *)(*(_QWORD *)(v1 + 1440) + 14288LL));
cocos2d::CCNode::convertToNodeSpace(
*(_QWORD *)(*(_QWORD *)(v1 + 1440) + 3920LL),
(__int64)&dword_1009F7800,
&v11);
if ( (float)(*(float *)&v11 + 30.0) < 50.0 )
LODWORD(v11) = 0;
v4 = *(_QWORD *)(v1 + 1440);
if ( *(_QWORD *)(v4 + 14816) )
{
sub_100402294(v4, &v10);
sub_10002630C(&v11, (double *)&v10);
v5 = sub_100402260(*(_QWORD *)(v1 + 1440));
v6 = sub_10040222C(*(_QWORD *)(v1 + 1440));
v4 = *(_QWORD *)(v1 + 1440);
*(_DWORD *)(v4 + 14840) = v5;
}
else
{
v5 = 0;
v6 = 0;
}
v7 = *(_QWORD *)(v4 + 14288);
sub_1000262F4(&v10, (double *)&v11);
*(float *)(v1 + 672) = sub_100402398(v7, (double *)&v10, v5, v6, 0, 1, 0, 0);
v8 = *(_QWORD *)(*(_QWORD *)(v1 + 1440) + 14288LL);
sub_1000262F4(&v10, (double *)&v11);
*(float *)(v1 + 676) = sub_100402398(v8, (double *)&v10, v5, v6, 0, 0, 0, 0);
sub_10040C6C4(*(float **)(*(_QWORD *)(v1 + 1440) + 14288LL), *(float *)(v1 + 672));
}
*(_BYTE *)(v1 + 616) ^= 1u;
result = EditorUI::updatePlaybackBtn(v1);
if ( *(_BYTE *)(v1 + 616) == 1 )
{
v9 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::updateReverb(v9, 0, 0);
sub_1003F823C(*(_QWORD *)(v1 + 1440));
result = GJBaseGameLayer::processQueuedAudioTriggers(*(_QWORD *)(v1 + 1440));
}
if ( (v3 & 1) == 0 )
*(_BYTE *)(*(_QWORD *)(v1 + 1440) + 13806LL) = 1;
}
}
return result;
}