ScummVM API documentation
Wintermute::BaseRenderer Class Referenceabstract
Inheritance diagram for Wintermute::BaseRenderer:
Wintermute::BaseClass Wintermute::BaseRenderer3D Wintermute::BaseRenderOSystem

Public Member Functions

virtual void dumpData (const char *filename)
 
virtual BaseImagetakeScreenshot ()=0
 
virtual bool setViewport (int left, int top, int right, int bottom)
 
virtual bool setViewport (Rect32 *rect)
 
virtual bool setScreenViewport ()
 
virtual void setWindowed (bool windowed)=0
 
virtual Graphics::PixelFormat getPixelFormat () const =0
 
virtual void fade (uint16 alpha)=0
 
virtual void fadeToColor (byte r, byte g, byte b, byte a)=0
 
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)
 
virtual bool setProjection ()
 
virtual bool windowedBlt ()
 
virtual bool fill (byte r, byte g, byte b, Common::Rect *rect=nullptr)=0
 
virtual void onWindowChange ()
 
virtual bool initRenderer (int width, int height, bool windowed)
 
virtual bool flip ()=0
 
virtual bool indicatorFlip ()=0
 
virtual bool forcedFlip ()=0
 
virtual void initLoop ()
 
virtual bool setup2D (bool force=false)
 
virtual bool setupLines ()
 
virtual Common::String getName () const =0
 
virtual bool displayDebugInfo ()
 
virtual bool drawShaderQuad ()
 
virtual float getScaleRatioX () const
 
virtual float getScaleRatioY () const
 
virtual BaseSurfacecreateSurface ()=0
 
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 Member Functions inherited from Wintermute::BaseClass
bool setEditorProp (const Common::String &propName, const Common::String &propValue)
 
Common::String getEditorProp (const Common::String &propName, const Common::String &initVal=Common::String())
 
 BaseClass (TDynamicConstructor, TDynamicConstructor)
 
bool parseEditorProperty (char *buffer, bool complete=true)
 
virtual bool saveAsText (BaseDynamicBuffer *buffer, int indent=0)
 
 BaseClass (BaseGame *GameOwner)
 
virtual const char * getClassName ()
 
virtual bool persist (BasePersistenceManager *persistMgr)
 

Public Attributes

int _realWidth
 
int _realHeight
 
int _drawOffsetX
 
int _drawOffsetY
 
bool _active
 
bool _ready
 
uint32 _window
 
uint32 _forceAlphaColor
 
- Public Attributes inherited from Wintermute::BaseClass
bool _persistable
 
BaseGame_gameRef
 

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
 
- Protected Attributes inherited from Wintermute::BaseClass
Common::HashMap< Common::String, Common::String_editorProps
 
Common::HashMap< Common::String, Common::String >::iterator _editorPropsIter
 

Detailed Description

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

Member Function Documentation

◆ takeScreenshot()

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::BaseRenderOSystem.

◆ fade()

virtual void Wintermute::BaseRenderer::fade ( uint16  alpha)
pure virtual

Fade the screen to black

Parameters
alphaamount to fade by (alpha value of black)

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

◆ fadeToColor()

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
rthe red component to fade too.
gthe green component to fade too.
bthe blue component to fade too.
athe alpha component to fade too.
rectthe portion of the screen to fade (if nullptr, the entire screen will be faded).

Implemented in Wintermute::BaseRenderOSystem.

◆ fill()

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
rthe red component to fill with.
gthe green component to fill with.
bthe blue component to fill with.

Implemented in Wintermute::BaseRenderOSystem.

◆ flip()

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 successful, false on error.

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

◆ indicatorFlip()

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::BaseRenderer3D, and Wintermute::BaseRenderOSystem.

◆ getName()

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::BaseRenderOSystem.

◆ createSurface()

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 useful 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::BaseRenderOSystem.


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