aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2009-05-29 13:07:14 +0000
committerMax Horn2009-05-29 13:07:14 +0000
commit813853ccc246088b26b2cdb0260f06eeb5676131 (patch)
tree8a6d8d4a3432482e4cce9b85dc47b703b56e9048 /engines/sci/engine
parentb72c2a29fbef2a89199a4b116c8af45172841240 (diff)
downloadscummvm-rg350-813853ccc246088b26b2cdb0260f06eeb5676131.tar.gz
scummvm-rg350-813853ccc246088b26b2cdb0260f06eeb5676131.tar.bz2
scummvm-rg350-813853ccc246088b26b2cdb0260f06eeb5676131.zip
SCI: Converted several fprintf(stderr) calls to warning/error (the remaining fprintf calls should probably be replaced by suitable debug/debugC/debugN invocations)
svn-id: r40993
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/seg_manager.cpp4
-rw-r--r--engines/sci/engine/vm.cpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index ca759b6315..8d3c143d65 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -489,7 +489,7 @@ static const char *sci1_default_knames[SCI1_KNAMES_DEFAULT_ENTRIES_NR] = {
int kernel_oops(EngineState *s, const char *file, int line, const char *reason) {
sciprintf("Kernel Oops in file %s, line %d: %s\n", file, line, reason);
- fprintf(stderr, "Kernel Oops in file %s, line %d: %s\n", file, line, reason);
+ warning("Kernel Oops in file %s, line %d: %s", file, line, reason);
script_debug_flag = script_error_flag = 1;
return 0;
}
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 99f067c704..fbefcb0c18 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -1087,7 +1087,7 @@ void Script::listAllOutgoingReferences(EngineState *s, reg_t addr, void *param,
warning("Request for outgoing script-object reference at %04x:%04x yielded invalid index %d", PRINT_REG(addr), idx);
}
} else {
- /* fprintf(stderr, "Unexpected request for outgoing script-object references at %04x:%04x\n", PRINT_REG(addr));*/
+ /* warning("Unexpected request for outgoing script-object references at %04x:%04x", PRINT_REG(addr));*/
/* Happens e.g. when we're looking into strings */
}
}
@@ -1109,7 +1109,7 @@ void CloneTable::listAllOutgoingReferences(EngineState *s, reg_t addr, void *par
// assert(addr.segment == _segId);
if (!clone_table->isValidEntry(addr.offset)) {
- fprintf(stderr, "Unexpected request for outgoing references from clone at %04x:%04x\n", PRINT_REG(addr));
+ warning("Unexpected request for outgoing references from clone at %04x:%04x", PRINT_REG(addr));
// BREAKPOINT();
return;
}
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 5b5c1bd49f..0d776c913d 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -514,8 +514,7 @@ ExecStack *add_exec_stack_entry(EngineState *s, reg_t pc, StackPtr sp, reg_t obj
#endif
void vm_handle_fatal_error(EngineState *s, int line, const char *file) {
- fprintf(stderr, "Fatal VM error in %s, L%d; aborting...\n", file, line);
- error("Could not recover, exitting...\n");
+ error("Fatal VM error in %s, L%d; aborting...", file, line);
}
static Script *script_locate_by_segment(EngineState *s, SegmentId seg) {