[Scummvm-cvs-logs] SF.net SVN: scummvm:[47380] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jan 19 15:26:23 CET 2010
Revision: 47380
http://scummvm.svn.sourceforge.net/scummvm/?rev=47380&view=rev
Author: m_kiewitz
Date: 2010-01-19 14:26:21 +0000 (Tue, 19 Jan 2010)
Log Message:
-----------
SCI: implemented priority bands support for sci1.1 picture resources, fixed lb2, kq6
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/gfx.cpp
scummvm/trunk/engines/sci/graphics/gfx.h
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/picture.cpp
Modified: scummvm/trunk/engines/sci/graphics/gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gfx.cpp 2010-01-19 11:30:41 UTC (rev 47379)
+++ scummvm/trunk/engines/sci/graphics/gfx.cpp 2010-01-19 14:26:21 UTC (rev 47380)
@@ -68,6 +68,8 @@
_menuBarRect = Common::Rect(0, 0, _screen->getWidth(), 9);
_EGAdrawingVisualize = false;
+
+ priorityBandsMemoryActive = false;
}
void Gfx::purgeCache() {
@@ -519,6 +521,24 @@
_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];
Modified: scummvm/trunk/engines/sci/graphics/gfx.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gfx.h 2010-01-19 11:30:41 UTC (rev 47379)
+++ scummvm/trunk/engines/sci/graphics/gfx.h 2010-01-19 14:26:21 UTC (rev 47380)
@@ -94,6 +94,8 @@
void PriorityBandsInit(int16 bandCount, int16 top, int16 bottom);
void PriorityBandsInit(byte *data);
+ void PriorityBandsRemember(byte *data);
+ void PriorityBandsRecall();
byte CoordinateToPriority(int16 y);
int16 PriorityToCoordinate(byte priority);
@@ -128,6 +130,9 @@
// true means make EGA picture drawing visible
bool _EGAdrawingVisualize;
+
+ byte priorityBandsMemory[14];
+ bool priorityBandsMemoryActive;
};
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-19 11:30:41 UTC (rev 47379)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-19 14:26:21 UTC (rev 47380)
@@ -634,6 +634,9 @@
_transitions->doit(picRect);
if (previousCursorState)
_cursor->show();
+
+ // We set SCI1.1 priority band information here
+ _gfx->PriorityBandsRecall();
}
void SciGui::animate(reg_t listReference, bool cycle, int argc, reg_t *argv) {
Modified: scummvm/trunk/engines/sci/graphics/picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/picture.cpp 2010-01-19 11:30:41 UTC (rev 47379)
+++ scummvm/trunk/engines/sci/graphics/picture.cpp 2010-01-19 14:26:21 UTC (rev 47380)
@@ -111,6 +111,9 @@
// process vector data
drawVectorData(inbuffer + vector_dataPos, vector_size);
+
+ // Remember priority band information for later
+ _gfx->PriorityBandsRemember(inbuffer + 40);
}
#ifdef ENABLE_SCI32
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list