[Scummvm-cvs-logs] SF.net SVN: scummvm: [23884] scummvm/trunk/engines/scumm/actor.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Sep 16 14:43:29 CEST 2006


Revision: 23884
          http://svn.sourceforge.net/scummvm/?rev=23884&view=rev
Author:   fingolfin
Date:     2006-09-16 05:43:18 -0700 (Sat, 16 Sep 2006)

Log Message:
-----------
cleanup; remove check whether _costume is valid, as that is already done by getResourceAddress

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/actor.cpp

Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp	2006-09-16 12:30:44 UTC (rev 23883)
+++ scummvm/trunk/engines/scumm/actor.cpp	2006-09-16 12:43:18 UTC (rev 23884)
@@ -1606,7 +1606,7 @@
 	AdjustBoxResult abr;
 
 	if (!isInCurrentRoom() && _vm->_game.version >= 7) {
-		debug(0, "startWalkActor: attempting to walk actor %d who is not in this room", _number);
+		debugC(DEBUG_ACTORS, "startWalkActor: attempting to walk actor %d who is not in this room", _number);
 		return;
 	}
 
@@ -1929,7 +1929,7 @@
 byte *Actor::getActorName() {
 	byte *ptr = _vm->getResourceAddress(rtActorName, _number);
 	if (ptr == NULL) {
-		debug(0, "Failed to find name of actor %d", _number);
+		debugC(DEBUG_ACTORS, "Failed to find name of actor %d", _number);
 	}
 	return ptr;
 }
@@ -1951,13 +1951,13 @@
 
 	akos = _vm->getResourceAddress(rtCostume, _costume);
 	if (!akos) {
-		debug(0, "Can't remap actor %d, costume %d not found", _number, _costume);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPaletteColor: Can't remap actor %d, costume %d not found", _number, _costume);
 		return;
 	}
 
 	akpl = _vm->findResourceData(MKID_BE('AKPL'), akos);
 	if (!akpl) {
-		debug(0, "Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPaletteColor: Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
 		return;
 	}
 
@@ -1980,22 +1980,19 @@
 	byte akpl_color;
 
 	if (!isInCurrentRoom()) {
-		debugC(DEBUG_ACTORS, "Remap actor %d not in current room", _number);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPalette: Actor %d not in current room", _number);
 		return;
-	} else if (_costume < 1 || _costume >= _vm->_numCostumes - 1) {
-		debugC(DEBUG_ACTORS, "Remap actor %d invalid costume %d", _number, _costume);
-		return;
 	}
 
 	akos = _vm->getResourceAddress(rtCostume, _costume);
 	if (!akos) {
-		debug(0, "Can't remap actor %d, costume %d not found", _number, _costume);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPalette: Can't remap actor %d, costume %d not found", _number, _costume);
 		return;
 	}
 
 	akpl = _vm->findResourceData(MKID_BE('AKPL'), akos);
 	if (!akpl) {
-		debug(0, "Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPalette: Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
 		return;
 	}
 
@@ -2005,7 +2002,7 @@
 	rgbs = _vm->findResourceData(MKID_BE('RGBS'), akos);
 
 	if (!rgbs) {
-		debugC(DEBUG_ACTORS, "Can't remap actor %d costume %d doesn't contain an RGB block", _number, _costume);
+		debugC(DEBUG_ACTORS, "Actor::remapActorPalette: Can't remap actor %d costume %d doesn't contain an RGB block", _number, _costume);
 		return;
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list