ScummVM API documentation
Titanic::CScreenManager Class Referenceabstract
Inheritance diagram for Titanic::CScreenManager:
Titanic::OSScreenManager

Public Member Functions

 CScreenManager (TitanicEngine *vm)
 
void fn1 ()
 
void fn2 ()
 
virtual void setWindowHandle (int v)
 
virtual bool resetWindowHandle (int v)
 
virtual void setMode (int width, int height, int bpp, uint numBackSurfaces, bool flag2)=0
 
virtual void drawCursors ()=0
 
virtual CVideoSurfacelockSurface (SurfaceNum surfaceNum)=0
 
virtual void unlockSurface (CVideoSurface *surface)=0
 
virtual CVideoSurfacegetSurface (SurfaceNum surfaceNum) const =0
 
virtual CVideoSurfacegetFrontRenderSurface () const =0
 
virtual void fillRect (SurfaceNum surfaceNum, Rect *rect, byte r, byte g, byte b)=0
 
virtual void blitFrom (SurfaceNum surfaceNum, CVideoSurface *src, const Point *destPos=nullptr, const Rect *srcRect=nullptr)=0
 
virtual void blitFrom (SurfaceNum surfaceNum, const Rect *rect, CVideoSurface *src, int v=0)=0
 
virtual int writeString (int surfaceNum, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor)=0
 
virtual void writeString (int surfaceNum, const Point &destPos, const Rect &clipRect, const CString &str, int maxWidth)=0
 
virtual void setFontColor (byte r, byte g, byte b)=0
 
virtual int getTextBounds (const CString &str, int maxWidth, Point *sizeOut=nullptr) const =0
 
virtual int getFontHeight () const =0
 
virtual int stringWidth (const CString &str)=0
 
virtual void frameRect (SurfaceNum surfaceNum, const Rect &rect, byte r, byte g, byte b)=0
 
virtual void clearSurface (SurfaceNum surfaceNum, Rect *_bounds)=0
 
virtual void resizeSurface (CVideoSurface *surface, int width, int height, int bpp=16)=0
 
virtual CVideoSurfacecreateSurface (int w, int h, int bpp=16)=0
 
virtual CVideoSurfacecreateSurface (const CResourceKey &key)=0
 
virtual Point getScreenTopLeft ()
 
virtual void waitForVSync ()
 
virtual void showCursor ()=0
 
virtual void hideCursor ()=0
 
void setSurfaceBounds (SurfaceNum surfaceNum, const Rect &r)
 
int setFontNumber (int fontNumber)
 
void preLoad ()
 

Static Public Member Functions

static CScreenManagersetCurrent ()
 

Public Attributes

Common::Array< VideoSurfaceEntry > _backSurfaces
 
Rect _frontSurfaceBounds
 
CVideoSurface_frontRenderSurface
 
CMouseCursor_mouseCursor
 
CTextCursor_textCursor
 
CInputHandler_inputHandler
 
int _fontNumber
 

Static Public Attributes

static CScreenManager_screenManagerPtr
 
static CScreenManager_currentScreenManagerPtr
 

Protected Attributes

TitanicEngine_vm
 

Member Function Documentation

◆ setCurrent()

static CScreenManager* Titanic::CScreenManager::setCurrent ( )
static

Set the current screen manager

◆ setMode()

virtual void Titanic::CScreenManager::setMode ( int  width,
int  height,
int  bpp,
uint  numBackSurfaces,
bool  flag2 
)
pure virtual

Sets the video mode

Implemented in Titanic::OSScreenManager.

◆ drawCursors()

virtual void Titanic::CScreenManager::drawCursors ( )
pure virtual

Handles drawing the cursors

Implemented in Titanic::OSScreenManager.

◆ lockSurface()

virtual CVideoSurface* Titanic::CScreenManager::lockSurface ( SurfaceNum  surfaceNum)
pure virtual

Locks a specified surface number for access and returns a pointer to it

Implemented in Titanic::OSScreenManager.

◆ unlockSurface()

virtual void Titanic::CScreenManager::unlockSurface ( CVideoSurface surface)
pure virtual

Unlocks a previously locked surface

Implemented in Titanic::OSScreenManager.

◆ getSurface()

virtual CVideoSurface* Titanic::CScreenManager::getSurface ( SurfaceNum  surfaceNum) const
pure virtual

Gets a specified surface number

Implemented in Titanic::OSScreenManager.

◆ getFrontRenderSurface()

virtual CVideoSurface* Titanic::CScreenManager::getFrontRenderSurface ( ) const
pure virtual

Return the front render surface

Implemented in Titanic::OSScreenManager.

◆ fillRect()

virtual void Titanic::CScreenManager::fillRect ( SurfaceNum  surfaceNum,
Rect rect,
byte  r,
byte  g,
byte  b 
)
pure virtual

Fill an area with a specific color

Implemented in Titanic::OSScreenManager.

◆ blitFrom() [1/2]

virtual void Titanic::CScreenManager::blitFrom ( SurfaceNum  surfaceNum,
CVideoSurface src,
const Point destPos = nullptr,
const Rect srcRect = nullptr 
)
pure virtual

Blits a surface onto one of the screen surfaces

Implemented in Titanic::OSScreenManager.

◆ blitFrom() [2/2]

virtual void Titanic::CScreenManager::blitFrom ( SurfaceNum  surfaceNum,
const Rect rect,
CVideoSurface src,
int  v = 0 
)
pure virtual

Blits a surface onto one of the screen surfaces

Implemented in Titanic::OSScreenManager.

◆ writeString() [1/2]

virtual int Titanic::CScreenManager::writeString ( int  surfaceNum,
const Rect destRect,
int  yOffset,
const CString str,
CTextCursor textCursor 
)
pure virtual

Write a string

Parameters
surfaceNumDestination surface
destRectBounds within dest surface
yOffsetY offset for drawing, to allow for parts of the text to be scrolled off-screen
strLine or lines to write
textCursorOptional text cursor pointer

Implemented in Titanic::OSScreenManager.

◆ writeString() [2/2]

virtual void Titanic::CScreenManager::writeString ( int  surfaceNum,
const Point destPos,
const Rect clipRect,
const CString str,
int  maxWidth 
)
pure virtual

Write a string

Parameters
surfaceNumDestination surface
destPosPosition to start writing text at
clipRectClipping area to constrain text to
strLine or lines to write
maxWidthMaximum allowed line width

Implemented in Titanic::OSScreenManager.

◆ setFontColor()

virtual void Titanic::CScreenManager::setFontColor ( byte  r,
byte  g,
byte  b 
)
pure virtual

Set the font color

Implemented in Titanic::OSScreenManager.

◆ getTextBounds()

virtual int Titanic::CScreenManager::getTextBounds ( const CString str,
int  maxWidth,
Point sizeOut = nullptr 
) const
pure virtual

Get the text area a string will fit into

Parameters
strString
maxWidthMaximum width in pixels
sizeOutOptional pointer to output size
Returns
Required height

Implemented in Titanic::OSScreenManager.

◆ getFontHeight()

virtual int Titanic::CScreenManager::getFontHeight ( ) const
pure virtual

Get the current font height

Implemented in Titanic::OSScreenManager.

◆ stringWidth()

virtual int Titanic::CScreenManager::stringWidth ( const CString str)
pure virtual

Returns the width of a given string in pixels

Implemented in Titanic::OSScreenManager.

◆ frameRect()

virtual void Titanic::CScreenManager::frameRect ( SurfaceNum  surfaceNum,
const Rect rect,
byte  r,
byte  g,
byte  b 
)
pure virtual

Draws a frame enclosing the specified area

Implemented in Titanic::OSScreenManager.

◆ clearSurface()

virtual void Titanic::CScreenManager::clearSurface ( SurfaceNum  surfaceNum,
Rect _bounds 
)
pure virtual

Clear a portion of a specified surface

Implemented in Titanic::OSScreenManager.

◆ resizeSurface()

virtual void Titanic::CScreenManager::resizeSurface ( CVideoSurface surface,
int  width,
int  height,
int  bpp = 16 
)
pure virtual

Resize the passed surface

Implemented in Titanic::OSScreenManager.

◆ createSurface() [1/2]

virtual CVideoSurface* Titanic::CScreenManager::createSurface ( int  w,
int  h,
int  bpp = 16 
)
pure virtual

Creates a surface of a given size

Implemented in Titanic::OSScreenManager.

◆ createSurface() [2/2]

virtual CVideoSurface* Titanic::CScreenManager::createSurface ( const CResourceKey key)
pure virtual

Creates a surface from a specified resource

Implemented in Titanic::OSScreenManager.

◆ getScreenTopLeft()

virtual Point Titanic::CScreenManager::getScreenTopLeft ( )
inlinevirtual

Get the top-left corner of the screen in global screen co-ordinates For ScummVM, this is always (0, 0), even in Windowed mode

◆ waitForVSync()

virtual void Titanic::CScreenManager::waitForVSync ( )
inlinevirtual

Waits for a vertical screen sync For ScummVM, this can be safely ignored

◆ showCursor()

virtual void Titanic::CScreenManager::showCursor ( )
pure virtual

Show the mouse cursor

Implemented in Titanic::OSScreenManager.

◆ hideCursor()

virtual void Titanic::CScreenManager::hideCursor ( )
pure virtual

Hide the mouse cursor

Implemented in Titanic::OSScreenManager.

◆ setSurfaceBounds()

void Titanic::CScreenManager::setSurfaceBounds ( SurfaceNum  surfaceNum,
const Rect r 
)

Set drawing bounds for a specified surface

◆ setFontNumber()

int Titanic::CScreenManager::setFontNumber ( int  fontNumber)

Set the current font number

◆ preLoad()

void Titanic::CScreenManager::preLoad ( )

Called when a game is about to be loaded


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