[Scummvm-cvs-logs] SF.net SVN: scummvm: [21630] scummvm/trunk/engines/cine
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Apr 5 06:07:04 CEST 2006
Revision: 21630
Author: eriktorbjorn
Date: 2006-04-05 06:06:03 -0700 (Wed, 05 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21630&view=rev
Log Message:
-----------
I don't think assert(0) is a particularly helpful error message...
Modified Paths:
--------------
scummvm/trunk/engines/cine/anim.cpp
scummvm/trunk/engines/cine/script.cpp
scummvm/trunk/engines/cine/various.cpp
Modified: scummvm/trunk/engines/cine/anim.cpp
===================================================================
--- scummvm/trunk/engines/cine/anim.cpp 2006-04-05 11:44:46 UTC (rev 21629)
+++ scummvm/trunk/engines/cine/anim.cpp 2006-04-05 13:06:03 UTC (rev 21630)
@@ -676,7 +676,7 @@
} else if (header2.type == 5) {
convert8BBP(animDataTable[entry].ptr1, dataPtr, header2.width, header2.height);
} else if (header2.type == 4) {
- assert(0);
+ error("loadSet: header2.type == 4");
} else {
convert8BBP2(animDataTable[entry].ptr1, dataPtr, header2.width, header2.height);
}
@@ -759,7 +759,7 @@
} else if (header2.type == 5) {
convert8BBP(animDataTable[entry].ptr1, dataPtr, header2.width, header2.height);
} else if (header2.type == 4) {
- assert(0);
+ error("loadSetAbs: header2.type == 4");
} else {
convert8BBP2(animDataTable[entry].ptr1, dataPtr, header2.width, header2.height);
}
@@ -821,7 +821,7 @@
return;
}
- assert(0);
+ error("loadResource: Cannot determine type for '%s'", resourceName);
}
void loadAbs(const char *resourceName, uint16 idx) {
@@ -844,7 +844,7 @@
return;
}
- assert(0);
+ error("loadAbs: Cannot determine type for '%s'", resourceName);
}
void loadResourcesFromSave() {
Modified: scummvm/trunk/engines/cine/script.cpp
===================================================================
--- scummvm/trunk/engines/cine/script.cpp 2006-04-05 11:44:46 UTC (rev 21629)
+++ scummvm/trunk/engines/cine/script.cpp 2006-04-05 13:06:03 UTC (rev 21630)
@@ -881,7 +881,7 @@
}
default:
{
- assert(0);
+ error("executeScript: OP_loadVar: Unknown variable type %d", varType);
}
}
} else {
@@ -2570,7 +2570,7 @@
} else if (param2 == 5) {
sprintf(lineBuffer, "var[%d]=rand() mod %d\n", param1, param3);
} else {
- assert(0);
+ error("decompileScript: 0x09: param2 = %d", param2);
}
} else {
int16 param3;
@@ -2720,7 +2720,7 @@
sprintf(compareString1, "var[%d]", param1);
sprintf(compareString2, "globalVar[%d]", param3);
} else {
- assert(0);
+ error("decompileScript: 0x0E: param2 = %d", param2);
}
} else {
int16 param3;
@@ -3138,7 +3138,7 @@
} else if (param2 == 2) {
sprintf(lineBuffer, "globalVar[%d] = globalVar[%d]\n", param1, param3);
} else {
- assert(0);
+ error("decompileScript: 0x52: param2 = %d", param2);
}
} else {
int16 param3;
@@ -3174,7 +3174,7 @@
sprintf(compareString1, "globalVar[%d]", param1);
sprintf(compareString2, "globalVar[%d]", param3);
} else {
- assert(0);
+ error("decompileScript: 0x53: param2 = %d", param2);
}
} else {
int16 param3;
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2006-04-05 11:44:46 UTC (rev 21629)
+++ scummvm/trunk/engines/cine/various.cpp 2006-04-05 13:06:03 UTC (rev 21630)
@@ -1446,9 +1446,7 @@
} while (!var_A);
- if (needMouseSave) {
- assert(0);
- }
+ assert(!needMouseSave);
var_4 = button;
@@ -1680,9 +1678,7 @@
} while (!var_A);
- if (needMouseSave) {
- assert(0);
- }
+ assert(!needMouseSave);
var_4 = button;
@@ -2828,15 +2824,13 @@
param1 = ptr1[1];
param2 = ptr1[2];
- if (element->varC == 255) {
- if (globalVars[VAR_MOUSE_X_POS] || globalVars[VAR_MOUSE_Y_POS]) {
- computeMove1(element, ptr1[4] + x, ptr1[5] + y, param1, param2, globalVars[VAR_MOUSE_X_POS], globalVars[VAR_MOUSE_Y_POS]);
- } else {
- element->var16 = 0;
- element->var14 = 0;
- }
+ assert(element->varC == 255);
+
+ if (globalVars[VAR_MOUSE_X_POS] || globalVars[VAR_MOUSE_Y_POS]) {
+ computeMove1(element, ptr1[4] + x, ptr1[5] + y, param1, param2, globalVars[VAR_MOUSE_X_POS], globalVars[VAR_MOUSE_Y_POS]);
} else {
- assert(0);
+ element->var16 = 0;
+ element->var14 = 0;
}
var_10 = computeMove2(element);
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