mirror of https://github.com/AxioDL/metaforce.git
CScriptStreamedMusic: Brace conditionals where applicable
This commit is contained in:
parent
79a25cab5e
commit
52cc84374d
|
@ -52,14 +52,18 @@ CScriptStreamedMusic::CScriptStreamedMusic(TUniqueId id, const CEntityInfo& info
|
||||||
, x50_volume(volume) {}
|
, x50_volume(volume) {}
|
||||||
|
|
||||||
void CScriptStreamedMusic::Stop(CStateManager& mgr) {
|
void CScriptStreamedMusic::Stop(CStateManager& mgr) {
|
||||||
if (x45_fileIsDsp)
|
if (!x45_fileIsDsp) {
|
||||||
StopStream(mgr);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StopStream(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptStreamedMusic::Play(CStateManager& mgr) {
|
void CScriptStreamedMusic::Play(CStateManager& mgr) {
|
||||||
TweakOverride(mgr);
|
TweakOverride(mgr);
|
||||||
if (x45_fileIsDsp)
|
if (x45_fileIsDsp) {
|
||||||
StartStream(mgr);
|
StartStream(mgr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptStreamedMusic::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CScriptStreamedMusic::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
@ -68,20 +72,24 @@ void CScriptStreamedMusic::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId o
|
||||||
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case EScriptObjectMessage::Play:
|
case EScriptObjectMessage::Play:
|
||||||
if (x30_24_active)
|
if (x30_24_active) {
|
||||||
Play(stateMgr);
|
Play(stateMgr);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EScriptObjectMessage::Stop:
|
case EScriptObjectMessage::Stop:
|
||||||
if (x30_24_active)
|
if (x30_24_active) {
|
||||||
Stop(stateMgr);
|
Stop(stateMgr);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EScriptObjectMessage::Increment:
|
case EScriptObjectMessage::Increment:
|
||||||
if (x45_fileIsDsp)
|
if (x45_fileIsDsp) {
|
||||||
CStreamAudioManager::FadeBackIn(!x46_loop, x48_fadeIn);
|
CStreamAudioManager::FadeBackIn(!x46_loop, x48_fadeIn);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EScriptObjectMessage::Decrement:
|
case EScriptObjectMessage::Decrement:
|
||||||
if (x45_fileIsDsp)
|
if (x45_fileIsDsp) {
|
||||||
CStreamAudioManager::TemporaryFadeOut(!x46_loop, x4c_fadeOut);
|
CStreamAudioManager::TemporaryFadeOut(!x46_loop, x4c_fadeOut);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue