aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/gfx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/gfx.cpp')
-rw-r--r--engines/sci/graphics/gfx.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/sci/graphics/gfx.cpp b/engines/sci/graphics/gfx.cpp
index 99aed7409a..3a3d39bc7d 100644
--- a/engines/sci/graphics/gfx.cpp
+++ b/engines/sci/graphics/gfx.cpp
@@ -68,6 +68,8 @@ void Gfx::init(Text *text) {
_menuBarRect = Common::Rect(0, 0, _screen->getWidth(), 9);
_EGAdrawingVisualize = false;
+
+ priorityBandsMemoryActive = false;
}
void Gfx::purgeCache() {
@@ -519,6 +521,24 @@ void Gfx::PriorityBandsInit(byte *data) {
_priorityBands[i++] = inx;
}
+// Gets used by picture class to remember priority bands data from sci1.1 pictures that need to get applied when
+// transitioning to that picture
+void Gfx::PriorityBandsRemember(byte *data) {
+ int bandNo;
+ for (bandNo = 0; bandNo < 14; bandNo++) {
+ priorityBandsMemory[bandNo] = READ_LE_UINT16(data);
+ data += 2;
+ }
+ priorityBandsMemoryActive = true;
+}
+
+void Gfx::PriorityBandsRecall() {
+ if (priorityBandsMemoryActive) {
+ PriorityBandsInit((byte *)&priorityBandsMemory);
+ priorityBandsMemoryActive = false;
+ }
+}
+
byte Gfx::CoordinateToPriority(int16 y) {
if (y < _priorityTop)
return _priorityBands[_priorityTop];