From c90474ee7143a215ef3b3548024e025ce16ad6d3 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 13 Jan 2019 20:24:06 -0500 Subject: working, with sprites --- src/libsok/sok-ctx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libsok/sok-ctx.c') diff --git a/src/libsok/sok-ctx.c b/src/libsok/sok-ctx.c index 84fe8ed..e278af1 100644 --- a/src/libsok/sok-ctx.c +++ b/src/libsok/sok-ctx.c @@ -538,15 +538,6 @@ bool sok_ctx_walk( } } - if (cbs->on_home) { - const bool has_goal = tile_is_goal(ctx, ctx->home); - - // emit home - if (!cbs->on_home(ctx, ctx->home, has_goal, data)) { - return false; - } - } - if (cbs->on_walls_start && !cbs->on_walls_start(ctx, data)) { return false; } @@ -597,6 +588,15 @@ bool sok_ctx_walk( return false; } + if (cbs->on_home) { + const bool has_goal = tile_is_goal(ctx, ctx->home); + + // emit home + if (!cbs->on_home(ctx, ctx->home, has_goal, data)) { + return false; + } + } + if (cbs->on_box) { // walk boxes for (size_t i = 0; i < ctx->level.num_boxes; i++) { -- cgit v1.2.3