ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

ModularGraphicsBackend Class Reference

Base classes for modular backends. More...

#include <modular-backend.h>

Inheritance diagram for ModularGraphicsBackend:
Collaboration diagram for ModularGraphicsBackend:

List of all members.

Public Member Functions

 ModularGraphicsBackend ()
virtual ~ModularGraphicsBackend ()
Features

virtual bool hasFeature (Feature f) override
 Determine whether the backend supports the specified feature.
virtual void setFeatureState (Feature f, bool enable) override
 En-/disable the specified feature.
virtual bool getFeatureState (Feature f) override
 Query the state of the specified feature.
Graphics

GraphicsManagergetGraphicsManager ()
virtual const GraphicsModegetSupportedGraphicsModes () const override
 !!! Not used in ResidualVM !!!
virtual int getDefaultGraphicsMode () const override
 !!! Not used in ResidualVM !!!
virtual bool setGraphicsMode (int mode) override
 !!! Not used in ResidualVM !!!
virtual int getGraphicsMode () const override
 !!! Not used in ResidualVM !!!
virtual const GraphicsModegetSupportedShaders () const override final
 !!! Not used in ResidualVM !!!
virtual int getDefaultShader () const override final
 Return the ID of the 'default' shader mode.
virtual int getShader () const override final
 Determine which shader is currently active.
virtual bool setShader (int id) override final
 !!! Not used in ResidualVM !!!
virtual const GraphicsModegetSupportedStretchModes () const override final
 Retrieve a list of all stretch modes supported by this backend.
virtual int getDefaultStretchMode () const override final
 Return the ID of the 'default' stretch mode.
virtual bool setStretchMode (int mode) override final
 Switch to the specified stretch mode.
virtual int getStretchMode () const override final
 Determine which stretch mode is currently active.
virtual void resetGraphicsScale () override final
 !!! Not used in ResidualVM !!!
virtual Graphics::PixelFormat getScreenFormat () const override final
 !!! Not used in ResidualVM !!!
virtual Common::List
< Graphics::PixelFormat
getSupportedFormats () const override final
 !!! Not used in ResidualVM !!!
virtual void initSize (uint width, uint height, const Graphics::PixelFormat *format=NULL) override final
 Set the size and color format of the virtual screen.
virtual void setupScreen (uint screenW, uint screenH, bool fullscreen, bool accel3d) override
 Set the size of the screen.
virtual Graphics::PixelBuffer getScreenPixelBuffer () override
 Return a Graphics::PixelBuffer representing the framebuffer.
virtual void suggestSideTextures (Graphics::Surface *left, Graphics::Surface *right) override
 Suggest textures to render at the side of the game window.
virtual void initSizeHint (const Graphics::ModeList &modes) override final
 Send a list of graphics modes to the backend so it can make a decision about the best way to set up the display hardware.
virtual int getScreenChangeID () const override final
 !!! Not used in ResidualVM !!!
virtual void beginGFXTransaction () override final
 !!! Not used in ResidualVM !!!
virtual OSystem::TransactionError endGFXTransaction () override final
 !!! Not used in ResidualVM !!!
virtual int16 getHeight () override final
 Returns the currently set virtual screen height.
virtual int16 getWidth () override final
 Returns the currently set virtual screen width.
virtual PaletteManagergetPaletteManager () override final
 !!! Not used in ResidualVM !!!
virtual void copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override final
 !!! Not used in ResidualVM !!!
virtual Graphics::SurfacelockScreen () override final
 !!! Not used in ResidualVM !!!
virtual void unlockScreen () override final
 Unlock the screen framebuffer, and mark it as dirty (i.e.
virtual void fillScreen (uint32 col) override final
 Fills the screen with a given color value.
virtual void updateScreen () override final
 Flush the whole screen, that is render the current content of the screen framebuffer to the display.
virtual void setShakePos (int shakeXOffset, int shakeYOffset) override final
 !!! Not used in ResidualVM !!!
virtual void setFocusRectangle (const Common::Rect &rect) override final
 !!! Not used in ResidualVM !!!
virtual void clearFocusRectangle () override final
 Clears the focus set by a call to setFocusRectangle().
virtual void showOverlay () override final
 Activate the overlay mode.
virtual void hideOverlay () override final
 Deactivate the overlay mode.
virtual bool isOverlayVisible () const override final
 Returns true if the overlay mode is activated, false otherwise.
virtual Graphics::PixelFormat getOverlayFormat () const override final
 Returns the pixel format description of the overlay.
virtual void clearOverlay () override final
 Reset the overlay.
virtual void grabOverlay (void *buf, int pitch) override final
 Copy the content of the overlay into a buffer provided by the caller.
virtual void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override final
 Blit a graphics buffer to the overlay.
virtual int16 getOverlayHeight () override final
 Return the height of the overlay.
virtual int16 getOverlayWidth () override final
 Return the width of the overlay.
virtual bool showMouse (bool visible) override final
 Show or hide the mouse cursor.
virtual void warpMouse (int x, int y) override final
 Move ("warp") the mouse cursor to the specified position in virtual screen coordinates.
virtual void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=NULL) override final
 !!! Not used in ResidualVM !!!
virtual void setCursorPalette (const byte *colors, uint start, uint num) override final
 !!! Not used in ResidualVM !!!
virtual bool lockMouse (bool lock) override
 Lock or unlock the mouse cursor within the window.
Miscellaneous

virtual void displayMessageOnOSD (const Common::U32String &msg) override final
 !!! Not used in ResidualVM !!!
virtual void displayActivityIconOnOSD (const Graphics::Surface *icon) override final
 Display an icon indicating background activity.

Protected Attributes

Managers variables

GraphicsManager_graphicsManager

Detailed Description

Base classes for modular backends.

They wrap most functions to their manager equivalent, but not all OSystem functions are implemented here.

A backend derivated from these classes, will need to implement these functions on its own: OSystem::pollEvent() OSystem::getMillis() OSystem::delayMillis() OSystem::getTimeAndDate() OSystem::quit()

And, it should also initialize all the managers variables declared in this class, or override their related functions.

Definition at line 50 of file modular-backend.h.


Constructor & Destructor Documentation

ModularGraphicsBackend::ModularGraphicsBackend (  ) 

Definition at line 36 of file modular-backend.cpp.

ModularGraphicsBackend::~ModularGraphicsBackend (  )  [virtual]

Definition at line 42 of file modular-backend.cpp.


Member Function Documentation

void ModularGraphicsBackend::beginGFXTransaction (  )  [override, virtual]

!!! Not used in ResidualVM !!!

Begin a new GFX transaction, which is a sequence of GFX mode changes. The idea behind GFX transactions is to make it possible to activate several different GFX changes at once as a "batch" operation. For example, assume we are running in 320x200 with a 2x scaler (thus using 640x400 pixels in total). Now, we want to switch to 640x400 with the 1x scaler. Without transactions, we have to choose whether we want to first switch the scaler mode, or first to 640x400 mode. In either case, depending on the backend implementation, some ugliness may result. E.g. the window might briefly switch to 320x200 or 1280x800. Using transactions, this can be avoided.

Note:
Transaction support is optional, and the default implementations of the relevant methods simply do nothing.
See also:
endGFXTransaction

Reimplemented from OSystem.

Definition at line 155 of file modular-backend.cpp.

void ModularGraphicsBackend::clearFocusRectangle (  )  [override, virtual]

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

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

See also:
setFocusRectangle

Reimplemented from OSystem.

Definition at line 210 of file modular-backend.cpp.

void ModularGraphicsBackend::clearOverlay (  )  [override, 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. Either it 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.

Definition at line 230 of file modular-backend.cpp.

void ModularGraphicsBackend::copyRectToOverlay ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
) [override, virtual]

Blit a graphics buffer to the overlay.

In a sense, this is the reverse of grabOverlay.

Parameters:
buf the buffer containing the graphics data source
pitch the pitch of the buffer (number of bytes in a scanline)
x the x coordinate of the destination rectangle
y the y coordinate of the destination rectangle
w the width of the destination rectangle
h the height of the destination rectangle
See also:
copyRectToScreen
grabOverlay

Implements OSystem.

Definition at line 238 of file modular-backend.cpp.

void ModularGraphicsBackend::copyRectToScreen ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
) [override, virtual]

!!! Not used in ResidualVM !!!

Blit a bitmap to the virtual screen. The real screen will not immediately be updated to reflect the changes. Client code has to to 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:
buf the buffer containing the graphics data source
pitch the pitch of the buffer (number of bytes in a scanline)
x the x coordinate of the destination rectangle
y the y coordinate of the destination rectangle
w the width of the destination rectangle
h the height 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.

Definition at line 175 of file modular-backend.cpp.

void ModularGraphicsBackend::displayActivityIconOnOSD ( const Graphics::Surface icon  )  [override, virtual]

Display an icon indicating background activity.

The icon is displayed in an 'on screen display'. It is visible above the regular screen content or near it.

The caller keeps ownership of the icon. It is acceptable to free the surface just after the call.

There is no preferred pixel format for the icon. The backend should convert its copy of the icon to an appropriate format.

The caller must call this method again with a null pointer as a parameter to indicate the icon should no longer be displayed.

Parameters:
icon the icon to display on screen

Reimplemented from BaseBackend.

Definition at line 276 of file modular-backend.cpp.

void ModularGraphicsBackend::displayMessageOnOSD ( const Common::U32String msg  )  [override, virtual]

!!! Not used in ResidualVM !!!

Display a message in an 'on screen display'. That is, display it in a fashion where it is visible on or near the screen (e.g. in a transparent rectangle over the regular screen content; or in a message box beneath it; etc.).

The message is expected to be provided in the current TranslationManager charset.

Note:
There is a default implementation in BaseBackend which uses a TimedMessageDialog to display the message. Hence implementing this is optional.
Parameters:
msg the message to display on screen

Reimplemented from BaseBackend.

Definition at line 272 of file modular-backend.cpp.

OSystem::TransactionError ModularGraphicsBackend::endGFXTransaction (  )  [override, virtual]

!!! Not used in ResidualVM !!!

End (and thereby commit) the current GFX transaction.

See also:
beginGFXTransaction
kTransactionError
Returns:
returns a ORed combination of TransactionError values or 0 on success

Reimplemented from OSystem.

Definition at line 159 of file modular-backend.cpp.

void ModularGraphicsBackend::fillScreen ( uint32  col  )  [override, virtual]

Fills the screen with a given color value.

!!! Not used in ResidualVM !!!

Reimplemented from BaseBackend.

Definition at line 187 of file modular-backend.cpp.

int ModularGraphicsBackend::getDefaultGraphicsMode (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

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 via the command line or a config file).

Returns:
the ID of the 'default' graphics mode

Reimplemented from OSystem.

Definition at line 68 of file modular-backend.cpp.

int ModularGraphicsBackend::getDefaultShader (  )  const [override, virtual]

Return the ID of the 'default' shader 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 shader mode is selected via the command line or a config file).

Returns:
the ID of the 'default' shader mode

Reimplemented from OSystem.

Definition at line 84 of file modular-backend.cpp.

int ModularGraphicsBackend::getDefaultStretchMode (  )  const [override, 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 via the command line or a config file).

Returns:
the ID of the 'default' graphics mode

Reimplemented from OSystem.

Definition at line 100 of file modular-backend.cpp.

bool ModularGraphicsBackend::getFeatureState ( Feature  f  )  [override, virtual]

Query the state of the specified feature.

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

Reimplemented from OSystem.

Definition at line 55 of file modular-backend.cpp.

GraphicsManager * ModularGraphicsBackend::getGraphicsManager (  ) 

Definition at line 59 of file modular-backend.cpp.

int ModularGraphicsBackend::getGraphicsMode (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

Determine which graphics mode is currently active.

Returns:
the ID of the active graphics mode

Reimplemented from OSystem.

Definition at line 76 of file modular-backend.cpp.

int16 ModularGraphicsBackend::getHeight (  )  [override, virtual]

Returns the currently set virtual screen height.

See also:
initSize
Returns:
the currently set virtual screen height

Implements OSystem.

Definition at line 163 of file modular-backend.cpp.

Graphics::PixelFormat ModularGraphicsBackend::getOverlayFormat (  )  const [override, virtual]

Returns the pixel format description of the overlay.

See also:
Graphics::PixelFormat

Implements OSystem.

Definition at line 226 of file modular-backend.cpp.

int16 ModularGraphicsBackend::getOverlayHeight (  )  [override, virtual]

Return the height of the overlay.

See also:
getHeight

Implements OSystem.

Definition at line 242 of file modular-backend.cpp.

int16 ModularGraphicsBackend::getOverlayWidth (  )  [override, virtual]

Return the width of the overlay.

See also:
getWidth

Implements OSystem.

Definition at line 246 of file modular-backend.cpp.

PaletteManager * ModularGraphicsBackend::getPaletteManager (  )  [override, virtual]

!!! Not used in ResidualVM !!!

Return the palette manager singleton. For more information, refer to the PaletteManager documentation.

Implements OSystem.

Definition at line 171 of file modular-backend.cpp.

int ModularGraphicsBackend::getScreenChangeID (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

Return an int value which is changed whenever any screen parameters (like the resolution) change. That is, whenever a EVENT_SCREEN_CHANGED would be sent. You can track this value in your code to detect screen changes in case you do not have full control over the event loop(s) being used (like the GUI code).

Returns:
an integer which can be used to track screen changes
Note:
Backends which generate EVENT_SCREEN_CHANGED events MUST overload this method appropriately.

Reimplemented from OSystem.

Definition at line 151 of file modular-backend.cpp.

Graphics::PixelFormat ModularGraphicsBackend::getScreenFormat (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

Determine the pixel format currently in use for screen rendering.

Returns:
the active screen pixel format.
See also:
Graphics::PixelFormat

Implements OSystem.

Definition at line 118 of file modular-backend.cpp.

Graphics::PixelBuffer ModularGraphicsBackend::getScreenPixelBuffer (  )  [override, virtual]

Return a Graphics::PixelBuffer representing the framebuffer.

The caller can then perform arbitrary graphics transformations on the framebuffer (blitting, scrolling, etc.). !!! ResidualVM specific method: !!!

Reimplemented from OSystem.

Definition at line 134 of file modular-backend.cpp.

int ModularGraphicsBackend::getShader (  )  const [override, virtual]

Determine which shader is currently active.

Returns:
the ID of the active shader

Reimplemented from OSystem.

Definition at line 92 of file modular-backend.cpp.

int ModularGraphicsBackend::getStretchMode (  )  const [override, virtual]

Determine which stretch mode is currently active.

Returns:
the ID of the active stretch mode

Reimplemented from OSystem.

Definition at line 108 of file modular-backend.cpp.

Common::List< Graphics::PixelFormat > ModularGraphicsBackend::getSupportedFormats (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

Returns a list of all pixel formats supported by the backend. The first item in the list must be directly supported by hardware, and provide the largest color space of those formats with direct hardware support. It is also strongly recommended that remaining formats should be placed in order of descending preference for the backend to use.

EG: a backend that supports 32-bit ABGR and 16-bit 555 BGR in hardware and provides conversion from equivalent RGB(A) modes should order its list 1) Graphics::PixelFormat(4, 0, 0, 0, 0, 0, 8, 16, 24) 2) Graphics::PixelFormat(2, 3, 3, 3, 8, 0, 5, 10, 0) 3) Graphics::PixelFormat(4, 0, 0, 0, 0, 24, 16, 8, 0) 4) Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0) 5) Graphics::PixelFormat::createFormatCLUT8()

See also:
Graphics::PixelFormat
Note:
Backends supporting RGB color should accept game data in RGB color order, even if hardware uses BGR or some other color order.

Implements OSystem.

Definition at line 122 of file modular-backend.cpp.

const OSystem::GraphicsMode * ModularGraphicsBackend::getSupportedGraphicsModes (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

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:
a list of supported graphics modes

Reimplemented from OSystem.

Definition at line 64 of file modular-backend.cpp.

const OSystem::GraphicsMode * ModularGraphicsBackend::getSupportedShaders (  )  const [override, virtual]

!!! Not used in ResidualVM !!!

Retrieve a list of all hardware shaders supported by this backend. This can be only hardware shaders. 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 shaders

Reimplemented from OSystem.

Definition at line 80 of file modular-backend.cpp.

const OSystem::GraphicsMode * ModularGraphicsBackend::getSupportedStretchModes (  )  const [override, 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.

Definition at line 96 of file modular-backend.cpp.

int16 ModularGraphicsBackend::getWidth (  )  [override, virtual]

Returns the currently set virtual screen width.

See also:
initSize
Returns:
the currently set virtual screen width

Implements OSystem.

Definition at line 167 of file modular-backend.cpp.

void ModularGraphicsBackend::grabOverlay ( void *  buf,
int  pitch 
) [override, virtual]

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

This is only used to implement fake alpha blending.

Implements OSystem.

Definition at line 234 of file modular-backend.cpp.

bool ModularGraphicsBackend::hasFeature ( Feature  f  )  [override, virtual]

Determine whether the backend supports the specified feature.

Reimplemented from OSystem.

Reimplemented in OSystem_MacOSX, OSystem_POSIX, OSystem_RISCOS, OSystem_SDL, and OSystem_Win32.

Definition at line 47 of file modular-backend.cpp.

void ModularGraphicsBackend::hideOverlay (  )  [override, virtual]

Deactivate the overlay mode.

Implements OSystem.

Definition at line 218 of file modular-backend.cpp.

void ModularGraphicsBackend::initSize ( uint  width,
uint  height,
const Graphics::PixelFormat format = NULL 
) [override, 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 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; this 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:
width the new virtual screen width
height the new virtual screen height
format the new virtual screen pixel format

Implements OSystem.

Definition at line 143 of file modular-backend.cpp.

void ModularGraphicsBackend::initSizeHint ( const Graphics::ModeList modes  )  [override, virtual]

Send a list of graphics modes to the backend so it can make a decision about the best way to set up the display hardware.

Engines that switch between different virtual screen sizes during a game should call this function prior to any call to initSize. Engines that use only a single screen size do not need to call this function.

Parameters:
modes the list of graphics modes the engine will probably use.

Reimplemented from OSystem.

Definition at line 147 of file modular-backend.cpp.

bool ModularGraphicsBackend::isOverlayVisible (  )  const [override, virtual]

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

Implements OSystem.

Definition at line 222 of file modular-backend.cpp.

bool ModularGraphicsBackend::lockMouse ( bool  lock  )  [override, virtual]

Lock or unlock the mouse cursor within the window.

ResidualVM specific method

Reimplemented from OSystem.

Definition at line 255 of file modular-backend.cpp.

Graphics::Surface * ModularGraphicsBackend::lockScreen (  )  [override, virtual]

!!! Not used in ResidualVM !!!

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 matching call to unlockScreen(). Calling code should make sure to only lock the framebuffer for the briefest periods of time possible, as the whole system is potentially stalled while the lock is active. Returns 0 if an error occurred. 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.

Definition at line 179 of file modular-backend.cpp.

void ModularGraphicsBackend::resetGraphicsScale (  )  [override, virtual]

!!! Not used in ResidualVM !!!

Sets the graphics scale factor to x1. Games with large screen sizes reset the scale to x1 so the screen will not be too big when starting the game.

Reimplemented from OSystem.

Definition at line 112 of file modular-backend.cpp.

void ModularGraphicsBackend::setCursorPalette ( const byte colors,
uint  start,
uint  num 
) [override, virtual]

!!! Not used in ResidualVM !!!

Replace the specified range of cursor 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.

Backends which implement it should have kFeatureCursorPalette flag set

See also:
setPalette
kFeatureCursorPalette

Reimplemented from OSystem.

Definition at line 268 of file modular-backend.cpp.

void ModularGraphicsBackend::setFeatureState ( Feature  f,
bool  enable 
) [override, virtual]

En-/disable the specified feature.

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

Reimplemented from OSystem.

Definition at line 51 of file modular-backend.cpp.

void ModularGraphicsBackend::setFocusRectangle ( const Common::Rect rect  )  [override, virtual]

!!! Not used in ResidualVM !!!

Sets the area of the screen that has the focus. For example, when a character is speaking, they will have the focus. Allows for pan-and-scan style views where the backend could 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:
rect A rectangle on the screen to be focused on
See also:
clearFocusRectangle

Reimplemented from OSystem.

Definition at line 206 of file modular-backend.cpp.

bool ModularGraphicsBackend::setGraphicsMode ( int  mode  )  [override, virtual]

!!! Not used in ResidualVM !!!

Switch to the specified graphics mode. If switching to the new mode failed, this method returns false.

Parameters:
mode the ID of the new graphics mode
Returns:
true if the switch was successful, false otherwise

Reimplemented from OSystem.

Definition at line 72 of file modular-backend.cpp.

void ModularGraphicsBackend::setMouseCursor ( const void *  buf,
uint  w,
uint  h,
int  hotspotX,
int  hotspotY,
uint32  keycolor,
bool  dontScale = false,
const Graphics::PixelFormat format = NULL 
) [override, virtual]

!!! Not used in ResidualVM !!!

Set the bitmap used for drawing the cursor.

Parameters:
buf the pixmap data to be used
w width of the mouse cursor
h height of the mouse cursor
hotspotX horizontal offset from the left side to the hotspot
hotspotY vertical offset from the top side to the hotspot
keycolor transparency color value. This should not exceed the maximum color value of the specified format. In case it does the behavior is undefined. The backend might just error out or simply ignore the value. (The SDL backend will just assert to prevent abuse of this).
dontScale Whether the cursor should never be scaled. An exception are high ppi displays, where the cursor would be too small to notice otherwise, these are allowed to scale the cursor anyway.
format pointer to the pixel format which cursor graphic uses (0 means CLUT8)

Implements OSystem.

Definition at line 264 of file modular-backend.cpp.

bool ModularGraphicsBackend::setShader ( int  id  )  [override, virtual]

!!! Not used in ResidualVM !!!

Switch to the specified shader mode. If switching to the new mode failed, this method returns false.

Parameters:
mode the ID of the new shader mode
Returns:
true if the switch was successful, false otherwise

Reimplemented from OSystem.

Definition at line 88 of file modular-backend.cpp.

void ModularGraphicsBackend::setShakePos ( int  shakeXOffset,
int  shakeYOffset 
) [override, virtual]

!!! Not used in ResidualVM !!!

Set current shake position, a feature needed for some SCUMM screen effects. The effect causes the displayed graphics to be shifted upwards by the specified (always positive) offset. The area at the bottom of the screen which is moved into view by this is filled with black. This does not cause any graphic data to be lost - that is, 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:
shakeXOffset the shake x offset
shakeYOffset the shake y offset
Note:
This is currently used in the SCUMM, QUEEN, KYRA, SCI, DREAMWEB, SUPERNOVA, TEENAGENT, TOLTECS, ULTIMA, and PETKA engines.

Implements OSystem.

Definition at line 203 of file modular-backend.cpp.

bool ModularGraphicsBackend::setStretchMode ( int  mode  )  [override, virtual]

Switch to the specified stretch mode.

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

Parameters:
mode the ID of the new graphics mode
Returns:
true if the switch was successful, false otherwise

Reimplemented from OSystem.

Definition at line 104 of file modular-backend.cpp.

void ModularGraphicsBackend::setupScreen ( uint  screenW,
uint  screenH,
bool  fullscreen,
bool  accel3d 
) [override, virtual]

Set the size of the screen.

!!! ResidualVM specific method: !!!

Parameters:
width the new screen width
height the new screen height
fullscreen the new screen will be displayed in fullscreeen mode

Reimplemented from OSystem.

Definition at line 129 of file modular-backend.cpp.

bool ModularGraphicsBackend::showMouse ( bool  visible  )  [override, virtual]

Show or hide the mouse cursor.

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

TODO: We might want to reconsider this fact, check Graphics::CursorManager::showMouse for some details about this.

See also:
Graphics::CursorManager::showMouse

Implements OSystem.

Definition at line 250 of file modular-backend.cpp.

void ModularGraphicsBackend::showOverlay (  )  [override, virtual]

Activate the overlay mode.

Implements OSystem.

Definition at line 214 of file modular-backend.cpp.

void ModularGraphicsBackend::suggestSideTextures ( Graphics::Surface left,
Graphics::Surface right 
) [override, virtual]

Suggest textures to render at the side of the game window.

This enables eg. Grim to render the game in a widescreen format.

The system must take a copy of the Surfaces, as they will be free()d automatically.

!!! ResidualVM specific method: !!!

Parameters:
left Texture to be used on the left
height Texture to be used on the right

Reimplemented from OSystem.

Definition at line 139 of file modular-backend.cpp.

void ModularGraphicsBackend::unlockScreen (  )  [override, 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.

Definition at line 183 of file modular-backend.cpp.

void ModularGraphicsBackend::updateScreen (  )  [override, virtual]

Flush the whole screen, that is render the current content of the screen framebuffer to the display.

This method could 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.

Definition at line 191 of file modular-backend.cpp.

void ModularGraphicsBackend::warpMouse ( int  x,
int  y 
) [override, virtual]

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

Parameters:
x the new x position of the mouse
y the new y position of the mouse

Implements OSystem.

Definition at line 259 of file modular-backend.cpp.


Member Data Documentation


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


Generated on Sat Sep 26 2020 05:02:37 for ResidualVM by doxygen 1.7.1
curved edge   curved edge