471 Commits

Author SHA1 Message Date
Eugene Sandulenko
4187038c62 PEGASUS: Added override keywords 2020-01-31 14:03:58 +01:00
Bastien Bouclet
7ecccd3b30 MOHAWK: RIVEN: Add default joystick action mappings 2020-01-29 08:51:29 +01:00
Bastien Bouclet
519b4a57e2 KEYMAPPER: Allow engines to return multiple keymaps
The idea is that keymaps may be situational. A keymap may be always
enabled, while another one may be enabled only during combat..
2020-01-29 08:51:29 +01:00
Bastien Bouclet
426867f4bc KEYMAPPER: Give human readable descriptions to the keymaps 2020-01-29 08:51:29 +01:00
Bastien Bouclet
376a77e735 PEGASUS: Add default joystick action bindings 2020-01-29 08:51:29 +01:00
Bastien Bouclet
32174c9067 KEYMAPPER: Actions can now be bound to joystick buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet
85f476070b PEGASUS: Use custom engine actions for key input 2020-01-29 08:51:29 +01:00
Bastien Bouclet
14663c4790 KEYMAPPER: Make the keymapper mandatory 2020-01-29 08:51:29 +01:00
Bastien Bouclet
ee8229dc00 ENGINES: Move keymap initialization to MetaEngine
To be able to access the keymap while the engine is not running.
2020-01-26 23:09:08 +02:00
Bastien Bouclet
19de568e24 KEYMAPPER: Untangle the dependencies between Action and Keymap 2020-01-26 23:09:08 +02:00
Bastien Bouclet
d60190b12e ENGINES: Define default bindings for the existing engine keymaps 2020-01-26 19:07:53 +01:00
Bastien Bouclet
9c0bc2b633 KEYMAPPER: Simplify the way keymaps are enabled and disabled 2020-01-26 19:07:53 +01:00
Bastien Bouclet
ac44469558 KEYMAPPER: Remove the domain class 2020-01-26 19:07:53 +01:00
Bastien Bouclet
e197a75829 KEYMAPPER: Action can generate only a single event 2020-01-26 19:07:53 +01:00
D G Turner
b7c397412d PEGASUS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 21:41:21 +00:00
Bastien Bouclet
bb813719b5 ENGINES: Change targets to have an 'engine ID'
The engine ID identifies which engine should be used to launch the target.
Also remove the 'single ID' system. Different games from engines that used
that system now have different game IDs.

Also-By: Matthew Hoops <clone2727@gmail.com>
2019-11-03 11:43:00 +01: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
3d55cec3b5 PEGASUS: Game does not use MIDI, mark it as such. 2019-09-29 19:34:16 +03:00
Cameron Cawley
4cf9d1815c COMMON: Open the main menu when the joystick START button is pressed 2019-07-08 01:24:55 +03:00
Cameron Cawley
cf107e7f90 PEGASUS: Implement joystick support 2019-07-08 01:24:55 +03:00
Filippos Karapetis
87e13a5048 PEGASUS: Fix MSVC warnings
- Add a float suffix in convertScreenHToSpaceX/Y
2019-05-27 14:53:41 +03:00
D G Turner
c006f405f3 PEGASUS: Fix Fall Through Compiler Warnings. 2018-11-13 08:50:08 +00:00
Eugene Sandulenko
378d9153b6 PEGASUS: Add override specifier 2018-03-28 12:29:28 +02:00
Colin Snover
d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06: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
Bastien Bouclet
3eb82462e7 ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams 2017-09-22 07:06:21 +02:00
Bastien Bouclet
d534299d38 PEGASUS: Don't do virtual calls when fading the screen
For better performance.
2017-09-12 20:25:24 +02:00
Bastien Bouclet
1519b2befc PEGASUS: Free the interface data when destroying the engine
Fixes loading a game from the launcher after returning to the launcher.
2017-09-12 20:25:24 +02:00
Bastien Bouclet
8e235f07a7 PEGASUS: Disallow loading / saving from the GMM from inner loops
InputDeviceManager::pumpEvents is called from neighborhood classes that
are destroyed when loading.
Don't allow loading from that method to prevent use after free bugs.
2017-09-12 20:25:24 +02:00
Bastien Bouclet
731028460f PEGASUS: Ignore events occuring while the GUI is visible
Otherwise, pressing escape to close the GMM opens the game's own menu.
2017-09-12 20:25:24 +02:00
Bastien Bouclet
64967c6222 PEGASUS: Reset the Pegasus biochip when toggling the shared screen space
Fixes a crash to debugger in the following case:
- TSA: Select he Pegasus biochip. The recall button is disabled.
- Select the gas canister in the inventory
- Jump to Norad VI
- Press T to show the Pegasus biochip. The recall button is still
incorrectly disabled. Clicking on it triggers an error.
2017-09-12 20:25:24 +02:00
Bastien Bouclet
6506b95fce PEGASUS: Call OSystem::updateScreen on each frame
Fixes the display of OSD information when toggling fullscreen.
2017-09-12 20:25:24 +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
Eugene Sandulenko
940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat
eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Ben Castricum
e95c2cc3ff ALL: save file => saved game 2016-11-29 21:10:59 +01:00
Ben Castricum
6f38c1e55d ALL: game state => saved game 2016-11-29 20:15:20 +01:00
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Strangerke
fd19d453dd PEGASUS: Fix some missing variable initializations 2016-06-16 07:59:53 +02:00
Strangerke
df02215957 PEGASUS: Initialize some variables 2016-06-14 07:43:04 +02:00
Eugene Sandulenko
33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
Eugene Sandulenko
4435902f1e PEGASUS: Add safety check.
The code which follows in the method has this check, assuming that
a null dereference is potentially possible.
2016-05-14 11:31:51 +02:00
Johannes Schickel
0b6befdcc5 ENGINES: Make variable names of AdvancedMetaEngine conform to our guidelines.
_singleid   -> _singleId
_gameids    -> _gameIds
_guioptions -> _guiOptions
2016-03-08 19:01:13 +01:00
Eugene Sandulenko
23d74fddb4 CONFIGURE: Introduced new engine dependency: highres
Some backends like GCW0 do no support graphics >320x240 due to
the hardware limitation (downscaling is possible but it will ruin
the pixel hunting which is often part of the gameplay).

Instead of manually updating the list of engines, we now introduce
a new dependency.

I marked all relevant engines, but some, like tinsel, require more
work with putting their relevant high-res games under USE_HIGHRES
define.
2016-03-05 14:25:56 +01:00
Matthew Hoops
b6fdc7be88 AUDIO: Make makeAIFFStream return a RewindableAudioStream
All callers requiring SeekableAudioStream have been adapted by using dynamic_cast
2015-06-06 17:20:41 -04:00
Filippos Karapetis
60e83c2d9c PEGASUS: Silence two MSVC warnings 2015-02-15 20:49:16 +02:00
Filippos Karapetis
26588f81b4 PEGASUS: Remove trailing whitespace 2014-10-28 16:17:44 +02:00
Ben Castricum
4cd06dcab7 PEGASUS: Don't try to translate "???" 2014-08-16 12:45:02 +01:00
Matthew Hoops
bf210cccc0 PEGASUS: Fix bad cast that destroys the InputHandler vtable
Thanks to LordHoto for his assistance in tracking this nonsense down.
2014-08-14 21:56:33 -04:00