58 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Scott Percival
666f241d29 EVENTRECORDER: Remove backwards compatibility 2021-09-09 19:32:02 +02:00
Scott Percival
29d6758c0d EVENTRECORDER: Add update mode
This new mode is functionally identical to playback mode, however
a new recording file is used to track the actual output of ScummVM.
This feature can be used to update a suite of existing recordings after
a renderer or a timing change.
2021-09-09 19:32:02 +02:00
Scott Percival
84707ec828 EVENTRECORDER: Prevent recursive call to warpMouse 2021-09-09 19:32:02 +02:00
Scott Percival
0112fab176 EVENTRECORDER: Filter GUI redraws from the logs 2021-09-09 19:32:02 +02:00
Scott Percival
13a20e11e6 EVENTRECORDER: Disable autosave in record/playback mode 2021-09-09 19:32:02 +02:00
Scott Percival
5cbcd98963 EVENTRECORDER: Add screen update tracking
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.

This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
2021-09-09 19:32:02 +02:00
Scott Percival
c29a62b05d EVENTRECORDER: Ignore hash check for targets with no MD5 records
This is required for Director to allow testing arbitrary files that
aren't part a game, e.g. Lingo Dictionary.
2021-09-09 19:32:02 +02:00
Martin Gerhardy
15dd09a527 EVENTRECORDER: fixed compilation 2021-08-10 09:34:48 +02:00
Le Philousophe
ef73bdac50 EVENTRECORDER: Update screen resolution in GUI before showing anything
This properly fix bug encountered in 5af11925809267eee1abd5ddf251530f6f5f5572
Now the UI is notified size has changed and properly reiszes overlay
surface.
2021-08-04 13:27:07 +02:00
Martin Gerhardy
115f2fcf13 EVENTRECORDER: handle new recorder event for TimeDate 2021-07-14 20:05:08 +02:00
Martin Gerhardy
7a172206d5 EVENTRECORDER: don't execute getMillis while resolving the random seed in playback mode 2021-07-12 22:56:02 +02:00
Martin Gerhardy
a0c237f7b9 EVENTRECORDER: added new event for OSystem::getTimeAndDate 2021-07-09 19:23:21 +02:00
Orgad Shaneh
484cfc5644 EVENTRECORDER: Fix date on initial name
Month was off by 1.
2021-07-09 00:07:55 +03:00
Martin Gerhardy
930aefbaa9 EVENTRECORDER: fixed missing events in eventQueue of DefaultEventManager
due to the fact that we aborted every event that wasn't a key-repeat event, we never filled the event queue
2021-07-08 15:05:35 +02:00
Martin Gerhardy
669e3fcba3 EVENTRECORDER: don't skip events by calling getMillis() during processMillis()
If for some reason getMillis() was called in any of the functions that are called
inside of processMillis() the getNextEvent would skip events. To prevent this we
detect recursive calls to processMillis() now and assume that no further millisecond
has passed since the initial call.
2021-07-08 15:05:35 +02:00
Martin Gerhardy
f35cc92aaf EVENTRECORDER: ignore other event sources when playing back a record 2021-07-08 15:05:35 +02:00
Martin Gerhardy
c7463600c1 GUI: fixed endless recursion in EventRecorder::pollEvent
warpMouse is calling purgeMouseEvents - which in turn calls pollEvents again

with this fix I was able to perform a small playback of twine in the menu
2021-06-21 20:56:01 +02:00
Martin Gerhardy
3ddce1cf3a EVENTRECORDER: relax the out-of-sync check
this might happen if you have EventSource instances registered, that
are querying the millis by themselves, too. If the EventRecorder::poll
is registered and thus dispatched after those EventSource instances, it
might look like it ran out-of-sync.
2021-06-19 14:34:52 +02:00
Martin Gerhardy
adc2671449 COMMON: fixed endless loop in recordings with only one screenshot
the stream was read after its end and the err() state wasn't checked properly
2021-06-19 14:34:52 +02:00
Martin Gerhardy
eccf343fcb GUI: removed superfluous break in EventRecorder 2021-06-19 14:34:52 +02:00
ysj1173886760
7a0d9546ce GUI: move kDebugLevelEventRec flag to global flag 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
Martin Gerhardy
03d174384e GUI: pass record file name by reference 2021-02-20 22:37:19 +01:00
aryanrawlani28
d12c6c4338 GUI: U32: Code cleanup
- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp
2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
Eugene Sandulenko
b376250846 EVENTRECORDER: Do not check md5s which were skipped on save 2020-08-29 17:22:50 +02:00
Cameron Cawley
d1bfa2c4ec BACKENDS: Modify the null mixer manager to not require SDL 2020-08-24 14:22:35 +02:00
Cameron Cawley
697d1a8672 BACKENDS: Added an abstract MixerManager class 2020-08-24 14:22:35 +02:00
mataniko
1b9fc31e2d JANITORIAL: Last remaining RTL references 2020-05-12 10:36:38 +02:00
mataniko
06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Bastien Bouclet
52be1c8c63 EVENTRECORDER: Register as an event observer rather than a mapper 2020-01-26 19:07:53 +01:00
Bastien Bouclet
6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
c0d8b6d9fc GUI: Introduce dynamic layouts
Prior to this change, a GUI layout was only affected by the screen size.
Now, a layout can additionally be influenced by the GUI dialog and widgets
that uses it. This capability is leveraged to implement the following
features:

* Layout elements that are not bound to a GUI widget do not take space.
   This means that dialogs where the widgets shown depend on for example
   a feature being enabled at configure time no longer have blank spaces.
* Widgets can define a minimal required size for their contents not to be
   cut. For now this is only used for buttons so their width is always
   sufficient for their caption not to be cut. This mechanism could be
   applied to other widget types in the future.
2020-01-04 10:56:25 +01:00
Bastien Bouclet
c142838122 BASE: Change the command line interface to use engine-qualified game names
Qualified game names have the following form: engineId:gameId.
Unqualified game names are still supported as long as they are not
ambiguous. However they are considered deprecated and are no longer
displayed by the --list-games command.
2019-11-03 11:43:00 +01: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
D G Turner
019de0cc23 EVENTRECORDER: Fix GCC Compiler Warnings
These were memcpy usage to copy a non-trivial structure.
2019-09-14 00:54:10 +01:00
Bastien Bouclet
8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
4d0bb753e4 GUI: Remove the ThemeItem draw queues
Drawing nows happens directly when the Dialog or Widget draw methods are
called. This makes it easy to debug why a particular low level draw
method was called, by inspecting the call stack.

This replaces the notion of "buffering" by two independant ways to
control what is drawn and where:
- The active layer is used to select whether the foreground or
  background part of the dialogs are rendered by the draw calls.
- The active surface is used to select if the draw calls affect the back
  buffer or the screen.

The foreground layer of the active dialog is drawn directly to the
screen. Its background layer is drawn to the back buffer. This way
widgets can restore the back buffer in order to update without having to
redraw the dialog's background.

Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-03-12 11:46:04 +01: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
Bastien Bouclet
8beb519c5e EVENTS: Rename synthetic to kbdRepeat 2017-11-19 16:12:50 +01: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
Eugene Sandulenko
0fb6f31d4e EVENTRECORDER: Fix incorrect check which prevented records from replay 2016-03-25 16:30:12 +01:00
Pawel Kolodziejski
be489328dd GUI: remove not used const 2014-12-05 19:37:45 +01:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Eugene Sandulenko
4c2dc5fb3f RECORDER: Fix warning 2013-09-09 00:46:03 +03:00
Johannes Schickel
11eb168582 GUI: Use Domain::const_iterator in EventRecorder code when possible. 2013-08-08 03:12:02 +02:00
Johannes Schickel
b1bd9322a1 GUI: Take advantage of Surface::getPixels. 2013-08-03 04:02:50 +02:00
Johannes Schickel
103e926c07 GUI: Prefer getBasePtr instead of direct Surface::pixels access. 2013-08-03 04:02:48 +02:00