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

Public Member Functions

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

Public Attributes

int _field48
 
int _field4C
 
int _field50
 
int _field54
 
STFont _fonts [4]
 

Member Function Documentation

◆ setMode()

void Titanic::OSScreenManager::setMode ( int  width,
int  height,
int  bpp,
uint  numBackSurfaces,
bool  flag2 
)
overridevirtual

Sets the video mode

Implements Titanic::CScreenManager.

◆ drawCursors()

void Titanic::OSScreenManager::drawCursors ( )
overridevirtual

Handles drawing the cursors

Implements Titanic::CScreenManager.

◆ lockSurface()

CVideoSurface* Titanic::OSScreenManager::lockSurface ( SurfaceNum  surfaceNum)
overridevirtual

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

Implements Titanic::CScreenManager.

◆ unlockSurface()

void Titanic::OSScreenManager::unlockSurface ( CVideoSurface surface)
overridevirtual

Unlocks a previously locked surface

Implements Titanic::CScreenManager.

◆ getSurface()

CVideoSurface* Titanic::OSScreenManager::getSurface ( SurfaceNum  surfaceNum) const
overridevirtual

Gets a specified surface number

Implements Titanic::CScreenManager.

◆ getFrontRenderSurface()

CVideoSurface* Titanic::OSScreenManager::getFrontRenderSurface ( ) const
inlineoverridevirtual

Return the front render surface

Implements Titanic::CScreenManager.

◆ fillRect()

void Titanic::OSScreenManager::fillRect ( SurfaceNum  surfaceNum,
Rect rect,
byte  r,
byte  g,
byte  b 
)
overridevirtual

Fill an area with a specific color

Implements Titanic::CScreenManager.

◆ blitFrom() [1/2]

void Titanic::OSScreenManager::blitFrom ( SurfaceNum  surfaceNum,
CVideoSurface src,
const Point destPos,
const Rect srcRect = nullptr 
)
overridevirtual

Blits a surface onto one of the screen surfaces

Implements Titanic::CScreenManager.

◆ blitFrom() [2/2]

void Titanic::OSScreenManager::blitFrom ( SurfaceNum  surfaceNum,
const Rect rect,
CVideoSurface src,
int  v = 0 
)
overridevirtual

Blits a surface onto one of the screen surfaces

Implements Titanic::CScreenManager.

◆ writeString() [1/2]

int Titanic::OSScreenManager::writeString ( int  surfaceNum,
const Rect destRect,
int  yOffset,
const CString str,
CTextCursor textCursor 
)
overridevirtual

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

Implements Titanic::CScreenManager.

◆ writeString() [2/2]

void Titanic::OSScreenManager::writeString ( int  surfaceNum,
const Point destPos,
const Rect clipRect,
const CString str,
int  lineWidth = 0 
)
overridevirtual

Write a string

Parameters
surfaceNumDestination surface
destPosPosition to start writing text at
clipRectClipping area to constrain text to
strLine or lines to write
lineWidthWidth in pixels of the string, if known.

Implements Titanic::CScreenManager.

◆ setFontColor()

void Titanic::OSScreenManager::setFontColor ( byte  r,
byte  g,
byte  b 
)
overridevirtual

Set the font color

Implements Titanic::CScreenManager.

◆ getTextBounds()

int Titanic::OSScreenManager::getTextBounds ( const CString str,
int  maxWidth,
Point sizeOut = nullptr 
) const
overridevirtual

Get the text area a string will fit into

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

Implements Titanic::CScreenManager.

◆ getFontHeight()

int Titanic::OSScreenManager::getFontHeight ( ) const
overridevirtual

Get the current font height

Implements Titanic::CScreenManager.

◆ stringWidth()

int Titanic::OSScreenManager::stringWidth ( const CString str)
overridevirtual

Returns the width of a given string in pixels

Implements Titanic::CScreenManager.

◆ frameRect()

void Titanic::OSScreenManager::frameRect ( SurfaceNum  surfaceNum,
const Rect rect,
byte  r,
byte  g,
byte  b 
)
overridevirtual

Draws a frame enclosing the specified area

Implements Titanic::CScreenManager.

◆ clearSurface()

void Titanic::OSScreenManager::clearSurface ( SurfaceNum  surfaceNum,
Rect bounds 
)
overridevirtual

Clear a portion of the screen surface

Implements Titanic::CScreenManager.

◆ resizeSurface()

void Titanic::OSScreenManager::resizeSurface ( CVideoSurface surface,
int  width,
int  height,
int  bpp = 16 
)
overridevirtual

Resize the passed surface

Implements Titanic::CScreenManager.

◆ createSurface() [1/2]

CVideoSurface* Titanic::OSScreenManager::createSurface ( int  w,
int  h,
int  bpp = 16 
)
overridevirtual

Creates a surface of a given size

Implements Titanic::CScreenManager.

◆ createSurface() [2/2]

CVideoSurface* Titanic::OSScreenManager::createSurface ( const CResourceKey key)
overridevirtual

Creates a surface from a specified resource

Implements Titanic::CScreenManager.

◆ showCursor()

void Titanic::OSScreenManager::showCursor ( )
overridevirtual

Show the mouse cursor

Implements Titanic::CScreenManager.

◆ hideCursor()

void Titanic::OSScreenManager::hideCursor ( )
overridevirtual

Hide the mouse cursor

Implements Titanic::CScreenManager.


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