[Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.103,1.104 charset.cpp,2.17,2.18 script_v5.cpp,1.46,1.47
Max Horn
fingolfin at users.sourceforge.net
Sun Apr 27 11:31:10 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.103,2.104
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.18,2.19 charset.h,2.10,2.11 script_v5.cpp,1.47,1.48 script_v8.cpp,2.149,2.150 string.cpp,1.104,1.105
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv19153
Modified Files:
string.cpp charset.cpp script_v5.cpp
Log Message:
Patch #728483: EGA LOOM: More text-drawing hackery
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- string.cpp 26 Apr 2003 16:51:03 -0000 1.103
+++ string.cpp 27 Apr 2003 18:30:32 -0000 1.104
@@ -188,7 +188,7 @@
_talkDelay = _defaultTalkDelay;
if (!_keepText) {
- if (_features & GF_AFTER_V3) {
+ if (_features & GF_AFTER_V3 && _gameId != GID_LOOM) {
gdi._mask_left = _string[0].xpos;
gdi._mask_top = _string[0].ypos;
gdi._mask_bottom = _string[0].ypos + 8;
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -d -r2.17 -r2.18
--- charset.cpp 7 Apr 2003 14:38:24 -0000 2.17
+++ charset.cpp 27 Apr 2003 18:30:34 -0000 2.18
@@ -181,6 +181,18 @@
unsigned int buffer = 0, mask = 0, x = 0, y = 0;
unsigned char color;
+ // FIXME: When playing with the original interpreter, Much of the
+ // text in Loom is drawn with a drop-shadow. But is it all of it, or
+ // just some? It's hard to tell with a black background.
+ bool drop_shadow = (_vm->_gameId == GID_LOOM);
+ int w, h;
+
+ if (!drop_shadow) {
+ w = h = 8;
+ } else {
+ w = h = 9;
+ }
+
_vm->checkRange(_vm->_maxCharsets - 1, 0, _curId, "Printing with bad charset %d");
if ((vs = _vm->findVirtScreen(_top)) == NULL)
@@ -199,7 +211,7 @@
char_ptr = _fontPtr + chr * 8;
dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left;
- _vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0);
+ _vm->updateDirtyRect(vs->number, _left, _left + w, _top - vs->topline, _top - vs->topline + h, 0);
for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) {
@@ -208,19 +220,28 @@
mask = 0x80;
}
color = ((buffer & mask) != 0);
- if (color)
+ if (color) {
+ if (drop_shadow)
+ *(dest_ptr + (y + 1) * _vm->_realWidth + x + 1) = 0;
*(dest_ptr + y * _vm->_realWidth + x) = _color;
+ }
}
}
// FIXME
+ if (_left < _strLeft)
+ _strLeft = _left;
+
_left += getCharWidth(chr);
- if (_left > _strRight)
+ if (_left > _strRight) {
_strRight = _left;
+ if (drop_shadow)
+ _strRight++;
+ }
- if (_top + 8 > _strBottom)
- _strBottom = _top + 8;
+ if (_top + h > _strBottom)
+ _strBottom = _top + h;
}
void CharsetRendererClassic::printChar(int chr) {
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- script_v5.cpp 27 Apr 2003 16:12:30 -0000 1.46
+++ script_v5.cpp 27 Apr 2003 18:30:35 -0000 1.47
@@ -451,6 +451,8 @@
break;
case 12: /* talk color */
a->talkColor = getVarOrDirectByte(0x80);
+ if (_features & GF_16COLOR)
+ a->talkColor &= 0x0f; // FIXME
break;
case 13: /* name */
loadPtrToResource(rtActorName, a->number, NULL);
@@ -2482,9 +2484,14 @@
// FIXME: Store positions, this is needed for Indy3 (Grail Diary)..
// I don't believe this is the correct fix, may cause other problems
// later in the game.
- if ((_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
+ //
+ // It's also needed for Loom, or the lines Bobbin
+ // speaks during the intro are put at position 0,0.
+ // In addition, Loom needs to remember the text colour.
+ if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) {
_string[textSlot].t_xpos = _string[textSlot].xpos;
_string[textSlot].t_ypos = _string[textSlot].ypos;
+ _string[textSlot].t_color = _string[textSlot].color;
}
_scriptPointer = _messagePtr;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.103,2.104
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.18,2.19 charset.h,2.10,2.11 script_v5.cpp,1.47,1.48 script_v8.cpp,2.149,2.150 string.cpp,1.104,1.105
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list