aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.cpp
diff options
context:
space:
mode:
authorColin Snover2016-07-03 17:57:58 -0500
committerColin Snover2016-08-19 14:08:22 -0500
commit0f2748b15a630f9d12ff0511d4e4cde79b8e915f (patch)
tree28044c339c74b76bb963af54f382dcd5530e40de /engines/sci/graphics/frameout.cpp
parent7da359755d31b6a5a98fc791f795139441c82b56 (diff)
downloadscummvm-rg350-0f2748b15a630f9d12ff0511d4e4cde79b8e915f.tar.gz
scummvm-rg350-0f2748b15a630f9d12ff0511d4e4cde79b8e915f.tar.bz2
scummvm-rg350-0f2748b15a630f9d12ff0511d4e4cde79b8e915f.zip
SCI32: Implement kRobot
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r--engines/sci/graphics/frameout.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index c0d8f15c74..333ed764b2 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -44,16 +44,17 @@
#include "sci/graphics/compare.h"
#include "sci/graphics/cursor32.h"
#include "sci/graphics/font.h"
-#include "sci/graphics/screen.h"
+#include "sci/graphics/frameout.h"
#include "sci/graphics/paint32.h"
#include "sci/graphics/palette32.h"
#include "sci/graphics/plane32.h"
#include "sci/graphics/remap32.h"
+#include "sci/graphics/screen.h"
#include "sci/graphics/screen_item32.h"
#include "sci/graphics/text32.h"
#include "sci/graphics/frameout.h"
-#include "sci/video/robot_decoder.h"
#include "sci/graphics/transitions32.h"
+#include "sci/graphics/video32.h"
namespace Sci {
@@ -501,10 +502,12 @@ void GfxFrameout::kernelAddPicAt(const reg_t planeObject, const GuiResourceId pi
#pragma mark Rendering
void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseRect) {
-// TODO: Robot
-// if (_robot != nullptr) {
-// _robot.doRobot();
-// }
+ RobotDecoder &robotPlayer = g_sci->_video32->getRobotPlayer();
+ const bool robotIsActive = robotPlayer.getStatus() != RobotDecoder::kRobotStatusUninitialized;
+
+ if (robotIsActive) {
+ robotPlayer.doRobot();
+ }
// NOTE: The original engine allocated these as static arrays of 100
// pointers to ScreenItemList / RectList
@@ -542,10 +545,9 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
drawScreenItemList(screenItemLists[i]);
}
-// TODO: Robot
-// if (_robot != nullptr) {
-// _robot->frameAlmostVisible();
-// }
+ if (robotIsActive) {
+ robotPlayer.frameAlmostVisible();
+ }
_palette->updateHardware(!shouldShowBits);
@@ -555,10 +557,9 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
_frameNowVisible = true;
-// TODO: Robot
-// if (_robot != nullptr) {
-// robot->frameNowVisible();
-// }
+ if (robotIsActive) {
+ robotPlayer.frameNowVisible();
+ }
}
void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *showStyle) {