The following variables:
gScummVMVersion
gScummVMBuildDate
gScummVMVersionDate
gScummVMFullVersion
gScummVMFeatures
are declared as pointers to strings but there is no need to do so.
They can be simply declared as const strings, since they will be never modified when SCUMMVM runs.
Exports version variables as const strings
Trying all engine plugins in alphabetical order is a time consuming
process, so start by trying the plugin which has the same name as the
engine id first, if it exists, as it will usually be the right one.
In the rare case that it would be the wrong one there is no problem;
the code will simply fall through to the old scanning and then record
the correct plugin in the engine_plugin_files domain where it will be
found the next time the plugin is needed.
Plugin filenames are all upper case on Dreamcast due to the ISO 9660
filesystem. It doesn't seem likely that making the check case
insensitive would cause any problems even on a file system that
is case sensitive.
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.
Fixes GUI events leaking into engines at startup. This caused
Phantasmagoria 1 to skip its introduction if the game was started from
the ScummVM GUI with a keyboard (Enter) but not with a mouse because
the key-down event started the engine and the key-up event remained
in the queue.
This also purges and mouse events since we happen to already have a
purgeMouseEvents() method. We may want to also clear joystick inputs,
or possibly the entire event queue, but that can be done after the
upcoming release. For now, the known bug is fixed.
This is a degradation from the split of detection plugins. All the
caching code which was present was left with detection plugins which
now make no sense: we always load all detection plugins as a whole.
This commit moves the caching logic over to the Engine plugins.
This opens a question now whether we should move all to UNCACHED_PLUGINS
Create a new flag --enable-windows-console to build with console
output on MinGW. The default behavior will be to enable the console.
The current plan is to continue to offer the users both options for
release builds - ScummVM and ScummVM (noconsole).
Whenever the text console is enabled, Windows console will be added
by default. This is to prevent a situation where ScummVM will not load
any visible debug console on hotkey or error.
This is currently only (partially) implemented for the 16-color Mac
versions of Loom and Indiana Jones and the Last Crusade. The text is
still drawn in color, since that's rendered separately, but I'm
committing this now while it still works.
When not displaying the GUI, plugins are not unloaded.
This can cause problems on AmigaOS where plugins must be unloaded before
exiting. Else, some plugins with global destructors cause crashes being
destroyed too late.
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
At some point when splitting the MetaEngine to a detection
plugin and a static meta engine, the former was called
MetaEngine while the latter was called MetaEngineConnect.
Thus was then later change to MetaEngineDetection and
MetaEngine. But some references were left to the former
names in comments and documentation.
This was only used by the ps2 backend, and that backend no longer
exists. Also now backends that want to force RTL should use the
kFeatureNoQuit OSystem feature instead.
This config was handled in the DefaultEventManager, but this did not
work for engines that quit the game without using a QUIT_EVENT (such
as SCI). So now it is handled one level up directly in scummvm_main.
Note: It is still also handled in the DefaultEventManager so that we
get the correct confirmation dialog there when "confirm_exit" is true.
Making it hardcoded because:
* This is the only place where it could happen
* It is the second time in history of ScummVM when we renamed
and engine (the first one was Simon -> AGOS)
Thus, there is a little sense in creating a universal solution.
- MEC: MetaEngineConnect.
- How do games handle save/load if MetaEngine (detection) is seperate from MetaEngineConnect (engine factory)?
- Most of the changes are quite similiar. ConfMan finds us the relevant MetaEngine, then simply use the new helpers from PluginMan.
- The new helpers will help convert a relevant MetaEngine into the other format or vice versa.
- Once the matching is complete, simply invoke functions by:
plugin->get<MetaEngineConnect>().engineMethod();
- Refer to previous commits to see the new class changes & notes.
- In runGame(), in main.cpp, we get a plugin of type MetaEngine.
- This MetaEngine cannot createInstances, but it just a helper class.
- Connect a MetaEngine class with it's factory class - MetaEngineConnect.
- Then, simply call the method.
- Changed so we can get any type of plugins.
- This used to always return PLUGIN_TYPE_ENGINE.
- Because now we can differentiate between engines and metaengine, this must be changed.
- For now, return METAENGINE by default
- Do NOT use pluginMan and load plugins, etc, etc.
- Get MetaEngines from memory, since they're always built in statically.
- Use detectGames method to detect games.
- MetaEngines will now always go to the executable.
- But, because they still live in engine projects and are connected via a macro, they will need to be differentiated from Engines.
- This macro, and it's use in future will help in that.
Enabled system API for begin/end gfx transactions, initSize, setGraphicsMode.
Function setGraphicsMode will use optional params to trigger 3d rendering
and switch to proper SDL Gfx manager.
Currently, the plugin architecture searches for plugins in ScummVM's
base directory and in the plugins directory itself.
However, for Win32, we need to bundle several DLL files in order to
make ScummVM run at all. Currently, this leads to several warning
messages since ScummVM tries to load those DLLs as plugins.
This patch excludes the ScummVM base directory when running on Win32 and
only accepts plugins from the plugins directory.
This commit addresses a range of changes, within scummvm subproject.
- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.
- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
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
A frame number can be given to --start-movie and it will start
at that frame.
Examples:
--start-movie=movie.dir@45 # start movie.dir at frame 45
--start-movie=@23 # start the default movie frame 23
--start-movie=movie.dir # start movie.dir as usual
This code is adapted from similar code in SerenityOS and allows the
LIST_INITIALIZER1 test to pass with c++11 compliant compiler when
targeting an old c++ std librray that does not have
std::initializer_list.
CoreMIDI provides hardware midi device support.
On my MacBook, the first call to MIDIGetNumberOfDestinations() takes around 2
seconds. Using one of the midi devices lower on the plugin list (mt32,
fluidsynth, etc) takes 2 extra seconds on every game start as
MidiDriver::getDeviceHandle() enumerates all the plugins to find the right one.
This change simply moves CoreMIDI to the bottom of the list. It will still
take 2 extra seconds when opening the options box, but that's a rare operation
relative to starting games.
By implementing MetaEngine::buildEngineOptionsWidget, engines can
instantiate a container widget that will be shown in the Engine tab of
the edit game dialog. The default implementation retains the existing
behavior and shows the extra GUI options.
Game controller input is now enabled whenever a compatible device is
connected. The keymapper's keymaps are refreshed when a joystick is added
or removed.
Fixes#10366.
When returning to the launcher with dynamic plugins enabled, the config manager
is re-created, invalidating the pointers the keymapper keeps to the
configuration domains.
Fixes#11348.
Previously backend defaults where added to the keymap defaults.
However, it became apparent backends need to change the default bindings
to resolve conflicts.
When the plugin-engine mapping is not cached in the configuration file,
we were not scanning all the plugins to establish the mapping.
This is a regression from commit: e2d91258b7
This commit reverts the offending commit and implements a proper fix for
the case where there are no dynamic plugins.
Fixes#11300.
The engineId, gameId and description come from static data in the game
engines. When the game engines are compiled as dynamic plugins, the QGD
structure may outlive the engine plugin. Making a copy ensures the data
remains available.
Fixes#11292.