ScummVM API documentation
ZVision::RenderManager Class Reference

Public Types

typedef Common::List< GraphicsEffect * > EffectsList
 

Public Member Functions

 RenderManager (ZVision *engine, const ScreenLayout layout, const Graphics::PixelFormat pixelFormat, bool doubleFPS, bool widescreen=false)
 
void initialize (bool hiRes=false)
 
bool renderSceneToScreen (bool immediate=false, bool overlayOnly=false, bool preStream=false)
 
Graphics::ManagedSurfacegetVidSurface (Common::Rect dstRect)
 
const Common::RectgetMenuArea () const
 
const Common::RectgetWorkingArea () const
 
void renderImageToBackground (const Common::Path &fileName, int16 destinationX, int16 destinationY)
 
void renderImageToBackground (const Common::Path &fileName, int16 destX, int16 destY, uint32 colorkey)
 
void renderImageToBackground (const Common::Path &fileName, int16 destX, int16 destY, int16 keyX, int16 keyY)
 
void setBackgroundImage (const Common::Path &fileName)
 
void setBackgroundPosition (int offset)
 
const Common::Point screenSpaceToImageSpace (const Common::Point &point)
 
RenderTablegetRenderTable ()
 
uint32 getCurrentBackgroundOffset ()
 
void scaleBuffer (const void *src, void *dst, uint32 srcWidth, uint32 srcHeight, byte bytesPerPixel, uint32 dstWidth, uint32 dstHeight)
 
void blitSurfaceToSurface (const Graphics::Surface &src, Common::Rect srcRect, Graphics::Surface &dst, int _x, int _y)
 
void blitSurfaceToSurface (const Graphics::Surface &src, Common::Rect srcRect, Graphics::Surface &dst, int _x, int _y, uint32 colorkey)
 
void blitSurfaceToSurface (const Graphics::Surface &src, Graphics::Surface &dst, int _x, int _y)
 
void blitSurfaceToSurface (const Graphics::Surface &src, Graphics::Surface &dst, int _x, int _y, uint32 colorkey)
 
void blitSurfaceToBkg (const Graphics::Surface &src, int x, int y, int32 colorkey=-1)
 
void blitSurfaceToBkgScaled (const Graphics::Surface &src, const Common::Rect &dstRect, int32 colorkey=-1)
 
void blitSurfaceToMenu (const Graphics::Surface &src, int16 x, int16 y, int32 colorkey=0)
 
void blitSurfaceToText (const Graphics::Surface &src, int16 x, int16 y, int32 colorkey=0)
 
Common::Point getBkgSize ()
 
Graphics::SurfacegetBkgRect (Common::Rect &rect)
 
Graphics::SurfaceloadImage (const Common::Path &file)
 
Graphics::SurfaceloadImage (const Common::Path &file, bool transposed)
 
void clearMenuSurface (bool force=false, int32 colorkey=-1)
 
void clearTextSurface (bool force=false, int32 colorkey=-1)
 
void prepareBackground ()
 
void readImageToSurface (const Common::Path &fileName, Graphics::Surface &destination)
 
void readImageToSurface (const Common::Path &fileName, Graphics::Surface &destination, bool transposed)
 
void addEffect (GraphicsEffect *_effect)
 
void deleteEffect (uint32 ID)
 
EffectMapmakeEffectMap (const Common::Point &xy, int16 depth, const Common::Rect &rect, int8 *minD, int8 *maxD)
 
EffectMapmakeEffectMap (const Graphics::Surface &surf, uint16 transp)
 
Common::Rect transformBackgroundSpaceRectToScreenSpace (const Common::Rect &src)
 
void markDirty ()
 
void checkBorders ()
 
void rotateTo (int16 to, int16 time)
 
void updateRotation ()
 
void upscaleRect (Common::Rect &rect)
 

Static Public Member Functions

static Graphics::SurfacetranposeSurface (const Graphics::Surface *surface)
 

Member Function Documentation

◆ renderSceneToScreen()

bool ZVision::RenderManager::renderSceneToScreen ( bool  immediate = false,
bool  overlayOnly = false,
bool  preStream = false 
)

Renders the scene to the screen Returns true if screen was updated If streamMode is set true, all background processing is skipped and the previous framebuffer is used

◆ renderImageToBackground() [1/3]

void ZVision::RenderManager::renderImageToBackground ( const Common::Path fileName,
int16  destinationX,
int16  destinationY 
)

Blits the image or a portion of the image to the background.

Parameters
fileNameName of the image file
destinationXX position where the image should be put. Coords are in working window space, not screen space!
destinationYY position where the image should be put. Coords are in working window space, not screen space!

◆ renderImageToBackground() [2/3]

void ZVision::RenderManager::renderImageToBackground ( const Common::Path fileName,
int16  destX,
int16  destY,
uint32  colorkey 
)

Blits the image or a portion of the image to the background.

Parameters
fileNameName of the image file
destXX position where the image should be put. Coords are in working window space, not screen space!
destYY position where the image should be put. Coords are in working window space, not screen space!
colorkeyTransparent color

◆ renderImageToBackground() [3/3]

void ZVision::RenderManager::renderImageToBackground ( const Common::Path fileName,
int16  destX,
int16  destY,
int16  keyX,
int16  keyY 
)

Blits the image or a portion of the image to the background.

Parameters
fileNameName of the image file
destXX position where the image should be put. Coords are in working window space, not screen space!
destYY position where the image should be put. Coords are in working window space, not screen space!
keyXX position of transparent color
keyYY position of transparent color

◆ setBackgroundImage()

void ZVision::RenderManager::setBackgroundImage ( const Common::Path fileName)

Sets the current background image to be used by the RenderManager and immediately blits it to the screen. (It won't show up until the end of the frame)

Parameters
fileNameThe name of the image file

◆ setBackgroundPosition()

void ZVision::RenderManager::setBackgroundPosition ( int  offset)

Set the background position (_backgroundOffset). If the current RenderState is PANORAMA, the offset will be in the horizontal direction. If the current RenderState is TILT, the offset will be in the vertical direction.

This method will not render anything on the screen. So if nothing else is called that renders the background, the change won't be seen until next frame.

Parameters
offsetThe amount to offset the background

◆ screenSpaceToImageSpace()

const Common::Point ZVision::RenderManager::screenSpaceToImageSpace ( const Common::Point point)

Converts a point in screen coordinate space to image coordinate space

Parameters
pointPoint in screen coordinate space
Returns
Point in image coordinate space

◆ tranposeSurface()

static Graphics::Surface* ZVision::RenderManager::tranposeSurface ( const Graphics::Surface surface)
static

Creates a copy of surface and transposes the data.

Note: The user is responsible for calling free() on the returned surface and then deleting it

Parameters
surfaceThe data to be transposed
Returns
A copy of the surface with the data transposed

◆ blitSurfaceToSurface()

void ZVision::RenderManager::blitSurfaceToSurface ( const Graphics::Surface src,
Common::Rect  srcRect,
Graphics::Surface dst,
int  _x,
int  _y 
)

Blit from one surface to another surface

Parameters
srcSource surface
srcRectRectangle defining area of source surface to blit; if this rectangle is empty or not supplied, entire source surface is blitted
dstDestination surface
xDestination surface x coordinate
yDestination surface y coordinate

◆ blitSurfaceToMenu()

void ZVision::RenderManager::blitSurfaceToMenu ( const Graphics::Surface src,
int16  x,
int16  y,
int32  colorkey = 0 
)

Blit from source surface to menu area

Parameters
srcSource surface
xx coordinate relative to menu area origin
yy coordinate relative to menu area origin

◆ blitSurfaceToText()

void ZVision::RenderManager::blitSurfaceToText ( const Graphics::Surface src,
int16  x,
int16  y,
int32  colorkey = 0 
)

Blit from source surface to text area

Parameters
srcSource surface
xx coordinate relative to text area origin
yy coordinate relative to text area origin

◆ readImageToSurface() [1/2]

void ZVision::RenderManager::readImageToSurface ( const Common::Path fileName,
Graphics::Surface destination 
)

Reads an image file pixel data into a Surface buffer. Also, if the image is transposed, it will un-transpose the pixel data. The function will call destination::create() if the dimensions of destination do not match up with the dimensions of the image.

Parameters
fileNameThe name of a .tga file
destinationA reference to the Surface to store the pixel data in

◆ readImageToSurface() [2/2]

void ZVision::RenderManager::readImageToSurface ( const Common::Path fileName,
Graphics::Surface destination,
bool  transposed 
)

Reads an image file pixel data into a Surface buffer. Also, if the image is transposed, it will un-transpose the pixel data. The function will call destination::create() if the dimensions of destination do not match up with the dimensions of the image.

Parameters
fileNameThe name of a .tga file
destinationA reference to the Surface to store the pixel data in
transposedTranspose flag

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