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

ResVmSdlGraphicsManager Class Reference

Base class for a ResidualVM SDL based graphics manager. More...

#include <resvm-sdl-graphics.h>

Inheritance diagram for ResVmSdlGraphicsManager:
Collaboration diagram for ResVmSdlGraphicsManager:

List of all members.

Classes

struct  Capabilities
 Capabilities of the current device. More...

Public Member Functions

 ResVmSdlGraphicsManager (SdlEventSource *source, SdlWindow *window, const Capabilities &capabilities)
 ~ResVmSdlGraphicsManager () override
void activateManager () override
void deactivateManager () override
void notifyVideoExpose () override
bool notifyMousePosition (Common::Point &mouse) override
void setFeatureState (OSystem::Feature f, bool enable) override
bool getFeatureState (OSystem::Feature f) const override
const OSystem::GraphicsModegetSupportedGraphicsModes () const override
int getDefaultGraphicsMode () const override
bool setGraphicsMode (int mode) override
int getGraphicsMode () const override
void resetGraphicsScale () override
Graphics::PixelFormat getScreenFormat () const override
Common::List
< Graphics::PixelFormat
getSupportedFormats () const override
void initSize (uint w, uint h, const Graphics::PixelFormat *format=nullptr) override
int getScreenChangeID () const override
void beginGFXTransaction () override
OSystem::TransactionError endGFXTransaction () override
void copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override
Graphics::SurfacelockScreen () override
void unlockScreen () override
void fillScreen (uint32 col) override
void setShakePos (int shakeOffset) override
void saveScreenshot () override
void setFocusRectangle (const Common::Rect &rect) override
void clearFocusRectangle () override
Graphics::PixelFormat getOverlayFormat () const override
bool showMouse (bool visible) override
bool lockMouse (bool lock) override
void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=nullptr) override
void setCursorPalette (const byte *colors, uint start, uint num) override
bool notifyEvent (const Common::Event &event) override
 Notifies the observer of an incoming event.
bool isMouseLocked () const
 Checks if mouse is locked or not.

Protected Member Functions

void setPalette (const byte *colors, uint start, uint num) override
void grabPalette (byte *colors, uint start, uint num) const override
Common::Rect getPreferredFullscreenResolution ()
 Obtain the user configured fullscreen resolution, or default to the desktop resolution.
virtual bool saveScreenshot (const Common::String &file) const =0
 Save a screenshot to the specified file.

Protected Attributes

const Capabilities_capabilities
bool _fullscreen
bool _lockAspectRatio
uint _engineRequestedWidth
uint _engineRequestedHeight
int _screenChangeCount
bool _overlayVisible
Graphics::PixelFormat _overlayFormat
Graphics::PixelFormat _screenFormat
Common::List
< Graphics::PixelFormat
_supportedFormats

Detailed Description

Base class for a ResidualVM SDL based graphics manager.

Used to share reusable methods between SDL graphics managers

Definition at line 40 of file resvm-sdl-graphics.h.


Constructor & Destructor Documentation

ResVmSdlGraphicsManager::ResVmSdlGraphicsManager ( SdlEventSource source,
SdlWindow window,
const Capabilities capabilities 
)

Definition at line 37 of file resvm-sdl-graphics.cpp.

ResVmSdlGraphicsManager::~ResVmSdlGraphicsManager (  )  [override]

Definition at line 51 of file resvm-sdl-graphics.cpp.


Member Function Documentation

void ResVmSdlGraphicsManager::activateManager (  )  [override]

Definition at line 54 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::beginGFXTransaction (  )  [override]

Definition at line 124 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::clearFocusRectangle (  )  [override]

Definition at line 190 of file resvm-sdl-graphics.cpp.

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

Definition at line 154 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::deactivateManager (  )  [override]

Definition at line 61 of file resvm-sdl-graphics.cpp.

OSystem::TransactionError ResVmSdlGraphicsManager::endGFXTransaction (  )  [override]

Definition at line 128 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::fillScreen ( uint32  col  )  [override]

Definition at line 166 of file resvm-sdl-graphics.cpp.

int ResVmSdlGraphicsManager::getDefaultGraphicsMode (  )  const [override]

Definition at line 120 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::getFeatureState ( OSystem::Feature  f  )  const [override]

Reimplemented in OpenGLSdlGraphicsManager.

Definition at line 105 of file resvm-sdl-graphics.cpp.

int ResVmSdlGraphicsManager::getGraphicsMode (  )  const [override]

Definition at line 145 of file resvm-sdl-graphics.cpp.

Graphics::PixelFormat ResVmSdlGraphicsManager::getOverlayFormat (  )  const [inline, override]

Definition at line 112 of file resvm-sdl-graphics.h.

Common::Rect ResVmSdlGraphicsManager::getPreferredFullscreenResolution (  )  [protected]

Obtain the user configured fullscreen resolution, or default to the desktop resolution.

Definition at line 70 of file resvm-sdl-graphics.cpp.

int ResVmSdlGraphicsManager::getScreenChangeID (  )  const [inline, override]

Definition at line 89 of file resvm-sdl-graphics.h.

Graphics::PixelFormat ResVmSdlGraphicsManager::getScreenFormat (  )  const [inline, override]

Definition at line 85 of file resvm-sdl-graphics.h.

Common::List< Graphics::PixelFormat > ResVmSdlGraphicsManager::getSupportedFormats (  )  const [override]

Definition at line 134 of file resvm-sdl-graphics.cpp.

const OSystem::GraphicsMode * ResVmSdlGraphicsManager::getSupportedGraphicsModes (  )  const [override]

Definition at line 116 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::grabPalette ( byte colors,
uint  start,
uint  num 
) const [override, protected]

Definition at line 174 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::initSize ( uint  w,
uint  h,
const Graphics::PixelFormat format = nullptr 
) [override]

Definition at line 150 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::isMouseLocked (  )  const

Checks if mouse is locked or not.

Avoid to emulate a mouse movement from joystick if locked.

Definition at line 218 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::lockMouse ( bool  lock  )  [override]

Definition at line 203 of file resvm-sdl-graphics.cpp.

Graphics::Surface * ResVmSdlGraphicsManager::lockScreen (  )  [override]

Definition at line 158 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::notifyEvent ( const Common::Event event  )  [override, virtual]

Notifies the observer of an incoming event.

An observer is supposed to eat the event, with returning true, when it wants to prevent other observers from receiving the event. A usage example here is the keymapper: If it processes an Event, it should 'eat' it and create a new event, which the EventDispatcher will then catch.

Parameters:
event the event, which is incoming.
Returns:
true if the event should not be passed to other observers, false otherwise.

Implements Common::EventObserver.

Definition at line 240 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::notifyMousePosition ( Common::Point mouse  )  [override]

Definition at line 263 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::notifyVideoExpose (  )  [override]

Definition at line 258 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::resetGraphicsScale (  )  [override]

Definition at line 91 of file resvm-sdl-graphics.cpp.

virtual bool ResVmSdlGraphicsManager::saveScreenshot ( const Common::String file  )  const [protected, pure virtual]

Save a screenshot to the specified file.

Implemented in OpenGLSdlGraphicsManager, and SurfaceSdlGraphicsManager.

void ResVmSdlGraphicsManager::saveScreenshot (  )  [override]

Definition at line 270 of file resvm-sdl-graphics.cpp.

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

Definition at line 178 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::setFeatureState ( OSystem::Feature  f,
bool  enable 
) [override]

Reimplemented in OpenGLSdlGraphicsManager, and SurfaceSdlGraphicsManager.

Definition at line 95 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::setFocusRectangle ( const Common::Rect rect  )  [override]

Definition at line 186 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::setGraphicsMode ( int  mode  )  [override]

Definition at line 140 of file resvm-sdl-graphics.cpp.

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

Definition at line 226 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::setPalette ( const byte colors,
uint  start,
uint  num 
) [override, protected]

Definition at line 170 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::setShakePos ( int  shakeOffset  )  [override]

Definition at line 182 of file resvm-sdl-graphics.cpp.

bool ResVmSdlGraphicsManager::showMouse ( bool  visible  )  [override]

Definition at line 198 of file resvm-sdl-graphics.cpp.

void ResVmSdlGraphicsManager::unlockScreen (  )  [override]

Definition at line 162 of file resvm-sdl-graphics.cpp.


Member Data Documentation

Definition at line 134 of file resvm-sdl-graphics.h.

Definition at line 136 of file resvm-sdl-graphics.h.

Definition at line 137 of file resvm-sdl-graphics.h.

Definition at line 142 of file resvm-sdl-graphics.h.

Definition at line 140 of file resvm-sdl-graphics.h.


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


Generated on Sat Sep 14 2019 05:03:17 for ResidualVM by doxygen 1.7.1
curved edge   curved edge