diff options
| author | Max Horn | 2002-12-25 21:14:26 +0000 | 
|---|---|---|
| committer | Max Horn | 2002-12-25 21:14:26 +0000 | 
| commit | d808e4da1f419ebcf8fb1a7554b09a867ae973ef (patch) | |
| tree | 51529273eb43a603569e5b42ff77337efca9db5b | |
| parent | fca9ec09e7709ff4400d2a9a7fd76f4f21781006 (diff) | |
| download | scummvm-rg350-d808e4da1f419ebcf8fb1a7554b09a867ae973ef.tar.gz scummvm-rg350-d808e4da1f419ebcf8fb1a7554b09a867ae973ef.tar.bz2 scummvm-rg350-d808e4da1f419ebcf8fb1a7554b09a867ae973ef.zip | |
cleanup
svn-id: r6148
| -rw-r--r-- | scumm/charset.cpp | 25 | ||||
| -rw-r--r-- | scumm/charset.h | 14 | ||||
| -rw-r--r-- | scumm/string.cpp | 8 | 
3 files changed, 23 insertions, 24 deletions
| diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 0ae52733a4..23bbd1847a 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -225,6 +225,7 @@ void CharsetRenderer::printCharOld(int chr)  void CharsetRenderer::printChar(int chr)  {  	int width, height; +	int offsX, offsY;  	int d;  	VirtScreen *vs; @@ -239,14 +240,14 @@ void CharsetRenderer::printChar(int chr)  	_bpp = *_fontPtr;  	_colorMap[1] = _color; -	_charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4); +	uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4); -	if (!_charOffs) +	if (!charOffs)  		return; -	assert(_charOffs < 0x10000); +	assert(charOffs < 0x10000); -	_charPtr = _fontPtr + _charOffs; +	_charPtr = _fontPtr + charOffs;  	width = _charPtr[0];  	height = _charPtr[1]; @@ -258,25 +259,25 @@ void CharsetRenderer::printChar(int chr)  	}  	if (_disableOffsX) { -		_offsX = 0; +		offsX = 0;  	} else {  		d = _charPtr[2];  		if (d >= 0x80)  			d -= 0x100; -		_offsX = d; +		offsX = d;  	}  	d = _charPtr[3];  	if (d >= 0x80)  		d -= 0x100; -	_offsY = d; +	offsY = d; -	_top += _offsY; -	_left += _offsX; +	_top += offsY; +	_left += offsX;  	if (_left + width > _right + 1 || _left < 0) {  		_left += width; -		_top -= _offsY; +		_top -= offsY;  		return;  	} @@ -299,7 +300,7 @@ void CharsetRenderer::printChar(int chr)  	int drawTop = _top - vs->topline;  	if (drawTop < 0)  		drawTop = 0; -	int bottom = drawTop + height + _offsY; +	int bottom = drawTop + height + offsY;  	_vm->updateDirtyRect(vs->number, _left, _left + width, drawTop, bottom, 0); @@ -334,7 +335,7 @@ void CharsetRenderer::printChar(int chr)  	if (_top + height > _strBottom)  		_strBottom = _top + height; -	_top -= _offsY; +	_top -= offsY;  }  void CharsetRenderer::drawBits(VirtScreen *vs, byte *dst, byte *mask, int drawTop, int width, int height) diff --git a/scumm/charset.h b/scumm/charset.h index 9bd786da63..98af8f954b 100644 --- a/scumm/charset.h +++ b/scumm/charset.h @@ -33,19 +33,19 @@ public:  	int _top;  	int _left, _startLeft; -	byte _center;  	int _right; +  	byte _color; +	byte _colorMap[16]; + +	bool _center;  	bool _hasMask; +	bool _ignoreCharsetMask;  	bool _blitAlso; -	 -	int _bufPos;  	bool _firstChar;  	bool _disableOffsX; -	bool _ignoreCharsetMask; - -	byte _colorMap[16]; +	int _bufPos;  	byte _buffer[512];	// TODO - would be really nice to get rid of this  protected: @@ -55,9 +55,7 @@ protected:  	byte *_fontPtr;  	byte _bpp; -	uint32 _charOffs;  	byte *_charPtr; -	int _offsX, _offsY;  	void drawBits(VirtScreen *vs, byte *dst, byte *mask, int drawTop, int width, int height); diff --git a/scumm/string.cpp b/scumm/string.cpp index a956194be0..db5d19488d 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -242,13 +242,13 @@ void Scumm::CHARSET_1()  		if (c != 0xFF) {  			_charset->_left = _charset->_nextLeft;  			_charset->_top = _charset->_nextTop; -			if (_features & GF_OLD256) +			if (_features & GF_OLD256) {  				_charset->printCharOld(c); -			else if (!(_features & GF_AFTER_V6)) { -				if (!(_haveMsg == 0xFE && _noSubtitles)) +			} else if (_features & GF_AFTER_V6) { +				if (!_noSubtitles || (_haveMsg != 0xFE && _haveMsg != 0xFF))  					_charset->printChar(c);  			} else { -				if (!((_haveMsg == 0xFE || _haveMsg == 0xFF) && _noSubtitles)) +				if (!_noSubtitles || _haveMsg != 0xFE)  					_charset->printChar(c);  			} | 
