aboutsummaryrefslogtreecommitdiff
path: root/src/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/text')
-rw-r--r--src/text/draw.c8
-rw-r--r--src/text/main.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/text/draw.c b/src/text/draw.c
index 762fb8f..7c23171 100644
--- a/src/text/draw.c
+++ b/src/text/draw.c
@@ -100,11 +100,11 @@ draw(
// print title, level, and console
printf(
- "%s: %s (#%zu)\n" // set name, level name, and level number
+ "%s: %s (#%d)\n" // set name, level name, and level number
"%s\n" // level
- "%zu%s> ", // console
- level->pack, level->name, level_num,
+ "%d%s> ", // console
+ level->pack, level->name, (int) level_num,
buf,
- ctx->num_moves, sok_ctx_is_done(ctx) ? " (won!)" : ""
+ (int) ctx->num_moves, sok_ctx_is_done(ctx) ? " (won!)" : ""
);
}
diff --git a/src/text/main.c b/src/text/main.c
index 7d6f144..e80e984 100644
--- a/src/text/main.c
+++ b/src/text/main.c
@@ -20,7 +20,7 @@ draw_moves(
const sok_ctx_t * const ctx,
const size_t skip_moves
) {
- printf("Solution (%zu moves): ", ctx->num_moves - skip_moves);
+ printf("Solution (%d moves): ", (int) (ctx->num_moves - skip_moves));
for (size_t i = skip_moves; i < ctx->num_moves; i++) {
if (ctx->moves[i].dir >= SOK_DIR_LAST) {
die("invalid move: %u", ctx->moves[i].dir);
@@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
sok_ctx_init(&ctx, NULL);
if (!sok_ctx_set_level(&ctx, level->data)) {
- die("Couldn't load level %zu", level_num);
+ die("Couldn't load level %d", (int) level_num);
}
bool done = false;
@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) {
// load next level
if (!sok_ctx_set_level(&ctx, level->data)) {
- die("Couldn't load level %zu", level_num);
+ die("Couldn't load level %d", (int) level_num);
}
} else {
warn("cannot advance to next level");
@@ -85,7 +85,7 @@ int main(int argc, char *argv[]) {
case ACTION_RESET:
// reset level
if (!sok_ctx_set_level(&ctx, level->data)) {
- die("Couldn't load level %zu", level_num);
+ die("Couldn't load level %d", (int) level_num);
}
break;
@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
// load level
if (!sok_ctx_set_level(&ctx, level->data)) {
- die("Couldn't load level %zu", level_num);
+ die("Couldn't load level %d", (int) level_num);
}
break;