Commit Graph

771 Commits

Author SHA1 Message Date
Cameron Cawley
a1890ede9c BASE: Avoid calling PluginMan.getEngineFromMetaEngine where possible 2021-04-05 15:33:23 +01:00
D G Turner
f8f0f09ef2 CINE: Fix GCC Compiler Warnings
These are mainly signed vs. unsigned comparison warnings apart from
a set, but unused variable in the main loop code which can be removed.
2021-03-17 21:53:28 +00:00
Paul Gilbert
ae4da8bce0 ENGINES: Make creation of savegame thumbnails an overrideable method 2021-03-07 09:34:33 -08:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Cameron Cawley
4ced49acd4 ENGINES: Changed AdvancedMetaEngine::createInstance to return a Common::Error 2020-12-04 20:57:14 +00:00
Eugene Sandulenko
e4f1351d05 CINE: Use AD_ENTRY2s in the detection tables 2020-11-28 13:49:16 +01:00
Eugene Sandulenko
5936026209 ALL: Clarify POTFILES, remove redundant common/translations.h includes 2020-11-10 03:03:49 +01: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
Cameron Cawley
baa1a49122 CINE: Fix warning 2020-10-10 21:26:41 +01:00
aryanrawlani28
992abce74a ENGINES: Rename getMetaEngine helpers
- getME -> getMetaEngineStatic (static parts)
- getMEC -> getMetaEngine (dynamic parts)
2020-10-03 14:56:36 +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
a56dc094b9 ENGINES: ALL: Move detection_enums -> detection.h
- Cleans up headers quite a bit.
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
f3b9477893 ENGINES: ALL: Add header guards for the new detection-header files. 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
ec3ccf5eb0 CINE: Split detection features & adapt to new plugins. 2020-10-03 14:56:36 +02:00
Paul Gilbert
bf754b76aa ENGINES: Cleanup of get savegame file & patterns 2020-09-19 09:31:49 -07:00
Eugene Sandulenko
c65f3e071c ALL: Remove ADGF_TESTING flags before the 2.2.0 release 2020-09-13 13:09:02 +02:00
Kari Salminen
70d16a3689 CINE: FW: Fix command line updating
In Future Wars the command line was not always updated and thus failed
sometimes to be up to date (i.e. showing wrong text, e.g. "EXAMINE" only
when it should have read "EXAMINE scaffolding" because the mouse cursor
was on the scaffolding).

Now we just always update the command line for both Future Wars and
Operation Stealth which seems to fix the command line updating.

I think this probably was a regression caused by adding support for
Operation Stealth (i.e. pull request #2365) and the efforts made in it
to make the user interface responsive.
2020-09-10 00:34:32 +01:00
Kari Salminen
eabd1c243d CINE: Fix loading inexistent music.
The Italian Amiga version of Future Wars tries to load music from file
"TELESONG.DAT" which does not exist. Previously after this starting to
play music might either try to play a null stream and crash or play an
old wrong music in memory. Fix that by setting the stream to null if
no music exists (Checked that the stream is destroyed i.e. the
destructor is run so it should be safe to set the _moduleStream variable
to nullptr directly).
2020-09-10 00:34:32 +01:00
Kari Salminen
1642259e4f CINE: FW: Fix 8 half speed scenes (Amiga/Atari ST)
Previously there was a fix for bug #2669415
("FW: half walking speed in a screen") which only addressed a single
scene in Amiga and Atari ST versions of Future Wars.

This fix fixes half walking speed in 8 more scenes in Amiga and Atari ST
versions of Future Wars. The scenes were identified by playing through
an Italian version of Amiga Future Wars.

3 more scenes were left over with half walking speed because they could
not be fixed as easily (i.e. using this fix on them broke the scenes in
some way, made them too fast or made the people walk into wrong
positions or something else). The scenes left over are the ones using
the following background files:
- "L10.PI1": The medieval castle's hall.
- "L18.PI1": The medieval castle's teleport room.
- "L45.PI1": Space station's computer room.
2020-09-10 00:34:32 +01:00
Kari Salminen
be3c84c8e8 CINE: Fix total playtime loading from savegame.
Total playtime is kept as milliseconds in the engine. It is saved as
seconds. Previously it was not converted to milliseconds on load but
seconds were took as milliseconds (i.e. 10s -> 10ms). Fix that by
converting total playtime on load from seconds to milliseconds.
2020-09-10 00:34:32 +01:00
Kari Salminen
8c0a71444f CINE: Try to fix bad_alloc with empty event queue
Previously I encountered an std::bad_alloc with the code in manageEvents
pushing an empty Event into the event queue. It did not happen very
often but I got it to appear while debugging at least once or maybe
twice.

This is an attempt to fix this possible behaviour by not pushing empty
events into the event queue but making sure the current status is
checked without needing to push empty events into an empty event queue.

I played through Italian Amiga version of Future Wars with this change
and encountered no problems with it.
2020-09-10 00:34:32 +01:00
Kari Salminen
1ce7db5572 CINE: Fix using F3 for INVENTORY and F4 for USE.
Previously the inventory could be summoned multiple times by pressing
F3 or F4. Fix that by keeping track when the inventory has been opened
and not allowing multiple use of it simultaneously.
2020-09-10 00:34:32 +01:00
Kari Salminen
7b3b07eb37 CINE: Fix mouse responsiveness after player death
After player has died it was hard to get the system menu to appear by
pressing the left and right mouse buttons simultaneously or the middle
mouse button. Fix that by using the maximum values of the mouse button
states for the polling period (Around 110ms at default play speed).
2020-09-10 00:34:32 +01:00
Kari Salminen
86c21a73ff CINE: FW: Fix Amiga/Atari ST copy protection text
Fix transparency of page number and grid position (e.g. 04 and D2) in
the copy protection scene of Amiga and Atari ST versions of Future Wars.
2020-09-10 00:34:32 +01:00
Kari Salminen
7ff9d16bf2 CINE: Loop Amiga music instead of playing it once
Make Amiga music loop until fade out when changing scene. This is
based on watching a video of Future Wars Amiga walkthrough, not on
playing the Amiga version or reading its disassembly. But it does seem
that the music loops instead of just playing once.
2020-09-10 00:34:32 +01:00
Kari Salminen
3be1744666 CINE: OS: Fix pitch of Amiga music by halving it.
Fix playing pitch of Amiga music in Operation Stealth by halving it.
Fixes bug #11676.
2020-09-05 22:57:03 +02:00
Kari Salminen
0bedec1304 CINE: OS: Fix playing Amiga samples.
Previously frequency of zero samples crashed the debug version,
now they are simply discarded. Also the frequency calculation is done
differently in the Amiga version of Operation Stealth than in the
Future Wars. This fixes playing samples in Amiga versions of Operation
Stealth (Not crashing on frequency of zero samples and playing the
samples at their right pitch).
2020-09-05 22:57:03 +02:00
Kari Salminen
5e2365fe83 CINE: Fix loading .AMI files (Amiga samples).
The .AMI files load better with loadSpl function than loadAni.
Using loadAni for some of the files resulted in garbled sound when
the input data was presumed to be 4-bit although it was 8-bit.
Fixes loading of some Amiga samples in Operation Stealth
(Not all samples were affected). Addresses bug #11676.
2020-09-05 22:57:03 +02:00
Kari Salminen
e9b585df4e CINE: OS: Fix MT-32/AdLib SFX & loading savegames
In Operation Stealth DOS and Atari ST versions, but not Amiga or
demo versions, sound effects are loaded in AUTO00.PRC using a
combination of o2_loadAbs and o2_playSample(1, ...) before
o1_freePartRange(0, 200). This is a better heuristic for ending the
script at the correct position than checking whether global variable
255 is compared to 0. In the original game AUTO00.PRC was run when
starting or restarting the game and one could not load a savegame
before passing the copy protection. Thus, we try to emulate that
behaviour by running at least part of AUTO00.PRC before loading a
savegame.
2020-09-04 10:31:33 +02:00
Kari Salminen
1ecb24cad7 CINE: OS: Fallback to default error messages
If the error messages can not be found (They are in the file
ERRMESS.DAT in Operation Stealth) then use the default values.

There are now the following default error messages included in ScummVM
for Operation Stealth:
 - American English (Protagonist is James Bond)
 - British English (Protagonist is John Glames)
 - French
 - German

For the Italian and Spanish releases of Operation Stealth the error
messages from Future Wars are used as fallback. This is incorrect
but better than nothing.

This makes the error message handling more lenient than before so that
not having an ERRMESS.DAT does not block the starting of the game
anymore.

Fixes bug #11649.
2020-09-03 00:39:02 +02:00
Kari Salminen
e82b4faeed CINE: Fix overlay rendering with NULL source mask
In French Amiga Future Wars from bug #10643 when walking left from the
scene with the open manhole cover a call to renderOverlay with a
type 0 (color sprite) overlay happens. The source mask for the overlay
is NULL and a memcpy using a NULL pointer as source is initiated.
This results in a memory access violation.

This fixes that memory access violation by simply setting the
destination mask to all zeroes when the source mask is NULL.
Seems to work fine at least in this case.

Fixes bug #10643.
2020-08-31 09:26:36 +02:00
Kari Salminen
c27ae2758d CINE: Support 100 savegames also with original UI
This raises the maximum number of savegames from 20 to 100.
The original UI could only show 20 on a screen at once so an
intermediate selection menu for selecting the group of 20 savegames
to be accessed is added in this commit:

0-19
20-39
40-59
60-79
80-99

Those are the values that are shown when selecting
"Restore game" or "Save game".

After selecting the group of savegames to be accessed that particular
group is only shown as those 20 can fit on the screen using the
original save/load UI.

At least partially if not fully fixes bug #11625.
2020-08-30 21:54:54 +01:00
Kari Salminen
0af1bfc1f9 CINE: Throttle safe controls to max 4Hz (#11621).
This throttles the safe controls in Operation Stealth in the
presidential palace after the first labyrinth arcade sequence.

The problem was that the safe controls were a bit too fast i.e. by
pressing on a single button you might easily get the numbers to change
by more than a single digit. This throttles the pressing of safe
control buttons in this particular scene to a maximum rate of 4Hz
(i.e. at least 250ms has to have passed before a click is registered
again).

Fixes bug #11621.
2020-08-30 21:54:42 +01:00
Kari Salminen
216ec1aecc CINE: Add OS German Atari ST detection (#11466).
This adds detection entry for the Operation Stealth German Atari ST
version from bug #11466.
2020-08-30 21:54:29 +01:00
Kari Salminen
57103b4966 CINE: Fix OS EGA French Floppy detection #11617.
This fixes the Operation Stealth EGA French Floppy detection entry
from bug #11617. The file in question is PROCS1, not PROCS01.
2020-08-30 21:54:20 +01:00
Eugene Sandulenko
ac6932bd89 I18N: Added missing files to POTFILES 2020-08-27 20:26:45 +02:00
Eugene Sandulenko
956b33a411 CINE: Fix warnings 2020-08-26 01:32:55 +02:00
Eugene Sandulenko
0ae7db07ea CINE: Added detection for another FR floppy OS. Bug #11617 2020-08-25 20:08:29 +02:00
Eugene Sandulenko
26f44a64c9 CINE: Put Operation Stealth to testing 2020-08-23 17:00:15 +02:00
Eugene Sandulenko
81975911f7 CINE: Fix compilation 2020-08-22 22:58:43 +02:00
Kari Salminen
f1809916a4 CINE: Fix autosave thumbnail generating.
Using the current screen contents for autosaves now.
For non-autosaves the screen contents before opening
the system menu are used.
2020-08-01 20:26:44 +02:00
Kari Salminen
24c7e0e70c CINE: FW: Fix disabled action menu after loading.
Future Wars PC disassembly does not save disableSysteMenu variable.
After adding versioning to Future Wars saves this value was also
saved and loaded but using it on load seems to have caused the
action menu (EXAMINE, TAKE, INVENTORY, ...) to be disabled sometimes
when it is not supposed to be disabled. Thus, now skipping the loading
of disableSystemMenu variable for versioned Future Wars saves.
2020-08-01 20:26:44 +02:00
Kari Salminen
8c34f865e8 CINE: FW: Fix Roland MT-32 sample playing.
Fix bug #11547 ("CINE: FW: Game crashes during intro with MT-32 music").
Future Wars PC disassembly passes 256 to writeInstrument and
writeInstrument overwrites it with value 246 here. So the value
becomes 246 in the end.
2020-08-01 10:42:21 +02:00
Kari Salminen
21e3086244 CINE: Simplify assert in freeAnimDataRange. 2020-07-31 10:38:42 +02:00
Kari Salminen
d11445b672 CINE: Add _animDataTable bounds checkings.
Hopefully a fix for Coverity check CID 1430586
("Untrusted value as argument").
2020-07-31 10:38:42 +02:00
Eugene Sandulenko
53f7e430fc CINE: Use strlcat 2020-07-27 12:24:47 +02:00
Eugene Sandulenko
a3ee49ad25 CINE: Remove unnecessary check. uints are always >= 0 2020-07-27 12:22:18 +02:00