From: Eric S. Raymond Date: Thu, 29 Jun 2017 20:41:49 +0000 (-0400) Subject: Start another round of magic_number removal, this time for motions. X-Git-Tag: 1.1~9 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=50e059eff8da3d02abe11e16160a1300ea1af3b6 Start another round of magic_number removal, this time for motions. --- diff --git a/main.c b/main.c index 0a2ed9a..4ebe719 100644 --- a/main.c +++ b/main.c @@ -602,19 +602,19 @@ static bool playermove(token_t verb, int motion) /* Couldn't find an entry matching the motion word passed * in. Various messages depending on word given. */ int spk = CANT_APPLY; - if (motion >= 43 && motion <= 50) + if (motion >= MOT_43 && motion <= MOT_50) spk = BAD_DIRECTION; - if (motion == 29 || motion == 30) + if (motion == MOT_29 || motion == MOT_30) spk = BAD_DIRECTION; - if (motion == 7 || motion == 36 || motion == 37) + if (motion == MOT_7 || motion == MOT_36 || motion == MOT_37) spk = UNSURE_FACING; - if (motion == 11 || motion == 19) + if (motion == MOT_11 || motion == MOT_19) spk = NO_INOUT_HERE; if (verb == FIND || verb == INVENTORY) spk = NEARBY; - if (motion == 62 || motion == 65) + if (motion == MOT_62 || motion == MOT_65) spk = NOTHING_HAPPENS; - if (motion == 17) + if (motion == MOT_17) spk = WHICH_WAY; rspeak(spk); return true;