SCI: Changed order of script and room in error messages

This matches the order in which workarounds are stored in workarounds.cpp
This commit is contained in:
md5 2011-06-11 14:00:02 +03:00
parent 154316b198
commit eea48434f5
2 changed files with 14 additions and 14 deletions

View file

@ -130,16 +130,16 @@ static reg_t read_var(EngineState *s, int type, int index) {
if (solution.type == WORKAROUND_NONE) {
#ifdef RELEASE_BUILD
// If we are running an official ScummVM release -> fake 0 in unknown cases
warning("Uninitialized read for temp %d from method %s::%s (script %d, room %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr,
g_sci->getEngineState()->currentRoomNumber(), originReply.localCallOffset);
warning("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(),
originReply.scriptNr, originReply.localCallOffset);
s->variables[type][index] = NULL_REG;
break;
#else
error("Uninitialized read for temp %d from method %s::%s (script %d, room %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr,
g_sci->getEngineState()->currentRoomNumber(), originReply.localCallOffset);
error("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(),
originReply.scriptNr, originReply.localCallOffset);
#endif
}
assert(solution.type == WORKAROUND_FAKE);
@ -366,9 +366,9 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
switch (solution.type) {
case WORKAROUND_NONE:
kernel->signatureDebug(kernelCall.signature, argc, argv);
error("[VM] k%s[%x]: signature mismatch via method %s::%s (script %d, room %d, localCall 0x%x)",
error("[VM] k%s[%x]: signature mismatch via method %s::%s (room %d, script %d, localCall 0x%x)",
kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(),
originReply.scriptNr, s->currentRoomNumber(), originReply.localCallOffset);
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
break;
case WORKAROUND_IGNORE: // don't do kernel call, leave acc alone
return;
@ -418,13 +418,13 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
int callNameLen = strlen(kernelCall.name);
if (strncmp(kernelCall.name, kernelSubCall.name, callNameLen) == 0) {
const char *subCallName = kernelSubCall.name + callNameLen;
error("[VM] k%s(%s): signature mismatch via method %s::%s (script %d, room %d, localCall %x)",
error("[VM] k%s(%s): signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
kernelCall.name, subCallName, originReply.objectName.c_str(), originReply.methodName.c_str(),
originReply.scriptNr, s->currentRoomNumber(), originReply.localCallOffset);
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
}
error("[VM] k%s: signature mismatch via method %s::%s (script %d, room %d, localCall %x)",
error("[VM] k%s: signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(),
originReply.scriptNr, s->currentRoomNumber(), originReply.localCallOffset);
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
break;
}
case WORKAROUND_IGNORE: // don't do kernel call, leave acc alone

View file

@ -32,9 +32,9 @@ reg_t reg_t::lookForWorkaround(const reg_t right) const {
SciTrackOriginReply originReply;
SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, arithmeticWorkarounds, &originReply);
if (solution.type == WORKAROUND_NONE)
error("Invalid arithmetic operation (params: %04x:%04x and %04x:%04x) from method %s::%s (script %d, room %d, localCall %x)",
error("Invalid arithmetic operation (params: %04x:%04x and %04x:%04x) from method %s::%s (room %d, script %d, localCall %x)",
PRINT_REG(*this), PRINT_REG(right), originReply.objectName.c_str(),
originReply.methodName.c_str(), originReply.scriptNr, g_sci->getEngineState()->currentRoomNumber(),
originReply.methodName.c_str(), g_sci->getEngineState()->currentRoomNumber(), originReply.scriptNr,
originReply.localCallOffset);
assert(solution.type == WORKAROUND_FAKE);
return make_reg(0, solution.value);