Commit Graph

135 Commits

Author SHA1 Message Date
Eugene Sandulenko
2ba6d5151f LASTEXPRESS: Added override keywords 2020-04-24 01:33:38 +02:00
Bastien Bouclet
1e6640ab33 LASTEXPRESS: Add override keywords 2020-02-09 12:43:15 +01:00
D G Turner
7b275b454c LASTEXPRESS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 13:28:49 +00:00
Evgeny Grechnikov
54562554f9 LASTEXPRESS: better names in sound code
Refactoring, no changes in behaviour.
2018-10-18 00:38:01 +03:00
Evgeny Grechnikov
53cd6616c9 LASTEXPRESS: refactor sound flags
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.
2018-10-14 20:08:32 +03:00
D G Turner
b3b4b9c8de LASTEXPRESS: Fix GCC Enum Comparison Mismatch Warning.
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.
2018-09-24 19:09:14 +01:00
D G Turner
f1ded1f111 LASTEXPRESS: Fix GCC Warnings
These were for missing parentheses to clarify logical expressions.
2018-09-24 18:43:35 +01:00
Evgeny Grechnikov
f057ac75ce LASTEXPRESS: more fixes in NPC logic 2018-09-24 01:57:44 +03:00
Martin Gerhardy
be71f5b990 LASTEXPRESS: fixed warnings with gcc 8.2
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:
   ^~~~
2018-09-13 20:55:49 +01:00
Evgeny Grechnikov
0cb6b30f67 LASTEXPRESS: more fixes in NPC logic 2018-09-11 23:14:30 +03:00
Evgeny Grechnikov
6a1e5c1d93 LASTEXPRESS: more fixes in NPC logic 2018-09-02 21:07:00 +03:00
Evgeny Grechnikov
39ad93d738 LASTEXPRESS: fix gcc build 2018-08-26 12:09:43 +02:00
Evgeny Grechnikov
f771fa40ad LASTEXPRESS: multiple fixes in NPC logic
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.
2018-08-26 12:09:43 +02:00
Torbjörn Andersson
70a2ca8b7d JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
2017-08-06 13:30:51 +02:00
Littleboy
c443b84dae LASTEXPRESS: Rename Vassili functions 2016-09-23 22:19:01 -04:00
Littleboy
45025d53e0 LASTEXPRESS: Rename Vesna functions 2016-09-23 22:19:00 -04:00
Littleboy
71766fcc65 LASTEXPRESS: Rename Tatiana functions 2016-09-23 22:19:00 -04:00
Eugene Sandulenko
d8caeed074 LASTEXPRESS: Fixed potential buffer overrun 2016-05-13 09:08:59 +02:00
Littleboy
94861cd73c LASTEXPRESS: Check for resulting sequence size in August logic code. CID 1003264 2014-06-16 18:46:31 -04:00
Littleboy
be563f3c19 LASTEXPRESS: Add assert check in Gendarmes logic. CID 1003263 2014-06-16 18:46:30 -04:00
Littleboy
cf360e6721 LASTEXPRESS: Rename Ivo functions 2014-06-16 18:46:29 -04:00
Littleboy
cbb7c71c89 LASTEXPRESS: Add asserts in EntityData serialization code. CID 1003265 2014-06-16 18:46:22 -04:00
Littleboy
9e1c0f14a8 LASTEXPRESS: Rename Max functions 2014-06-16 18:46:21 -04:00
Littleboy
b4d7c1c15b LASTEXPRESS: Rename Chapters and Gendarmes functions 2014-06-16 18:46:20 -04:00
Littleboy
374ee55cfc LASTEXPRESS: Rename Kahina functions 2014-06-16 18:46:19 -04:00
Littleboy
a42f910a90 LASTEXPRESS: Rename Pascale functions 2014-06-16 18:46:18 -04:00
Littleboy
9b4ed3f1e5 LASTEXPRESS: Rename Cooks functions 2014-06-16 18:46:17 -04:00
Littleboy
d921f6721d LASTEXPRESS: Add missing logic in Waiter2 for chapter 4 2014-06-16 18:46:16 -04:00
Littleboy
73cc1803cb LASTEXPRESS: Rename Waiter* functions 2014-06-16 18:46:14 -04:00
Littleboy
5310d49e53 LASTEXPRESS: Rename Server* classes to Waiter* 2014-06-16 18:46:13 -04:00
Littleboy
7765f852be LASTEXPRESS: Rename Hadija functions 2014-06-16 18:46:12 -04:00
Littleboy
f403d6b45d LASTEXPRESS: Rename Kronos functions 2014-06-16 18:46:11 -04:00
Johannes Schickel
3d4f409572 LASTEXPRESS: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Littleboy
66ff931fb9 LASTEXPRESS: Rename Yasmin logic functions 2013-12-10 01:55:03 -05:00
Littleboy
ddcef23943 LASTEXPRESS: Fix enum comparison 2013-12-10 01:54:59 -05:00
Littleboy
e36786eb1b LASTEXPRESS: Rename Francois and Alouan logic functions 2013-12-10 01:54:59 -05:00
Littleboy
1314c5c128 LASTEXPRESS: Rename Object properties 2013-12-10 01:54:56 -05:00
Littleboy
a2e9585400 LASTEXPRESS: Rename Anna logic functions
Fix wrong call in
2013-12-10 01:54:55 -05:00
Littleboy
5e9404ccdf LASTEXPRESS: Rename Alexei logic functions 2013-12-10 01:54:54 -05:00
Littleboy
a4b21cf436 LASTEXPRESS: Rename Abbot logic functions 2013-12-10 01:54:53 -05:00
Strangerke
a8de5dfad8 LASTEXPRESS: Janitorial - Fix spacing errors 2013-11-24 19:28:54 +01:00
Eugene Sandulenko
753c9198e9 LASTEXPRESS: Fix potential buffer overruns. Numerous CID 1003873-1003885 2013-10-08 00:11:18 +03:00
Eugene Sandulenko
18413bc0b3 LASTEXPRESS: Fix multiline macros. CID 1003638 2013-04-28 23:59:21 +03:00
Eugene Sandulenko
6ca845b9ea LASTEXPRESS: Fix nasty bug with multiline macro. CID 1003640 2013-04-28 23:59:21 +03:00
Littleboy
6ab3b903d4 LASTEXPRESS: Identify more Verges functions 2012-08-27 21:49:42 -04:00
Littleboy
8fa617556c LASTEXPRESS: Fix typo in Verges chapter 3 function 2012-08-27 21:49:41 -04:00
Littleboy
81c6016e8f LASTEXPRESS: Identify several Verges functions 2012-08-27 21:49:40 -04:00
Littleboy
275aded0b0 LASTEXPRESS: Remove unnecessary casts 2012-08-27 21:49:40 -04:00
Littleboy
2c0033c7ba LASTEXPRESS: Add const modifiers 2012-08-27 21:49:38 -04:00
Littleboy
cec57e0918 LASTEXPRESS: Reduce header interdependency 2012-08-27 21:49:37 -04:00