aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-11-06 08:56:50 +0000
committerTravis Howell2005-11-06 08:56:50 +0000
commite8e1d462e083a343d1612357d82eac1388063790 (patch)
tree9a4eeed3075fd4d0e508930b375d099bee37e3d9
parentf21a7e44f20751159e60a7bdeee16e6e0d66fb26 (diff)
downloadscummvm-rg350-e8e1d462e083a343d1612357d82eac1388063790.tar.gz
scummvm-rg350-e8e1d462e083a343d1612357d82eac1388063790.tar.bz2
scummvm-rg350-e8e1d462e083a343d1612357d82eac1388063790.zip
Cleanup.
svn-id: r19482
-rw-r--r--scumm/charset.cpp11
-rw-r--r--scumm/charset.h3
2 files changed, 7 insertions, 7 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index f94470b2b2..3b272a6353 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -220,7 +220,7 @@ CharsetRenderer::~CharsetRenderer() {
}
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 @@ void CharsetRendererCommon::setCurID(byte id) {
else
_fontPtr += 29;
- //_bitDepth = _fontPtr[0];
+ _bitDepth = _fontPtr[0];
_fontHeight = _fontPtr[1];
_numChars = READ_LE_UINT16(_fontPtr + 2);
}
@@ -253,7 +253,7 @@ void CharsetRendererV3::setCurID(byte id) {
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 @@ void CharsetRendererClassic::printChar(int chr) {
_vm->_charsetColorMap[1] = _color;
- int type = *_fontPtr;
if (is2byte) {
enableShadow(true);
charPtr = _vm->get2byteCharPtr(chr);
@@ -1410,7 +1409,7 @@ void CharsetRendererClassic::printChar(int chr) {
_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 @@ void CharsetRendererClassic::printChar(int chr) {
}
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);
diff --git a/scumm/charset.h b/scumm/charset.h
index ab4128eaef..32a326cc44 100644
--- a/scumm/charset.h
+++ b/scumm/charset.h
@@ -100,8 +100,9 @@ public:
class CharsetRendererCommon : public CharsetRenderer {
protected:
byte *_fontPtr;
- int _numChars;
+ int _bitDepth;
int _fontHeight;
+ int _numChars;
enum ShadowMode {
kNoShadowMode,