aboutsummaryrefslogtreecommitdiff
path: root/src/libsok
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-01-13 20:24:06 -0500
committerPaul Duncan <pabs@pablotron.org>2019-01-13 20:24:06 -0500
commitc90474ee7143a215ef3b3548024e025ce16ad6d3 (patch)
treec935b33186759432050ca8dc116117a989f7ff5b /src/libsok
parenteb30ab240acea4f1e338bb4fcc1ddadb5ccc5aee (diff)
downloadsok-c90474ee7143a215ef3b3548024e025ce16ad6d3.tar.bz2
sok-c90474ee7143a215ef3b3548024e025ce16ad6d3.zip
working, with sprites
Diffstat (limited to 'src/libsok')
-rw-r--r--src/libsok/sok-ctx.c18
1 files changed, 9 insertions, 9 deletions
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++) {