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

interface for the rendering portion of WME this interface is mainly intended to wrap away any differencies between software-rendering/hardware-rendering. More...

#include <base_renderer.h>

Inheritance diagram for Wintermute::BaseRenderer:
Collaboration diagram for Wintermute::BaseRenderer:

List of all members.

Public Member Functions

virtual void dumpData (const char *filename)
virtual BaseImagetakeScreenshot ()=0
 Take a screenshot of the current screenstate.
virtual bool saveScreenShot (const Common::String &filename, int sizeX=0, int sizeY=0)
virtual bool setViewport (int left, int top, int right, int bottom)
virtual bool setViewport (Rect32 *rect)
virtual Rect32 getViewPort ()=0
virtual bool setScreenViewport ()
virtual void setWindowed (bool windowed)=0
virtual Graphics::PixelFormat getPixelFormat () const =0
virtual void fade (uint16 alpha)=0
 Fade the screen to black.
virtual void fadeToColor (byte r, byte g, byte b, byte a)=0
 Fade a portion of the screen to a specific color.
virtual bool drawLine (int x1, int y1, int x2, int y2, uint32 color)
virtual bool drawRect (int x1, int y1, int x2, int y2, uint32 color, int width=1)
 BaseRenderer (BaseGame *inGame=nullptr)
 ~BaseRenderer () override
virtual bool setProjection ()
virtual bool windowedBlt ()
virtual bool fill (byte r, byte g, byte b, Common::Rect *rect=nullptr)=0
 Fill a portion of the screen with a specified color.
virtual void onWindowChange ()
virtual bool initRenderer (int width, int height, bool windowed)
virtual bool flip ()=0
 Flip the backbuffer onto the screen-buffer The screen will NOT be updated before calling this function.
virtual bool indicatorFlip ()=0
 Special flip for the indicator drawn during save/load essentially, just copies the region defined by the _indicator-variables.
virtual bool forcedFlip ()=0
virtual void initLoop ()
virtual bool setup2D (bool force=false)
virtual bool setupLines ()
virtual Common::String getName () const =0
 Get the name of the current renderer.
virtual bool displayDebugInfo ()
virtual bool drawShaderQuad ()
virtual float getScaleRatioX () const
virtual float getScaleRatioY () const
virtual BaseSurfacecreateSurface ()=0
 Create a Surface fit for use with the renderer.
bool clipCursor ()
bool unclipCursor ()
BaseObjectgetObjectAt (int x, int y)
void deleteRectList ()
virtual bool startSpriteBatch ()
virtual bool endSpriteBatch ()
bool pointInViewport (Point32 *P)
bool isReady () const
bool isWindowed () const
int32 getBPP () const
void addRectToList (BaseActiveRect *rect)
void initIndicator ()
void setIndicatorVal (int value)
void setIndicator (int width, int height, int x, int y, uint32 color)
void persistSaveLoadImages (BasePersistenceManager *persistMgr)
void initSaveLoad (bool isSaving, bool quickSave=false)
virtual void endSaveLoad ()
void setLoadingScreen (const char *filename, int x, int y)
void setSaveImage (const char *filename, int x, int y)
bool displayIndicator ()
int32 getWidth () const
int32 getHeight () const

Public Attributes

int _realWidth
int _realHeight
int _drawOffsetX
int _drawOffsetY
bool _active
bool _ready
uint32 _window
uint32 _forceAlphaColor

Protected Attributes

int32 _height
int32 _width
bool _windowed
int32 _bPP
Common::String _loadImageName
Common::String _saveImageName
int32 _saveImageX
int32 _saveImageY
int32 _loadImageX
int32 _loadImageY
BaseSurface_saveLoadImage
bool _hasDrawnSaveLoadImage
int32 _indicatorWidthDrawn
uint32 _indicatorColor
int32 _indicatorX
int32 _indicatorY
int32 _indicatorWidth
int32 _indicatorHeight
bool _loadInProgress
bool _indicatorDisplay
int32 _indicatorProgress
uint32 _clipperWindow
Rect32 _windowRect
Rect32 _viewportRect
Rect32 _screenRect
Rect32 _monitorRect

Private Member Functions

bool displaySaveloadImage ()
bool displaySaveloadLines ()

Private Attributes

Common::Array< BaseActiveRect * > _rectList

Detailed Description

interface for the rendering portion of WME this interface is mainly intended to wrap away any differencies between software-rendering/hardware-rendering.

Definition at line 53 of file base_renderer.h.


Constructor & Destructor Documentation

Wintermute::BaseRenderer::BaseRenderer ( BaseGame inGame = nullptr  ) 

Definition at line 46 of file base_renderer.cpp.

Wintermute::BaseRenderer::~BaseRenderer (  )  [override]

Definition at line 81 of file base_renderer.cpp.


Member Function Documentation

void Wintermute::BaseRenderer::addRectToList ( BaseActiveRect rect  ) 

Definition at line 370 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::clipCursor (  ) 

Definition at line 325 of file base_renderer.cpp.

virtual BaseSurface* Wintermute::BaseRenderer::createSurface (  )  [pure virtual]

Create a Surface fit for use with the renderer.

As diverse implementations of BaseRenderer might have different solutions for storing surfaces this allows for a common interface for creating surface-handles. (Mostly usefull to ease future implementation of hw-accelerated rendering, or readding 3D-support at some point).

Returns:
a surface that can be used with this renderer

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

void Wintermute::BaseRenderer::deleteRectList (  ) 

Definition at line 242 of file base_renderer.cpp.

virtual bool Wintermute::BaseRenderer::displayDebugInfo (  )  [inline, virtual]

Reimplemented in Wintermute::BaseRenderOpenGL3D, and Wintermute::BaseRenderOpenGL3DShader.

Definition at line 137 of file base_renderer.h.

bool Wintermute::BaseRenderer::displayIndicator (  ) 

Definition at line 391 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::displaySaveloadImage (  )  [private]

Definition at line 414 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::displaySaveloadLines (  )  [private]

Definition at line 431 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::drawLine ( int  x1,
int  y1,
int  x2,
int  y2,
uint32  color 
) [virtual]
bool Wintermute::BaseRenderer::drawRect ( int  x1,
int  y1,
int  x2,
int  y2,
uint32  color,
int  width = 1 
) [virtual]
virtual bool Wintermute::BaseRenderer::drawShaderQuad (  )  [inline, virtual]

Reimplemented in Wintermute::BaseRenderOpenGL3D, and Wintermute::BaseRenderOpenGL3DShader.

Definition at line 140 of file base_renderer.h.

virtual void Wintermute::BaseRenderer::dumpData ( const char *  filename  )  [inline, virtual]
void Wintermute::BaseRenderer::endSaveLoad (  )  [virtual]

Reimplemented in Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

Definition at line 171 of file base_renderer.cpp.

virtual bool Wintermute::BaseRenderer::endSpriteBatch (  )  [inline, virtual]
virtual void Wintermute::BaseRenderer::fade ( uint16  alpha  )  [pure virtual]

Fade the screen to black.

Parameters:
alpha amount to fade by (alpha value of black)

Implemented in Wintermute::BaseRenderer3D, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

virtual void Wintermute::BaseRenderer::fadeToColor ( byte  r,
byte  g,
byte  b,
byte  a 
) [pure virtual]

Fade a portion of the screen to a specific color.

Parameters:
r the red component to fade too.
g the green component to fade too.
b the blue component to fade too.
a the alpha component to fade too.
rect the portion of the screen to fade (if nullptr, the entire screen will be faded).

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

virtual bool Wintermute::BaseRenderer::fill ( byte  r,
byte  g,
byte  b,
Common::Rect rect = nullptr 
) [pure virtual]

Fill a portion of the screen with a specified color.

Parameters:
r the red component to fill with.
g the green component to fill with.
b the blue component to fill with.

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

virtual bool Wintermute::BaseRenderer::flip (  )  [pure virtual]

Flip the backbuffer onto the screen-buffer The screen will NOT be updated before calling this function.

Returns:
true if successfull, false on error.

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

virtual bool Wintermute::BaseRenderer::forcedFlip (  )  [pure virtual]
int32 Wintermute::BaseRenderer::getBPP (  )  const [inline]

Definition at line 179 of file base_renderer.h.

int32 Wintermute::BaseRenderer::getHeight (  )  const [inline]

Definition at line 199 of file base_renderer.h.

virtual Common::String Wintermute::BaseRenderer::getName (  )  const [pure virtual]

Get the name of the current renderer.

Returns:
the name of the renderer.

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

BaseObject * Wintermute::BaseRenderer::getObjectAt ( int  x,
int  y 
)

Definition at line 190 of file base_renderer.cpp.

virtual Graphics::PixelFormat Wintermute::BaseRenderer::getPixelFormat (  )  const [pure virtual]
virtual float Wintermute::BaseRenderer::getScaleRatioX (  )  const [inline, virtual]
virtual float Wintermute::BaseRenderer::getScaleRatioY (  )  const [inline, virtual]
virtual Rect32 Wintermute::BaseRenderer::getViewPort (  )  [pure virtual]
int32 Wintermute::BaseRenderer::getWidth (  )  const [inline]

Definition at line 198 of file base_renderer.h.

virtual bool Wintermute::BaseRenderer::indicatorFlip (  )  [pure virtual]

Special flip for the indicator drawn during save/load essentially, just copies the region defined by the _indicator-variables.

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

void Wintermute::BaseRenderer::initIndicator (  ) 

Definition at line 93 of file base_renderer.cpp.

void Wintermute::BaseRenderer::initLoop (  )  [virtual]

Reimplemented in Wintermute::BaseRenderer3D.

Definition at line 89 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::initRenderer ( int  width,
int  height,
bool  windowed 
) [virtual]
void Wintermute::BaseRenderer::initSaveLoad ( bool  isSaving,
bool  quickSave = false 
)

Definition at line 140 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::isReady (  )  const [inline]

Definition at line 177 of file base_renderer.h.

bool Wintermute::BaseRenderer::isWindowed (  )  const [inline]

Definition at line 178 of file base_renderer.h.

void Wintermute::BaseRenderer::onWindowChange (  )  [virtual]
void Wintermute::BaseRenderer::persistSaveLoadImages ( BasePersistenceManager persistMgr  ) 

Definition at line 180 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::pointInViewport ( Point32 P  ) 

Definition at line 353 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::saveScreenShot ( const Common::String filename,
int  sizeX = 0,
int  sizeY = 0 
) [virtual]
void Wintermute::BaseRenderer::setIndicator ( int  width,
int  height,
int  x,
int  y,
uint32  color 
)

Definition at line 105 of file base_renderer.cpp.

void Wintermute::BaseRenderer::setIndicatorVal ( int  value  ) 

Definition at line 113 of file base_renderer.cpp.

void Wintermute::BaseRenderer::setLoadingScreen ( const char *  filename,
int  x,
int  y 
)

Definition at line 120 of file base_renderer.cpp.

virtual bool Wintermute::BaseRenderer::setProjection (  )  [inline, virtual]

Reimplemented in Wintermute::BaseRenderOpenGL3D, and Wintermute::BaseRenderOpenGL3DShader.

Definition at line 96 of file base_renderer.h.

void Wintermute::BaseRenderer::setSaveImage ( const char *  filename,
int  x,
int  y 
)

Definition at line 130 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::setScreenViewport (  )  [virtual]

Definition at line 310 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::setup2D ( bool  force = false  )  [virtual]
bool Wintermute::BaseRenderer::setupLines (  )  [virtual]
bool Wintermute::BaseRenderer::setViewport ( Rect32 rect  )  [virtual]

Reimplemented in Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

Definition at line 316 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::setViewport ( int  left,
int  top,
int  right,
int  bottom 
) [virtual]
virtual void Wintermute::BaseRenderer::setWindowed ( bool  windowed  )  [pure virtual]
virtual bool Wintermute::BaseRenderer::startSpriteBatch (  )  [inline, virtual]
virtual BaseImage* Wintermute::BaseRenderer::takeScreenshot (  )  [pure virtual]

Take a screenshot of the current screenstate.

Returns:
a BaseImage containing the current screen-buffer.

Implemented in Wintermute::BaseRenderOpenGL3D, Wintermute::BaseRenderOpenGL3DShader, Wintermute::BaseRenderOpenGLTexture, and Wintermute::BaseRenderOSystem.

bool Wintermute::BaseRenderer::unclipCursor (  ) 

Definition at line 345 of file base_renderer.cpp.

bool Wintermute::BaseRenderer::windowedBlt (  )  [virtual]

Member Data Documentation

Definition at line 174 of file base_renderer.h.

Definition at line 205 of file base_renderer.h.

Definition at line 226 of file base_renderer.h.

Definition at line 214 of file base_renderer.h.

Definition at line 201 of file base_renderer.h.

Definition at line 217 of file base_renderer.h.

Definition at line 223 of file base_renderer.h.

Definition at line 221 of file base_renderer.h.

Definition at line 224 of file base_renderer.h.

Definition at line 220 of file base_renderer.h.

Definition at line 218 of file base_renderer.h.

Definition at line 219 of file base_renderer.h.

Definition at line 211 of file base_renderer.h.

Definition at line 212 of file base_renderer.h.

Definition at line 222 of file base_renderer.h.

Definition at line 231 of file base_renderer.h.

Definition at line 175 of file base_renderer.h.

Definition at line 56 of file base_renderer.h.

Definition at line 55 of file base_renderer.h.

Definition at line 209 of file base_renderer.h.

Definition at line 210 of file base_renderer.h.

Definition at line 213 of file base_renderer.h.

Definition at line 230 of file base_renderer.h.

Definition at line 229 of file base_renderer.h.

Definition at line 202 of file base_renderer.h.

Definition at line 204 of file base_renderer.h.

Definition at line 228 of file base_renderer.h.


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


Generated on Sat Sep 19 2020 05:06:29 for ResidualVM by doxygen 1.7.1
curved edge   curved edge