ScummVM API documentation
Titanic::OSVideoSurface Class Reference
Inheritance diagram for Titanic::OSVideoSurface:
Titanic::CVideoSurface Titanic::ListItem Titanic::CSaveableObject

Public Member Functions

 OSVideoSurface (CScreenManager *screenManager, DirectDrawSurface *surface)
 
 OSVideoSurface (CScreenManager *screenManager, const CResourceKey &key, bool flag=false)
 
void loadResource (const CResourceKey &key) override
 
void loadTarga (const CResourceKey &key) override
 
void loadJPEG (const CResourceKey &key) override
 
void loadTarga (const CString &name) override
 
void loadMovie (const CResourceKey &key, bool destroyFlag=false) override
 
bool lock () override
 
void unlock () override
 
bool hasSurface () override
 
int getWidth () override
 
int getHeight () override
 
int getPitch () override
 
int getBpp () override
 
void recreate (int width, int height, int bpp=16) override
 
void resize (int width, int height, int bpp=16) override
 
void detachSurface () override
 
int getPixelDepth () override
 
uint16 getPixel (const Point &pt) override
 
void setPixel (const Point &pt, uint pixel) override
 
void shiftColors () override
 
void clear () override
 
void playMovie (uint flags, CGameObject *obj) override
 
void playMovie (uint startFrame, uint endFrame, uint flags, CGameObject *obj) override
 
void playMovie (uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj) override
 
void stopMovie () override
 
void setMovieFrame (uint frameNumber) override
 
void addMovieEvent (int frameNumber, CGameObject *obj) override
 
void setMovieFrameRate (double rate) override
 
const CMovieRangeInfoList * getMovieRangeInfo () const override
 
void flipVertically (bool needsLock=true) override
 
bool loadIfReady () override
 
bool load () override
 
void transPixelate () override
 
Graphics::ManagedSurface * dupMovieTransparency () const override
 
int freeSurface () override
 
uint16 * getBasePtr (int x, int y) override
 
- Public Member Functions inherited from Titanic::CVideoSurface
 CVideoSurface (CScreenManager *screenManager)
 
void setSurface (CScreenManager *screenManager, DirectDrawSurface *surface)
 
void load (SimpleFile *file) override
 
virtual void loadResource (const CResourceKey &key)=0
 
virtual void loadTarga (const CResourceKey &key)=0
 
virtual void loadJPEG (const CResourceKey &key)=0
 
virtual void loadTarga (const CString &name)=0
 
virtual void loadMovie (const CResourceKey &key, bool destroyFlag=false)=0
 
virtual bool lock ()=0
 
virtual void unlock ()=0
 
virtual bool hasSurface ()=0
 
virtual int getWidth ()=0
 
virtual int getHeight ()=0
 
virtual int getPitch ()=0
 
virtual int getBpp ()=0
 
virtual void recreate (int width, int height, int bpp=16)=0
 
virtual void resize (int width, int height, int bpp=16)=0
 
virtual void detachSurface ()=0
 
virtual int getPixelDepth ()=0
 
virtual uint16 getPixel (const Common::Point &pt)=0
 
virtual void setPixel (const Point &pt, uint pixel)=0
 
virtual void shiftColors ()=0
 
virtual void clear ()=0
 
virtual void playMovie (uint flags, CGameObject *obj)=0
 
virtual void playMovie (uint startFrame, uint endFrame, uint flags, CGameObject *obj)=0
 
virtual void playMovie (uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj)=0
 
virtual void stopMovie ()=0
 
virtual void setMovieFrame (uint frameNumber)=0
 
virtual void addMovieEvent (int eventId, CGameObject *obj)=0
 
virtual void setMovieFrameRate (double rate)=0
 
virtual const CMovieRangeInfoList * getMovieRangeInfo () const =0
 
virtual void flipVertically (bool needsLock=true)=0
 
virtual bool loadIfReady ()=0
 
virtual bool load ()=0
 
virtual void transPixelate ()=0
 
virtual bool hasFrame ()
 
virtual Graphics::ManagedSurface * dupMovieTransparency () const =0
 
virtual int freeSurface ()
 
virtual uint16 * getBasePtr (int x, int y)=0
 
void blitFrom (const Point &destPos, CVideoSurface *src, const Rect *srcRect=nullptr)
 
void blitFrom (const Point &destPos, const Graphics::Surface *src)
 
void setTransparencySurface (Graphics::ManagedSurface *surface)
 
const Graphics::Surface * getTransparencySurface () const
 
uint16 * getPixels ()
 
Graphics::ManagedSurface * getRawSurface ()
 
uint getTransparencyColor ()
 
void copyPixel (uint16 *destP, const uint16 *srcP, byte alpha, const Graphics::PixelFormat &srcFormat, bool isAlpha)
 
- Public Member Functions inherited from Titanic::ListItem
void save (SimpleFile *file, int indent) override
 
void load (SimpleFile *file) override
 
- Public Member Functions inherited from Titanic::CSaveableObject
virtual ClassDef * getType () const
 
bool isInstanceOf (const ClassDef *classDef) const
 
virtual void save (SimpleFile *file, int indent)
 
virtual void load (SimpleFile *file)
 
virtual void saveHeader (SimpleFile *file, int indent)
 
virtual void saveFooter (SimpleFile *file, int indent)
 

Additional Inherited Members

- Static Public Member Functions inherited from Titanic::CVideoSurface
static void setup ()
 
- Static Public Member Functions inherited from Titanic::CSaveableObject
static void initClassList ()
 
static void freeClassList ()
 
static CSaveableObject * createInstance (const Common::String &name)
 
- Public Attributes inherited from Titanic::CVideoSurface
CMovie * _movie
 
DirectDrawSurface * _ddSurface
 
bool _fastBlitFlag
 
bool _flipVertically
 
CResourceKey _resourceKey
 
TransparencyMode _transparencyMode
 
- Public Attributes inherited from Titanic::ListItem
 CLASSDEF
 
- Static Public Attributes inherited from Titanic::CSaveableObject
static ClassDef * _type
 
- Protected Attributes inherited from Titanic::CVideoSurface
CScreenManager * _screenManager
 
Graphics::ManagedSurface * _rawSurface
 
bool _pendingLoad
 
Graphics::ManagedSurface * _transparencySurface
 
DisposeAfterUse::Flag _freeTransparencySurface
 
int _videoSurfaceNum
 
bool _hasFrame
 
int _lockCount
 
- Static Protected Attributes inherited from Titanic::CVideoSurface
static int _videoSurfaceCounter
 

Member Function Documentation

◆ loadResource()

void Titanic::OSVideoSurface::loadResource ( const CResourceKey &  key)
overridevirtual

Load the surface with the passed resource

Implements Titanic::CVideoSurface.

◆ loadTarga() [1/2]

void Titanic::OSVideoSurface::loadTarga ( const CResourceKey &  key)
overridevirtual

Loads a Targa image file specified by the resource key

Implements Titanic::CVideoSurface.

◆ loadJPEG()

void Titanic::OSVideoSurface::loadJPEG ( const CResourceKey &  key)
overridevirtual

Loads a JPEG image file specified by the resource key

Implements Titanic::CVideoSurface.

◆ loadTarga() [2/2]

void Titanic::OSVideoSurface::loadTarga ( const CString &  name)
overridevirtual

Loads a Targa image file specified by the given name

Implements Titanic::CVideoSurface.

◆ loadMovie()

void Titanic::OSVideoSurface::loadMovie ( const CResourceKey &  key,
bool  destroyFlag = false 
)
overridevirtual

Loads a movie file specified by the resource key.

Parameters
keyResource key for movie to load
destroyFlagImmediately destroy movie after decoding first frame

Implements Titanic::CVideoSurface.

◆ lock()

bool Titanic::OSVideoSurface::lock ( )
overridevirtual

Lock the surface for direct access to the pixels

Implements Titanic::CVideoSurface.

◆ unlock()

void Titanic::OSVideoSurface::unlock ( )
overridevirtual

Unlocks the surface after prior calls to lock()

Implements Titanic::CVideoSurface.

◆ hasSurface()

bool Titanic::OSVideoSurface::hasSurface ( )
overridevirtual

Returns true if an underlying raw surface has been set

Implements Titanic::CVideoSurface.

◆ getWidth()

int Titanic::OSVideoSurface::getWidth ( )
overridevirtual

Returns the width of the surface

Implements Titanic::CVideoSurface.

◆ getHeight()

int Titanic::OSVideoSurface::getHeight ( )
overridevirtual

Returns the height of the surface

Implements Titanic::CVideoSurface.

◆ getPitch()

int Titanic::OSVideoSurface::getPitch ( )
overridevirtual

Returns the pitch of the surface in bytes

Implements Titanic::CVideoSurface.

◆ getBpp()

int Titanic::OSVideoSurface::getBpp ( )
overridevirtual

Returns the bytes per pixel of the surface

Implements Titanic::CVideoSurface.

◆ recreate()

void Titanic::OSVideoSurface::recreate ( int  width,
int  height,
int  bpp = 16 
)
overridevirtual

Recreates the surface with the designated size

Implements Titanic::CVideoSurface.

◆ resize()

void Titanic::OSVideoSurface::resize ( int  width,
int  height,
int  bpp = 16 
)
overridevirtual

Resizes the surface

Implements Titanic::CVideoSurface.

◆ detachSurface()

void Titanic::OSVideoSurface::detachSurface ( )
overridevirtual

Detachs the underlying raw surface

Implements Titanic::CVideoSurface.

◆ getPixelDepth()

int Titanic::OSVideoSurface::getPixelDepth ( )
overridevirtual

Returns the number of bytes per pixel in the surface

Implements Titanic::CVideoSurface.

◆ getPixel()

uint16 Titanic::OSVideoSurface::getPixel ( const Point &  pt)
overridevirtual

Gets the pixel at the specified position within the surface

Implements Titanic::CVideoSurface.

◆ setPixel()

void Titanic::OSVideoSurface::setPixel ( const Point &  pt,
uint  pixel 
)
overridevirtual

Sets a pixel at a specified position within the surface

Implements Titanic::CVideoSurface.

◆ shiftColors()

void Titanic::OSVideoSurface::shiftColors ( )
overridevirtual

Shifts the colors of the surface.. maybe greys it out?

Implements Titanic::CVideoSurface.

◆ clear()

void Titanic::OSVideoSurface::clear ( )
overridevirtual

Clears the entire surface to black

Implements Titanic::CVideoSurface.

◆ playMovie() [1/3]

void Titanic::OSVideoSurface::playMovie ( uint  flags,
CGameObject *  obj 
)
overridevirtual

Plays a movie, loading it from the specified _resource if not already loaded

Implements Titanic::CVideoSurface.

◆ playMovie() [2/3]

void Titanic::OSVideoSurface::playMovie ( uint  startFrame,
uint  endFrame,
uint  flags,
CGameObject *  obj 
)
overridevirtual

Plays a movie, loading it from the specified _resource if not already loaded

Implements Titanic::CVideoSurface.

◆ playMovie() [3/3]

void Titanic::OSVideoSurface::playMovie ( uint  startFrame,
uint  endFrame,
uint  initialFrame,
uint  flags,
CGameObject *  obj 
)
overridevirtual

Plays a movie, loading it from the specified _resource if not already loaded

Implements Titanic::CVideoSurface.

◆ stopMovie()

void Titanic::OSVideoSurface::stopMovie ( )
overridevirtual

Stops any movie currently attached to the surface

Implements Titanic::CVideoSurface.

◆ setMovieFrame()

void Titanic::OSVideoSurface::setMovieFrame ( uint  frameNumber)
overridevirtual

Sets the movie to the specified frame number

Implements Titanic::CVideoSurface.

◆ addMovieEvent()

void Titanic::OSVideoSurface::addMovieEvent ( int  frameNumber,
CGameObject *  obj 
)
overridevirtual

Adds a movie playback event

Implements Titanic::CVideoSurface.

◆ setMovieFrameRate()

void Titanic::OSVideoSurface::setMovieFrameRate ( double  rate)
overridevirtual

Set the movie frame rate

Implements Titanic::CVideoSurface.

◆ getMovieRangeInfo()

const CMovieRangeInfoList * Titanic::OSVideoSurface::getMovieRangeInfo ( ) const
overridevirtual

Return any movie range info associated with the surface's movie

Implements Titanic::CVideoSurface.

◆ flipVertically()

void Titanic::OSVideoSurface::flipVertically ( bool  needsLock = true)
overridevirtual

◆ loadIfReady()

bool Titanic::OSVideoSurface::loadIfReady ( )
overridevirtual

Loads the surface's resource if there's one pending

Implements Titanic::CVideoSurface.

◆ load()

bool Titanic::OSVideoSurface::load ( )
overridevirtual

Loads the surface data based on the currently set resource key

Implements Titanic::CVideoSurface.

◆ transPixelate()

void Titanic::OSVideoSurface::transPixelate ( )
overridevirtual

Does a replacement of transparent pixels on certain lines at regular intervals. This is totally weird

Implements Titanic::CVideoSurface.

◆ dupMovieTransparency()

Graphics::ManagedSurface * Titanic::OSVideoSurface::dupMovieTransparency ( ) const
overridevirtual

Duplicates movie transparency surface

Implements Titanic::CVideoSurface.

◆ freeSurface()

int Titanic::OSVideoSurface::freeSurface ( )
overridevirtual

Frees the underlying surface

Reimplemented from Titanic::CVideoSurface.

◆ getBasePtr()

uint16 * Titanic::OSVideoSurface::getBasePtr ( int  x,
int  y 
)
overridevirtual

Get a pointer into the underlying surface

Implements Titanic::CVideoSurface.


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