From 195e6e149b401cd8d27f406834c7f54a8cca4909 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 7 Apr 2023 08:18:50 -0400 Subject: [PATCH] Apply loc_t type. --- advent.h | 2 +- main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/advent.h b/advent.h index 1162106..c1d3132 100644 --- a/advent.h +++ b/advent.h @@ -167,7 +167,7 @@ struct game_t { int holdng; // number of objects being carried int igo; // # uses of "go" instead of a direction int iwest; // # times he's said "west" instead of "w" - int knfloc; // knife location; 0 if none, -1 after caveat + loc_t knfloc; // knife location; LOC_NOWERE if none, -1 after caveat turn_t limit; // lifetime of lamp loc_t loc; // where player is now loc_t newloc; // where player is going diff --git a/main.c b/main.c index cdc83ba..e3e6a96 100644 --- a/main.c +++ b/main.c @@ -370,7 +370,7 @@ static bool dwarfmove(void) ++game.dtotal; if (game.odloc[i] == game.dloc[i]) { ++attack; - if (game.knfloc >= 0) + if (game.knfloc >= LOC_NOWHERE) game.knfloc = game.loc; if (randrange(1000) < 95 * (game.dflag - 2)) ++stick; -- 2.31.1