X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=66ad24707d752ebe0bc0a2490bec5fd112bf3518;hb=fe46e5ab0c1ec9f9a1d7954b63422e15fe623e58;hp=00a138f1160156223c6685b609d825b86d7e0575;hpb=59243cf8bc1939348467810bc63e107728a680c4;p=open-adventure.git diff --git a/main.c b/main.c index 00a138f..66ad247 100644 --- a/main.c +++ b/main.c @@ -417,8 +417,8 @@ static bool dwarfmove(void) if (game.dloc[i] == 0) continue; /* Fill tk array with all the places this dwarf might go. */ - int j = 1; - kk = KEY[game.dloc[i]]; + unsigned int j = 1; + kk = TKEY[game.dloc[i]]; if (kk != 0) do { game.newloc = T_DESTINATION(TRAVEL[kk]); @@ -541,7 +541,7 @@ static void croak(void) static bool playermove(token_t verb, int motion) { - int scratchloc, k2, kk = KEY[game.loc]; + int scratchloc, k2, kk = TKEY[game.loc]; game.newloc = game.loc; if (kk == 0) BUG(LOCATION_HAS_NO_TRAVEL_ENTRIES); @@ -564,7 +564,7 @@ static bool playermove(token_t verb, int motion) scratchloc = T_DESTINATION(TRAVEL[kk]); if (scratchloc != motion) { if (!SPECIAL(scratchloc)) { - if (FORCED(scratchloc) && T_DESTINATION(TRAVEL[KEY[scratchloc]]) == motion) + if (FORCED(scratchloc) && T_DESTINATION(TRAVEL[TKEY[scratchloc]]) == motion) k2 = kk; } if (TRAVEL[kk] >= 0) { @@ -580,7 +580,7 @@ static bool playermove(token_t verb, int motion) } motion = T_MOTION(TRAVEL[kk]); - kk = KEY[game.loc]; + kk = TKEY[game.loc]; break; /* fall through to ordinary travel */ } } else {