[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.272,1.273 scumm.cpp,1.370,1.371 scumm.h,1.543,1.544 string.cpp,1.269,1.270
kirben
kirben at users.sourceforge.net
Fri Mar 18 07:05:37 CET 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19696/scumm
Modified Files:
script_v5.cpp scumm.cpp scumm.h string.cpp
Log Message:
Add string height override for loom
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -d -r1.272 -r1.273
--- script_v5.cpp 11 Mar 2005 01:09:58 -0000 1.272
+++ script_v5.cpp 18 Mar 2005 15:04:11 -0000 1.273
@@ -2641,9 +2641,10 @@
break;
case 3: // SO_ERASE
{
- int a = getVarOrDirectWord(PARAM_1);
- int b = getVarOrDirectWord(PARAM_2);
- warning("ScummEngine_v5::decodeParseString: Unhandled case 3: %d, %d", a, b);
+ int w = getVarOrDirectWord(PARAM_1);
+ int h = getVarOrDirectWord(PARAM_2);
+ // restoreCharsetBg(xpos, xpos + w, ypos, ypos + h)
+ error("ScummEngine_v5::decodeParseString: Unhandled case 3: %d, %d", w, h);
}
break;
case 4: // SO_CENTER
@@ -2652,10 +2653,7 @@
break;
case 6: // SO_LEFT
if (_version == 3) {
- // FIXME: this value seems to be some kind of override
- // for text spacing?!?
- /* int a = */ getVarOrDirectWord(PARAM_1);
-
+ _string[textSlot].height = getVarOrDirectWord(PARAM_1);
} else {
_string[textSlot].center = false;
_string[textSlot].overhead = false;
@@ -2715,6 +2713,7 @@
if (_version <= 3) {
_string[textSlot]._default.xpos = _string[textSlot].xpos;
_string[textSlot]._default.ypos = _string[textSlot].ypos;
+ _string[textSlot]._default.height = _string[textSlot].height;
_string[textSlot]._default.color = _string[textSlot].color;
}
return;
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -d -r1.370 -r1.371
--- scumm.cpp 16 Mar 2005 03:20:31 -0000 1.370
+++ scumm.cpp 18 Mar 2005 15:04:11 -0000 1.371
@@ -1516,6 +1516,7 @@
_string[i]._default.ypos = 5;
}
_string[i]._default.right = _screenWidth - 1;
+ _string[i]._default.height = 0;
_string[i]._default.color = 0xF;
_string[i]._default.center = 0;
_string[i]._default.charset = 0;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.543
retrieving revision 1.544
diff -u -d -r1.543 -r1.544
--- scumm.h 16 Mar 2005 03:20:32 -0000 1.543
+++ scumm.h 18 Mar 2005 15:04:36 -0000 1.544
@@ -249,6 +249,7 @@
int16 xpos;
int16 ypos;
int16 right;
+ int16 height;
byte color;
byte charset;
bool center;
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- string.cpp 13 Mar 2005 04:00:59 -0000 1.269
+++ string.cpp 18 Mar 2005 15:04:37 -0000 1.270
@@ -234,7 +234,11 @@
if (_charset->_center) {
_charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2;
}
- _charset->_nextTop += _charset->getFontHeight();
+ if (_string[0].height) {
+ _charset->_nextTop += _string[0].height;
+ } else {
+ _charset->_nextTop += _charset->getFontHeight();
+ }
if (_version > 3) {
// FIXME - is this really needed?
_charset->_disableOffsX = true;
More information about the Scummvm-git-logs
mailing list