[Scummvm-cvs-logs] SF.net SVN: scummvm:[47002] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jan 5 01:12:31 CET 2010
Revision: 47002
http://scummvm.svn.sourceforge.net/scummvm/?rev=47002&view=rev
Author: m_kiewitz
Date: 2010-01-05 00:12:31 +0000 (Tue, 05 Jan 2010)
Log Message:
-----------
SCI: adjusting cel drawing according to left/top of plane
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/script.cpp
scummvm/trunk/engines/sci/engine/vm.h
scummvm/trunk/engines/sci/gui/gui.cpp
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2010-01-04 23:39:22 UTC (rev 47001)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2010-01-05 00:12:31 UTC (rev 47002)
@@ -241,6 +241,9 @@
#ifdef ENABLE_SCI32
FIND_SELECTOR(data);
FIND_SELECTOR(picture);
+ FIND_SELECTOR(plane);
+ FIND_SELECTOR(top);
+ FIND_SELECTOR(left);
#endif
}
Modified: scummvm/trunk/engines/sci/engine/vm.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.h 2010-01-04 23:39:22 UTC (rev 47001)
+++ scummvm/trunk/engines/sci/engine/vm.h 2010-01-05 00:12:31 UTC (rev 47002)
@@ -201,6 +201,8 @@
Selector picture; // Used to hold the picture ID for SCI32 pictures
Selector plane;
+ Selector top;
+ Selector left;
#endif
};
Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp 2010-01-04 23:39:22 UTC (rev 47001)
+++ scummvm/trunk/engines/sci/gui/gui.cpp 2010-01-05 00:12:31 UTC (rev 47002)
@@ -880,6 +880,9 @@
if (priority == -1)
continue;
+ int16 planeTop = GET_SEL32V(_s->_segMan, planeObj, top);
+ int16 planeLeft = GET_SEL32V(_s->_segMan, planeObj, left);
+
for (uint32 itemNr = 0; itemNr < _screenItems.size(); itemNr++) {
reg_t viewObj = _screenItems[itemNr];
reg_t planeOfItem = GET_SEL32(_s->_segMan, viewObj, plane);
@@ -892,6 +895,9 @@
priority = GET_SEL32V(_s->_segMan, viewObj, priority);
//int16 signal = GET_SEL32V(_s->_segMan, viewObj, signal);
+ leftPos += planeLeft;
+ topPos += planeTop;
+
// Theoretically, leftPos and topPos should be sane
// Apparently, sometimes they're not, therefore I'm adding some sanity checks here so that
// the hack underneath does not try and draw cels outside the screen coordinates
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