diff options
author | uruk | 2014-08-03 19:16:18 +0200 |
---|---|---|
committer | uruk | 2014-08-03 19:16:18 +0200 |
commit | 07fc3fb3c368ad4c801fb3c0a804eb9a7a127685 (patch) | |
tree | c8dd421978254b50ea72f61c0040f53cdfeda4c9 | |
parent | b8b3e5af04f349ec353cffd73f399e21c4301f78 (diff) | |
download | scummvm-rg350-07fc3fb3c368ad4c801fb3c0a804eb9a7a127685.tar.gz scummvm-rg350-07fc3fb3c368ad4c801fb3c0a804eb9a7a127685.tar.bz2 scummvm-rg350-07fc3fb3c368ad4c801fb3c0a804eb9a7a127685.zip |
CGE2: Some repair in Bitmap::code().
-rw-r--r-- | engines/cge2/bitmap.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/cge2/bitmap.cpp b/engines/cge2/bitmap.cpp index bcc9e98913..6d38f33b99 100644 --- a/engines/cge2/bitmap.cpp +++ b/engines/cge2/bitmap.cpp @@ -183,21 +183,20 @@ BitmapPtr Bitmap::code(uint8 *map) { while (true) { // at most 2 times: for (V == NULL) & for allocated block; uint8 *im = _v + 2; uint16 *cp = (uint16 *) _v; - int bpl; if (_v) { // 2nd pass - fill the hide table - for (uint16 i = 0; i < _h; i++) { + for (uint i = 0; i < _h; i++) { _b[i]._skip = 0xFFFF; _b[i]._hide = 0x0000; } } - for (bpl = 0; bpl < 4; bpl++) { // once per each bitplane + for (int bpl = 0; bpl < 4; bpl++) { // once per each bitplane uint8 *bm = map; bool skip = (bm[bpl] == kPixelTransp); uint16 j; cnt = 0; - for (uint16 i = 0; i < _h; i++) { // once per each line + for (uint i = 0; i < _h; i++) { // once per each line uint8 pix; for (j = bpl; j < _w; j += 4) { pix = bm[j]; @@ -263,7 +262,7 @@ BitmapPtr Bitmap::code(uint8 *map) { _b = (HideDesc *)(_v + sizV); } cnt = 0; - for (uint16 i = 0; i < _h; i++) { + for (uint i = 0; i < _h; i++) { if (_b[i]._skip == 0xFFFF) { // whole line is skipped _b[i]._skip = (cnt + kScrWidth) >> 2; cnt = 0; |