[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.161,1.162 akos.h,1.29,1.30

Eugene Sandulenko sev at users.sourceforge.net
Wed Sep 8 14:39:18 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22947

Modified Files:
	akos.cpp akos.h 
Log Message:
Semi-working akos codec32.


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- akos.cpp	8 Sep 2004 21:14:12 -0000	1.161
+++ akos.cpp	8 Sep 2004 21:38:43 -0000	1.162
@@ -412,9 +412,7 @@
 			result |= codec16(xmoveCur, ymoveCur);
 			break;
 		case 32:
-			// TODO Add codec32
-			warning("akos_drawLimb codec32");
-			result = 1;
+			result |= codec32(xmoveCur, ymoveCur);
 			break;
 		default:
 			error("akos_drawLimb: invalid codec %d", codec);
@@ -491,9 +489,7 @@
 				result |= codec16(xmoveCur, ymoveCur);
 				break;
 			case 32:
-				// TODO Add codec32
-				warning("akos_drawLimb: codec32 stub");
-				result = 1;
+				result |= codec32(xmoveCur, ymoveCur);
 				break;
 			default:
 				error("akos_drawLimb: invalid codec %d", codec);
@@ -1223,6 +1219,40 @@
 	return 0;
 }
 
+byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) {
+	Common::Rect clip, src, dst;
+
+	debug(0, "codec32(%d, %d)", xmoveCur, ymoveCur);
+
+	if (!_mirror) {
+		dst.left = (_actorX - xmoveCur - _width) + 1;
+	} else {
+		dst.left = _actorX + xmoveCur;
+	}
+
+	src.top = src.left = 0;
+	src.right = _width - 1;
+	src.bottom = _height - 1;
+
+	clip.top = clip.left = 0;
+	clip.right = _outwidth - 1;
+	clip.bottom = _outheight - 1;
+
+	dst.top = _actorY + ymoveCur;
+	dst.right = dst.left + _width - 1;
+	dst.bottom = dst.top + _height - 1;
+
+	clip.clip(_clipOverride);
+	dst.clip(clip);
+
+	_vm->markRectAsDirty(kMainVirtScreen, dst, _actorID);
+
+	byte *dstptr = _outptr + dst.left + dst.top * _outwidth;
+
+	_vm->gdi.decompressImageHE(dstptr, _outwidth, &dst, _srcptr, &src);
+	return 0;
+}
+
 bool ScummEngine::akos_increaseAnims(const byte *akos, Actor *a) {
 	const byte *aksq, *akfo;
 	int i;

Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- akos.h	8 Sep 2004 21:14:12 -0000	1.29
+++ akos.h	8 Sep 2004 21:38:44 -0000	1.30
@@ -94,6 +94,7 @@
 	void codec1_genericDecode();
 	byte codec5(int xmoveCur, int ymoveCur);
 	byte codec16(int xmoveCur, int ymoveCur);
+	byte codec32(int xmoveCur, int ymoveCur);
 	void akos16SetupBitReader(const byte *src);
 	void akos16SkipData(int32 numskip);
 	void akos16DecodeLine(byte *buf, int32 numbytes, int32 dir);





More information about the Scummvm-git-logs mailing list