From: Eric S. Raymond Date: Thu, 15 Jun 2017 11:16:39 +0000 (-0400) Subject: More ARB tagging. X-Git-Tag: 1.1~300 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=1d37262a162f194cac7728e4f9f48d9db8e36966;p=open-adventure.git More ARB tagging. --- diff --git a/actions.c b/actions.c index ba6450e..18a7714 100644 --- a/actions.c +++ b/actions.c @@ -269,7 +269,7 @@ static int carry(token_t verb, token_t obj) } if (!TOTING(CAGE))spk=ARB_27; if (TOTING(ROD))spk=ARB_26; - if (spk/2 == 13) { + if (spk/2 == 13) { /* FIXME: Arithmetic on message number */ RSPEAK(spk); return GO_CLEAROBJ; } @@ -296,7 +296,7 @@ static int chain(token_t verb) spk=ARB_171; if (game.prop[BEAR] == 0)spk=ARB_41; if (game.prop[CHAIN] == 0)spk=ARB_37; - if (spk != 171) {RSPEAK(spk); return GO_CLEAROBJ;} + if (spk != ARB_171) {RSPEAK(spk); return GO_CLEAROBJ;} game.prop[CHAIN]=0; game.fixed[CHAIN]=0; if (game.prop[BEAR] != 3)game.prop[BEAR]=2; @@ -305,7 +305,7 @@ static int chain(token_t verb) spk=ARB_172; if (game.prop[CHAIN] != 0)spk=ARB_34; if (game.loc != PLAC[CHAIN])spk=ARB_173; - if (spk != 172) {RSPEAK(spk); return GO_CLEAROBJ;} + if (spk != ARB_172) {RSPEAK(spk); return GO_CLEAROBJ;} game.prop[CHAIN]=2; if (TOTING(CHAIN))DROP(CHAIN,game.loc); game.fixed[CHAIN]= -1; @@ -450,7 +450,7 @@ static int extinguish(token_t verb, int obj) else if (obj == LAMP) { game.prop[LAMP]=0; RSPEAK(ARB_40); - spk = DARK(game.loc) ? 16 : 0; + spk = DARK(game.loc) ? ARB_16 : ARB_0; } else if (obj == DRAGON || obj == VOLCAN) spk=ARB_146; @@ -720,7 +720,7 @@ static int lock(token_t verb, token_t obj) if (!game.panic)game.clock2=15; game.panic=true; } else { - spk=ARB_34+game.prop[GRATE]; + spk=ARB_34+game.prop[GRATE]; /* FIXME: Arithmetic on message number */ game.prop[GRATE]=1; if (verb == LOCK)game.prop[GRATE]=0; spk=spk+2*game.prop[GRATE]; @@ -767,7 +767,7 @@ static int pour(token_t verb, token_t obj) static int quit(FILE *input) /* Quit. Intransitive only. Verify intent and exit if that's what he wants. */ { - if (YES(input,22,54,54)) + if (YES(input,ARB_22,ARB_54,ARB_54)) score(1); return GO_CLEAROBJ; } @@ -795,7 +795,7 @@ static int read(FILE *input, token_t verb, token_t obj) return GO_CLEAROBJ; } if (obj == OYSTER && !game.clshnt) { - game.clshnt=YES(input,192,193,54); + game.clshnt=YES(input,ARB_192,ARB_193,ARB_54); return GO_CLEAROBJ; } PSPEAK(obj,OBJTXT[obj]+game.prop[obj]); diff --git a/main.c b/main.c index fda7272..49dcbfe 100644 --- a/main.c +++ b/main.c @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) /* Start-up, dwarf stuff */ game.zzword=RNDVOC(3,0); - game.novice=YES(stdin, 65,1,0); + game.novice=YES(stdin, ARB_65,ARB_1,ARB_0); game.newloc=1; game.loc=1; game.limit=330; @@ -244,11 +244,11 @@ static void checkhints(FILE *cmdin) /* Fall through to hint display */ game.hintlc[hint]=0; - if (!YES(cmdin,HINTS[hint][3],0,54)) + if (!YES(cmdin,HINTS[hint][3],ARB_0,ARB_54)) return; SETPRM(1,HINTS[hint][2],HINTS[hint][2]); RSPEAK(ARB_261); - game.hinted[hint]=YES(cmdin,175,HINTS[hint][4],54); + game.hinted[hint]=YES(cmdin,ARB_175,HINTS[hint][4],ARB_54); if (game.hinted[hint] && game.limit > 30) game.limit=game.limit+30*HINTS[hint][2]; } @@ -431,16 +431,16 @@ static bool dwarfmove(void) if (game.dtotal == 0) return true; SETPRM(1,game.dtotal,0); - RSPEAK(4+1/game.dtotal); + RSPEAK(ARB_4+1/game.dtotal); /* FIXME: Arithmetic on message number */ if (attack == 0) return true; if (game.dflag == 2)game.dflag=3; SETPRM(1,attack,0); int k=6; - if (attack > 1)k=250; + if (attack > 1)k=ARB_250; RSPEAK(k); SETPRM(1,stick,0); - RSPEAK(k+1+2/(1+stick)); + RSPEAK(k+1+2/(1+stick)); /* FIXME: Arithmetic on message number */ if (stick == 0) return true; game.oldlc2=game.loc; @@ -477,7 +477,8 @@ static void croak(FILE *cmdin) RSPEAK(ARB_131); score(0); } else { - if (!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54)) + /* FIXME: Arithmetic on message numbers */ + if (!YES(cmdin,ARB_79+game.numdie*2,ARB_80+game.numdie*2,ARB_54)) score(0); if (game.numdie == MAXDIE) score(0); @@ -523,8 +524,8 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) game.oldlc2=game.oldloc; game.oldloc=game.loc; k2=0; - if (motion == game.loc)k2=91; - if (CNDBIT(game.loc,NOBACK))k2=274; + if (motion == game.loc)k2=ARB_91; + if (CNDBIT(game.loc,NOBACK))k2=ARB_274; if (k2 == 0) { for (;;) { scratchloc=MOD((labs(TRAVEL[kk])/1000),1000); @@ -565,7 +566,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) } else if (motion == CAVE) { /* Cave. Different messages depending on whether above ground. */ - RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58); + RSPEAK((OUTSID(game.loc) && game.loc != 8) ? ARB_57 : ARB_58); return true; } else { diff --git a/saveresume.c b/saveresume.c index 62523f3..6cb48ae 100644 --- a/saveresume.c +++ b/saveresume.c @@ -40,7 +40,7 @@ int saveresume(FILE *input, bool resume) * some points (so can't win by using saved games to retry * battles or to start over after learning zzword). */ RSPEAK(ARB_260); - if (!YES(input,200,54,54)) return GO_CLEAROBJ; + if (!YES(input,ARB_200,ARB_54,ARB_54)) return GO_CLEAROBJ; game.saved=game.saved+5; } else @@ -48,7 +48,7 @@ int saveresume(FILE *input, bool resume) /* Resume. Read a suspended game back from a file. */ if (game.loc != 1 || game.abbrev[1] != 1) { RSPEAK(ARB_268); - if (!YES(input,200,54,54)) return GO_CLEAROBJ; + if (!YES(input,ARB_200,ARB_54,ARB_54)) return GO_CLEAROBJ; } }