ScummVM API documentation
OSystem_DS Class Reference
Inheritance diagram for OSystem_DS:
ModularMixerBackend PaletteManager BaseBackend Common::NonCopyable OSystem Common::NonCopyable

Public Member Functions

virtual bool hasFeature (Feature f)
 
virtual void setFeatureState (Feature f, bool enable)
 
virtual bool getFeatureState (Feature f)
 
virtual const OSystem::GraphicsModegetSupportedGraphicsModes () const
 
virtual int getDefaultGraphicsMode () const
 
virtual bool setGraphicsMode (int mode, uint flags)
 
virtual int getGraphicsMode () const
 
virtual const GraphicsModegetSupportedStretchModes () const
 
virtual int getDefaultStretchMode () const
 
virtual bool setStretchMode (int mode)
 
virtual int getStretchMode () const
 
virtual Graphics::PixelFormat getScreenFormat () const
 
virtual Common::List< Graphics::PixelFormatgetSupportedFormats () const
 
virtual void initSize (uint width, uint height, const Graphics::PixelFormat *format)
 
virtual int16 getHeight ()
 
virtual int16 getWidth ()
 
virtual PaletteManagergetPaletteManager ()
 
virtual void copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h)
 
virtual void updateScreen ()
 
virtual void setShakePos (int shakeXOffset, int shakeYOffset)
 
virtual void showOverlay (bool inGUI)
 
virtual void hideOverlay ()
 
virtual bool isOverlayVisible () const
 
virtual void clearOverlay ()
 
virtual void grabOverlay (Graphics::Surface &surface)
 
virtual void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h)
 
virtual int16 getOverlayHeight ()
 
virtual int16 getOverlayWidth ()
 
virtual Graphics::PixelFormat getOverlayFormat () const
 
Common::Point transformPoint (int16 x, int16 y)
 
virtual bool showMouse (bool visible)
 
virtual void warpMouse (int x, int y)
 
virtual void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format, const byte *mask)
 
virtual void addSysArchivesToSearchSet (Common::SearchSet &s, int priority)
 
virtual uint32 getMillis (bool skipRecord=false)
 
virtual void delayMillis (uint msecs)
 
virtual void getTimeAndDate (TimeDate &td, bool skipRecord=false) const
 
void doTimerCallback (int interval=10)
 
virtual Common::MutexInternalcreateMutex ()
 
virtual Common::EventSourcegetDefaultEventSource ()
 
virtual Common::HardwareInputSetgetHardwareInputSet ()
 
virtual Common::String getSystemLanguage () const
 
virtual void engineInit ()
 
virtual void engineDone ()
 
virtual void quit ()
 
virtual void setFocusRectangle (const Common::Rect &rect)
 
virtual void clearFocusRectangle ()
 
virtual void initBackend ()
 
virtual Graphics::SurfacelockScreen ()
 
virtual void unlockScreen ()
 
virtual void setCursorPalette (const byte *colors, uint start, uint num)
 
void setSwapLCDs (bool swap)
 
void refreshCursor (u16 *dst, const Graphics::Surface &src, const uint16 *palette)
 
virtual void logMessage (LogMessageType::Type type, const char *message)
 
virtual void messageBox (LogMessageType::Type type, const char *message)
 
void setMainScreen (int32 x, int32 y, int32 sx, int32 sy)
 
void setSubScreen (int32 x, int32 y, int32 sx, int32 sy)
 
- Public Member Functions inherited from ModularMixerBackend
virtual MixerManagergetMixerManager ()
 
Audio::MixergetMixer () override final
 
- Public Member Functions inherited from BaseBackend
bool setScaler (const char *name, int factor) override final
 
void displayMessageOnOSD (const Common::U32String &msg) override
 
void displayActivityIconOnOSD (const Graphics::Surface *icon) override
 
void fillScreen (uint32 col) override
 
void fillScreen (const Common::Rect &r, uint32 col) override
 
- Public Member Functions inherited from OSystem
void destroy ()
 
virtual void init ()
 
bool backendInitialized () const
 
virtual void taskStarted (Task)
 
virtual void taskFinished (Task)
 
virtual void updateStartSettings (const Common::String &executable, Common::String &command, Common::StringMap &startSettings, Common::StringArray &additionalArgs)
 
bool setGraphicsMode (const char *name)
 
Graphics::PixelFormat getScreenFormat () const
 
Common::List< Graphics::PixelFormatgetSupportedFormats () const
 
virtual Common::Array< uint > getSupportedAntiAliasingLevels () const
 
virtual OpenGL::ContextType getOpenGLType () const
 
virtual bool setShader (const Common::Path &fileName)
 
bool setStretchMode (const char *name)
 
virtual uint getDefaultScaler () const
 
virtual uint getDefaultScaleFactor () const
 
virtual bool setScaler (uint mode, int factor)
 
virtual uint getScaler () const
 
virtual uint getScaleFactor () const
 
virtual void initSizeHint (const Graphics::ModeList &modes)
 
virtual int getScreenChangeID () const
 
virtual void beginGFXTransaction ()
 
virtual TransactionError endGFXTransaction ()
 
virtual float getHiDPIScreenFactor () const
 
virtual void saveScreenshot ()
 
virtual bool lockMouse (bool lock)
 
virtual void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=nullptr, const byte *mask=nullptr)=0
 
virtual uint32 getDoubleClickTime () const
 
virtual Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
virtual Common::KeymapArray getGlobalKeymaps ()
 
virtual Common::KeymapperDefaultBindingsgetKeymapperDefaultBindings ()
 
AudioCDManagergetAudioCDManager ()
 
virtual void fatalError ()
 
virtual void setWindowCaption (const Common::U32String &caption)
 
virtual Common::SaveFileManagergetSavefileManager ()
 
virtual Common::TextToSpeechManagergetTextToSpeechManager ()
 
virtual Common::DialogManagergetDialogManager ()
 
virtual DLC::StoregetDLCStore ()
 
virtual FilesystemFactorygetFilesystemFactory ()
 
virtual Common::SeekableReadStreamcreateConfigReadStream ()
 
virtual Common::WriteStreamcreateConfigWriteStream ()
 
virtual Common::Path getDefaultConfigFileName ()
 
virtual Common::Path getDefaultLogFileName ()
 
virtual void registerDefaultSettings (const Common::String &target) const
 
virtual GUI::OptionsContainerWidgetbuildBackendOptionsWidget (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const
 
virtual const char *const * buildHelpDialogData ()
 
virtual void applyBackendSettings ()
 
virtual bool displayLogFile ()
 
virtual bool hasTextInClipboard ()
 
virtual Common::U32String getTextFromClipboard ()
 
virtual bool setTextInClipboard (const Common::U32String &text)
 
virtual bool openUrl (const Common::String &url)
 
virtual bool isConnectionLimited ()
 

Static Public Member Functions

static OSystem_DSinstance ()
 

Public Attributes

int _currentTimeMillis
 
int _callbackTimer
 

Protected Member Functions

void initGraphics ()
 
virtual void setPalette (const byte *colors, uint start, uint num)
 
virtual void grabPalette (byte *colors, uint start, uint num) const
 

Protected Attributes

Graphics::Surface _framebuffer
 
Graphics::Surface _overlay
 
DS::Background_screen
 
DS::Background_overlayScreen
 
bool _subScreenActive
 
Graphics::Surface _cursor
 
int _graphicsMode
 
int _stretchMode
 
bool _paletteDirty
 
bool _cursorDirty
 
u16 _palette [256]
 
u16 _cursorPalette [256]
 
u16 * _cursorSprite
 
Common::Point _cursorPos
 
int _cursorHotX
 
int _cursorHotY
 
uint32 _cursorKey
 
bool _cursorVisible
 
bool _overlayInGUI
 
DSEventSource_eventSource
 
DS::Keyboard_keyboard
 
bool _disableCursorPalette
 
const Graphics::PixelFormat _pfCLUT8
 
const Graphics::PixelFormat _pfABGR1555
 
bool _engineRunning
 
- Protected Attributes inherited from ModularMixerBackend
MixerManager_mixerManager
 
- Protected Attributes inherited from OSystem
AudioCDManager_audiocdManager
 
Common::EventManager_eventManager
 
Common::TimerManager_timerManager
 
Common::SaveFileManager_savefileManager
 
Common::TextToSpeechManager_textToSpeechManager
 
Common::DialogManager_dialogManager
 
FilesystemFactory_fsFactory
 
DLC::Store_dlcStore
 
Common::U32String _clipboard
 
bool _dummyUnused
 

Static Protected Attributes

static OSystem_DS_instance
 

Additional Inherited Members

- Public Types inherited from OSystem
enum  Task { kLocalServer, kCloudDownload, kDataPackDownload }
 
enum  Feature {
  kFeatureFullscreenMode, kFeatureAspectRatioCorrection, kFeatureFilteringMode, kFeatureStretchMode,
  kFeatureVirtualKeyboard, kFeatureCursorPalette, kFeatureCursorAlpha, kFeatureCursorMask,
  kFeatureCursorMaskInvert, kFeatureCursorMaskPaletteXorColorXnor, kFeatureOverlaySupportsAlpha, kFeatureIconifyWindow,
  kFeatureOpenGLForGame, kFeatureShadersForGame, kFeatureVSync, kFeatureFullscreenToggleKeepsContext,
  kFeatureDisplayLogFile, kFeatureClipboardSupport, kFeatureOpenUrl, kFeatureTouchpadMode,
  kFeatureKbdMouseSpeed, kFeatureJoystickDeadzone, kFeatureScalers, kFeatureShaders,
  kFeatureDLC, kFeatureSystemBrowserDialog, kFeatureNoQuit, kFeatureTouchscreen,
  kFeatureCpuNEON, kFeatureCpuSSE2, kFeatureCpuSSE41, kFeatureCpuAVX2,
  kFeatureCpuAltivec
}
 
enum  GfxModeFlags { kGfxModeNoFlags = 0, kGfxModeRender3d = (1 << 0) }
 
enum  TransactionError {
  kTransactionSuccess = 0, kTransactionAspectRatioFailed = (1 << 0), kTransactionFullscreenFailed = (1 << 1), kTransactionModeSwitchFailed = (1 << 2),
  kTransactionSizeChangeFailed = (1 << 3), kTransactionFormatNotSupported = (1 << 4), kTransactionFilteringFailed = (1 << 5), kTransactionStretchModeSwitchFailed = (1 << 6),
  kTransactionShaderChangeFailed = (1 << 7), kTransactionVSyncFailed = (1 << 8)
}
 

Member Function Documentation

◆ hasFeature()

virtual bool OSystem_DS::hasFeature ( Feature  f)
virtual

Determine whether the backend supports the specified feature.

Reimplemented from OSystem.

◆ setFeatureState()

virtual void OSystem_DS::setFeatureState ( Feature  f,
bool  enable 
)
virtual

Enable or disable the specified feature.

For example, this may be used to enable fullscreen mode or to deactivate aspect correction, etc.

Reimplemented from OSystem.

◆ getFeatureState()

virtual bool OSystem_DS::getFeatureState ( Feature  f)
virtual

Query the state of the specified feature.

For example, test whether fullscreen mode is active or not.

Reimplemented from OSystem.

◆ getSupportedGraphicsModes()

virtual const OSystem::GraphicsMode* OSystem_DS::getSupportedGraphicsModes ( void  ) const
virtual

Retrieve a list of all graphics modes supported by this backend.

This can be both video modes as well as graphic filters/scalers. It is completely up to the backend maintainer to decide what is appropriate here and what not. The list is terminated by an all-zero entry.

Returns
List of supported graphics modes.

Reimplemented from OSystem.

◆ getDefaultGraphicsMode()

virtual int OSystem_DS::getDefaultGraphicsMode ( ) const
virtual

Return the ID of the 'default' graphics mode. What exactly this means is up to the backend. This mode is set by the client code when no user overrides are present (i.e. if no custom graphics mode is selected using the command line or a config file).

Returns
ID of the 'default' graphics mode.

Reimplemented from OSystem.

◆ setGraphicsMode()

virtual bool OSystem_DS::setGraphicsMode ( int  mode,
uint  flags 
)
virtual

Switch to the specified graphics mode.

If switching to the new mode fails, this method returns false.

The flag 'kGfxModeRender3d' is optional. It allows to switch to 3D-only rendering mode. In this mode, the game engine is allowed to use OpenGL(ES) directly.

Parameters
modeID of the new graphics mode.
flagsFlags for the new graphics mode.
Returns
True if the switch was successful, false otherwise.

Reimplemented from OSystem.

◆ getGraphicsMode()

virtual int OSystem_DS::getGraphicsMode ( ) const
virtual

Determine which graphics mode is currently active.

Returns
ID of the active graphics mode.

Reimplemented from OSystem.

◆ getSupportedStretchModes()

virtual const GraphicsMode* OSystem_DS::getSupportedStretchModes ( ) const
virtual

Retrieve a list of all stretch modes supported by this backend.

It is completely up to the backend maintainer to decide what is appropriate here and what not. The list is terminated by an all-zero entry.

Returns
a list of supported stretch modes

Reimplemented from OSystem.

◆ getDefaultStretchMode()

virtual int OSystem_DS::getDefaultStretchMode ( ) const
virtual

Return the ID of the 'default' stretch mode.

What exactly this means is up to the backend. This mode is set by the client code when no user overrides are present (i.e. if no custom stretch mode is selected using the command line or a config file).

Returns
ID of the 'default' graphics mode.

Reimplemented from OSystem.

◆ setStretchMode()

virtual bool OSystem_DS::setStretchMode ( int  mode)
virtual

Switch to the specified stretch mode.

If switching to the new mode fails, this method returns false.

Parameters
modeID of the new graphics mode.
Returns
True if the switch was successful, false otherwise.

Reimplemented from OSystem.

◆ getStretchMode()

virtual int OSystem_DS::getStretchMode ( ) const
virtual

Determine which stretch mode is currently active.

Returns
ID of the active stretch mode.

Reimplemented from OSystem.

◆ initSize()

virtual void OSystem_DS::initSize ( uint  width,
uint  height,
const Graphics::PixelFormat format 
)
virtual

Set the size and color format of the virtual screen.

Typical sizes include:

  • 320x200 (e.g. for most SCUMM games, and Simon)
  • 320x240 (e.g. for FM-TOWN SCUMM games)
  • 640x480 (e.g. for Curse of Monkey Island)

This is the resolution for which the client code generates data. This is not necessarily equal to the actual display size. For example, a backend may magnify the graphics to fit on the screen (see also the GraphicsMode), stretch the data to perform aspect ratio correction, or shrink it to fit on small screens (in cell phones).

Typical formats include:

  • CLUT8 (e.g. 256 color, for most games)
  • RGB555 (e.g. 16-bit color, for later SCUMM HE games)
  • RGB565 (e.g. 16-bit color, for Urban Runner)

This is the pixel format for which the client code generates data. It is not necessarily equal to the hardware pixel format. For example, a backend may perform color lookup of 8-bit graphics before pushing a screen to hardware, or correct the ARGB color order.

Parameters
widthNew virtual screen width.
heightNew virtual screen height.
formatNew virtual screen pixel format.

Implements OSystem.

◆ getHeight()

virtual int16 OSystem_DS::getHeight ( )
virtual

Return the currently set virtual screen height.

See also
initSize
Returns
Currently set virtual screen height.

Implements OSystem.

◆ getWidth()

virtual int16 OSystem_DS::getWidth ( )
virtual

Return the currently set virtual screen width.

See also
initSize
Returns
Currently set virtual screen width.

Implements OSystem.

◆ getPaletteManager()

virtual PaletteManager* OSystem_DS::getPaletteManager ( )
inlinevirtual

Return the palette manager singleton.

For more information, see PaletteManager.

Implements OSystem.

◆ setPalette()

virtual void OSystem_DS::setPalette ( const byte *  colors,
uint  start,
uint  num 
)
protectedvirtual

Replace the specified range of the palette with new colors. The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.

The palette data is specified in interleaved RGB format. That is, the first byte of the memory block 'colors' points at is the red component of the first new color; the second byte the green component of the first new color; the third byte the blue component, the last byte to the alpha (transparency) value. Then the second color starts, and so on. So memory looks like this: R1-G1-B1-R2-G2-B2-R3-...

Parameters
colorsthe new palette data, in interleaved RGB format
startthe first palette entry to be updated
numthe number of palette entries to be updated
Note
It is an error if start+num exceeds 256, behavior is undefined in that case (the backend may ignore it silently or assert).
It is an error if this function gets called when the pixel format in use (the return value of getScreenFormat) has more than one byte per pixel.
See also
getScreenFormat

Implements PaletteManager.

◆ grabPalette()

virtual void OSystem_DS::grabPalette ( byte *  colors,
uint  start,
uint  num 
) const
protectedvirtual

Grabs a specified part of the currently active palette. The format is the same as for setPalette.

This should return exactly the same RGB data as was setup via previous setPalette calls.

For example, for every valid value of start and num of the following code:

byte origPal[num*3]; // Setup origPal's data however you like g_system->setPalette(origPal, start, num); byte obtainedPal[num*3]; g_system->grabPalette(obtainedPal, start, num);

the following should be true:

memcmp(origPal, obtainedPal, num*3) == 0

See also
setPalette
Parameters
colorsthe palette data, in interleaved RGB format
startthe first platte entry to be read
numthe number of palette entries to be read
Note
It is an error if this function gets called when the pixel format in use (the return value of getScreenFormat) has more than one byte per pixel.
See also
getScreenFormat

Implements PaletteManager.

◆ copyRectToScreen()

virtual void OSystem_DS::copyRectToScreen ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
)
virtual

Blit a bitmap to the virtual screen.

The real screen will not immediately be updated to reflect the changes. Client code must call updateScreen to ensure any changes are visible to the user. This can be used to optimize drawing and reduce flicker.

If the current pixel format has one byte per pixel, the graphics data uses 8 bits per pixel, using the palette specified via setPalette. If more than one byte per pixel is in use, the graphics data uses the pixel format returned by getScreenFormat.

Parameters
bufBuffer containing the graphics data source.
pitchPitch of the buffer (number of bytes in a scanline).
xx coordinate of the destination rectangle.
yy coordinate of the destination rectangle.
wWidth of the destination rectangle.
hHeight of the destination rectangle.
Note
The specified destination rectangle must be completly contained in the visible screen space, and must be non-empty. If not, a backend may or may not perform clipping, trigger an assert, or silently corrupt memory.
See also
updateScreen
getScreenFormat

Implements OSystem.

◆ updateScreen()

virtual void OSystem_DS::updateScreen ( )
virtual

Flush the whole screen, i.e. render the current content of the screen framebuffer to the display.

This method may be called very often by engines. Backends are hence supposed to only perform any redrawing if it is necessary and otherwise return immediately. See https://wiki.scummvm.org/index.php/HOWTO-Backends#updateScreen.28.29_method

Implements OSystem.

◆ setShakePos()

virtual void OSystem_DS::setShakePos ( int  shakeXOffset,
int  shakeYOffset 
)
virtual

Set current shake position, a feature needed for screen effects in some engines.

The effect causes the displayed graphics to be shifted downwards and rightwards by the specified offsets (the offsets can be negative to shift upwards or leftwards). The area at the border of the screen which is moved into view by this (for example at the bottom when moving upward) is filled with black. This does not cause any graphic data to be lost. To restore the original view, the game engine only has to call this method again with offset equal to zero. No calls to copyRectToScreen are necessary.

Parameters
shakeXOffsetShake x offset.
shakeYOffsetShake y offset.
Note
This is currently used in the SCUMM, QUEEN, KYRA, SCI, DREAMWEB, SUPERNOVA, TEENAGENT, TOLTECS, ULTIMA, and PETKA engines.

Implements OSystem.

◆ showOverlay()

virtual void OSystem_DS::showOverlay ( bool  inGUI)
virtual

Activate the overlay mode.

Implements OSystem.

◆ hideOverlay()

virtual void OSystem_DS::hideOverlay ( )
virtual

Deactivate the overlay mode.

Implements OSystem.

◆ isOverlayVisible()

virtual bool OSystem_DS::isOverlayVisible ( ) const
virtual

Return true if the overlay mode is activated, false otherwise.

Implements OSystem.

◆ clearOverlay()

virtual void OSystem_DS::clearOverlay ( )
virtual

Reset the overlay.

After calling this method while the overlay mode is active, the user should be seeing only the game graphics. How this is achieved depends on how the backend implements the overlay. It either sets all pixels of the overlay to be transparent (when alpha blending is used) or, in case of fake alpha blending, it might just put a copy of the current game graphics screen into the overlay.

Implements OSystem.

◆ grabOverlay()

virtual void OSystem_DS::grabOverlay ( Graphics::Surface surface)
virtual

Copy the content of the overlay into a surface provided by the caller.

This is only used to implement fake alpha blending.

Implements OSystem.

◆ copyRectToOverlay()

virtual void OSystem_DS::copyRectToOverlay ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
)
virtual

Blit a graphics buffer to the overlay.

In a sense, this is the reverse of grabOverlay.

Parameters
bufBuffer containing the graphics data source.
pitchPitch of the buffer (number of bytes in a scanline).
xx coordinate of the destination rectangle.
yy coordinate of the destination rectangle.
wWidth of the destination rectangle.
hHeight of the destination rectangle.
See also
copyRectToScreen
grabOverlay

Implements OSystem.

◆ getOverlayHeight()

virtual int16 OSystem_DS::getOverlayHeight ( )
virtual

Return the height of the overlay.

See also
getHeight

Implements OSystem.

◆ getOverlayWidth()

virtual int16 OSystem_DS::getOverlayWidth ( )
virtual

Return the width of the overlay.

See also
getWidth

Implements OSystem.

◆ getOverlayFormat()

virtual Graphics::PixelFormat OSystem_DS::getOverlayFormat ( ) const
virtual

Return the pixel format description of the overlay.

See also
Graphics::PixelFormat

Implements OSystem.

◆ showMouse()

virtual bool OSystem_DS::showMouse ( bool  visible)
virtual

Show or hide the mouse cursor.

Currently, the backend is not required to immediately draw the mouse cursor on showMouse(true).

See also
Graphics::CursorManager::showMouse

Implements OSystem.

◆ warpMouse()

virtual void OSystem_DS::warpMouse ( int  x,
int  y 
)
virtual

Move ("warp") the mouse cursor to the specified position in virtual screen coordinates.

Parameters
xNew x position of the mouse.
yNew y position of the mouse.

Implements OSystem.

◆ addSysArchivesToSearchSet()

virtual void OSystem_DS::addSysArchivesToSearchSet ( Common::SearchSet s,
int  priority 
)
virtual

Add system-specific Common::Archive objects to the given SearchSet. For example, on Unix, the directory corresponding to DATA_PATH (if set), or, on macOS, the 'Resource' dir in the app bundle.

Parameters
sSearchSet to which the system-specific dirs, if any, are added.
priorityPriority with which those dirs are added.

Reimplemented from OSystem.

◆ getMillis()

virtual uint32 OSystem_DS::getMillis ( bool  skipRecord = false)
virtual

Get the number of milliseconds since the program was started.

Parameters
skipRecordSkip recording of this value by the event recorder. This might be needed particularly when we are in an on-screen GUI loop where the player can pause the recording.

Implements OSystem.

◆ delayMillis()

virtual void OSystem_DS::delayMillis ( uint  msecs)
virtual

Delay/sleep for the specified amount of milliseconds.

Implements OSystem.

◆ getTimeAndDate()

virtual void OSystem_DS::getTimeAndDate ( TimeDate td,
bool  skipRecord = false 
) const
virtual

Get the current time and date, in the local timezone.

On many systems, this corresponds to the combination of time() and localtime().

Implements OSystem.

◆ createMutex()

virtual Common::MutexInternal* OSystem_DS::createMutex ( )
virtual

Create a new mutex.

Returns
The newly created mutex, or 0 if an error occurred.

Implements OSystem.

◆ getHardwareInputSet()

virtual Common::HardwareInputSet* OSystem_DS::getHardwareInputSet ( )
virtual

Register hardware inputs with keymapper.

Returns
HardwareInputSet with all keys and recommended mappings.

For more information, see keymapper.

Reimplemented from OSystem.

◆ getSystemLanguage()

virtual Common::String OSystem_DS::getSystemLanguage ( ) const
virtual

Return the language of the system.

This returns the currently set language of the system on which ScummVM is run.

The format is an ISO 639 language code, optionally followed by an ISO 3166-1 country code in the form language_country.

For information about POSIX locales, see the following link: https://en.wikipedia.org/wiki/ISO_639 https://en.wikipedia.org/wiki/ISO_3166-1

The default implementation returns "en_US".

Returns
Locale of the system.

Reimplemented from OSystem.

◆ engineInit()

virtual void OSystem_DS::engineInit ( void  )
virtual

Allow the backend to perform engine-specific initialization.

Called just before the engine is run.

Reimplemented from OSystem.

◆ engineDone()

virtual void OSystem_DS::engineDone ( )
virtual

Allow the backend to perform engine-specific deinitialization.

Called after the engine finishes.

Reimplemented from OSystem.

◆ quit()

virtual void OSystem_DS::quit ( )
virtual

Quit (exit) the application.

Implements OSystem.

◆ setFocusRectangle()

virtual void OSystem_DS::setFocusRectangle ( const Common::Rect rect)
virtual

Set the area of the screen that has the focus.

For example, when a character is speaking, they will have the focus. This allows for pan-and-scan style views where the backend can follow the speaking character or area of interest on the screen.

The backend is responsible for clipping the rectangle and deciding how best to zoom the screen to show any shape and size rectangle the engine provides.

Parameters
rectRectangle on the screen to be focused on.
See also
clearFocusRectangle

Reimplemented from OSystem.

◆ clearFocusRectangle()

virtual void OSystem_DS::clearFocusRectangle ( )
virtual

Clear the focus set by a call to setFocusRectangle().

This allows the engine to clear the focus when no particular area of the screen has the focus.

See also
setFocusRectangle

Reimplemented from OSystem.

◆ initBackend()

virtual void OSystem_DS::initBackend ( )
virtual

The following method is called once, from main.cpp, after all config data (including command line params etc.) is fully loaded.

Note
Subclasses should always invoke the implementation of their parent class. They should do so near the end of their own implementation.

Reimplemented from BaseBackend.

◆ lockScreen()

virtual Graphics::Surface* OSystem_DS::lockScreen ( )
virtual

Lock the active screen framebuffer and return a Graphics::Surface representing it.

The caller can then perform arbitrary graphics transformations on the framebuffer (blitting, scrolling, etc.). Must be followed by a matching call to unlockScreen(). Code that is calling this should make sure to only lock the framebuffer for the shortest time possible, as the whole system is potentially stalled while the lock is active.

Returns
0 if an error occurs. Otherwise, a surface with the pixel format described by getScreenFormat is returned.

The returned surface must not be deleted by the client code.

See also
getScreenFormat

Implements OSystem.

◆ unlockScreen()

virtual void OSystem_DS::unlockScreen ( )
virtual

Unlock the screen framebuffer, and mark it as dirty, i.e. during the next updateScreen() call, the whole screen will be updated.

Implements OSystem.

◆ setCursorPalette()

virtual void OSystem_DS::setCursorPalette ( const byte *  colors,
uint  start,
uint  num 
)
virtual

Replace the specified range of cursor palette with new colors.

The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.

Backends which implement this should have the kFeatureCursorPalette flag set.

See also
setPalette
kFeatureCursorPalette

Reimplemented from OSystem.

◆ logMessage()

virtual void OSystem_DS::logMessage ( LogMessageType::Type  type,
const char *  message 
)
virtual

Log the given message.

It is up to the backend where to log the different messages. The backend should aim at using a non-buffered output for it, so that no log data is lost in case of a crash.

The default implementation outputs them on stdout/stderr.

Parameters
typeType of the message.
messageThe message itself.

Implements OSystem.

◆ messageBox()

virtual void OSystem_DS::messageBox ( LogMessageType::Type  type,
const char *  message 
)
virtual

Display a dialog box containing the given message.

Parameters
typeType of the message.
messageThe message itself.

Reimplemented from OSystem.


The documentation for this class was generated from the following file: