diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/kfile.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 30 | ||||
-rw-r--r-- | engines/sci/engine/klists.cpp | 22 | ||||
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 12 | ||||
-rw-r--r-- | engines/sci/engine/kstring.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/vm.cpp | 4 |
10 files changed, 42 insertions, 42 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index b0010919a1..87b3a76141 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -250,7 +250,7 @@ byte *kmem(EngineState *s, reg_t handle) { HunkTable *ht = (HunkTable *)GET_SEGMENT(*s->seg_manager, handle.segment, MEM_OBJ_HUNK); if (!ht || !ht->isValidEntry(handle.offset)) { - warning("Error: kmem() with invalid handle\n"); + warning("Error: kmem() with invalid handle"); return NULL; } @@ -281,7 +281,7 @@ void kernel_compile_signature(const char **s) { v = 0; if (ellipsis) { - error("Failed compiling kernel function signature '%s': non-terminal ellipsis '%c'\n", *s, *src); + error("Failed compiling kernel function signature '%s': non-terminal ellipsis '%c'", *s, *src); } do { diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 22b19afcd1..11d1cb457e 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -592,13 +592,13 @@ reg_t kSaveGame(EngineState *s, int funct_nr, int argc, reg_t *argv) { ++i; } if (savedir_id >= MAX_SAVEGAME_NR) { - warning("Internal error: Free savegame ID is %d, shouldn't happen!", savedir_id); + warning("Internal error: Free savegame ID is %d, shouldn't happen", savedir_id); return NULL_REG; } // This loop terminates when savedir_id is not in [x | ex. n. saves [n].id = x] } else { - warning("Savegame ID %d is not allowed!", savedir_nr); + warning("Savegame ID %d is not allowed", savedir_nr); return NULL_REG; } diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index aa5e3c3cc6..5dc684416a 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -100,7 +100,7 @@ enum { if (val == GFX_ERROR) \ warning("GFX subsystem returned error on \"" #x "\""); \ else {\ - error("GFX subsystem fatal error condition on \"" #x "\"!\n"); \ + error("GFX subsystem fatal error condition on \"" #x "\""); \ vm_handle_fatal_error(s, __LINE__, __FILE__); \ } \ }\ @@ -109,7 +109,7 @@ enum { #define ASSERT(x) { \ int val = !!(x); \ if (!val) { \ - error("Fatal error condition on \"" #x "\"!\n"); \ + error("Fatal error condition on \"" #x "\""); \ BREAKPOINT(); \ vm_handle_fatal_error(s, __LINE__, __FILE__); \ } \ @@ -1801,7 +1801,7 @@ int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, in reg_t under_bits = NULL_REG; if (!is_object(s, obj)) { - error("Non-object %04x:%04x present in view list during delete time\n", PRINT_REG(obj)); + error("Non-object %04x:%04x present in view list during delete time", PRINT_REG(obj)); obj = NULL_REG; } else if (widget->under_bitsp) { // Is there a bg picture left to clean? @@ -1838,7 +1838,7 @@ int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, in if (!(signal & _K_VIEW_SIG_FLAG_HIDDEN)) { debugC(2, kDebugLevelGraphics, "Adding view at %04x:%04x to background\n", PRINT_REG(obj)); if (!(gfxw_remove_id(widget->_parent, widget->_ID, widget->_subID) == widget)) { - error("Attempt to remove view with ID %x:%x from list failed!\n", widget->_ID, widget->_subID); + error("Attempt to remove view with ID %x:%x from list failed", widget->_ID, widget->_subID); } s->drop_views->add((GfxContainer *)s->drop_views, gfxw_picviewize_dynview(widget)); @@ -1956,7 +1956,7 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list, GfxDynView *widget; if (!*widget_list) { - error("make_view_list with widget_list == ()\n"); + error("make_view_list with widget_list == ()"); }; assert_primary_widget_lists(s); @@ -1964,7 +1964,7 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list, // Yes, this _does_ happen! if (!list) { // list sanity check - error("Attempt to make list from non-list!\n"); + error("Attempt to make list from non-list"); } reg_t next_node = list->first; @@ -2284,7 +2284,7 @@ reg_t kAddToPic(EngineState *s, int funct_nr, int argc, reg_t *argv) { priority, -1 /* No priority */ , ALIGN_CENTER, ALIGN_BOTTOM, 0); if (!widget) { - error("Attempt to single-add invalid picview (%d/%d/%d)\n", view, loop, cel); + error("Attempt to single-add invalid picview (%d/%d/%d)", view, loop, cel); } else { widget->_ID = -1; if (control >= 0) { @@ -2348,7 +2348,7 @@ reg_t kSetPort(EngineState *s, int funct_nr, int argc, reg_t *argv) { new_port = gfxw_find_port(s->visual, port_nr); if (!new_port) { - error("Invalid port %04x requested\n", port_nr); + error("Invalid port %04x requested", port_nr); return NULL_REG; } @@ -2387,7 +2387,7 @@ reg_t kSetPort(EngineState *s, int funct_nr, int argc, reg_t *argv) { break; } default : - error("SetPort was called with %d parameters\n", argc); + error("SetPort was called with %d parameters", argc); break; } @@ -2405,13 +2405,13 @@ reg_t kDrawCel(EngineState *s, int funct_nr, int argc, reg_t *argv) { /* if (!view) { - error("Attempt to draw non-existing view.%03d\n", view); + error("Attempt to draw non-existing view.%03d", view); return; } */ if (gfxop_check_cel(s->gfx_state, view, &loop, &cel)) { - error("Attempt to draw non-existing view.%03d\n", view); + error("Attempt to draw non-existing view.%03d", view); return s->r_acc; } @@ -2433,7 +2433,7 @@ reg_t kDisposeWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) { goner = gfxw_find_port(s->visual, goner_nr); if ((goner_nr < 3) || (goner == NULL)) { - error("Removal of invalid window %04x requested\n", goner_nr); + error("Removal of invalid window %04x requested", goner_nr); return s->r_acc; } @@ -2593,7 +2593,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t * gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen); if (!newscreen) { - error("Failed to allocate 'newscreen'!\n"); + error("Failed to allocate 'newscreen'"); return; } @@ -3160,7 +3160,7 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) { } if (!text) { - error("Display with invalid reference %04x:%04x!\n", PRINT_REG(textp)); + error("Display with invalid reference %04x:%04x", PRINT_REG(textp)); return NULL_REG; } @@ -3292,7 +3292,7 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) { text_handle = gfxw_new_text(s->gfx_state, area, font_nr, text, halign, ALIGN_TOP, color0, *color1, bg_color, 0); if (!text_handle) { - error("Display: Failed to create text widget!\n"); + error("Display: Failed to create text widget"); return NULL_REG; } diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index fc3d5c5c98..e1cc21bf6b 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -151,12 +151,12 @@ reg_t kDisposeList(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (!l) { // FIXME: This should be an error, but it's turned to a warning for now - warning("Attempt to dispose non-list at %04x:%04x!\n", PRINT_REG(argv[0])); + warning("Attempt to dispose non-list at %04x:%04x", PRINT_REG(argv[0])); return NULL_REG; } if (!sane_listp(s, argv[0])) - error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0])); + error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); /* if (!l->first.isNull()) { reg_t n_addr = l->first; @@ -203,7 +203,7 @@ reg_t kFirstNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { List *l = lookup_list(s, argv[0]); if (l && !sane_listp(s, argv[0])) - error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0])); + error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); if (l) return l->first; @@ -215,7 +215,7 @@ reg_t kLastNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { List *l = lookup_list(s, argv[0]); if (l && !sane_listp(s, argv[0])) - error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0])); + error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); if (l) return l->last; @@ -227,7 +227,7 @@ reg_t kEmptyList(EngineState *s, int funct_nr, int argc, reg_t *argv) { List *l = lookup_list(s, argv[0]); if (!l || !sane_listp(s, argv[0])) - error("List at %04x:%04x is invalid or not sane anymore!\n", PRINT_REG(argv[0])); + error("List at %04x:%04x is invalid or not sane anymore", PRINT_REG(argv[0])); return make_reg(0, ((l) ? l->first.isNull() : 0)); } @@ -240,9 +240,9 @@ void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) { // FIXME: This should be an error, but it's turned to a warning for now if (!new_n) - warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase)); + warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase)); if (!l || !sane_listp(s, listbase)) - error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(listbase)); + error("List at %04x:%04x is not sane anymore", PRINT_REG(listbase)); new_n->succ = l->first; new_n->pred = NULL_REG; @@ -264,9 +264,9 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) { // FIXME: This should be an error, but it's turned to a warning for now if (!new_n) - warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase)); + warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase)); if (!l || !sane_listp(s, listbase)) - error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(listbase)); + error("List at %04x:%04x is not sane anymore", PRINT_REG(listbase)); new_n->succ = NULL_REG; new_n->pred = l->last; @@ -283,7 +283,7 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) { reg_t kNextNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { Node *n = lookup_node(s, argv[0]); if (!sane_nodep(s, argv[0])) { - error("List node at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0])); + error("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); script_error_flag = script_debug_flag = 0; return NULL_REG; } @@ -294,7 +294,7 @@ reg_t kNextNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { reg_t kPrevNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { Node *n = lookup_node(s, argv[0]); if (!sane_nodep(s, argv[0])) - error("List node at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0])); + error("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); return n->pred; } diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 0410d36974..9ad807e385 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -623,7 +623,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { debugC(2, kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)\n", PRINT_REG(avoider), destx, desty); if (invoke_selector(INV_SEL(mover, doit, 1) , 0)) { - error("Mover %04x:%04x of avoider %04x:%04x doesn't have a doit() funcselector\n", PRINT_REG(mover), PRINT_REG(avoider)); + error("Mover %04x:%04x of avoider %04x:%04x doesn't have a doit() funcselector", PRINT_REG(mover), PRINT_REG(avoider)); return NULL_REG; } diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index e6912c2799..b1fc2d4816 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -71,7 +71,7 @@ int invoke_selector(EngineState *s, reg_t object, int selector_id, int noinvalid slc_type = lookup_selector(s, object, selector_id, NULL, &address); if (slc_type == kSelectorNone) { - error("Selector '%s' of object at %04x:%04x could not be invoked (%s L%d)\n", + error("Selector '%s' of object at %04x:%04x could not be invoked (%s L%d)", s->_vocabulary->_selectorNames[selector_id].c_str(), PRINT_REG(object), fname, line); if (noinvalid == 0) KERNEL_OOPS("Not recoverable: VM was halted\n"); @@ -193,7 +193,7 @@ reg_t kClone(EngineState *s, int funct_nr, int argc, reg_t *argv) { clone_obj = s->seg_manager->alloc_Clone(&clone_addr); if (!clone_obj) { - error("Cloning %04x:%04x failed-- internal error!\n", PRINT_REG(parent_addr)); + error("Cloning %04x:%04x failed-- internal error", PRINT_REG(parent_addr)); return NULL_REG; } @@ -219,13 +219,13 @@ reg_t kDisposeClone(EngineState *s, int funct_nr, int argc, reg_t *argv) { uint16 underBits; if (!victim_obj) { - error("Attempt to dispose non-class/object at %04x:%04x\n", + error("Attempt to dispose non-class/object at %04x:%04x", PRINT_REG(victim_addr)); return s->r_acc; } if (victim_obj->_variables[SCRIPT_INFO_SELECTOR].offset != SCRIPT_INFO_CLONE) { - //warning("Attempt to dispose something other than a clone at %04x\n", offset); + //warning("Attempt to dispose something other than a clone at %04x", offset); // SCI silently ignores this behaviour; some games actually depend on it return s->r_acc; } @@ -268,12 +268,12 @@ reg_t kScriptID(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (!scr->exports_nr) { // FIXME: Is this fatal? This occurs in SQ4CD - warning("Script 0x%x does not have a dispatch table\n", script); + warning("Script 0x%x does not have a dispatch table", script); return NULL_REG; } if (index > scr->exports_nr) { - error("Dispatch index too big: %d > %d\n", index, scr->exports_nr); + error("Dispatch index too big: %d > %d", index, scr->exports_nr); return NULL_REG; } diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index d34670369b..1f61b0ecb9 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -161,7 +161,7 @@ reg_t kSetSynonyms(EngineState *s, int funct_nr, int argc, reg_t *argv) { synonyms_nr, script); if (synonyms_nr > 16384) { - error("Segtable corruption: script.%03d has %d synonyms!\n", + error("Segtable corruption: script.%03d has %d synonyms", script, synonyms_nr); /* We used to reset the corrupted value here. I really don't think it's appropriate. * Lars */ diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 9f29134b84..fa6a1e960b 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -1516,7 +1516,7 @@ static int c_is_sample(EngineState *s, const Common::Array<cmd_param_t> &cmdPara if ((data = songit->getAudioStream())) { /* - warning("\nIs sample (encoding %dHz/%s/%04x).", data->conf.rate, (data->conf.stereo) ? + warning("\nIs sample (encoding %dHz/%s/%04x)", data->conf.rate, (data->conf.stereo) ? ((data->conf.stereo == SFX_PCM_STEREO_LR) ? "stereo-LR" : "stereo-RL") : "mono", data->conf.format); */ delete data; diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index eb7a01da57..19b813ce18 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -535,7 +535,7 @@ void SegManager::heapRelocate(reg_t block) { for (k = 0; k < scr->_objects.size(); k++) sciprintf("- obj#%d at %04x w/ %d vars\n", k, scr->_objects[k].pos.offset, scr->_objects[k]._variables.size()); sciprintf("Triggering breakpoint...\n"); - error("Breakpoint in %s, line %d\n", __FILE__, __LINE__); + error("Breakpoint in %s, line %d", __FILE__, __LINE__); } } } diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 3fb7bbcdcc..e47993cfea 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -629,7 +629,7 @@ void run_vm(EngineState *s, int restoring) { scr = script_locate_by_segment(s, xs->addr.pc.segment); if (!scr) { // No script? Implicit return via fake instruction buffer - warning("Running on non-existant script in segment %x!", xs->addr.pc.segment); + warning("Running on non-existant script in segment %x", xs->addr.pc.segment); code_buf = _fake_return_buffer; #ifndef DISABLE_VALIDATIONS code_buf_size = 2; @@ -1434,7 +1434,7 @@ void run_vm(EngineState *s, int restoring) { //#ifndef DISABLE_VALIDATIONS if (xs != &(s->_executionStack.back())) { - warning("xs is stale (%p vs %p); last command was %02x\n", + warning("xs is stale (%p vs %p); last command was %02x", (void *)xs, (void *)&(s->_executionStack.back()), opnumber); } |