diff options
author | Walter van Niftrik | 2009-05-27 00:24:32 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-05-27 00:24:32 +0000 |
commit | e3178daf13c438c850dc4a4ddd260869f70d2ae2 (patch) | |
tree | c6f7593d01b72e92033679aa2ce543ef056a4523 | |
parent | fd191a4920b15e168d4c8f4ad9c57ebc698a8ffc (diff) | |
download | scummvm-rg350-e3178daf13c438c850dc4a4ddd260869f70d2ae2.tar.gz scummvm-rg350-e3178daf13c438c850dc4a4ddd260869f70d2ae2.tar.bz2 scummvm-rg350-e3178daf13c438c850dc4a4ddd260869f70d2ae2.zip |
SCI: Cleanup.
svn-id: r40931
-rw-r--r-- | engines/sci/engine/kfile.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 10 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 9 |
3 files changed, 10 insertions, 15 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index b6d7c90624..102365a925 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -383,7 +383,7 @@ reg_t kDeviceInfo(EngineState *s, int funct_nr, int argc, reg_t *argv) { case K_DEVICE_INFO_IS_FLOPPY: input_s = kernel_dereference_char_pointer(s, argv[1], 0); - debug(3, "K_DEVICE_INFO_IS_FLOPPY(%s)\n", input_s); + debug(3, "K_DEVICE_INFO_IS_FLOPPY(%s)", input_s); return NULL_REG; /* Never */ /* SCI uses these in a less-than-portable way to delete savegames. @@ -411,7 +411,7 @@ reg_t kDeviceInfo(EngineState *s, int funct_nr, int argc, reg_t *argv) { default: // TODO: Not all sub-commands are handled. E.g. KQ5CD calls sub-command 5 - warning("Unknown DeviceInfo() sub-command: %d\n", mode); + warning("Unknown DeviceInfo() sub-command: %d", mode); break; } @@ -853,7 +853,7 @@ reg_t kFileIO(EngineState *s, int funct_nr, int argc, reg_t *argv) { return make_reg(0, exists); } default : - error("Unknown FileIO() sub-command: %d\n", func_nr); + error("Unknown FileIO() sub-command: %d", func_nr); } return s->r_acc; diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index da3f9f2e08..5f7efd0823 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -165,7 +165,7 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) { switch (UKPV(0)) { case K_MEMORY_ALLOCATE_CRITICAL : if (!s->seg_manager->allocDynmem(UKPV(1), "kMemory() critical", &s->r_acc)) { - error("Critical heap allocation failed\n"); + error("Critical heap allocation failed"); script_error_flag = script_debug_flag = 1; } return s->r_acc; @@ -175,7 +175,7 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) { break; case K_MEMORY_FREE : if (s->seg_manager->freeDynmem(argv[1])) { - error("Attempt to kMemory::free() non-dynmem pointer %04x:%04x!\n", PRINT_REG(argv[1])); + error("Attempt to kMemory::free() non-dynmem pointer %04x:%04x", PRINT_REG(argv[1])); } break; case K_MEMORY_MEMCPY : { @@ -201,7 +201,7 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (!ref) { // This occurs in KQ5CD when interacting with certain objects - warning("Attempt to poke invalid memory at %04x:%04x!\n", PRINT_REG(argv[1])); + warning("Attempt to poke invalid memory at %04x:%04x", PRINT_REG(argv[1])); return s->r_acc; } if (s->seg_manager->_heap[argv[1].segment]->getType() == MEM_OBJ_LOCALS) @@ -215,7 +215,7 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) { if (!ref) { // This occurs in KQ5CD when interacting with certain objects - warning("Attempt to poke invalid memory at %04x:%04x!\n", PRINT_REG(argv[1])); + warning("Attempt to poke invalid memory at %04x:%04x", PRINT_REG(argv[1])); return s->r_acc; } @@ -223,7 +223,7 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) { *((reg_t *) ref) = argv[2]; else { if (argv[2].segment) { - error("Attempt to poke memory reference %04x:%04x to %04x:%04x!\n", PRINT_REG(argv[2]), PRINT_REG(argv[1])); + error("Attempt to poke memory reference %04x:%04x to %04x:%04x", PRINT_REG(argv[2]), PRINT_REG(argv[1])); return s->r_acc; WRITE_LE_UINT16(ref, argv[2].offset); // ? } diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index fd0d710b7b..7d5bf1e03a 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1655,13 +1655,8 @@ reg_t kAvoidPath(EngineState *s, int funct_nr, int argc, reg_t *argv) { case 3 : { reg_t retval; Polygon *polygon = convert_polygon(s, argv[2]); - - if (polygon->type == POLY_CONTAINED_ACCESS) { - sciprintf("[avoidpath] Warning: containment test performed on contained access polygon\n"); - - // Semantics unknown, assume barred access semantics - polygon->type = POLY_BARRED_ACCESS; - } + // Override polygon type to prevent inverted result for contained access polygons + polygon->type = POLY_BARRED_ACCESS; retval = make_reg(0, contained(start, polygon) != CONT_OUTSIDE); delete polygon; |