diff options
author | Filippos Karapetis | 2009-05-30 15:40:49 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-30 15:40:49 +0000 |
commit | 3490819a66f942f4fb18c4f25f8dcb4bf67ea4c5 (patch) | |
tree | aaaa4746049a11873bf15baf4489f849bc2726e3 /engines/sci/engine/kmovement.cpp | |
parent | 69582f0179c9ab9dcdc0afb2acbe659d36a37790 (diff) | |
download | scummvm-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/kmovement.cpp')
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 9a80b3c99f..16b1df6fcb 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -119,7 +119,7 @@ reg_t kSetJump(EngineState *s, int funct_nr, int argc, reg_t *argv) { // POST: (dx != 0) ==> abs(tmp) > abs(dx) // POST: (dx != 0) ==> abs(tmp) ~>=~ abs(dy) - SCIkdebug(SCIkBRESEN, "c: %d, tmp: %d\n", c, tmp); + debugC(2, kDebugLevelBresen, "c: %d, tmp: %d\n", c, tmp); // Compute x step if (tmp != 0) @@ -151,8 +151,8 @@ reg_t kSetJump(EngineState *s, int funct_nr, int argc, reg_t *argv) { // Always force vy to be upwards vy = -abs(vy); - SCIkdebug(SCIkBRESEN, "SetJump for object at %04x:%04x\n", PRINT_REG(object)); - SCIkdebug(SCIkBRESEN, "xStep: %d, yStep: %d\n", vx, vy); + debugC(2, kDebugLevelBresen, "SetJump for object at %04x:%04x\n", PRINT_REG(object)); + debugC(2, kDebugLevelBresen, "xStep: %d, yStep: %d\n", vx, vy); PUT_SEL32V(object, xStep, vx); PUT_SEL32V(object, yStep, vy); @@ -206,8 +206,8 @@ static void initialize_bresen(EngineState *s, int argc, reg_t *argv, reg_t mover PUT_SEL32V(mover, dx, deltax_step); PUT_SEL32V(mover, dy, deltay_step); - SCIkdebug(SCIkBRESEN, "Init bresen for mover %04x:%04x: d=(%d,%d)\n", PRINT_REG(mover), deltax, deltay); - SCIkdebug(SCIkBRESEN, " steps=%d, mv=(%d, %d), i1= %d, i2=%d\n", + debugC(2, kDebugLevelBresen, "Init bresen for mover %04x:%04x: d=(%d,%d)\n", PRINT_REG(mover), deltax, deltay); + debugC(2, kDebugLevelBresen, " steps=%d, mv=(%d, %d), i1= %d, i2=%d\n", numsteps, deltax_step, deltay_step, i1, bdi*2); //PUT_SEL32V(mover, b_movCnt, numsteps); // Needed for HQ1/Ogre? @@ -549,13 +549,13 @@ reg_t kDoBresen(EngineState *s, int funct_nr, int argc, reg_t *argv) { y = desty; completed = 1; - SCIkdebug(SCIkBRESEN, "Finished mover %04x:%04x\n", PRINT_REG(mover)); + debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x\n", PRINT_REG(mover)); } PUT_SEL32V(client, x, x); PUT_SEL32V(client, y, y); - SCIkdebug(SCIkBRESEN, "New data: (x,y)=(%d,%d), di=%d\n", x, y, bdi); + debugC(2, kDebugLevelBresen, "New data: (x,y)=(%d,%d), di=%d\n", x, y, bdi); if (s->selector_map.cantBeHere != -1) invoke_selector(INV_SEL(client, cantBeHere, 0), 0); @@ -571,7 +571,7 @@ reg_t kDoBresen(EngineState *s, int funct_nr, int argc, reg_t *argv) { PUT_SEL32V(client, y, oldy); PUT_SEL32V(client, signal, (signal | _K_VIEW_SIG_FLAG_HIT_OBSTACLE)); - SCIkdebug(SCIkBRESEN, "Finished mover %04x:%04x by collision\n", PRINT_REG(mover)); + debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x by collision\n", PRINT_REG(mover)); completed = 1; } @@ -620,7 +620,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { destx = GET_SEL32V(mover, x); desty = GET_SEL32V(mover, y); - SCIkdebug(SCIkBRESEN, "Doing avoider %04x (dest=%d,%d)\n", avoider, destx, desty); + debugC(2, kDebugLevelBresen, "Doing avoider %04x (dest=%d,%d)\n", 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)); @@ -641,7 +641,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { dy = desty - GET_SEL32V(client, y); angle = get_angle(dx, dy); - SCIkdebug(SCIkBRESEN, "Movement (%d,%d), angle %d is %sblocked\n", dx, dy, angle, (s->r_acc.offset) ? " " : "not "); + debugC(2, kDebugLevelBresen, "Movement (%d,%d), angle %d is %sblocked\n", dx, dy, angle, (s->r_acc.offset) ? " " : "not "); if (s->r_acc.offset) { // isBlocked() returned non-zero int rotation = (rand() & 1) ? 45 : (360 - 45); // Clockwise/counterclockwise @@ -651,7 +651,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { int ystep = GET_SEL32V(client, yStep); int moves; - SCIkdebug(SCIkBRESEN, " avoider %04x:%04x\n", PRINT_REG(avoider)); + debugC(2, kDebugLevelBresen, " avoider %04x:%04x\n", PRINT_REG(avoider)); for (moves = 0; moves < 8; moves++) { int move_x = (int)(sin(angle * PI / 180.0) * (xstep)); @@ -660,7 +660,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { PUT_SEL32V(client, x, oldx + move_x); PUT_SEL32V(client, y, oldy + move_y); - SCIkdebug(SCIkBRESEN, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)\n", oldx, oldy, angle, move_x, move_y); + debugC(2, kDebugLevelBresen, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)\n", oldx, oldy, angle, move_x, move_y); if (invoke_selector(INV_SEL(client, canBeHere, 1) , 0)) { error("Client %04x:%04x of avoider %04x:%04x doesn't" @@ -672,7 +672,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) { PUT_SEL32V(client, y, oldy); if (s->r_acc.offset) { // We can be here - SCIkdebug(SCIkBRESEN, "Success\n"); + debugC(2, kDebugLevelBresen, "Success\n"); PUT_SEL32V(client, heading, angle); return make_reg(0, angle); |