diff options
author | Evgeny Grechnikov | 2018-10-14 17:29:47 +0300 |
---|---|---|
committer | Evgeny Grechnikov | 2018-10-14 17:29:47 +0300 |
commit | d36aadd3a68883cd22b77d8c247dfc4ff17581b7 (patch) | |
tree | 7f4d4ff47b70c9e25b5663c807a368b7a7d25267 /engines | |
parent | b13e2352426c78ee4628e445bace363399fdd206 (diff) | |
download | scummvm-rg350-d36aadd3a68883cd22b77d8c247dfc4ff17581b7.tar.gz scummvm-rg350-d36aadd3a68883cd22b77d8c247dfc4ff17581b7.tar.bz2 scummvm-rg350-d36aadd3a68883cd22b77d8c247dfc4ff17581b7.zip |
LASTEXPRESS: fix constants in sound serializer
Wrong enum member used: (status & 0x7000000)
should be checked against 0x3000000, not against 3
(this is a check of sound type to skip menu sounds in savefiles).
Activate delay should not be compared with sound volume;
comparison with 0x8000000 is just a sanity check against overflow.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lastexpress/sound/entry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 87ecd26cdb..a8c9b22cd4 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -366,7 +366,7 @@ void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) { assert(_name1.size() <= 16); assert(_name2.size() <= 16); - if (_name2.matchString("NISSND?") && ((_status.status & kFlagType9) != kFlag3)) { + if (_name2.matchString("NISSND?") && ((_status.status & kFlagType9) != kFlagType13)) { s.syncAsUint32LE(_status.status); s.syncAsUint32LE(_type); s.syncAsUint32LE(_blockCount); // field_8; @@ -376,7 +376,7 @@ void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsUint32LE(_entity); uint32 delta = (uint32)_field_48 - getSound()->getData2(); - if (delta > kFlag8) + if (delta > 0x8000000u) // sanity check against overflow delta = 0; s.syncAsUint32LE(delta); |