[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.57,1.58 boxes.cpp,1.10,1.11 script_v8.cpp,2.112,2.113 scumm.h,1.129,1.130
Max Horn
fingolfin at users.sourceforge.net
Mon Jan 13 06:05:05 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv16783
Modified Files:
actor.cpp boxes.cpp script_v8.cpp scumm.h
Log Message:
fixed COMI actor scaling, again
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- actor.cpp 13 Jan 2003 01:29:44 -0000 1.57
+++ actor.cpp 13 Jan 2003 14:04:39 -0000 1.58
@@ -368,6 +368,13 @@
return;
scale = _vm->getScale(walkbox, x, y);
+ if (_vm->_features & GF_AFTER_V8) {
+ // At least in COMI, scale values are clipped to range 1-255
+ if (scale < 1)
+ scale = 1;
+ else if (scale > 255)
+ scale = 255;
+ }
// FIXME - Hack for The Dig 'Tomb' (room 88)
// Otherwise walking to the far-left door causes the actor
@@ -393,12 +400,6 @@
}
if (scale > 255) {
- if (_vm->_features & GF_AFTER_V8) {
- // In COMI, the scale values often are bigger than 255;
- // however, the original engine seems to just cap them at 255,
- // hence we do the same (the result looks correct, too);
- scale = 255;
- } else
warning("Actor %d at %d, scale %d out of range", number, y, scale);
}
scalex = (byte)scale;
Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- boxes.cpp 13 Jan 2003 13:37:43 -0000 1.10
+++ boxes.cpp 13 Jan 2003 14:04:40 -0000 1.11
@@ -128,6 +128,12 @@
b->old.scale = TO_LE_16(scale);
}
+void Scumm::setBoxScaleSlot(int box, int slot)
+{
+ Box *b = getBoxBaseAddr(box);
+ b->v8.scaleSlot = TO_LE_32(slot);
+}
+
int Scumm::getScale(int box, int x, int y)
{
Box *ptr = getBoxBaseAddr(box);
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.112
retrieving revision 2.113
diff -u -d -r2.112 -r2.113
--- script_v8.cpp 13 Jan 2003 01:29:45 -0000 2.112
+++ script_v8.cpp 13 Jan 2003 14:04:40 -0000 2.113
@@ -1373,11 +1373,10 @@
case 15: // setVideoFrameRate
// not used anymore (was smush frame rate)
break;
- case 20: // setBoxScale
- setBoxScale(args[1], args[2]);
+ case 20: // setBoxScaleSlot
+ setBoxScaleSlot(args[1], args[2]);
break;
case 21: // setScaleSlot
- warning("o8_kernelSetFunctions: setScaleSlot(%d, %d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
setScaleSlot(args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
break;
case 22: // setBannerColors
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- scumm.h 13 Jan 2003 01:29:45 -0000 1.129
+++ scumm.h 13 Jan 2003 14:04:41 -0000 1.130
@@ -864,7 +864,7 @@
};
ScaleSlot _scaleSlots[20]; // FIXME - not sure if this limit is right, but based on my observations it is
void setScaleSlot(int slot, int x1, int y1, int scale1, int x2, int y2, int scale2);
-
+ void setBoxScaleSlot(int box, int slot);
byte getNumBoxes();
byte *getBoxMatrixBaseAddr();
More information about the Scummvm-git-logs
mailing list