[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
Max Horn
fingolfin at users.sourceforge.net
Sun Apr 27 11:58:17 CEST 2003
- Previous message: [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
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,1.2,1.3 101comp.h,1.2,1.3 102comp.h,1.2,1.3 10comp.h,1.2,1.3 11comp.h,1.2,1.3 12comp.h,1.2,1.3 13comp.h,1.2,1.3 14comp.h,1.2,1.3 15comp.h,1.2,1.3 16comp.h,1.2,1.3 17comp.h,1.2,1.3 18comp.h,1.2,1.3 19comp.h,1.2,1.3 1compact.h,1.2,1.3 20comp.h,1.2,1.3 21comp.h,1.2,1.3 22comp.h,1.2,1.3 23comp.h,1.2,1.3 24comp.h,1.2,1.3 25comp.h,1.2,1.3 26comp.h,1.2,1.3 27comp.h,1.2,1.3 28comp.h,1.2,1.3 29comp.h,1.2,1.3 2compact.h,1.2,1.3 30comp.h,1.2,1.3 31comp.h,1.2,1.3 32comp.h,1.2,1.3 33comp.h,1.2,1.3 34comp.h,1.2,1.3 36comp.h,1.2,1.3 37comp.h,1.2,1.3 38comp.h,1.2,1.3 39comp.h,1.2,1.3 3compact.h,1.2,1.3 40comp.h,1.2,1.3 41comp.h,1.2,1.3 42comp.h,1.2,1.3 44comp.h,1.2,1.3 45comp.h,1.2,1.3 46comp.h,1.2,1.3 47comp.h,1.2,1.3 48comp.h,1.2,1.3 4compact.h,1.2,1.3 5compact.h,1.2,1.3 65comp.h,1.2,1.3 66comp.h,1.2,1.3 67comp.h,1.2,1.3 68comp.h,1.2,1.3 69comp.h,1.2,1.3 70comp.h,1.2,1.3 71comp.h,1.2,1.3 72comp.h,1.2,1.3 73comp.h,1.2,1.3 74comp.h,1.2,1.3 75comp.h,1.2,1.3 76comp.h,1.2,1.3 77comp.h,1.2,1.3 78comp.h,1.2,1.3 79comp.h,1.2,1.3 80comp.h,1.2,1.3 81comp.h,1.2,1.3 82comp.h,1.2,1.3 85comp.h,1.2,1.3 90comp.h,1.2,1.3 91comp.h,1.2,1.3 92comp.h,1.2,1.3 93comp.h,1.2,1.3 94comp.h,1.2,1.3 95comp.h,1.2,1.3 96comp.h,1.2,1.3 9compact.h,1.2,1.3 linc_gen.h,1.2,1.3 lincmenu.h,1.2,1.3 objects.h,1.2,1.3 z_compac.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv26946
Modified Files:
charset.cpp charset.h script_v5.cpp script_v8.cpp string.cpp
Log Message:
drop shadow cleanup
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -d -r2.18 -r2.19
--- charset.cpp 27 Apr 2003 18:30:34 -0000 2.18
+++ charset.cpp 27 Apr 2003 18:49:25 -0000 2.19
@@ -173,6 +173,15 @@
setCurID(oldID);
}
+void CharsetRendererOld256::setColor(byte color)
+{
+ _color = color;
+ if (_vm->_features & GF_16COLOR) {
+ _dropShadow = ((_color & 0xF0) != 0);
+ _color &= 0x0f;
+ } else
+ _dropShadow = false;
+}
void CharsetRendererOld256::printChar(int chr) {
// Indy3 / Zak256
@@ -181,13 +190,9 @@
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) {
+ if (!_dropShadow) {
w = h = 8;
} else {
w = h = 9;
@@ -221,7 +226,7 @@
}
color = ((buffer & mask) != 0);
if (color) {
- if (drop_shadow)
+ if (_dropShadow)
*(dest_ptr + (y + 1) * _vm->_realWidth + x + 1) = 0;
*(dest_ptr + y * _vm->_realWidth + x) = _color;
}
@@ -236,7 +241,7 @@
if (_left > _strRight) {
_strRight = _left;
- if (drop_shadow)
+ if (_dropShadow)
_strRight++;
}
Index: charset.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.h,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- charset.h 7 Apr 2003 14:38:25 -0000 2.10
+++ charset.h 27 Apr 2003 18:49:26 -0000 2.11
@@ -37,8 +37,11 @@
int _right;
int _nbChars;
+protected:
byte _color;
+ bool _dropShadow;
+public:
bool _center;
bool _hasMask;
bool _ignoreCharsetMask;
@@ -53,7 +56,7 @@
virtual int getCharWidth(byte chr) = 0;
public:
- CharsetRenderer(Scumm *vm) : _vm(vm) {}
+ CharsetRenderer(Scumm *vm) : _vm(vm) { _dropShadow = false; }
virtual ~CharsetRenderer() {}
virtual void printChar(int chr) = 0;
@@ -65,6 +68,8 @@
int getCurID() { return _curId; }
virtual int getFontHeight() = 0;
+
+ virtual void setColor(byte color) { _color = color; }
};
class CharsetRendererCommon : public CharsetRenderer {
@@ -101,6 +106,8 @@
CharsetRendererOld256(Scumm *vm) : CharsetRendererCommon(vm) {}
void printChar(int chr);
+
+ void setColor(byte color);
};
class CharsetRendererNut : public CharsetRenderer {
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- script_v5.cpp 27 Apr 2003 18:30:35 -0000 1.47
+++ script_v5.cpp 27 Apr 2003 18:49:26 -0000 1.48
@@ -451,8 +451,6 @@
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);
@@ -2405,8 +2403,6 @@
break;
case 1: /* color */
_string[textSlot].color = getVarOrDirectByte(0x80);
- if (_features & GF_16COLOR)
- _string[textSlot].color &= 0x0f; // FIXME
break;
case 2: /* clipping */
_string[textSlot].right = getVarOrDirectWord(0x80);
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.149
retrieving revision 2.150
diff -u -d -r2.149 -r2.150
--- script_v8.cpp 26 Apr 2003 13:28:33 -0000 2.149
+++ script_v8.cpp 27 Apr 2003 18:49:26 -0000 2.150
@@ -587,7 +587,7 @@
_charset->_startLeft = _charset->_left = _blastTextQueue[i].xpos;
_charset->_right = _realWidth - 1;
_charset->_center = _blastTextQueue[i].center;
- _charset->_color = _blastTextQueue[i].color;
+ _charset->setColor(_blastTextQueue[i].color);
_charset->_disableOffsX = _charset->_firstChar = true;
_charset->setCurID(_blastTextQueue[i].charset);
_charset->_nextLeft = _blastTextQueue[i].xpos;
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- string.cpp 27 Apr 2003 18:30:32 -0000 1.104
+++ string.cpp 27 Apr 2003 18:49:27 -0000 1.105
@@ -143,7 +143,7 @@
_charset->_center = _string[0].center;
_charset->_right = _string[0].right;
- _charset->_color = _charsetColor;
+ _charset->setColor(_charsetColor);
if (!(_features & GF_AFTER_V3)) // FIXME
for (i = 0; i < 4; i++)
@@ -301,9 +301,9 @@
color = *buffer++;
color |= *buffer++ << 8;
if (color == 0xFF)
- _charset->_color = _charsetColor;
+ _charset->setColor(_charsetColor);
else
- _charset->_color = color;
+ _charset->setColor(color);
break;
case 13:
buffer += 2;
@@ -356,7 +356,7 @@
_charset->_startLeft = _charset->_left = _string[0].xpos;
_charset->_right = _realWidth - 1;
_charset->_center = _string[0].center;
- _charset->_color = _string[0].color;
+ _charset->setColor(_string[0].color);
_charset->_disableOffsX = _charset->_firstChar = true;
_charset->setCurID(_string[0].charset);
_charset->_nextLeft = _string[0].xpos;
@@ -410,7 +410,7 @@
_charset->_startLeft = _charset->_left = _string[a].xpos;
_charset->_right = _string[a].right;
_charset->_center = _string[a].center;
- _charset->_color = _string[a].color;
+ _charset->setColor(_string[a].color);
_charset->_disableOffsX = _charset->_firstChar = true;
_charset->setCurID(_string[a].charset);
@@ -479,9 +479,9 @@
color = buf[i] + (buf[i + 1] << 8);
i += 2;
if (color == 0xFF)
- _charset->_color = _string[a].color;
+ _charset->setColor(_string[a].color);
else
- _charset->_color = color;
+ _charset->setColor(color);
break;
}
} else {
- Previous message: [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
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,1.2,1.3 101comp.h,1.2,1.3 102comp.h,1.2,1.3 10comp.h,1.2,1.3 11comp.h,1.2,1.3 12comp.h,1.2,1.3 13comp.h,1.2,1.3 14comp.h,1.2,1.3 15comp.h,1.2,1.3 16comp.h,1.2,1.3 17comp.h,1.2,1.3 18comp.h,1.2,1.3 19comp.h,1.2,1.3 1compact.h,1.2,1.3 20comp.h,1.2,1.3 21comp.h,1.2,1.3 22comp.h,1.2,1.3 23comp.h,1.2,1.3 24comp.h,1.2,1.3 25comp.h,1.2,1.3 26comp.h,1.2,1.3 27comp.h,1.2,1.3 28comp.h,1.2,1.3 29comp.h,1.2,1.3 2compact.h,1.2,1.3 30comp.h,1.2,1.3 31comp.h,1.2,1.3 32comp.h,1.2,1.3 33comp.h,1.2,1.3 34comp.h,1.2,1.3 36comp.h,1.2,1.3 37comp.h,1.2,1.3 38comp.h,1.2,1.3 39comp.h,1.2,1.3 3compact.h,1.2,1.3 40comp.h,1.2,1.3 41comp.h,1.2,1.3 42comp.h,1.2,1.3 44comp.h,1.2,1.3 45comp.h,1.2,1.3 46comp.h,1.2,1.3 47comp.h,1.2,1.3 48comp.h,1.2,1.3 4compact.h,1.2,1.3 5compact.h,1.2,1.3 65comp.h,1.2,1.3 66comp.h,1.2,1.3 67comp.h,1.2,1.3 68comp.h,1.2,1.3 69comp.h,1.2,1.3 70comp.h,1.2,1.3 71comp.h,1.2,1.3 72comp.h,1.2,1.3 73comp.h,1.2,1.3 74comp.h,1.2,1.3 75comp.h,1.2,1.3 76comp.h,1.2,1.3 77comp.h,1.2,1.3 78comp.h,1.2,1.3 79comp.h,1.2,1.3 80comp.h,1.2,1.3 81comp.h,1.2,1.3 82comp.h,1.2,1.3 85comp.h,1.2,1.3 90comp.h,1.2,1.3 91comp.h,1.2,1.3 92comp.h,1.2,1.3 93comp.h,1.2,1.3 94comp.h,1.2,1.3 95comp.h,1.2,1.3 96comp.h,1.2,1.3 9compact.h,1.2,1.3 linc_gen.h,1.2,1.3 lincmenu.h,1.2,1.3 objects.h,1.2,1.3 z_compac.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list