Public Member Functions | |
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 |
Public Member Functions inherited from Titanic::CSaveableObject | |
virtual ClassDef * | getType () const |
bool | isInstanceOf (const ClassDef *classDef) const |
virtual void | saveHeader (SimpleFile *file, int indent) |
virtual void | saveFooter (SimpleFile *file, int indent) |
Static Public Member Functions | |
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 | |
CMovie * | _movie |
DirectDrawSurface * | _ddSurface |
bool | _fastBlitFlag |
bool | _flipVertically |
CResourceKey | _resourceKey |
TransparencyMode | _transparencyMode |
Public Attributes inherited from Titanic::ListItem | |
CLASSDEF | |
Protected Attributes | |
CScreenManager * | _screenManager |
Graphics::ManagedSurface * | _rawSurface |
bool | _pendingLoad |
Graphics::ManagedSurface * | _transparencySurface |
DisposeAfterUse::Flag | _freeTransparencySurface |
int | _videoSurfaceNum |
bool | _hasFrame |
int | _lockCount |
Static Protected Attributes | |
static int | _videoSurfaceCounter |
Additional Inherited Members | |
Static Public Attributes inherited from Titanic::CSaveableObject | |
static ClassDef * | _type |
|
inlinestatic |
Setup statics
void Titanic::CVideoSurface::setSurface | ( | CScreenManager * | screenManager, |
DirectDrawSurface * | surface | ||
) |
Set the underlying surface for this video surface
|
inlineoverridevirtual |
Load the data for the class from file
Reimplemented from Titanic::ListItem.
|
pure virtual |
Load the surface with the passed resource
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads a Targa image file specified by the resource key
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads a JPEG image file specified by the resource key
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads a Targa image file specified by the given name
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads a movie file specified by the resource key.
key | Resource key for movie to load |
destroyFlag | Immediately destroy movie after decoding first frame |
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Lock the surface for direct access to the pixels
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Unlocks the surface after prior calls to lock()
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns true if an underlying raw surface has been set
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns the width of the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns the height of the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns the pitch of the surface in bytes
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns the bytes per pixel of the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Recreates the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Resizes the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Detachs the underlying raw surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Returns the number of bytes per pixel in the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Gets the pixel at the specified position within the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Sets a pixel at a specified position within the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Shifts the colors of the surface.. maybe greys it out?
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Clears the entire surface to black
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Plays a movie, loading it from the specified _resource if not already loaded
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Plays a movie, loading it from the specified _resource if not already loaded
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Plays a movie, loading it from the specified _resource if not already loaded
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Stops any movie currently attached to the surface
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Set the current movie frame number
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Adds a movie playback event
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Set the movie frame rate
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Return any movie range info associated with the surface's movie
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads the surface's resource if there's one pending
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Loads the surface data based on the currently set resource key
Implemented in Titanic::OSVideoSurface.
|
pure virtual |
Does a replacement of transparent pixels on certain lines at regular intervals. This is totally weird
Implemented in Titanic::OSVideoSurface.
|
virtual |
Returns true if there's a frame to display on the video surface
|
pure virtual |
Duplicates movie transparency surface
Implemented in Titanic::OSVideoSurface.
|
inlinevirtual |
Frees the underlying surface
Reimplemented in Titanic::OSVideoSurface.
|
pure virtual |
Get a pointer into the underlying surface
Implemented in Titanic::OSVideoSurface.
void Titanic::CVideoSurface::blitFrom | ( | const Point & | destPos, |
CVideoSurface * | src, | ||
const Rect * | srcRect = nullptr |
||
) |
Blit from another surface
void Titanic::CVideoSurface::blitFrom | ( | const Point & | destPos, |
const Graphics::Surface * | src | ||
) |
Blit from another surface
|
inline |
Sets a raw surface to use as a transparency mask for the surface
|
inline |
Get the previously set transparency mask surface
|
inline |
Get the pixels associated with the surface. Only valid when the surface has been locked for access
|
inline |
Get a reference to the underlying surface. Only valid when the surface has been locked for access
uint Titanic::CVideoSurface::getTransparencyColor | ( | ) |
Returns the transparent color
void Titanic::CVideoSurface::copyPixel | ( | uint16 * | destP, |
const uint16 * | srcP, | ||
byte | alpha, | ||
const Graphics::PixelFormat & | srcFormat, | ||
bool | isAlpha | ||
) |
Copies a pixel, handling transparency
destP | Dest pointer to 16-bit pixel |
srcP | Source pointer to 16-bit pixel |
alpha | Alpha (0-31). At 0, it's completely opaque, and overwrites the dest pixel. Through to 31, which is completely transparent, and ignores the source pixel. |
srcFormat | The source surface format |
isAlpha | If true, has alpha channel |