aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kernel32.cpp17
-rw-r--r--engines/sci/engine/state.h12
-rw-r--r--engines/sci/graphics/frameout.cpp1
-rw-r--r--engines/sci/graphics/gui32.cpp29
-rw-r--r--engines/sci/graphics/gui32.h7
-rw-r--r--engines/sci/sci.cpp1
6 files changed, 15 insertions, 52 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index 06d1b8b044..06a24caffc 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -31,6 +31,7 @@
#include "sci/engine/selector.h"
#include "sci/graphics/gui.h"
#include "sci/graphics/gui32.h"
+#include "sci/graphics/frameout.h"
namespace Sci {
@@ -669,7 +670,7 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) {
reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
- s->_gui32->addScreenItem(viewObj);
+ s->_gfxFrameout->kernelAddScreenItem(viewObj);
return NULL_REG;
}
@@ -683,7 +684,7 @@ reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
- s->_gui32->deleteScreenItem(viewObj);
+ s->_gfxFrameout->kernelDeleteScreenItem(viewObj);
/*
reg_t viewObj = argv[0];
@@ -705,7 +706,7 @@ reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) {
reg_t planeObj = argv[0];
- s->_gui32->addPlane(planeObj);
+ s->_gfxFrameout->kernelAddPlane(planeObj);
warning("kAddPlane object %04x:%04x", PRINT_REG(planeObj));
return NULL_REG;
}
@@ -713,7 +714,7 @@ reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) {
reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) {
reg_t planeObj = argv[0];
- s->_gui32->deletePlane(planeObj);
+ s->_gfxFrameout->kernelDeletePlane(planeObj);
warning("kDeletePlane object %04x:%04x", PRINT_REG(planeObj));
return NULL_REG;
}
@@ -721,7 +722,7 @@ reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) {
reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) {
reg_t planeObj = argv[0];
- s->_gui32->updatePlane(planeObj);
+ s->_gfxFrameout->kernelUpdatePlane(planeObj);
return s->r_acc;
}
@@ -735,8 +736,8 @@ reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv) {
}
reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv) {
- warning("kGetHighPlanePri: %d", s->_gui32->getHighPlanePri());
- return make_reg(0, s->_gui32->getHighPlanePri());
+ warning("kGetHighPlanePri: %d", s->_gfxFrameout->kernelGetHighPlanePri());
+ return make_reg(0, s->_gfxFrameout->kernelGetHighPlanePri());
}
reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) {
@@ -744,7 +745,7 @@ reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) {
// as its called right after a view is updated
// TODO
- s->_gui32->frameOut();
+ s->_gfxFrameout->kernelFrameout();
return NULL_REG;
}
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index a11ba50855..f61dd33920 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -58,26 +58,19 @@ class GfxCursor;
class GfxMenu;
class GfxPaint;
class GfxPaint16;
-class GfxPaint32;
class GfxPalette;
class GfxPorts;
class GfxScreen;
class SciGui;
-class Cursor;
class MessageState;
class SoundCommandParser;
#ifdef ENABLE_SCI32
class SciGui32;
+class GfxFrameout;
+class GfxPaint32;
#endif
-struct GfxState;
-struct GfxPort;
-struct GfxVisual;
-struct GfxContainer;
-struct GfxList;
-
-
class DirSeeker {
protected:
reg_t _outbuffer;
@@ -165,6 +158,7 @@ public:
#ifdef ENABLE_SCI32
SciGui32 *_gui32; // GUI for SCI32 games
+ GfxFrameout *_gfxFrameout; // kFrameout and the like for 32-bit gfx
#endif
SciEvent *_event; // Event handling
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index e9ee25946c..ad05918c5e 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -265,6 +265,7 @@ void GfxFrameout::kernelFrameout() {
}
}
free(itemData);
+ _screen->copyToScreen();
}
} // End of namespace Sci
diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp
index 9b9f2fc648..f8c54c0fe4 100644
--- a/engines/sci/graphics/gui32.cpp
+++ b/engines/sci/graphics/gui32.cpp
@@ -52,6 +52,7 @@ SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, G
_paint32 = new GfxPaint32(_s->resMan, _s->_segMan, _s->_kernel, _cache, _screen, _palette);
_s->_gfxPaint = _paint32;
_frameout = new GfxFrameout(_s->_segMan, _s->resMan, _cache, _screen, _palette, _paint32);
+ _s->_gfxFrameout = _frameout;
}
SciGui32::~SciGui32() {
@@ -204,34 +205,6 @@ void SciGui32::moveCursor(Common::Point pos) {
void SciGui32::setCursorZone(Common::Rect zone) {
_cursor->setMoveZone(zone);
}
-void SciGui32::addScreenItem(reg_t object) {
- _frameout->kernelAddScreenItem(object);
-}
-
-void SciGui32::deleteScreenItem(reg_t object) {
- _frameout->kernelDeleteScreenItem(object);
-}
-
-void SciGui32::addPlane(reg_t object) {
- _frameout->kernelAddPlane(object);
-}
-
-void SciGui32::updatePlane(reg_t object) {
- _frameout->kernelUpdatePlane(object);
-}
-
-void SciGui32::deletePlane(reg_t object) {
- _frameout->kernelDeletePlane(object);
-}
-
-int16 SciGui32::getHighPlanePri() {
- return _frameout->kernelGetHighPlanePri();
-}
-
-void SciGui32::frameOut() {
- _frameout->kernelFrameout();
- _screen->copyToScreen();
-}
void SciGui32::drawRobot(GuiResourceId robotId) {
Robot *test = new Robot(_s->resMan, _screen, robotId);
diff --git a/engines/sci/graphics/gui32.h b/engines/sci/graphics/gui32.h
index bb1aa38107..615c0ea5e8 100644
--- a/engines/sci/graphics/gui32.h
+++ b/engines/sci/graphics/gui32.h
@@ -59,13 +59,6 @@ public:
void moveCursor(Common::Point pos);
void setCursorZone(Common::Rect zone);
- void addScreenItem(reg_t object);
- void deleteScreenItem(reg_t object);
- void addPlane(reg_t object);
- void updatePlane(reg_t object);
- void deletePlane(reg_t object);
- int16 getHighPlanePri();
- void frameOut();
void globalToLocal(int16 *x, int16 *y, reg_t planeObj);
void localToGlobal(int16 *x, int16 *y, reg_t planeObj);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 21b265f03d..c1a83ea88f 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -190,6 +190,7 @@ Common::Error SciEngine::run() {
_gamestate->_gui = new SciGui(_gamestate, screen, palette, cache, cursor, _gamestate->_gfxPorts, _audio);
#ifdef ENABLE_SCI32
_gamestate->_gui32 = 0;
+ _gamestate->_gfxFrameout = 0;
}
#endif