Merge SoundFlag and SoundStatus into a single enum;
SoundEntry::setupStatus just casts one to another.
Keep only definitions of bits in SoundFlag; drop compound flags
like kFlagSteam = kSoundTypeAmbient | kSoundFlagLooped | kVolume7,
use ORed simple flags in calls; change the signature
of SoundManager::playSoundWithSubtitles to use uint32
instead of SoundFlag to avoid excess casting.
Add meaningful names to flags; add some comments.
Get rid of endian-unsafe SoundStatusUnion.
Fixes an issue with big-endian hosts.
No changes in behaviour on little-endian hosts.
This was previously comparing the Object Model to the Object Enum.
This has been corrected, but should have no functional change as the
underlying enum value of 1 is identical for both symbols.
engines/lastexpress/entities/alexei.cpp: In member function ‘void LastExpress::Alexei::standingAtWindow(const LastExpress::SavePoint&)’:
engines/lastexpress/entities/alexei.cpp:772:49: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C++ engines/lastexpress/entities/chapters.o
engines/lastexpress/entities/august.cpp: In member function ‘void LastExpress::August::function21(const LastExpress::SavePoint&)’:
engines/lastexpress/entities/august.cpp:672:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
switch(params->param5) {
^~~~~~
engines/lastexpress/entities/august.cpp:694:3: note: here
case 9:
^~~~
Checked the logic against the original game
(to be precise, DOS English version from GOG, although I think
AI logic has no significant differences with other versions).
Fixed a *lot* of errors with varying visibility for the user.
Also, save+exit+load sometimes resulted in memory corruption like
((EntityParametersSSII*)(new EntityParametersIIII))->param8 = 0;
load operation did not restore the correct type of NPC logic context,
the default one was used (which also has the smallest sizeof).
Should be fixed now. Save+load is still unusable because it locks
everybody waiting for kActionEndSound (the sound state is not restored),
but, at least, it should not corrupt the memory. Hopefully.