//
// SetupSongTriggerPopup::onSavePlaybackPos from 0x524eac to 0x524f88 (220 bytes)
//
// 0 xrefs:
//
// 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 SetupSongTriggerPopup::onSavePlaybackPos(SetupSongTriggerPopup *a1, cocos2d::CCObject *a2)
{
FMODAudioEngine *v4; // r0
FMODAudioEngine *v5; // r0
int MusicTimeMS; // r0
int v7; // s16
SetupSongTriggerPopup *v8; // r0
int v9; // r1
LevelEditorLayer *m_levelEditorLayer; // r9
float (__fastcall *timeForPos)(LevelEditorLayer *__hidden, cocos2d::CCPoint, int, int, bool, int); // r10
const cocos2d::CCPoint *v12; // r0
cocos2d::CCPoint v13; // [sp+Ch] [bp-Ch] BYREF
v4 = FMODAudioEngine::sharedEngine();
if ( FMODAudioEngine::isMusicPlaying(v4, 0) )
{
v5 = FMODAudioEngine::sharedEngine();
MusicTimeMS = FMODAudioEngine::getMusicTimeMS(v5, 0);
}
else
{
MusicTimeMS = (int)GameManager::sharedState()->m_levelEditorLayer;
if ( MusicTimeMS )
{
MusicTimeMS = (int)a1->m_gameObject;
if ( MusicTimeMS )
{
m_levelEditorLayer = GameManager::sharedState()->m_levelEditorLayer;
timeForPos = m_levelEditorLayer->timeForPos;
v12 = a1->m_gameObject->getPosition(a1->m_gameObject);
cocos2d::CCPoint::CCPoint(&v13, v12);
MusicTimeMS = (int)(float)(((float (__fastcall *)(LevelEditorLayer *, cocos2d::CCPoint *, _DWORD, _DWORD, _DWORD, _DWORD))timeForPos)(
m_levelEditorLayer,
&v13,
0,
0,
0,
0)
* 1000.0);
}
}
}
v7 = MusicTimeMS & ~(MusicTimeMS >> 31);
if ( a2->getTag(a2) )
{
if ( a2->getTag(a2) != 1 )
return;
v8 = a1;
v9 = 410;
}
else
{
v8 = a1;
v9 = 408;
}
SetupTriggerPopup::updateValue(v8, v9, (float)v7);
}