Commit Graph
364 Commits
Author SHA1 Message Date
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
D G Turner f0f02c4a3f LASTEXPRESS: Add Missing End Markers to Detection Entry File Lists.
This omission might have caused detection issues, but unlikely to cause
crashes.
2018-09-14 03:17:56 +01:00
Martin Gerhardy 3128c0be2f LASTEXPRESS: added detection entry for gog release 2018-09-14 02:38:02 +01: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
Adrian Frühwirth 0524ff6e8d JANITORIAL: Silence GCC 7 fallthrough warnings 2018-03-23 18:34:17 +01:00
Colin Snover 432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05: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