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) |
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, 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::Surface * | getBkgRect (Common::Rect &rect) |
Graphics::Surface * | loadImage (const Common::Path &file) |
Graphics::Surface * | loadImage (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) |
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 () |
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::Surface * | tranposeSurface (const Graphics::Surface *surface) |
void ZVision::RenderManager::renderSceneToScreen | ( | ) |
Renders the scene to the screen
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::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 |