Commit Graph

376 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
f8881f661b LASTEXPRESS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Orgad Shaneh
3919f53326 ENGINES: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
djsrv
7eb4841065 ALL: Use Path type in Archive functions 2021-08-07 10:44:37 +02:00
Max Horn
2f1f8f502e DEVTOOLS: move credits from devtools/credits.pl to engines
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
2021-08-05 00:01:46 +02:00
Paul Gilbert
005561d305 COMMON: Increase Stream pos, seek, size from int32 to int64 2021-07-08 18:24:28 -07:00
sluicebox
8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05:00
sluicebox
cbe971e551 LASTEXPRESS: Add missing debug channel terminator 2021-05-22 04:01:17 -06:00
ysj1173886760
fb1e15fc3d LASTEXPRESS: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Cameron Cawley
4ced49acd4 ENGINES: Changed AdvancedMetaEngine::createInstance to return a Common::Error 2020-12-04 20:57:14 +00:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
Eugene Sandulenko
7ea6781043 PLUGINS: PLUGIN_TYPE_METAENGINE -> PLUGIN_TYPE_ENGINE_DETECTION 2020-10-11 23:12:32 +02:00
Eugene Sandulenko
7af0fb302e LASTEXPRESS: Fix detection for GOG release 2020-10-07 01:40:03 +02:00
Eugene Sandulenko
489823a739 Revert "LASTEXPRESS: added detection entry for gog release"
This reverts commit 3128c0be2f.

The md5s are for full files, it was never tested or even compiled,
as it is obvious from the PR#1333. There are different reasons why the
version was not detected, this will be fixed separately.
2020-10-07 01:40:03 +02:00
aryanrawlani28
d26bbe521c ENGINES: ALL: Finish renaming ME & AME classes
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
29ceb07959 ENGINES: ALL: Revert detection submodule to be directly present in the engine directory
- DETECT_OBJS are present and added inside an engine's modules.mk file.
2020-10-03 14:56:36 +02:00
aryanrawlani28
8189a05316 ENGINES: ALL: Adapt to changes for new plugins by defining a new detection module
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
06cb6c50e6 LASTEXPRESS: Split detection features & adapt to new plugins. 2020-10-03 14:56:36 +02:00
mataniko
581a6ec7d6 JANITORIAL: Rename kSupportsRTL to kSupportsReturnToLauncher 2020-05-12 10:36:38 +02:00
Eugene Sandulenko
2ba6d5151f LASTEXPRESS: Added override keywords 2020-04-24 01:33:38 +02:00
Paul Gilbert
d3e88f72e5 LASTEXPRESS: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Bastien Bouclet
1e6640ab33 LASTEXPRESS: Add override keywords 2020-02-09 12:43:15 +01:00
Eugene Sandulenko
f35993b224 LASTEXPRESS: Added override keywords 2020-02-05 15:42:31 +01:00
Paul Gilbert
5b80320525 ENGINES: Adding override keyword to hasFeature methods 2020-02-04 20:04:11 -08:00
Eugene Sandulenko
074e1d19fc LASTEXPRESS: Fix conflicting enums 2020-01-31 16:29:50 +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
Bastien Bouclet
9c8bd056d6 ENGINES: Stop using 'single id' 2019-11-03 11:43:00 +01:00
Bastien Bouclet
4b42112721 ENGINES: Add an engine ID to all the engines 2019-11-03 11:43:00 +01:00
Henrik "Henke37" Andersson
7b68555626 LASTEXPRESS: The game doesn't use MIDI, so mark it as such. 2019-09-29 19:34:16 +03:00
Bastien Bouclet
9a4c0ae281 ENGINES: Normalize the getName() result of metaengines
Also-By: Matthew Hoops <clone2727@gmail.com>
2018-12-10 06:47:27 +01:00
Evgeny Grechnikov
af580eaa85 LASTEXPRESS: save/load sound state
Warning: breaks compatibility with previous savefiles.
They were mostly broken anyway, locking any NPC who
waited for kActionEndSound when savefile was created.
2018-10-20 16:35:23 +03:00
Evgeny Grechnikov
9f7ae73a7b LASTEXPRESS: loud train noise when NPC exits car
If Cath stands near the beginning or the end of a car,
looks at a door, and a NPC opens this door,
the volume of train noise is temporarily raised.

Controlled by variables SoundManager::_data{0,1,2},
renamed to be not so mysterious.
2018-10-20 00:32:10 +03:00
Evgeny Grechnikov
06b7bb47ba LASTEXPRESS: case-insensitive lookup in sound queue 2018-10-19 23:37:35 +03:00
Evgeny Grechnikov
8a374bdf0c LASTEXPRESS: rnd() should not return a constant 2018-10-18 00:56:28 +03: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
b7b5fbbad2 LASTEXPRESS: support for looped sounds 2018-10-17 23:03:00 +03:00
Evgeny Grechnikov
d561fd8a83 LASTEXPRESS: dynamic adjusting of sound volume
Now it works just like in the original game,
including fading where it is applicable
(e.g. in a passengers list if closing the list while a sound is playing).

By the way, p2s sequence is known as http://oeis.org/A000265 ,
p1s is 4 - A007814, and p2s[i]/2**p1s[i] is just i/16.
It is time to get rid of these arrays.
2018-10-16 23:57:25 +03:00
Evgeny Grechnikov
29f6ce1d9a LASTEXPRESS: support for delay-activated sounds
Not very obvious, but noticeable e.g. when knocking on harem doors.
I suppose this is the problem that wiki describes
as "improper triggering of actions on sound end".
2018-10-16 23:01:26 +03:00
D G Turner
cc5d858169 LASTEXPRESS: Remove Engine Specific All Debug Level.
This is replaced by the global "all" option for debugflags and defining
this triggers a warning about the conflict at runtime.
2018-10-16 18:25:03 +01:00
D G Turner
5d340d244c LASTEXPRESS: Fix Compiler Warning in Sound Code.
The SoundFlag type is an enumeration which have a default underlying
type of unsigned int in most case.

Thus comparing this to -1 causes a compiler warning. Since the default
entity sound flag type is 0xFFFF... which is equivalent to -1, then
replacing this with the correct enum symbol fixes the issue and should
result in the correct behaviour. Examination of the resulting code line
seems to confirm that this is the correct expected logic.
2018-10-16 13:30:44 +01:00
Evgeny Grechnikov
43fb9ebb1b LASTEXPRESS: drop sound thread
The backend runs its own sound thread anyway,
with the corresponding bookkeeping that we use.
We don't need yet another sound thread,
and it is always nice to not have something
that could change our structures from underneath us.
2018-10-16 01:03:55 +03:00
Evgeny Grechnikov
8162309212 LASTEXPRESS: fix race condition in sound code
SoundEntry::play() calls StreamedSound::setFilterId(),
StreamSound::setFilterId() requires the underlying reference to be alive.
SoundQueue::handleTimer() checks that the stream is still alive
by calling SoundEntry::isFinished(). However, if the stream is finalized
just between calls to SoundEntry::isFinished() and SoundEntry::play(),
the sound mixer frees the stream leading to use-after-free in setFilterId().

Turn off the automatical disposing, delete the stream in SoundEntry::~SoundEntry().
2018-10-16 00:49:07 +03:00
Thierry Crozat
457c4ee8ac LASTEXPRESS: Fix compilation with some compilers 2018-10-14 22:00:13 +01: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
Evgeny Grechnikov
d36aadd3a6 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.
2018-10-14 17:29:47 +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