aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui32/gui32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gui32/gui32.cpp')
-rw-r--r--engines/sci/gui32/gui32.cpp67
1 files changed, 5 insertions, 62 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index ae493708cf..f85917b083 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -23,10 +23,12 @@
*
*/
+#include "sci/sci.h" // for INCLUDE_OLDGFX
+#ifdef INCLUDE_OLDGFX
+
#include "graphics/cursorman.h"
#include "common/util.h"
-#include "sci/sci.h"
#include "sci/engine/state.h"
#include "sci/debug.h" // for g_debug_sleeptime_factor
#include "sci/resource.h"
@@ -264,67 +266,6 @@ void _k_redraw_box(EngineState *s, int x1, int y1, int x2, int y2) {
#endif
}
-Common::Rect set_base(EngineState *s, reg_t object) {
- SegManager *segMan = s->_segMan;
- int x, y, original_y, z, ystep, xsize, ysize;
- int xbase, ybase, xend, yend;
- int view, loop, cel;
- int oldloop, oldcel;
- int xmod = 0, ymod = 0;
- Common::Rect retval;
-
- x = (int16)GET_SEL32V(segMan, object, x);
- original_y = y = (int16)GET_SEL32V(segMan, object, y);
-
- if (s->_kernel->_selectorCache.z > -1)
- z = (int16)GET_SEL32V(segMan, object, z);
- else
- z = 0;
-
- y -= z; // Subtract z offset
-
- ystep = (int16)GET_SEL32V(segMan, object, yStep);
-
- view = (int16)GET_SEL32V(segMan, object, view);
- int l = GET_SEL32V(segMan, object, loop);
- oldloop = loop = (l & 0x80) ? l - 256 : l;
- int c = GET_SEL32V(segMan, object, cel);
- oldcel = cel = (c & 0x80) ? c - 256 : c;
-
- Common::Point offset = Common::Point(0, 0);
-
- if (loop != oldloop) {
- loop = 0;
- PUT_SEL32V(segMan, object, loop, 0);
- debugC(2, kDebugLevelGraphics, "Resetting loop for %04x:%04x!\n", PRINT_REG(object));
- }
-
- if (cel != oldcel) {
- cel = 0;
- PUT_SEL32V(segMan, object, cel, 0);
- }
-
- gfxop_get_cel_parameters(s->gfx_state, view, loop, cel, &xsize, &ysize, &offset);
-
- xmod = offset.x;
- ymod = offset.y;
-
- xbase = x - xmod - (xsize >> 1);
- xend = xbase + xsize;
- yend = y /* - ymod */ + 1;
- ybase = yend - ystep;
-
- debugC(2, kDebugLevelBaseSetter, "(%d,%d)+/-(%d,%d), (%d x %d) -> (%d, %d) to (%d, %d)\n",
- x, y, xmod, ymod, xsize, ysize, xbase, ybase, xend, yend);
-
- retval.left = xbase;
- retval.top = ybase;
- retval.right = xend;
- retval.bottom = yend;
-
- return retval;
-}
-
static Common::Rect nsrect_clip(EngineState *s, int y, Common::Rect retval, int priority) {
int pri_top;
@@ -2820,3 +2761,5 @@ bool SciGui32::debugShowMap(int mapNo) {
}
} // End of namespace Sci
+
+#endif