[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.269,1.270 script_v2.cpp,2.249,2.250 script_v5.cpp,1.255,1.256 script_v8.cpp,2.266,2.267 scumm.cpp,1.126,1.127 sound.cpp,1.363,1.364 string.cpp,1.242,1.243

Max Horn fingolfin at users.sourceforge.net
Sat Aug 21 15:34:04 CEST 2004


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

Modified Files:
	actor.cpp script_v2.cpp script_v5.cpp script_v8.cpp scumm.cpp 
	sound.cpp string.cpp 
Log Message:
Removed some obsolete TODO comments

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- actor.cpp	17 Aug 2004 13:09:20 -0000	1.269
+++ actor.cpp	21 Aug 2004 22:33:22 -0000	1.270
@@ -148,6 +148,12 @@
 	speedx = newSpeedX;
 	speedy = newSpeedY;
 
+if (newSpeedX == 10 && newSpeedY == 5) {
+	speedx = 5;
+	speedy = 5;
+}
+
+
 	if (moving) {
 		calcMovementFactor(walkdata.next);
 	}
@@ -171,17 +177,15 @@
 }
 
 int Actor::calcMovementFactor(Common::Point next) {
-	Common::Point actorPos(_pos);
-	int diffX, diffY;
-	int32 deltaXFactor, deltaYFactor;
+	int deltaXFactor, deltaYFactor;
 
-	if (actorPos == next)
+	if (_pos == next)
 		return 0;
 
-	diffX = next.x - actorPos.x;
-	diffY = next.y - actorPos.y;
-	deltaYFactor = speedy << 16;
+	const int diffX = next.x - _pos.x;
+	const int diffY = next.y - _pos.y;
 
+	deltaYFactor = speedy << 16;
 	if (diffY < 0)
 		deltaYFactor = -deltaYFactor;
 
@@ -192,7 +196,7 @@
 		deltaYFactor = 0;
 	}
 
-	if ((uint) abs((int)(deltaXFactor >> 16)) > speedx) {
+	if ((uint) abs(deltaXFactor >> 16) > speedx) {
 		deltaXFactor = speedx << 16;
 		if (diffX < 0)
 			deltaXFactor = -deltaXFactor;
@@ -205,7 +209,7 @@
 		}
 	}
 
-	walkdata.cur = actorPos;
+	walkdata.cur = _pos;
 	walkdata.next = next;
 	walkdata.deltaXFactor = deltaXFactor;
 	walkdata.deltaYFactor = deltaYFactor;
@@ -379,8 +383,11 @@
 	distX = abs(walkdata.next.x - walkdata.cur.x);
 	distY = abs(walkdata.next.y - walkdata.cur.y);
 
+if (number == 6) printf("actorWalkStep: actor %d at (%d,%d); ", number, actorPos.x, actorPos.y);
 	if (abs(actorPos.x - walkdata.cur.x) >= distX && abs(actorPos.y - walkdata.cur.y) >= distY) {
 		moving &= ~MF_IN_LEG;
+if (number == 6) printf("MF_IN_LEG: walkdata.cur=(%d,%d), walkdata.next=(%d,%d)\n", 
+		walkdata.cur.x, walkdata.cur.y, walkdata.next.x, walkdata.next.y);
 		return 0;
 	}
 
@@ -400,6 +407,11 @@
 		actorPos.y = walkdata.next.y;
 	}
 
+if (number == 6) printf("new pos (%d,%d): delta=(%d,%d), delta>>8=(%d,%d)\n",
+		actorPos.x, actorPos.y,
+		walkdata.deltaXFactor, walkdata.deltaYFactor,
+		(walkdata.deltaXFactor >> 8), (walkdata.deltaYFactor >> 8));
+
 	_pos = actorPos;
 	return 1;
 }

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.249
retrieving revision 2.250
diff -u -d -r2.249 -r2.250
--- script_v2.cpp	14 Aug 2004 07:04:31 -0000	2.249
+++ script_v2.cpp	21 Aug 2004 22:33:22 -0000	2.250
@@ -1389,8 +1389,6 @@
 }
 
 void ScummEngine_v2::o2_cutscene() {
-	//warning("TODO o2_cutscene()");
-
 	vm.cutSceneData[0] = _userState | (_userPut ? 16 : 0);
 	vm.cutSceneData[1] = (int16)VAR(VAR_CURSORSTATE);
 	vm.cutSceneData[2] = _currentRoom;
@@ -1413,8 +1411,6 @@
 }
 
 void ScummEngine_v2::o2_endCutscene() {
-	//warning("TODO o2_endCutscene()");
-
 	vm.cutSceneStackPointer = 0;
 
 	VAR(VAR_OVERRIDE) = 0;

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -d -r1.255 -r1.256
--- script_v5.cpp	21 Aug 2004 09:02:45 -0000	1.255
+++ script_v5.cpp	21 Aug 2004 22:33:23 -0000	1.256
@@ -858,7 +858,6 @@
 }
 
 void ScummEngine_v5::o5_getStringWidth() {
-	// TODO - not sure if this is correct... needs testing
 	int string, width = 0;
 	byte *ptr;
 	
@@ -874,7 +873,6 @@
 }
 
 void ScummEngine_v5::o5_saveLoadVars() {
-	// TODO
 	if (fetchScriptByte() == 1)
 		saveVars();
 	else

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.266
retrieving revision 2.267
diff -u -d -r2.266 -r2.267
--- script_v8.cpp	19 Aug 2004 07:25:34 -0000	2.266
+++ script_v8.cpp	21 Aug 2004 22:33:23 -0000	2.267
@@ -1063,7 +1063,6 @@
 }
 
 void ScummEngine_v8::o8_cameraOps() {
-	// TODO
 	byte subOp = fetchScriptByte();
 	switch (subOp) {
 	case 0x32:		// SO_CAMERA_PAUSE
@@ -1368,7 +1367,6 @@
 }
 
 void ScummEngine_v8::o8_kernelGetFunctions() {
-	// TODO
 	int args[30];
 	int len = getStackList(args, ARRAYSIZE(args));
 

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- scumm.cpp	21 Aug 2004 10:18:13 -0000	1.126
+++ scumm.cpp	21 Aug 2004 22:33:23 -0000	1.127
@@ -439,9 +439,6 @@
 	// The first step is to check whether one of them is present (we do that
 	// here); the rest is handled by the  ScummFile class and code in
 	// openResourceFile() (and in the Sound class, for MONSTER.SOU handling).
-	//
-	// TODO: Smush/iMuse need to be extended to be able to load files from the
-	//       container, too (for The Dig and FT, as well as their demos).
 	if (gs.detectFilename) {
 		if (_fileHandle.open(gs.detectFilename)) {
 			_containerFile = gs.detectFilename;
@@ -1197,7 +1194,7 @@
 		setupV1ActorTalkColor();
 	} else if (_gameId == GID_MANIAC && _version == 2 && _demoMode) {
 		// HACK Some palette changes needed for demo script
-		// in Maniac Mansion (Enchanced)
+		// in Maniac Mansion (Enhanced)
 		_actors[3].setPalette(3, 1);
 		_actors[9].talkColor = 15;
 		_actors[10].talkColor = 7;
@@ -1441,7 +1438,6 @@
 
 		if (_quit) {
 			// TODO: Maybe perform an autosave on exit?
-			// TODO: Also, we could optionally show a "Do you really want to quit?" dialog here
 		}
 	}
 }
@@ -2608,7 +2604,7 @@
 	}
 
 	if (_features & GF_OLD_BUNDLE)
-		ptr = 0; // TODO ? do 16 bit games use a palette?!?
+		ptr = 0;
 	else if (_features & GF_SMALL_HEADER)
 		ptr = findResourceSmall(MKID('CLUT'), roomptr);
 	else

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.363
retrieving revision 1.364
diff -u -d -r1.363 -r1.364
--- sound.cpp	21 Aug 2004 04:15:03 -0000	1.363
+++ sound.cpp	21 Aug 2004 22:33:23 -0000	1.364
@@ -464,12 +464,12 @@
 				int track = -1;
 				if (soundID == 50)
 					track = 17;
-				else if (ptr[6] == 0x7F && ptr[7] == 0x00 && ptr[8] == 0x80)
-				{
-					char tracks[16] = {13,14,10,3,4,9,16,5,1,8,2,15,6,7,11,12};
+				else if (ptr[6] == 0x7F && ptr[7] == 0x00 && ptr[8] == 0x80) {
+					static const char tracks[16] = {13,14,10,3,4,9,16,5,1,8,2,15,6,7,11,12};
 					if (ptr[9] == 0x0E)
 						track = 18;
-					else	track = tracks[ptr[9] - 0x23];
+					else
+						track = tracks[ptr[9] - 0x23];
 				}
 				if (track != -1) {
 					playCDTrack(track,((track < 5) || (track > 16)) ? 1 : -1,0,0);

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- string.cpp	18 Aug 2004 12:20:26 -0000	1.242
+++ string.cpp	21 Aug 2004 22:33:23 -0000	1.243
@@ -246,9 +246,9 @@
 				_sound->talkSound(talk_sound_a, talk_sound_b, 2);
 
 				// Set flag that speech variant exist of this msg.
-				// TODO: This does not work for the speech system in V7+ games
-				// since they encode the voice information differently, and it
-				// is being stripped from the string before it ever gets here.
+				// This is actually a hack added by ScummVM; the original did
+				// subtitle hiding in some other way. I am not sure exactly
+				// how, though.
 				if (_haveMsg == 0xFF)
 					_haveMsg = 0xFE;
 				break;
@@ -871,7 +871,6 @@
 	if (found != NULL) {
 		strcpy((char *)trans_buff, _languageBuffer + found->offset);
 
-		// FIXME / TODO: Maybe this should be enabled for Full Throttle, too?
 		if ((_gameId == GID_DIG) && !(_features & GF_DEMO)) {
 			// Replace any '%___' by the corresponding special codes in the source text
 			const byte *src = text;





More information about the Scummvm-git-logs mailing list