From 9e8d15918e5f3317fc0f7980bc6d07aca8fbc12d Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 8 Jan 2019 07:35:11 -0500 Subject: remove unused debugging calls --- src/libsok/sok-ctx.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/libsok') 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 -#include // debugging #include // 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; } -- cgit v1.2.3