aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/lever_control.cpp
diff options
context:
space:
mode:
authorMarisa-Chan2014-01-07 18:39:16 +0700
committerMarisa-Chan2014-01-07 18:39:16 +0700
commit1428cb8950e5bdcfad9d15d0fb2e32ff1dbc0bae (patch)
tree5baeb94cd7e5249f5416c9af9a0e5e59443bfafa /engines/zvision/lever_control.cpp
parent48156debaf148b50acd3eb6e3de7020498016a5f (diff)
downloadscummvm-rg350-1428cb8950e5bdcfad9d15d0fb2e32ff1dbc0bae.tar.gz
scummvm-rg350-1428cb8950e5bdcfad9d15d0fb2e32ff1dbc0bae.tar.bz2
scummvm-rg350-1428cb8950e5bdcfad9d15d0fb2e32ff1dbc0bae.zip
ZVISION: Refactoring of renderManager.
Diffstat (limited to 'engines/zvision/lever_control.cpp')
-rw-r--r--engines/zvision/lever_control.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index fa8475f457..9cd36cf653 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -375,26 +375,20 @@ void LeverControl::renderFrame(uint frameNumber) {
_lastRenderedFrame = frameNumber;
}
- const uint16 *frameData;
+ const Graphics::Surface *frameData;
int x = _animationCoords.left;
int y = _animationCoords.top;
- int width;
- int height;
if (_fileType == RLF) {
// getFrameData() will automatically optimize to getNextFrame() / getPreviousFrame() if it can
- frameData = (const uint16 *)_animation.rlf->getFrameData(frameNumber)->getPixels();
- width = _animation.rlf->width(); // Use the animation width instead of _animationCoords.width()
- height = _animation.rlf->height(); // Use the animation height instead of _animationCoords.height()
+ frameData = _animation.rlf->getFrameData(frameNumber);
} else if (_fileType == AVI) {
_animation.avi->seekToFrame(frameNumber);
const Graphics::Surface *surface = _animation.avi->decodeNextFrame();
- frameData = (const uint16 *)surface->getPixels();
- width = surface->w;
- height = surface->h;
+ frameData = surface;
}
- _engine->getRenderManager()->copyRectToWorkingWindow(frameData, x, y, width, width, height);
+ _engine->getRenderManager()->blitSurfaceToBkg(*frameData, x, y);
}
} // End of namespace ZVision