[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.378,1.379 actor.h,1.82,1.83 akos.cpp,1.234,1.235

Gregory Montoir cyx at users.sourceforge.net
Fri Sep 23 16:25:02 CEST 2005


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

Modified Files:
	actor.cpp actor.h akos.cpp 
Log Message:
renamed some HE specific akos fields

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.378
retrieving revision 1.379
diff -u -d -r1.378 -r1.379
--- actor.cpp	31 Aug 2005 20:54:51 -0000	1.378
+++ actor.cpp	23 Sep 2005 23:23:34 -0000	1.379
@@ -1144,8 +1144,7 @@
 	bcr->_paletteNum = _hePaletteNum;
 
 	if (_vm->_heversion >= 80 && _heNoTalkAnimation == 0) {
-		_heCondMask &= 0xFFFFFC00;
-		_heCondMask |= 1;
+		_heCondMask = (_heCondMask & ~0x3FF) | 1;
 		if (_vm->getTalkingActor() == _number) {
 			// Checks if talk sound is active?
 			// Otherwise just do rand animation

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- actor.h	30 Jul 2005 21:11:22 -0000	1.82
+++ actor.h	23 Sep 2005 23:23:34 -0000	1.83
@@ -63,9 +63,9 @@
 	uint16 end[16];
 	uint16 frame[16];
 
-	uint16 seq1[16];
-	uint16 seq2[16];
-	uint32 seq3[16];
+	uint16 heJumpOffsetTable[16];
+	uint16 heJumpCountTable[16];
+	uint32 heCondMaskTable[16];
 
 	void reset() {
 		stopped = 0;

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -d -r1.234 -r1.235
--- akos.cpp	3 Sep 2005 16:53:10 -0000	1.234
+++ akos.cpp	23 Sep 2005 23:23:34 -0000	1.235
@@ -203,7 +203,7 @@
 					a->_cost.end[i] = 0;
 					a->_cost.start[i] = 0;
 					a->_cost.curpos[i] = 0;
-					a->_cost.seq3[i] = 0;
+					a->_cost.heCondMaskTable[i] = 0;
 
 					if (akst) {
 						int size = _vm->getResourceDataSize(akst) / 8;
@@ -211,7 +211,7 @@
 							bool found = false;
 							while (size--) {
 								if (READ_LE_UINT32(akst) == 0) {
-									a->_cost.seq3[i] = READ_LE_UINT32(akst + 4);
+									a->_cost.heCondMaskTable[i] = READ_LE_UINT32(akst + 4);
 									found = true;
 									break;
 								}
@@ -233,16 +233,16 @@
 					start = READ_LE_UINT16(r); r += 2;
 					len = READ_LE_UINT16(r); r += 2;
 
-					a->_cost.seq1[i] = 0;
-					a->_cost.seq2[i] = 0;
+					a->_cost.heJumpOffsetTable[i] = 0;
+					a->_cost.heJumpCountTable[i] = 0;
 					if (aksf) {
 						int size = _vm->getResourceDataSize(aksf) / 6;
 						if (size > 0) {
 							bool found = false;
 							while (size--) {
 								if (READ_LE_UINT16(aksf) == start) {
-									a->_cost.seq1[i] = READ_LE_UINT16(aksf + 2);
-									a->_cost.seq2[i] = READ_LE_UINT16(aksf + 4);
+									a->_cost.heJumpOffsetTable[i] = READ_LE_UINT16(aksf + 2);
+									a->_cost.heJumpCountTable[i] = READ_LE_UINT16(aksf + 4);
 									found = true;
 									break;
 								}
@@ -259,14 +259,14 @@
 					a->_cost.end[i] = start + len;
 					a->_cost.start[i] = start;
 					a->_cost.curpos[i] = start;
-					a->_cost.seq3[i] = 0;
+					a->_cost.heCondMaskTable[i] = 0;
 					if (akst) {
 						int size = _vm->getResourceDataSize(akst) / 8;
 						if (size > 0) {
 							bool found = false;
 							while (size--) {
 								if (READ_LE_UINT32(akst) == start) {
-									a->_cost.seq3[i] = READ_LE_UINT32(akst + 4);
+									a->_cost.heCondMaskTable[i] = READ_LE_UINT32(akst + 4);
 									found = true;
 									break;
 								}
@@ -353,13 +353,13 @@
 	uint i, extra;
 	byte result = 0;
 	int xmoveCur, ymoveCur;
-	uint32 seq3Idx[32];
-	uint8 hasSeq3Idx;
+	uint32 heCondMaskIndex[32];
+	bool useCondMask;
 	int lastDx, lastDy;
 
 	lastDx = lastDy = 0;
 	for (i = 0; i < 32; ++i) {
-		seq3Idx[i] = i;
+		heCondMaskIndex[i] = i;
 	}
 
 	if (_skipLimbs)
@@ -371,7 +371,7 @@
 	if (!cost.active[limb] || cost.stopped & (1 << limb))
 		return 0;
 
-	hasSeq3Idx = 0;
+	useCondMask = false;
 	p = aksq + cost.curpos[limb];
 
 	code = p[0];
@@ -383,11 +383,11 @@
 		uint j = 0;
 		extra = p[3];
 		uint8 n = extra;
-		assert(n < ARRAYSIZE(seq3Idx));
+		assert(n < ARRAYSIZE(heCondMaskIndex));
 		while (n--) {
-			seq3Idx[j++] = aksq[s++];
+			heCondMaskIndex[j++] = aksq[s++];
 		}
-		hasSeq3Idx = 1;
+		useCondMask = true;
 		p += extra + 2;
 		code = (code == AKC_C021) ? AKC_ComplexChan : AKC_ComplexChan2;
 	}
@@ -436,7 +436,7 @@
 
 		extra = p[2];
 		p += 3;
-		uint32 decflag = seq3Idx[0];
+		uint32 decflag = heCondMaskIndex[0];
 
 		for (i = 0; i != extra; i++) {
 			code = p[4];
@@ -458,10 +458,10 @@
 				_ymove -= lastDy;
 			}
 
-			if (!hasSeq3Idx || !akct) {
+			if (!useCondMask || !akct) {
 				decflag = 1;
 			} else {
-				uint32 cond = READ_LE_UINT32(akct + cost.seq3[limb] + seq3Idx[i] * 4);
+				uint32 cond = READ_LE_UINT32(akct + cost.heCondMaskTable[limb] + heCondMaskIndex[i] * 4);
 				if (cond == 0) {
 					decflag = 1;
 				} else {
@@ -1513,9 +1513,9 @@
 				error("akos_increaseAnim: no AKFO table");
 			tmp = a->getAnimVar(GB(2)) - 1;
 			if (_heversion >= 80) {
-				if (tmp < 0 || tmp > a->_cost.seq2[chan] - 1)
+				if (tmp < 0 || tmp > a->_cost.heJumpCountTable[chan] - 1)
 					error("akos_increaseAnim: invalid jump value %d", tmp);
-				curpos = READ_LE_UINT16(akfo + a->_cost.seq1[chan] + tmp * 2);
+				curpos = READ_LE_UINT16(akfo + a->_cost.heJumpOffsetTable[chan] + tmp * 2);
 			} else {
 				if (tmp < 0 || tmp > numakfo - 1)
 					error("akos_increaseAnim: invalid jump value %d", tmp);





More information about the Scummvm-git-logs mailing list