Public Member Functions | |
SciEngine (OSystem *syst, const ADGameDescription *desc, SciGameId gameId) | |
Common::Error | run () override |
bool | hasFeature (EngineFeature f) const override |
void | pauseEngineIntern (bool pause) override |
void | severeError () |
Console * | getSciDebugger () |
Common::Error | loadGameState (int slot) override |
Common::Error | saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override |
bool | canLoadGameStateCurrently (Common::U32String *msg=nullptr) override |
bool | canSaveGameStateCurrently (Common::U32String *msg=nullptr) override |
void | syncSoundSettings () override |
from ScummVM to the game | |
void | updateSoundMixerVolumes () |
uint32 | getTickCount () |
void | setTickCount (const uint32 ticks) |
void | errorString (const char *buf1, char *buf2, int size) override |
int | getAutosaveSlot () const override |
const SciGameId & | getGameId () const |
const char * | getGameIdStr () const |
Common::Language | getLanguage () const |
bool | isLanguageRTL () const |
Common::Platform | getPlatform () const |
bool | isDemo () const |
bool | isCD () const |
bool | useHiresGraphics () const |
bool | isBE () const |
bool | hasParser () const |
bool | hasMacFonts () const |
bool | hasMacIconBar () const |
bool | hasMacSaveRestoreDialogs () const |
ResourceManager * | getResMan () const |
ScriptPatcher * | getScriptPatcher () const |
Kernel * | getKernel () const |
EngineState * | getEngineState () const |
Vocabulary * | getVocabulary () const |
EventManager * | getEventManager () const |
reg_t | getGameObject () const |
Common::RandomSource & | getRNG () |
Common::String | getSavegameName (int nr) const |
Common::String | getSavegamePattern () const |
Common::String | getFilePrefix () const |
Common::String | wrapFilename (const Common::String &name) const |
Common::String | unwrapFilename (const Common::String &name) const |
const char * | getGameObjectName () |
int | inQfGImportRoom () const |
void | showQfgImportMessageBox () const |
void | sleep (uint32 msecs) |
void | scriptDebug () |
bool | checkExportBreakpoint (uint16 script, uint16 pubfunct) |
bool | checkSelectorBreakpoint (BreakpointType breakpointType, reg_t send_obj, int selector) |
bool | checkAddressBreakpoint (const reg_t &address) |
bool | checkKernelBreakpoint (const Common::String &name) |
Common::String | strSplitLanguage (const char *str, uint16 *splitLanguage, const char *sep="\---------\) |
Common::String | strSplit (const char *str, const char *sep="\---------\) |
kLanguage | getSciLanguage () |
void | setSciLanguage (kLanguage lang) |
void | setSciLanguage () |
Common::String | getSciLanguageString (const Common::String &str, kLanguage requestedLanguage, kLanguage *secondaryLanguage=nullptr, uint16 *languageSplitter=nullptr) const |
void | checkVocabularySwitch () |
void | initGraphics () |
void | suggestDownloadGK2SubTitlesPatch () |
Common::MacResManager * | getMacExecutable () |
Public Member Functions inherited from Engine | |
MetaEngine * | getMetaEngine () const |
void | setMetaEngine (MetaEngine *metaEngine) |
PauseToken | pauseEngine () |
bool | isPaused () const |
void | openMainMenuDialog () |
uint32 | getTotalPlayTime () const |
void | setTotalPlayTime (uint32 time=0) |
Common::TimerManager * | getTimerManager () |
Common::EventManager * | getEventManager () |
Common::SaveFileManager * | getSaveFileManager () |
bool | existExtractedCDAudioFiles (uint track=1) |
bool | isDataAndCDAudioReadFromSameCD () |
void | warnMissingExtractedCDAudio () |
void | handleAutoSave () |
void | saveAutosaveIfEnabled () |
virtual bool | canSaveAutosaveCurrently () |
Engine (OSystem *syst) | |
virtual | ~Engine () |
virtual void | initializePath (const Common::FSNode &gamePath) |
virtual GUI::Debugger * | getDebugger () final |
void | setDebugger (GUI::Debugger *debugger) |
GUI::Debugger * | getOrCreateDebugger () |
bool | enhancementEnabled (int32 cls) |
virtual void | applyGameSettings () |
virtual void | flipMute () |
virtual Common::String | getSaveStateName (int slot) const |
virtual Common::Error | loadGameStream (Common::SeekableReadStream *stream) |
void | setGameToLoadSlot (int slot) |
virtual Common::Error | saveGameStream (Common::WriteStream *stream, bool isAutosave=false) |
bool | saveGameDialog () |
bool | loadGameDialog () |
Public Attributes | |
GfxAnimate * | _gfxAnimate |
GfxCache * | _gfxCache |
GfxCompare * | _gfxCompare |
GfxControls16 * | _gfxControls16 |
GfxCoordAdjuster16 * | _gfxCoordAdjuster |
GfxCursor * | _gfxCursor |
GfxMenu * | _gfxMenu |
GfxPalette * | _gfxPalette16 |
GfxRemap * | _gfxRemap16 |
GfxPaint16 * | _gfxPaint16 |
GfxPorts * | _gfxPorts |
GfxScreen * | _gfxScreen |
GfxText16 * | _gfxText16 |
GfxTransitions * | _gfxTransitions |
GfxMacIconBar * | _gfxMacIconBar |
GfxMacFontManager * | _gfxMacFontManager |
SciTTS * | _tts |
AudioPlayer * | _audio |
Sync * | _sync |
SoundCommandParser * | _soundCmd |
GameFeatures * | _features |
GuestAdditions * | _guestAdditions |
opcode_format(* | _opcode_formats )[4] |
DebugState | _debugState |
uint32 | _speedThrottleDelay |
Public Attributes inherited from Engine | |
OSystem * | _system |
Audio::Mixer * | _mixer |
Additional Inherited Members | |
Public Types inherited from Engine | |
enum | EngineFeature { kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime, kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride } |
Static Public Member Functions inherited from Engine | |
static void | quitGame () |
static bool | shouldQuit () |
static bool | warnUserAboutUnsupportedGame (Common::String msg=Common::String()) |
static void | errorUnsupportedGame (Common::String extraMsg) |
Protected Member Functions inherited from Engine | |
virtual int | runDialog (GUI::Dialog &dialog) |
void | defaultSyncSoundSettings () |
Protected Attributes inherited from Engine | |
Common::TimerManager * | _timer |
Common::EventManager * | _eventMan |
Common::SaveFileManager * | _saveFileMan |
GUI::Dialog * | _mainMenuDialog |
const Common::String | _targetName |
int32 | _activeEnhancements = kEnhGameBreakingBugFixes |
|
overridevirtual |
Initialize the engine and start its main loop.
Implements Engine.
|
overridevirtual |
Determine whether the engine supports the specified feature.
Reimplemented from Engine.
|
overridevirtual |
Actual implementation of pauseEngine by subclasses.
Reimplemented from Engine.
|
overridevirtual |
Load a game state.
slot | The slot from which a save state should be loaded. |
Reimplemented from Engine.
|
overridevirtual |
Save a game state.
slot | The slot into which the save state should be stored. |
desc | Description for the save state, entered by the user. |
isAutosave | Expected to be true if an autosave is being created. |
Reimplemented from Engine.
|
overridevirtual |
Indicate whether a game state can be loaded.
msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
overridevirtual |
Indicate whether a game state can be saved.
msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
overridevirtual |
|
inlineoverridevirtual |
Disable support for ScummVM autosaves.
A lot of SCI games already have an autosaving mechanism. Also, a lot of games have death screens when the player does something wrong, and autosaves could kick in when the death screen is shown, which makes them useless, since the player can only restore or restart.
Another place where autosaves could kick in is during screens with internal loops, e.g. the inventory screen, where the autosave created would be invalid, as the internal loop isn't persisted in saved games.
For now, we allow saving in places where the user has control via GuestAdditions::userHasControl(), but as mentioned above, these do not cover cases where the user does have control, but saving would either be useless (e.g. in death screens) or invalid saved would be created (e.g. while the inventory screen is open).
In the future, if we are able to detect all death screens, all internal loops and generally all places where saving shouldn't be allowed, we could re-enable this feature.
Reimplemented from Engine.
bool Sci::SciEngine::isLanguageRTL | ( | ) | const |
Returns true if the game's language direction is Right To Left. RTL support did not exist in the original SCI engine. This is a ScummVM feature to support modern fan translations.
Common::Platform Sci::SciEngine::getPlatform | ( | ) | const |
Returns the original platform of the game.
bool Sci::SciEngine::isBE | ( | ) | const |
Returns true if the game's original platform is Macintosh or Amiga. Note that this is not necessarily the endianness of the game's resources.
bool Sci::SciEngine::hasMacFonts | ( | ) | const |
Returns true if the game supports native Mac fonts and the fonts are available.
bool Sci::SciEngine::hasMacIconBar | ( | ) | const |
Returns true if the game is a Mac version with an icon bar on the bottom.
bool Sci::SciEngine::hasMacSaveRestoreDialogs | ( | ) | const |
Returns true if the game is a Mac version that used native Mac file dialogs for saving and restoring. These versions do not include resources for the normal save and restore screens, so the ScummVM UI must always be used.
Common::String Sci::SciEngine::getFilePrefix | ( | ) | const |
Returns 'TARGET-' prefix for filenames in the save directory.
Common::String Sci::SciEngine::wrapFilename | ( | const Common::String & | name | ) | const |
Prepend 'TARGET-' to the given filename.
Common::String Sci::SciEngine::unwrapFilename | ( | const Common::String & | name | ) | const |
Remove the 'TARGET-' prefix of the given filename, if present.
const char* Sci::SciEngine::getGameObjectName | ( | ) |
Returns the name of the game object. Currently used for identifying specific fan made games.
int Sci::SciEngine::inQfGImportRoom | ( | ) | const |
Tests if we are in a QfG import screen, where special handling of file-listings is performed.
void Sci::SciEngine::showQfgImportMessageBox | ( | ) | const |
Shows a ScummVM message box explaining how to import Qfg saved character files.
void Sci::SciEngine::sleep | ( | uint32 | msecs | ) |
Sleep for the given number of milliseconds, while polling for input to keep the screen updated and responsive.
Common::String Sci::SciEngine::strSplitLanguage | ( | const char * | str, |
uint16 * | splitLanguage | ||
) |
Processes a multilanguage string based on the current language settings and returns a string that is ready to be displayed.
str | The multilanguage string. |
splitLanguage | The two-character language delimiter detected by strSplitLanguage. If a delimiter is found, then it is written to this address as a 16-bit integer. For example: j becomes 0x6A25. |
sep | Optional separator to place between the main language and subtitle language. If nullptr is passed then no subtitle will be added to the returned string. |