mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
improve readability of MxBackgroundAudioManager::Enable
While the previous iteration wasn't incorrect, it definitely reads like pseudocode (i.e. it's very unlikely any actual developers would have written that). This is much more readable/likely to have been written and still results in the same asm.
This commit is contained in:
parent
32a7916297
commit
3a28fdae6f
@ -31,9 +31,12 @@ void MxBackgroundAudioManager::Stop()
|
||||
// OFFSET: LEGO1 0x1007f5f0
|
||||
void MxBackgroundAudioManager::Enable(MxBool p)
|
||||
{
|
||||
if ((this->m_musicEnabled != p) && (this->m_musicEnabled = p, !p)) {
|
||||
Stop();
|
||||
}
|
||||
if (this->m_musicEnabled != p) {
|
||||
this->m_musicEnabled = p;
|
||||
if (!p) {
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007f650
|
||||
|
||||
Loading…
Reference in New Issue
Block a user