[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.158,2.159 charset.h,2.49,2.50

kirben kirben at users.sourceforge.net
Sun Nov 6 00:57:16 CET 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20563/scumm

Modified Files:
	charset.cpp charset.h 
Log Message:

Cleanup.


Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.158
retrieving revision 2.159
diff -u -d -r2.158 -r2.159
--- charset.cpp	5 Nov 2005 13:05:52 -0000	2.158
+++ charset.cpp	6 Nov 2005 08:56:50 -0000	2.159
@@ -220,7 +220,7 @@
 }
 
 CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
-	: CharsetRenderer(vm), _numChars(0), _fontHeight(0) {
+	: CharsetRenderer(vm), _bitDepth(0), _fontHeight(0), _numChars(0) {
 	_shadowMode = kNoShadowMode;
 	_shadowColor = 0;
 }
@@ -239,7 +239,7 @@
 	else
 		_fontPtr += 29;
 
-	//_bitDepth = _fontPtr[0];
+	_bitDepth = _fontPtr[0];
 	_fontHeight = _fontPtr[1];
 	_numChars = READ_LE_UINT16(_fontPtr + 2);
 }
@@ -253,7 +253,7 @@
 	if (_fontPtr == 0)
 		error("CharsetRendererCommon::setCurID: charset %d not found!", id);
 
-	//_bitDepth = 1;
+	_bitDepth = 1;
 	_numChars = _fontPtr[4];
 	_fontHeight = _fontPtr[5];
 
@@ -1332,7 +1332,6 @@
 
 	_vm->_charsetColorMap[1] = _color;
 
-	int type = *_fontPtr;
 	if (is2byte) {
 		enableShadow(true);
 		charPtr = _vm->get2byteCharPtr(chr);
@@ -1410,7 +1409,7 @@
 		_textScreenID = vs->number;
 	}
 
-	if ((_vm->_heversion >= 71 && type >= 8) || (_vm->_heversion >= 90 && type == 0)) {
+	if ((_vm->_heversion >= 71 && _bitDepth >= 8) || (_vm->_heversion >= 90 && _bitDepth == 0)) {
 #ifndef DISABLE_HE
 		if (_ignoreCharsetMask || !vs->hasTwoBuffers) {
 			dstPtr = vs->getPixels(0, 0);
@@ -1423,7 +1422,7 @@
 		}
 
 		Common::Rect rScreen(vs->w, vs->h);
-		if (type >= 8) {
+		if (_bitDepth >= 8) {
 			byte imagePalette[256];
 			memset(imagePalette, 0, sizeof(imagePalette));
 			memcpy(imagePalette, _vm->_charsetColorMap, 16);

Index: charset.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.h,v
retrieving revision 2.49
retrieving revision 2.50
diff -u -d -r2.49 -r2.50
--- charset.h	4 Nov 2005 13:09:57 -0000	2.49
+++ charset.h	6 Nov 2005 08:56:50 -0000	2.50
@@ -100,8 +100,9 @@
 class CharsetRendererCommon : public CharsetRenderer {
 protected:
 	byte *_fontPtr;
-	int _numChars;
+	int _bitDepth;
 	int _fontHeight;
+	int _numChars;
 
 	enum ShadowMode {
 		kNoShadowMode,





More information about the Scummvm-git-logs mailing list