aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui32/gui32.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-11-04 11:52:11 +0000
committerFilippos Karapetis2009-11-04 11:52:11 +0000
commitf755311114121ce67efc17db4a67996382affc47 (patch)
treed7a7e6785328e372b71f43d7879e7b79385c5468 /engines/sci/gui32/gui32.cpp
parentf5d1ca32f2626ae1eb6c6c598e129698123a3aab (diff)
downloadscummvm-rg350-f755311114121ce67efc17db4a67996382affc47.tar.gz
scummvm-rg350-f755311114121ce67efc17db4a67996382affc47.tar.bz2
scummvm-rg350-f755311114121ce67efc17db4a67996382affc47.zip
priority_first and priority_last are not used by the new drawing code, thus the new code didn't handle priority changes by kGraph()
svn-id: r45658
Diffstat (limited to 'engines/sci/gui32/gui32.cpp')
-rw-r--r--engines/sci/gui32/gui32.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 5b6900f6eb..edb901054c 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -75,6 +75,18 @@ namespace Sci {
_s->visual->draw(gfxw_point_zero); \
gfxop_update(_s->gfx_state);
+#define SCI0_VIEW_PRIORITY_14_ZONES(y) (((y) < s->priority_first)? 0 : (((y) >= s->priority_last)? 14 : 1\
+ + ((((y) - s->priority_first) * 14) / (s->priority_last - s->priority_first))))
+
+#define SCI0_PRIORITY_BAND_FIRST_14_ZONES(nr) ((((nr) == 0)? 0 : \
+ ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 14)))
+
+#define SCI0_VIEW_PRIORITY(y) (((y) < s->priority_first)? 0 : (((y) >= s->priority_last)? 14 : 1\
+ + ((((y) - s->priority_first) * 15) / (s->priority_last - s->priority_first))))
+
+#define SCI0_PRIORITY_BAND_FIRST(nr) ((((nr) == 0)? 0 : \
+ ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 15)))
+
#if 0
// Used for debugging
#define FULL_INSPECTION()\
@@ -2996,6 +3008,11 @@ void SciGui32::moveCursor(Common::Point pos) {
gfxop_get_event(_s->gfx_state, SCI_EVT_PEEK);
}
+void SciGui32::modifyPriorityBands(int top, int bottom) {
+ _s->priority_first = top;
+ _s->priority_last = bottom;
+}
+
bool SciGui32::debugUndither(bool flag) {
return true;
}