diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-01-08 07:35:11 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-01-08 07:35:11 -0500 |
commit | 9e8d15918e5f3317fc0f7980bc6d07aca8fbc12d (patch) | |
tree | fc20fa49078b1d8b3e111c45a4f97c3e1b53e21c /src | |
parent | 2967ff07fa5b5bcbf0983c225336faa8b4494e47 (diff) | |
download | sok-9e8d15918e5f3317fc0f7980bc6d07aca8fbc12d.tar.bz2 sok-9e8d15918e5f3317fc0f7980bc6d07aca8fbc12d.zip |
remove unused debugging calls
Diffstat (limited to 'src')
-rw-r--r-- | src/libsok/sok-ctx.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/libsok/sok-ctx.c b/src/libsok/sok-ctx.c index de22d1e..cc6b1ce 100644 --- a/src/libsok/sok-ctx.c +++ b/src/libsok/sok-ctx.c @@ -1,5 +1,4 @@ #include <stdbool.h> -#include <stdio.h> // debugging #include <string.h> // memset() #include "sok.h" @@ -171,13 +170,9 @@ sok_ctx_set_level( return false; } - // init moves + // init moves, player, and boxes ctx->num_moves = 0; - - // init player ctx->home = ctx->level.home; - - // init boxes memcpy(ctx->boxes, ctx->level.boxes, ctx->level.num_boxes * sizeof(sok_pos_t)); // return success @@ -202,7 +197,6 @@ tile_is_box( const sok_pos_t pos ) { for (size_t i = 0; i < ctx->level.num_boxes; i++) { - // fprintf(stderr, "D: ctx->boxes[%zu] = {%u, %u}\n", i, ctx->boxes[i].x, ctx->boxes[i].y); if (POINTS_EQUAL(ctx->boxes[i], pos)) { return true; } @@ -241,21 +235,6 @@ sok_can_move( { .x = ctx->home.x, .y = ctx->home.y - 2 }, }; - /* fprintf( - stderr, - "D: ctx->home = {%u, %u}, ps[] = {{%u, %u}, {%u, %u}};\n" - "D: tile_is_floor(ctx, ps[0]) = %c, tile_is_box(ctx, ps[0]) = %c\n" - "D: tile_is_floor(ctx, ps[1]) = %c, tile_is_box(ctx, ps[1]) = %c\n" - "", - ctx->home.x, ctx->home.y, - ps[0].x, ps[0].y, - ps[1].x, ps[1].y, - tile_is_floor(ctx, ps[0]) ? 't' : 'f', - tile_is_box(ctx, ps[0]) ? 't' : 'f', - tile_is_floor(ctx, ps[1]) ? 't' : 'f', - tile_is_box(ctx, ps[1]) ? 't' : 'f' - ); */ - return (( (ctx->home.y > 0) && tile_is_floor(ctx, ps[0]) && @@ -410,7 +389,6 @@ sok_ctx_move( const sok_dir_t dir ) { if (!sok_can_move(ctx, dir)) { - // fprintf(stderr, "can_move failed\n"); return false; } |