aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-12 11:36:42 +0000
committerMartin Kiewitz2009-10-12 11:36:42 +0000
commit250402f21bf95d36e543013112455c6e00eb1e23 (patch)
treeca575fedfb05c5095251bfc47debc07d4ec92e22 /engines/sci
parent9ae7935a1d3311821e8fc3086471d64719e050aa (diff)
downloadscummvm-rg350-250402f21bf95d36e543013112455c6e00eb1e23.tar.gz
scummvm-rg350-250402f21bf95d36e543013112455c6e00eb1e23.tar.bz2
scummvm-rg350-250402f21bf95d36e543013112455c6e00eb1e23.zip
SCI/newgui: kGraph RedrawBox (ReAnimate) is now using class calling (functionality not yet implemented)
svn-id: r44976
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp13
-rw-r--r--engines/sci/gui/gui.cpp4
-rw-r--r--engines/sci/gui/gui.h1
-rw-r--r--engines/sci/gui/gui_gfx.cpp5
-rw-r--r--engines/sci/gui/gui_gfx.h1
-rw-r--r--engines/sci/gui/gui_windowmgr.cpp2
-rw-r--r--engines/sci/gui32/gui32.cpp12
-rw-r--r--engines/sci/gui32/gui32.h1
8 files changed, 28 insertions, 11 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index e134c22274..aa8f5b3854 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -657,16 +657,9 @@ reg_t kGraph(EngineState *s, int argc, reg_t *argv) {
break;
case K_GRAPH_REDRAW_BOX: {
- debugC(2, kDebugLevelGraphics, "redraw_box(%d, %d, %d, %d)\n", argv[1].toSint16(), argv[2].toSint16(), argv[3].toSint16(), argv[4].toSint16());
-
- area.x += s->port->zone.x;
- area.y += s->port->zone.y;
-
- if (s->dyn_views && s->dyn_views->_parent == (GfxContainer *)s->port)
- s->dyn_views->draw(Common::Point(0, 0));
-
- // FIXME: Change to class calling
- //gfxop_update_box(s->gfx_state, area);
+ rect = Common::Rect(x, y, x1, y1);
+ s->_gui->graphRedrawBox(rect);
+ break;
}
break;
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 46b68257db..2097fe0e2c 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -436,6 +436,10 @@ void SciGui::graphUpdateBox(Common::Rect rect) {
_gfx->BitsShow(rect);
}
+void SciGui::graphRedrawBox(Common::Rect rect) {
+ _gfx->ReAnimate(rect);
+}
+
int16 SciGui::picNotValid(int16 newPicNotValid) {
int16 oldPicNotValid = _screen->_picNotValid;
diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h
index 0fd773a87a..59c19fcc4c 100644
--- a/engines/sci/gui/gui.h
+++ b/engines/sci/gui/gui.h
@@ -83,6 +83,7 @@ public:
virtual reg_t graphSaveBox(Common::Rect rect, uint16 flags);
virtual void graphRestoreBox(reg_t handle);
virtual void graphUpdateBox(Common::Rect rect);
+ virtual void graphRedrawBox(Common::Rect rect);
virtual int16 picNotValid(int16 newPicNotValid);
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index d37875cfcd..2c1bfee9bc 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -1358,6 +1358,11 @@ void SciGuiGfx::AnimateRestoreAndDelete(int argc, reg_t *argv) {
}
}
+void SciGuiGfx::ReAnimate(Common::Rect rect) {
+ // TODO: implement ReAnimate
+ BitsShow(rect);
+}
+
void SciGuiGfx::AddToPicDrawCels(List *list) {
reg_t curObject;
GuiAnimateEntry *listEntry;
diff --git a/engines/sci/gui/gui_gfx.h b/engines/sci/gui/gui_gfx.h
index 0290f46534..bf5041fb24 100644
--- a/engines/sci/gui/gui_gfx.h
+++ b/engines/sci/gui/gui_gfx.h
@@ -135,6 +135,7 @@ public:
void AnimateDrawCels();
void AnimateUpdateScreen(byte oldPicNotValid);
void AnimateRestoreAndDelete(int argc, reg_t *argv);
+ void ReAnimate(Common::Rect rect);
void AddToPicDrawCels(List *list);
void AddToPicDrawView(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
bool CanBeHereCheckRectList(reg_t checkObject, Common::Rect checkRect, List *list);
diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp
index 0dee03fefc..b27fd31d14 100644
--- a/engines/sci/gui/gui_windowmgr.cpp
+++ b/engines/sci/gui/gui_windowmgr.cpp
@@ -250,7 +250,7 @@ void SciGuiWindowMgr::DisposeWindow(GuiWindow *pWnd, int16 arg2) {
if (arg2)
_gfx->BitsShow(pWnd->restoreRect);
else
- _gfx->BitsShow(pWnd->restoreRect); // FIXME: dummy, should be ReAnimate(&pwnd->dims);
+ _gfx->ReAnimate(pWnd->restoreRect);
_windowList.remove(pWnd);
_gfx->SetPort(_windowList.back());
_windowsById[pWnd->id] = 0;
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index c47a2ce141..0909d981c2 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -961,6 +961,18 @@ void SciGui32::graphUpdateBox(Common::Rect rect) {
gfxop_update_box(s->gfx_state, area);
}
+void SciGui32::graphRedrawBox(Common::Rect rect) {
+ rect_t area = gfx_rect(rect.left, rect.top, rect.width(), rect.height());
+
+ area.x += s->port->zone.x;
+ area.y += s->port->zone.y;
+
+ if (s->dyn_views && s->dyn_views->_parent == (GfxContainer *)s->port)
+ s->dyn_views->draw(Common::Point(0, 0));
+
+ //gfxop_update_box(s->gfx_state, area);
+}
+
int16 SciGui32::picNotValid(int16 newPicNotValid) {
int16 oldPicNotValid = s->pic_not_valid;
diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h
index 21c496d871..c30eeb2b7e 100644
--- a/engines/sci/gui32/gui32.h
+++ b/engines/sci/gui32/gui32.h
@@ -74,6 +74,7 @@ public:
reg_t graphSaveBox(Common::Rect rect, uint16 flags);
void graphRestoreBox(reg_t handle);
void graphUpdateBox(Common::Rect);
+ void graphRedrawBox(Common::Rect);
int16 picNotValid(int16 newPicNotValid);