ScummVM API documentation
ZVision::RenderManager Class Reference

Public Member Functions

 RenderManager (ZVision *engine, uint32 windowWidth, uint32 windowHeight, const Common::Rect workingWindow, const Graphics::PixelFormat pixelFormat, bool doubleFPS)
 
void initialize ()
 
void renderSceneToScreen ()
 
void copyToScreen (const Graphics::Surface &surface, Common::Rect &rect, int16 srcLeft, int16 srcTop)
 
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, const Common::Rect &_srcRect, Graphics::Surface &dst, int x, int y)
 
void blitSurfaceToSurface (const Graphics::Surface &src, const Common::Rect &_srcRect, 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, int x, int y, int32 colorkey=-1)
 
void initSubArea (uint32 windowWidth, uint32 windowHeight, const Common::Rect workingWindow)
 
uint16 createSubArea (const Common::Rect &area)
 
uint16 createSubArea ()
 
void deleteSubArea (uint16 id)
 
void deleteSubArea (uint16 id, int16 delay)
 
void updateSubArea (uint16 id, const Common::String &txt)
 
void processSubs (uint16 deltatime)
 
Common::Point getBkgSize ()
 
Graphics::SurfacegetBkgRect (Common::Rect &rect)
 
Graphics::SurfaceloadImage (const Common::Path &file)
 
Graphics::SurfaceloadImage (const Common::Path &file, bool transposed)
 
void clearMenuSurface ()
 
void clearMenuSurface (const Common::Rect &r)
 
void renderMenuToScreen ()
 
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 ()
 
bool askQuestion (const Common::String &str)
 
void delayedMessage (const Common::String &str, uint16 milsecs)
 
void timedMessage (const Common::String &str, uint16 milsecs)
 
void showDebugMsg (const Common::String &msg, int16 delay=3000)
 
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()

void ZVision::RenderManager::renderSceneToScreen ( )

Renders the scene to the screen

◆ 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

◆ 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: