diff options
author | Marisa-Chan | 2014-01-07 18:39:16 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-01-07 18:39:16 +0700 |
commit | 1428cb8950e5bdcfad9d15d0fb2e32ff1dbc0bae (patch) | |
tree | 5baeb94cd7e5249f5416c9af9a0e5e59443bfafa /engines/zvision/lever_control.cpp | |
parent | 48156debaf148b50acd3eb6e3de7020498016a5f (diff) | |
download | scummvm-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.cpp | 14 |
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 |