aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/klists.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-30 15:40:49 +0000
committerFilippos Karapetis2009-05-30 15:40:49 +0000
commit3490819a66f942f4fb18c4f25f8dcb4bf67ea4c5 (patch)
treeaaaa4746049a11873bf15baf4489f849bc2726e3 /engines/sci/engine/klists.cpp
parent69582f0179c9ab9dcdc0afb2acbe659d36a37790 (diff)
downloadscummvm-rg350-3490819a66f942f4fb18c4f25f8dcb4bf67ea4c5.tar.gz
scummvm-rg350-3490819a66f942f4fb18c4f25f8dcb4bf67ea4c5.tar.bz2
scummvm-rg350-3490819a66f942f4fb18c4f25f8dcb4bf67ea4c5.zip
- Removed debug_mode from the engine state
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function - Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND - Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables svn-id: r41033
Diffstat (limited to 'engines/sci/engine/klists.cpp')
-rw-r--r--engines/sci/engine/klists.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 0494e459a4..fc3d5c5c98 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -141,7 +141,7 @@ reg_t kNewList(EngineState *s, int funct_nr, int argc, reg_t *argv) {
List *l;
l = s->seg_manager->alloc_List(&listbase);
l->first = l->last = NULL_REG;
- SCIkdebug(SCIkNODES, "New listbase at %04x:%04x\n", PRINT_REG(listbase));
+ debugC(2, kDebugLevelNodes, "New listbase at %04x:%04x\n", PRINT_REG(listbase));
return listbase; // Return list base address
}
@@ -192,7 +192,7 @@ reg_t _k_new_node(EngineState *s, reg_t value, reg_t key) {
reg_t kNewNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
s->r_acc = _k_new_node(s, argv[0], argv[1]);
- SCIkdebug(SCIkNODES, "New nodebase at %04x:%04x\n", PRINT_REG(s->r_acc));
+ debugC(2, kDebugLevelNodes, "New nodebase at %04x:%04x\n", PRINT_REG(s->r_acc));
return s->r_acc;
}
@@ -236,7 +236,7 @@ void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) {
List *l = lookup_list(s, listbase);
Node *new_n = lookup_node(s, nodebase);
- SCIkdebug(SCIkNODES, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
+ debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
// FIXME: This should be an error, but it's turned to a warning for now
if (!new_n)
@@ -260,7 +260,7 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) {
List *l = lookup_list(s, listbase);
Node *new_n = lookup_node(s, nodebase);
- SCIkdebug(SCIkNODES, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
+ debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
// FIXME: This should be an error, but it's turned to a warning for now
if (!new_n)
@@ -365,27 +365,27 @@ reg_t kFindKey(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t key = argv[1];
reg_t list_pos = argv[0];
- SCIkdebug(SCIkNODES, "Looking for key %04x:%04x in list %04x:%04x\n", PRINT_REG(key), PRINT_REG(list_pos));
+ debugC(2, kDebugLevelNodes, "Looking for key %04x:%04x in list %04x:%04x\n", PRINT_REG(key), PRINT_REG(list_pos));
if (!sane_listp(s, list_pos))
error("List at %04x:%04x is not sane anymore", PRINT_REG(list_pos));
node_pos = lookup_list(s, list_pos)->first;
- SCIkdebug(SCIkNODES, "First node at %04x:%04x\n", PRINT_REG(node_pos));
+ debugC(2, kDebugLevelNodes, "First node at %04x:%04x\n", PRINT_REG(node_pos));
while (!node_pos.isNull()) {
Node *n = lookup_node(s, node_pos);
if (n->key == key) {
- SCIkdebug(SCIkNODES, " Found key at %04x:%04x\n", PRINT_REG(node_pos));
+ debugC(2, kDebugLevelNodes, " Found key at %04x:%04x\n", PRINT_REG(node_pos));
return node_pos;
}
node_pos = n->succ;
- SCIkdebug(SCIkNODES, "NextNode at %04x:%04x\n", PRINT_REG(node_pos));
+ debugC(2, kDebugLevelNodes, "NextNode at %04x:%04x\n", PRINT_REG(node_pos));
}
- SCIkdebug(SCIkNODES, "Looking for key without success\n");
+ debugC(2, kDebugLevelNodes, "Looking for key without success\n");
return NULL_REG;
}