[Scummvm-git-logs] scummvm master -> d36aadd3a68883cd22b77d8c247dfc4ff17581b7
grechnik
diamondaz at yandex.ru
Sun Oct 14 16:30:39 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d36aadd3a6 LASTEXPRESS: fix constants in sound serializer
Commit: d36aadd3a68883cd22b77d8c247dfc4ff17581b7
https://github.com/scummvm/scummvm/commit/d36aadd3a68883cd22b77d8c247dfc4ff17581b7
Author: Evgeny Grechnikov (diamondaz at yandex.ru)
Date: 2018-10-14T17:29:47+03:00
Commit Message:
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.
Changed paths:
engines/lastexpress/sound/entry.cpp
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 87ecd26..a8c9b22 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);
More information about the Scummvm-git-logs
mailing list