diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/robot.cpp | 8 | ||||
-rw-r--r-- | engines/sci/graphics/robot.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/graphics/robot.cpp b/engines/sci/graphics/robot.cpp index 31f421a2e1..768eba2214 100644 --- a/engines/sci/graphics/robot.cpp +++ b/engines/sci/graphics/robot.cpp @@ -159,7 +159,7 @@ void GfxRobot::draw(int x, int y) { byte *pixels = assembleVideoFrame(i); getFrameDimensions(i, width, height); - g_system->copyRectToScreen(pixels, width, x, y, width, (int) (height * getFrameScaleFactor(i))); + g_system->copyRectToScreen(pixels, width, x, y, width, height * getFrameScale(i) / 100); g_system->updateScreen(); g_system->delayMillis(100); delete[] pixels; @@ -222,7 +222,7 @@ byte *GfxRobot::assembleVideoFrame(int frame) { videoData += 10 + fragmentCompressed; } - assert(decompressedSize == (frameWidth * frameHeight) * getFrameScaleFactor(frame)); + assert(decompressedSize == (frameWidth * frameHeight) * getFrameScale(frame) / 100); byte *output = new byte[decompressedSize]; int assemblePtr = 0; @@ -274,11 +274,11 @@ void GfxRobot::getFrameRect(int frame, Common::Rect &rect) { rect = Common::Rect(x, y, x + w, y + h); } -float GfxRobot::getFrameScaleFactor(int frame) { +int GfxRobot::getFrameScale(int frame) { byte *videoData = _resourceData + _imageStart[frame]; byte percentage = videoData[3]; - return (float) percentage / 100.0; + return percentage; } #endif diff --git a/engines/sci/graphics/robot.h b/engines/sci/graphics/robot.h index c1c57a4596..fc5f498862 100644 --- a/engines/sci/graphics/robot.h +++ b/engines/sci/graphics/robot.h @@ -44,7 +44,7 @@ private: byte *assembleVideoFrame(int frame); void getFrameDimensions(int frame, int &width, int &height); void getFrameRect(int frame, Common::Rect &rect); // Not sure what to use this for yet - float getFrameScaleFactor(int frame); // Scale factor?? More like custom height, but why use a percentage for it? + int getFrameScale(int frame); // Scale factor (multiplied by 100). More like custom height, but why use a percentage for it? ResourceManager *_resMan; GfxScreen *_screen; |