aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichieSams2013-09-07 18:04:01 -0500
committerRichieSams2013-09-07 18:04:01 -0500
commit47ee636f0503f39531371e3e611a4b6fb81906e0 (patch)
tree2cc59b3e2736ee7e589af3741832f175735743fe
parent70e75dd6403a25f220e2e5eb0af9c3f0e940288c (diff)
downloadscummvm-rg350-47ee636f0503f39531371e3e611a4b6fb81906e0.tar.gz
scummvm-rg350-47ee636f0503f39531371e3e611a4b6fb81906e0.tar.bz2
scummvm-rg350-47ee636f0503f39531371e3e611a4b6fb81906e0.zip
ZVISION: Make LeverControl render to the working window instead of directly to the screen
-rw-r--r--engines/zvision/lever_control.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 744fde1e1c..318710e627 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -32,6 +32,7 @@
#include "zvision/lever_control.h"
#include "zvision/zvision.h"
#include "zvision/script_manager.h"
+#include "zvision/render_manager.h"
#include "zvision/cursor_manager.h"
#include "zvision/rlf_animation.h"
#include "zvision/zork_avi_decoder.h"
@@ -375,7 +376,6 @@ void LeverControl::renderFrame(uint frameNumber) {
}
const uint16 *frameData;
- int pitch;
int x = _animationCoords.left;
int y = _animationCoords.top;
int width;
@@ -384,19 +384,17 @@ void LeverControl::renderFrame(uint frameNumber) {
if (_fileType == RLF) {
// getFrameData() will automatically optimize to getNextFrame() / getPreviousFrame() if it can
frameData = _animation.rlf->getFrameData(frameNumber);
- pitch = _animation.rlf->width() * sizeof(uint16);
width = _animation.rlf->width(); // Use the animation width instead of _animationCoords.width()
height = _animation.rlf->height(); // Use the animation height instead of _animationCoords.height()
} else if (_fileType == AVI) {
_animation.avi->seekToFrame(frameNumber);
const Graphics::Surface *surface = _animation.avi->decodeNextFrame();
frameData = (const uint16 *)surface->getPixels();
- pitch = surface->pitch;
width = surface->w;
height = surface->h;
}
- _engine->_system->copyRectToScreen(frameData, pitch, x + _engine->_workingWindow.left, y + _engine->_workingWindow.top, width, height);
+ _engine->getRenderManager()->copyRectToWorkingWindow(frameData, x, y, width, width, height);
}
} // End of namespace ZVision