//
// EditorUI::updatePlaybackBtn from 0x10002d0c0 to 0x10002d1cc (268 bytes)
//
// 7 xrefs:
// > EditorUI::onPlayback @ 0x10000c4b6
// > EditorUI::onPlaytest @ 0x10000c6e9
// > EditorUI::onStopPlaytest @ 0x10000c805
// > EditorUI::onPause @ 0x10002a729
// > EditorUI::songStateChanged @ 0x10003d8a5
// > sub_10003D8B0 @ 0x10003d8bc
// > EditorUI::playtestStopped @ 0x10003d97b
//
// 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 EditorUI::updatePlaybackBtn(EditorUI *a1)
{
PlaybackMode m_playbackMode; // r14d
__int64 v3; // r12
bool v4; // zf
bool v5; // al
const char *v6; // r13
void *v7; // r15
unsigned int v8; // r14d
cocos2d::CCSpriteFrameCache *v9; // rax
cocos2d::CCSpriteFrame *v10; // rax
CCMenuItemSpriteExtra *m_playbackBtn; // rdi
__int64 v12; // rax
bool v13; // al
PlaybackMode v14; // [rsp+0h] [rbp-2Ch]
m_playbackMode = a1->m_editorLayer->m_playbackMode;
v14 = m_playbackMode;
v3 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_playbackBtn->getNormalImage)(a1->m_playbackBtn);
v4 = m_playbackMode == Not;
v5 = m_playbackMode == Not;
v6 = "GJ_stopMusicBtn_001.png";
v7 = &unk_100815543;
if ( m_playbackMode == Not )
v7 = &unk_100815540;
v8 = 175;
if ( v4 )
v8 = 255;
if ( !v5 )
v6 = "GJ_playMusicBtn_001.png";
if ( !a1->m_isPlayingMusic )
v6 = "GJ_playMusicBtn_001.png";
v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v6);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v3 + 1144LL))(v3, v10);
m_playbackBtn = a1->m_playbackBtn;
m_playbackBtn->m_animationEnabled = v14 == Not;
v12 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))m_playbackBtn->getNormalImage)(m_playbackBtn);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v12 + 944LL))(v12, v7);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_playbackBtn->setOpacity)(a1->m_playbackBtn, v8);
v13 = a1->m_isPlayingMusic && a1->m_editorLayer->m_playbackMode == Not;
a1->m_playbackActive = v13;
}