diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 20 | ||||
-rw-r--r-- | engines/sci/engine/klists.cpp | 14 | ||||
-rw-r--r-- | engines/sci/engine/kstring.cpp | 8 |
3 files changed, 21 insertions, 21 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index e572af65e5..36e6d2a90d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -226,7 +226,7 @@ void graph_restore_box(EngineState *s, reg_t handle) { while (port_nr > 2 && !(s->port->_flags & GFXW_FLAG_IMMUNE_TO_SNAPSHOTS) && (gfxw_widget_matches_snapshot(*ptr, s->port))) { // This shouldn't ever happen, actually, since windows (ports w/ ID > 2) should all be immune GfxPort *newport = gfxw_find_port(s->visual, port_nr); - error("Port %d is not immune against snapshots!\n", s->port->_ID); + error("Port %d is not immune against snapshots", s->port->_ID); port_nr--; if (newport) s->port = newport; @@ -240,7 +240,7 @@ void graph_restore_box(EngineState *s, reg_t handle) { } while (parent && (gfxw_widget_matches_snapshot(*ptr, parent))); if (!parent) { - error("Attempted widget mass destruction by a snapshot\n"); + error("Attempted widget mass destruction by a snapshot"); BREAKPOINT(); } @@ -249,7 +249,7 @@ void graph_restore_box(EngineState *s, reg_t handle) { if (!ptr) { - error("Attempt to restore invalid snaphot with handle %04x!\n", handle); + error("Attempt to restore invalid snaphot with handle "PREG, PRINT_REG(handle)); return; } @@ -343,7 +343,7 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) { break; } default : - error("kSetCursor: Unhandled case: %d arguments given!\n", argc); + error("kSetCursor: Unhandled case: %d arguments given", argc); break; } return s->r_acc; @@ -698,7 +698,7 @@ void _k_dirloop(reg_t obj, uint16 angle, EngineState *s, int funct_nr, int argc, maxloops = gfxop_lookup_view_get_loops(s->gfx_state, view); if (maxloops == GFX_ERROR) { - error("Invalid view.%03d\n", view); + error("Invalid view.%03d", view); return; } else if ((loop > 1) && (maxloops < 4)) return; @@ -886,7 +886,7 @@ reg_t kCelHigh(EngineState *s, int funct_nr, int argc, reg_t *argv) { } if (gfxop_get_cel_parameters(s->gfx_state, view, loop, cel, &width, &height, &offset)) { - error("Invalid loop (%d) or cel (%d) in view.%d (0x%x), or view invalid\n", loop, cel, view, view); + error("Invalid loop (%d) or cel (%d) in view.%d (0x%x), or view invalid", loop, cel, view, view); return NULL_REG; } else return make_reg(0, height); @@ -904,7 +904,7 @@ reg_t kCelWide(EngineState *s, int funct_nr, int argc, reg_t *argv) { } if (gfxop_get_cel_parameters(s->gfx_state, view, loop, cel, &width, &height, &offset)) { - error("Invalid loop (%d) or cel (%d) in view.%d (0x%x), or view invalid\n", loop, cel, view, view); + error("Invalid loop (%d) or cel (%d) in view.%d (0x%x), or view invalid", loop, cel, view, view); return NULL_REG; } else return make_reg(0, width); @@ -916,11 +916,11 @@ reg_t kNumLoops(EngineState *s, int funct_nr, int argc, reg_t *argv) { int loops_nr = gfxop_lookup_view_get_loops(s->gfx_state, view); if (loops_nr < 0) { - error("view.%d (0x%x) not found\n", view, view); + error("view.%d (0x%x) not found", view, view); return NULL_REG; } - SCIkdebug(SCIkGRAPHICS, "NumLoops(view.%d) = %d\n", view, loops_nr); + SCIkdebug(SCIkGRAPHICS, "NumLoops(view.%d) = %d", view, loops_nr); return make_reg(0, loops_nr); } @@ -935,7 +935,7 @@ reg_t kNumCels(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (gfxop_check_cel(s->gfx_state, view, &loop, &cel)) { // OK, this is a hack and there's a // real function to calculate cel numbers... - error("view.%d (0x%x) not found\n", view, view); + error("view.%d (0x%x) not found", view, view); return NULL_REG; } diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 9069bcdff4..662351435e 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -38,14 +38,14 @@ Node *lookup_node(EngineState *s, reg_t addr) { // seem to have any apparent ill-effects, though, so it's been changed to non-fatal, for now //sciprintf("%s, L%d: Attempt to use non-node "PREG" as list node\n", __FILE__, __LINE__, PRINT_REG(addr)); //script_debug_flag = script_error_flag = 1; - warning("%s, L%d: Attempt to use non-node "PREG" as list node\n", __FILE__, __LINE__, PRINT_REG(addr)); + warning("%s, L%d: Attempt to use non-node "PREG" as list node", __FILE__, __LINE__, PRINT_REG(addr)); return NULL; } NodeTable *nt = (NodeTable *)mobj; if (!ENTRY_IS_VALID(nt, addr.offset)) { - sciprintf("%s, L%d: Attempt to use non-node "PREG" as list node\n", __FILE__, __LINE__, PRINT_REG(addr)); + sciprintf("%s, L%d: Attempt to use non-node "PREG" as list node", __FILE__, __LINE__, PRINT_REG(addr)); script_debug_flag = script_error_flag = 1; return NULL; } @@ -57,7 +57,7 @@ List *lookup_list(EngineState *s, reg_t addr) { MemObject *mobj = GET_SEGMENT(*s->seg_manager, addr.segment, MEM_OBJ_LISTS); if (!mobj) { - sciprintf("%s, L%d: Attempt to use non-list "PREG" as list\n", __FILE__, __LINE__, PRINT_REG(addr)); + sciprintf("%s, L%d: Attempt to use non-list "PREG" as list", __FILE__, __LINE__, PRINT_REG(addr)); script_debug_flag = script_error_flag = 1; return NULL; } @@ -302,7 +302,7 @@ reg_t kPrevNode(EngineState *s, int funct_nr, int argc, reg_t *argv) { reg_t kNodeValue(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 "PREG" is not sane!\n", PRINT_REG(argv[0])); + error("List node at "PREG" is not sane", PRINT_REG(argv[0])); script_debug_flag = script_error_flag = 0; return NULL_REG; } @@ -321,11 +321,11 @@ reg_t kAddAfter(EngineState *s, int funct_nr, int argc, reg_t *argv) { Node *newnode = lookup_node(s, argv[2]); if (!l || !sane_listp(s, argv[0])) - error("List at "PREG" is not sane anymore!\n", PRINT_REG(argv[0])); + error("List at "PREG" is not sane anymore", PRINT_REG(argv[0])); // FIXME: This should be an error, but it's turned to a warning for now if (!newnode) { - warning("New 'node' "PREG" is not a node!\n", argv[1], argv[2]); + warning("New 'node' "PREG" is not a node", PRINT_REG(argv[2])); return NULL_REG; } @@ -368,7 +368,7 @@ reg_t kFindKey(EngineState *s, int funct_nr, int argc, reg_t *argv) { SCIkdebug(SCIkNODES, "Looking for key "PREG" in list "PREG"\n", PRINT_REG(key), PRINT_REG(list_pos)); if (!sane_listp(s, list_pos)) - error("List at "PREG" is not sane anymore!\n", PRINT_REG(list_pos)); + error("List at "PREG" is not sane anymore", PRINT_REG(list_pos)); node_pos = lookup_list(s, list_pos)->first; diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 9fadabb9fc..87dd201763 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -34,7 +34,7 @@ namespace Sci { #define CHECK_OVERFLOW1(pt, size, rv) \ if (((pt) - (str_base)) + (size) > maxsize) { \ - error("String expansion exceeded heap boundaries\n"); \ + error("String expansion exceeded heap boundaries"); \ return rv;\ } @@ -51,7 +51,7 @@ char *kernel_lookup_text(EngineState *s, reg_t address, int index) { textres = s->resmgr->findResource(kResourceTypeText, address.offset, 0); if (!textres) { - error("text.%03d not found\n", address); + error("text.%03d not found", address.offset); return NULL; /* Will probably segfault */ } @@ -65,7 +65,7 @@ char *kernel_lookup_text(EngineState *s, reg_t address, int index) { if (textlen) return seeker; else { - error("Index %d out of bounds in text.%03d\n", _index, address); + error("Index %d out of bounds in text.%03d", _index, address.offset); return 0; } @@ -706,7 +706,7 @@ reg_t kGetFarText(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (!textres) { - error("text.%d does not exist\n", UKPV(0)); + error("text.%d does not exist", UKPV(0)); return NULL_REG; } |