[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.116,1.117
Max Horn
fingolfin at users.sourceforge.net
Thu Jul 4 03:07:08 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv869
Modified Files:
script_v1.cpp
Log Message:
fixed monkeyvga crasher that occured at least in the german version, but potentially could show up in others, too - this was supposed to me in my commit from yesterday, and contains the actual fix, but was somehow left out
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- script_v1.cpp 25 Jun 2002 02:04:43 -0000 1.116
+++ script_v1.cpp 4 Jul 2002 10:06:53 -0000 1.117
@@ -2170,7 +2170,21 @@
error("Can't set name of object %d", obj);
name = getObjOrActorName(obj);
- size = getResourceDataSize(name);
+
+ if (_features & GF_SMALL_HEADER) {
+ // FIXME this is hack to make MonkeyVGA work. needed at least for the german
+ // version but possibly for others as well. There is no apparent other
+ // way to determine the available space that works in all cases...
+ byte *objptr;
+ byte offset = 0;
+
+ objptr = getOBCDFromObject(obj);
+ offset = READ_LE_UINT16(objptr + 18);
+ size = READ_LE_UINT16(objptr) - offset;
+ } else {
+ size = getResourceDataSize(name);
+ }
+
i = 0;
while ((a = fetchScriptByte()) != 0) {
More information about the Scummvm-git-logs
mailing list