diff options
| author | Max Horn | 2003-06-06 00:16:34 +0000 | 
|---|---|---|
| committer | Max Horn | 2003-06-06 00:16:34 +0000 | 
| commit | 067609c83231904ae2268cc373a2ba924b539c0a (patch) | |
| tree | b5210afb9fd53ef32a1234ab1364af79442e4ba1 | |
| parent | 74110342157470ce4fda159b6f9327077da783ab (diff) | |
| download | scummvm-rg350-067609c83231904ae2268cc373a2ba924b539c0a.tar.gz scummvm-rg350-067609c83231904ae2268cc373a2ba924b539c0a.tar.bz2 scummvm-rg350-067609c83231904ae2268cc373a2ba924b539c0a.zip  | |
cleanup
svn-id: r8341
| -rw-r--r-- | scumm/gfx.cpp | 28 | ||||
| -rw-r--r-- | scumm/scummvm.cpp | 6 | 
2 files changed, 20 insertions, 14 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 73dbf90e2c..f35d423c7e 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1329,24 +1329,30 @@ StripTable *Gdi::generateStripTable(const byte *src, int width, int height, Stri  }  void Gdi::drawStripC64Background(byte *dst, int stripnr, int height) { -	for(int y = 0; y < (height >> 3); y++) { -		_C64Colors[3] = (_C64ColorMap[y + stripnr * (height >> 3)] & 7); -		for(int i = 0; i < 8; i++) { -			for(int j = 7; j >= 0; j--) { -				*(dst + (7 - j) + (y * 8 + i) * _vm->_screenWidth) = -					_C64Colors[((_C64CharMap[_C64PicMap[y + stripnr * (height >> 3)] * 8 + i] >> (j & 6)) & 3)]; +	int y, i, j; +	height >>= 3; +	for (y = 0; y < height; y++) { +		_C64Colors[3] = (_C64ColorMap[y + stripnr * height] & 7); +		for (i = 0; i < 8; i++) { +			for (j = 7; j >= 0; j--) { +				byte c = _C64CharMap[_C64PicMap[y + stripnr * height] * 8 + i] >> (j & 6); +				dst[7 - j] = _C64Colors[c & 3];  			} +			dst += _vm->_screenWidth;  		}  	}  }  void Gdi::drawStripC64Mask(byte *dst, int stripnr, int height) { -	for(int y = 0; y < (height >> 3); y++) { -		for(int i = 0; i < 8; i++) { -			for(int j = 7; j >= 0; j--) { -				*(dst + (7 - j) + (y * 8 + i) * _vm->_screenWidth) = -					((_C64MaskChar[_C64MaskMap[y + stripnr * (height >> 3)] * 8 + i] >> (j & 6)) & 3); +	int y, i, j; +	height >>= 3; +	for (y = 0; y < height; y++) { +		for (i = 0; i < 8; i++) { +			for (j = 7; j >= 0; j--) { +				byte c = _C64MaskChar[_C64MaskMap[y + stripnr * height] * 8 + i] >> (j & 6); +				dst[7 - j] = c & 3;  			} +			dst += _vm->_screenWidth;  		}  	}  } diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 911e0706e9..4f1c71c605 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1420,9 +1420,9 @@ void Scumm::initRoomSubBlocks() {  	//  	if (_features & GF_AFTER_V1) {  		_IM00_offs = 0; -    for(i = 0; i < 4; i++){ -      gdi._C64Colors[i] = roomptr[6 + i]; -    } +		for(i = 0; i < 4; i++){ +			gdi._C64Colors[i] = roomptr[6 + i]; +		}  		gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 10), gdi._C64CharMap, 256 * 8);  		gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 12), gdi._C64PicMap, roomptr[4] * roomptr[5]);  		gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 14), gdi._C64ColorMap, roomptr[4] * roomptr[5]);  | 
