[Scummvm-cvs-logs] SF.net SVN: scummvm:[40931] scummvm/trunk/engines/sci/engine
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Wed May 27 02:24:32 CEST 2009
Revision: 40931
http://scummvm.svn.sourceforge.net/scummvm/?rev=40931&view=rev
Author: waltervn
Date: 2009-05-27 00:24:32 +0000 (Wed, 27 May 2009)
Log Message:
-----------
SCI: Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kfile.cpp
scummvm/trunk/engines/sci/engine/kmisc.cpp
scummvm/trunk/engines/sci/engine/kpathing.cpp
Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp 2009-05-26 23:34:57 UTC (rev 40930)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp 2009-05-27 00:24:32 UTC (rev 40931)
@@ -383,7 +383,7 @@
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 @@
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 @@
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;
Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp 2009-05-26 23:34:57 UTC (rev 40930)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp 2009-05-27 00:24:32 UTC (rev 40931)
@@ -165,7 +165,7 @@
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 @@
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 @@
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 @@
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 *) 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); // ?
}
Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp 2009-05-26 23:34:57 UTC (rev 40930)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp 2009-05-27 00:24:32 UTC (rev 40931)
@@ -1655,14 +1655,9 @@
case 3 : {
reg_t retval;
Polygon *polygon = convert_polygon(s, argv[2]);
+ // Override polygon type to prevent inverted result for contained access polygons
+ polygon->type = POLY_BARRED_ACCESS;
- 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;
- }
-
retval = make_reg(0, contained(start, polygon) != CONT_OUTSIDE);
delete polygon;
return retval;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list