aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kmisc.cpp
diff options
context:
space:
mode:
authorMax Horn2010-06-28 12:29:06 +0000
committerMax Horn2010-06-28 12:29:06 +0000
commit8ae9774a009a2c12123d4bc9070a3d8f043a1c34 (patch)
treea67999f93d12baded1514fca02a0312c36a4ab34 /engines/sci/engine/kmisc.cpp
parent4fdbd14a60afc72c3b936b02dffd39935594e8e5 (diff)
downloadscummvm-rg350-8ae9774a009a2c12123d4bc9070a3d8f043a1c34.tar.gz
scummvm-rg350-8ae9774a009a2c12123d4bc9070a3d8f043a1c34.tar.bz2
scummvm-rg350-8ae9774a009a2c12123d4bc9070a3d8f043a1c34.zip
SCI: Turn more warnings into errors.
If one of these is triggered for you, you can add an exception to the error, together with a comment explaining why this exception is necessary. Ideally after verifying that the cause is a script bug and not a bug in our code... svn-id: r50442
Diffstat (limited to 'engines/sci/engine/kmisc.cpp')
-rw-r--r--engines/sci/engine/kmisc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index f742734ad7..3d206d0358 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -123,7 +123,7 @@ reg_t kMemoryInfo(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, size);
default:
- warning("Unknown MemoryInfo operation: %04x", argv[0].offset);
+ error("Unknown MemoryInfo operation: %04x", argv[0].offset);
}
return NULL_REG;
@@ -198,7 +198,7 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) {
int mode = (argc > 0) ? argv[0].toUint16() : 0;
if (getSciVersion() <= SCI_VERSION_0_LATE && mode > 1)
- warning("kGetTime called in SCI0 with mode %d (expected 0 or 1)", mode);
+ error("kGetTime called in SCI0 with mode %d (expected 0 or 1)", mode);
switch (mode) {
case K_NEW_GETTIME_TICKS :
@@ -218,7 +218,7 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) {
debugC(2, kDebugLevelTime, "GetTime(date) returns %d", retval);
break;
default:
- warning("Attempt to use unknown GetTime mode %d", mode);
+ error("Attempt to use unknown GetTime mode %d", mode);
break;
}
@@ -264,7 +264,7 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) {
SegmentRef ref = s->_segMan->dereference(argv[1]);
if (!ref.isValid() || ref.maxSize < 2) {
- warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1]));
+ error("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1]));
return s->r_acc;
}
if (ref.isRaw)
@@ -280,7 +280,7 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) {
SegmentRef ref = s->_segMan->dereference(argv[1]);
if (!ref.isValid() || ref.maxSize < 2) {
- warning("Attempt to poke invalid memory at %04x:%04x", PRINT_REG(argv[1]));
+ error("Attempt to poke invalid memory at %04x:%04x", PRINT_REG(argv[1]));
return s->r_acc;
}
@@ -375,7 +375,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
case kPlatformIsItWindows:
return make_reg(0, isWindows);
default:
- warning("Unsupported kPlatform operation %d", operation);
+ error("Unsupported kPlatform operation %d", operation);
}
return NULL_REG;