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::ManagedSurface & | getVidSurface (Common::Rect dstRect) |
const Common::Rect & | getMenuArea () const |
const Common::Rect & | getWorkingArea () 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) |
RenderTable * | getRenderTable () |
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::Surface * | getBkgRect (Common::Rect &rect) |
Graphics::Surface * | loadImage (const Common::Path &file) |
Graphics::Surface * | loadImage (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) |
EffectMap * | makeEffectMap (const Common::Point &xy, int16 depth, const Common::Rect &rect, int8 *minD, int8 *maxD) |
EffectMap * | makeEffectMap (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::Surface * | tranposeSurface (const Graphics::Surface *surface) |
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
void ZVision::RenderManager::renderImageToBackground | ( | const Common::Path & | fileName, |
int16 | destinationX, | ||
int16 | destinationY | ||
) |
Blits the image or a portion of the image to the background.
fileName | Name of the image file |
destinationX | X position where the image should be put. Coords are in working window space, not screen space! |
destinationY | Y position where the image should be put. Coords are in working window space, not screen space! |
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.
fileName | Name of the image file |
destX | X position where the image should be put. Coords are in working window space, not screen space! |
destY | Y position where the image should be put. Coords are in working window space, not screen space! |
colorkey | Transparent color |
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.
fileName | Name of the image file |
destX | X position where the image should be put. Coords are in working window space, not screen space! |
destY | Y position where the image should be put. Coords are in working window space, not screen space! |
keyX | X position of transparent color |
keyY | Y position of transparent color |
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)
fileName | The name of the image file |
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.
offset | The amount to offset the background |
const Common::Point ZVision::RenderManager::screenSpaceToImageSpace | ( | const Common::Point & | point | ) |
|
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
surface | The data to be transposed |
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
src | Source surface |
srcRect | Rectangle defining area of source surface to blit; if this rectangle is empty or not supplied, entire source surface is blitted |
dst | Destination surface |
x | Destination surface x coordinate |
y | Destination surface y coordinate |
void ZVision::RenderManager::blitSurfaceToMenu | ( | const Graphics::Surface & | src, |
int16 | x, | ||
int16 | y, | ||
int32 | colorkey = 0 |
||
) |
Blit from source surface to menu area
src | Source surface |
x | x coordinate relative to menu area origin |
y | y coordinate relative to menu area origin |
void ZVision::RenderManager::blitSurfaceToText | ( | const Graphics::Surface & | src, |
int16 | x, | ||
int16 | y, | ||
int32 | colorkey = 0 |
||
) |
Blit from source surface to text area
src | Source surface |
x | x coordinate relative to text area origin |
y | y coordinate relative to text area origin |
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.
fileName | The name of a .tga file |
destination | A reference to the Surface to store the pixel data in |
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.
fileName | The name of a .tga file |
destination | A reference to the Surface to store the pixel data in |
transposed | Transpose flag |