[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.107.2.6,1.107.2.7 akos.h,1.27,1.27.2.1
Travis Howell
kirben at users.sourceforge.net
Sat Jul 17 01:44:02 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.7,1.229.2.8 actor.h,1.51.2.1,1.51.2.2 script_v6.cpp,1.293.2.14,1.293.2.15 script_v8.cpp,2.229.2.4,2.229.2.5 scummvm.cpp,2.577.2.20,2.577.2.21 sound.cpp,1.320.2.6,1.320.2.7 string.cpp,1.193.2.4,1.193.2.5 verbs.cpp,1.93,1.93.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.577.2.21,2.577.2.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29486/scumm
Modified Files:
Tag: branch-0-6-0
akos.cpp akos.h
Log Message:
Back port:
Fix for bug #885466 (FT: Text gets drawn under moving bits), by making AKOS codec 16 honor the charset mask
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.107.2.6
retrieving revision 1.107.2.7
diff -u -d -r1.107.2.6 -r1.107.2.7
--- akos.cpp 26 Jun 2004 09:31:45 -0000 1.107.2.6
+++ akos.cpp 17 Jul 2004 08:43:34 -0000 1.107.2.7
@@ -891,36 +891,11 @@
}
}
-void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency) {
- byte *tmp_buf = akos16.buffer;
-
- if (dir < 0) {
- dest -= (t_width - 1);
- tmp_buf += (t_width - 1);
- }
-
- akos16SetupBitReader(src);
-
- if (numskip_before != 0) {
- akos16SkipData(numskip_before);
- }
-
- assert(t_height > 0);
- assert(t_width > 0);
- while (t_height--) {
- akos16DecodeLine(tmp_buf, t_width, dir);
- bompApplyShadow(_shadow_mode, _shadow_table, akos16.buffer, dest, t_width, transparency);
-
- if (numskip_after != 0) {
- akos16SkipData(numskip_after);
- }
- dest += pitch;
- }
-}
-
-void AkosRenderer::akos16DecompressMask(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, byte * maskptr, int32 bitpos_start) {
+void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf) {
byte *tmp_buf = akos16.buffer;
int maskpitch;
+ byte *maskptr = 0, *charsetMask = 0;
+ const byte maskbit = revBitMask[maskLeft & 7];
if (dir < 0) {
dest -= (t_width - 1);
@@ -935,18 +910,26 @@
maskpitch = _numStrips;
+ charsetMask = _vm->getMaskBuffer(maskLeft, maskTop, 0);
+ if (zBuf != 0)
+ maskptr = _vm->getMaskBuffer(maskLeft, maskTop, zBuf);
+
assert(t_height > 0);
assert(t_width > 0);
while (t_height--) {
akos16DecodeLine(tmp_buf, t_width, dir);
- bompApplyMask(akos16.buffer, maskptr, (byte)bitpos_start, t_width, transparency);
+ bompApplyMask(akos16.buffer, charsetMask, maskbit, t_width, transparency);
+ if (maskptr) {
+ bompApplyMask(akos16.buffer, maskptr, maskbit, t_width, transparency);
+ maskptr += maskpitch;
+ }
bompApplyShadow(_shadow_mode, _shadow_table, akos16.buffer, dest, t_width, transparency);
if (numskip_after != 0) {
akos16SkipData(numskip_after);
}
dest += pitch;
- maskptr += maskpitch;
+ charsetMask += maskpitch;
}
}
@@ -1044,15 +1027,9 @@
int32 numskip_before = skip_x + (skip_y * _width);
int32 numskip_after = _width - cur_x;
- byte *dest = _outptr + width_unk + height_unk * _outwidth;
+ byte *dst = _outptr + width_unk + height_unk * _outwidth;
- if (_zbuf == 0) {
- akos16Decompress(dest, pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency);
- } else {
- byte *ptr = _vm->getMaskBuffer(clip.left, clip.top, _zbuf);
- akos16DecompressMask(dest, pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, ptr, clip.left / 8);
- }
-
+ akos16Decompress(dst, pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, clip.left, clip.top, _zbuf);
return 0;
}
Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -u -d -r1.27 -r1.27.2.1
--- akos.h 6 Jan 2004 12:45:29 -0000 1.27
+++ akos.h 17 Jul 2004 08:43:34 -0000 1.27.2.1
@@ -96,8 +96,7 @@
void akos16SetupBitReader(const byte *src);
void akos16SkipData(int32 numskip);
void akos16DecodeLine(byte *buf, int32 numbytes, int32 dir);
- void akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency);
- void akos16DecompressMask(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, byte *maskptr, int32 bitpos_start);
+ void akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf);
};
} // End of namespace Scumm
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.7,1.229.2.8 actor.h,1.51.2.1,1.51.2.2 script_v6.cpp,1.293.2.14,1.293.2.15 script_v8.cpp,2.229.2.4,2.229.2.5 scummvm.cpp,2.577.2.20,2.577.2.21 sound.cpp,1.320.2.6,1.320.2.7 string.cpp,1.193.2.4,1.193.2.5 verbs.cpp,1.93,1.93.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.577.2.21,2.577.2.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list