[Scummvm-cvs-logs] SF.net SVN: scummvm:[49972] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jun 18 01:45:38 CEST 2010


Revision: 49972
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49972&view=rev
Author:   thebluegr
Date:     2010-06-17 23:45:38 +0000 (Thu, 17 Jun 2010)

Log Message:
-----------
Strict mode: Turned several severe errors (almost all detection related) into errors, instead of warnings

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/features.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/engine/message.cpp
    scummvm/trunk/engines/sci/resource.cpp
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/engine/features.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/features.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/engine/features.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -51,13 +51,13 @@
 	reg_t addr;
 
 	if (objAddr.isNull()) {
-		warning("getDetectionAddr: %s object couldn't be found", objName.c_str());
+		error("getDetectionAddr: %s object couldn't be found", objName.c_str());
 		return NULL_REG;
 	}
 
 	if (methodNum == -1) {
 		if (lookupSelector(_segMan, objAddr, slc, NULL, &addr) != kSelectorMethod) {
-			warning("getDetectionAddr: target selector is not a method of object %s", objName.c_str());
+			error("getDetectionAddr: target selector is not a method of object %s", objName.c_str());
 			return NULL_REG;
 		}
 	} else {
@@ -491,7 +491,7 @@
 			_moveCountType = kIncrementMoveCount;
 		} else {
 			if (!autoDetectMoveCountType()) {
-				warning("Move count autodetection failed");
+				error("Move count autodetection failed");
 				_moveCountType = kIncrementMoveCount;	// Most games do this, so best guess
 			}
 		}

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -80,7 +80,7 @@
 		// Init
 		return make_reg(0, 1);
 	default:
-		warning("kCdDoAudio: Unhandled case %d", argv[0].toUint16());
+		error("kCdDoAudio: Unhandled case %d", argv[0].toUint16());
 	}
 
 	return s->r_acc;
@@ -223,7 +223,7 @@
 		g_sci->_audio->stopSoundSync();
 		break;
 	default:
-		warning("DoSync: Unhandled subfunction %d", argv[0].toUint16());
+		error("DoSync: Unhandled subfunction %d", argv[0].toUint16());
 	}
 
 	return s->r_acc;

Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/engine/message.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -161,7 +161,7 @@
 		reader = new MessageReaderV4(res->data, res->size);
 		break;
 	default:
-		warning("Message: unsupported resource version %d", version);
+		error("Message: unsupported resource version %d", version);
 		return false;
 	}
 
@@ -259,7 +259,7 @@
 	if (!_cursorStackStack.empty())
 		_cursorStack = _cursorStackStack.pop();
 	else
-		warning("Message: attempt to pop from empty stack");
+		error("Message: attempt to pop from empty stack");
 }
 
 int MessageState::hexDigitToInt(char h) {
@@ -380,7 +380,7 @@
 		if ((unsigned)buffer_r.maxSize >= str.size() + 1) {
 			_segMan->strcpy(buf, str.c_str());
 		} else {
-			warning("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str());
+			error("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str());
 
 			// Set buffer to empty string if possible
 			if (buffer_r.maxSize > 0)

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -714,7 +714,7 @@
 		debugC(1, kDebugLevelResMan, "resMan: Detected Amiga graphic resources");
 		break;
 	default:
-		warning("resMan: Couldn't determine view type");
+		error("resMan: Couldn't determine view type");
 	}
 }
 
@@ -1116,7 +1116,7 @@
 				patchDataOffset = 8;
 				break;
 			default:
-				warning("Resource patch unsupported special case %X", patchDataOffset & 0x7F);
+				error("Resource patch unsupported special case %X", patchDataOffset & 0x7F);
 				return;
 		}
 	}
@@ -1636,7 +1636,7 @@
 		break;
 #endif
 	default:
-		warning("Resource %s: Compression method %d not supported", _id.toString().c_str(), compression);
+		error("Resource %s: Compression method %d not supported", _id.toString().c_str(), compression);
 		return SCI_ERROR_UNKNOWN_COMPRESSION;
 	}
 
@@ -1752,7 +1752,7 @@
 		}
 	}
 
-	warning("resMan: Couldn't find any views");
+	error("resMan: Couldn't find any views");
 	return kViewUnknown;
 }
 
@@ -1862,7 +1862,7 @@
 				}
 			}
 
-			warning("Failed to accurately determine SCI version");
+			error("Failed to accurately determine SCI version");
 			// No parser, we assume SCI_VERSION_01.
 			s_sciVersion = SCI_VERSION_01;
 			return;
@@ -1919,7 +1919,7 @@
 		}
 	}
 
-	warning("resMan: Couldn't detect hires");
+	error("resMan: Couldn't detect hires");
 	return false;
 #else
 	error("no sci32 support");
@@ -1944,7 +1944,7 @@
 	Resource *res = findResource(ResourceId(kResourceTypeScript, 0), 0);
 
 	if (!res) {
-		warning("resMan: Failed to find script.000");
+		error("resMan: Failed to find script.000");
 		return false;
 	}
 

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -365,7 +365,7 @@
 	_gamestate->stack_top = stack->_entries + stack->_capacity;
 
 	if (!script_instantiate(_resMan, _gamestate->_segMan, 0)) {
-		warning("initGame(): Could not instantiate script 0");
+		error("initGame(): Could not instantiate script 0");
 		return false;
 	}
 

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-06-17 23:44:01 UTC (rev 49971)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-06-17 23:45:38 UTC (rev 49972)
@@ -203,7 +203,7 @@
 		_cmdUpdateCuesIndex = 17;
 		break;
 	default:
-		warning("Sound command parser: unknown sound version %d", _soundVersion);
+		error("Sound command parser: unknown sound version %d", _soundVersion);
 		break;
 	}
 }
@@ -246,7 +246,7 @@
 
 		(this->*(_soundCommands[command]->sndCmd))(obj, value);
 	} else {
-		warning("Invalid sound command requested (%d), valid range is 0-%d", command, _soundCommands.size() - 1);
+		error("Invalid sound command requested (%d), valid range is 0-%d", command, _soundCommands.size() - 1);
 	}
 
 	return _acc;


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