Replace motion word VOCWRD() calls with enums.
This commit is contained in:
parent
3476d69806
commit
3c1348c736
5 changed files with 9 additions and 43 deletions
8
advent.h
8
advent.h
|
@ -167,17 +167,9 @@ extern int restore(FILE *);
|
|||
#define INDEEP(LOC) ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
|
||||
|
||||
/* vocabulary items */
|
||||
extern long NUL;
|
||||
extern long BACK;
|
||||
extern long LOOK;
|
||||
extern long CAVE;
|
||||
extern long FIND;
|
||||
extern long INVENT;
|
||||
extern long SAY;
|
||||
extern long ENTER;
|
||||
extern long STREAM;
|
||||
extern long DPRSSN;
|
||||
extern long ENTRNC;
|
||||
extern long LOCK;
|
||||
extern long THROW;
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ motions: !!omap
|
|||
words: !!null
|
||||
- MOT_2:
|
||||
words: ['road', 'hill']
|
||||
- MOT_3:
|
||||
- ENTER:
|
||||
words: ['enter']
|
||||
- MOT_4:
|
||||
words: ['upstr']
|
||||
|
@ -395,7 +395,7 @@ motions: !!omap
|
|||
words: ['fores']
|
||||
- MOT_7:
|
||||
words: ['forwa', 'conti', 'onwar']
|
||||
- MOT_8:
|
||||
- BACK:
|
||||
words: ['back', 'retur', 'retre']
|
||||
- MOT_9:
|
||||
words: ['valle']
|
||||
|
@ -407,7 +407,7 @@ motions: !!omap
|
|||
words: ['build', 'house']
|
||||
- MOT_13:
|
||||
words: ['gully']
|
||||
- MOT_14:
|
||||
- STREAM:
|
||||
words: ['strea']
|
||||
- MOT_15:
|
||||
words: ['fork']
|
||||
|
@ -421,7 +421,7 @@ motions: !!omap
|
|||
words: ['inwar', 'insid', 'in']
|
||||
- MOT_20:
|
||||
words: ['surfa']
|
||||
- MOT_21:
|
||||
- NUL:
|
||||
words: ['null', 'nowhe']
|
||||
- MOT_22:
|
||||
words: ['dark']
|
||||
|
@ -493,7 +493,7 @@ motions: !!omap
|
|||
words: ['y2']
|
||||
- MOT_56:
|
||||
words: ['climb']
|
||||
- MOT_57:
|
||||
- LOOK:
|
||||
words: ['look', 'exami', 'touch', 'descr']
|
||||
- MOT_58:
|
||||
words: ['floor']
|
||||
|
@ -505,15 +505,15 @@ motions: !!omap
|
|||
words: ['slab', 'slabr']
|
||||
- MOT_62:
|
||||
words: ['xyzzy']
|
||||
- MOT_63:
|
||||
- DPRSSN:
|
||||
words: ['depre']
|
||||
- MOT_64:
|
||||
- ENTRNC:
|
||||
words: ['entra']
|
||||
- MOT_65:
|
||||
words: ['plugh']
|
||||
- MOT_66:
|
||||
words: ['secre']
|
||||
- MOT_67:
|
||||
- CAVE:
|
||||
words: ['cave']
|
||||
- MOT_68:
|
||||
words: !!null
|
||||
|
|
8
cheat.c
8
cheat.c
|
@ -13,17 +13,9 @@ struct game_t game;
|
|||
long LNLENG, LNPOSN;
|
||||
char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
|
||||
|
||||
long NUL;
|
||||
long BACK;
|
||||
long LOOK;
|
||||
long CAVE;
|
||||
long FIND;
|
||||
long INVENT;
|
||||
long SAY;
|
||||
long ENTER;
|
||||
long STREAM;
|
||||
long DPRSSN;
|
||||
long ENTRNC;
|
||||
long LOCK;
|
||||
long THROW;
|
||||
|
||||
|
|
12
init.c
12
init.c
|
@ -74,17 +74,7 @@ void initialise(void)
|
|||
|
||||
/* Define some handy mnemonics. */
|
||||
|
||||
/* These are motion-verb numbers. */
|
||||
BACK = VOCWRD(WORD_BACK, 0);
|
||||
CAVE = VOCWRD(WORD_CAVE, 0);
|
||||
DPRSSN = VOCWRD(WORD_DPRSSN, 0);
|
||||
ENTER = VOCWRD(WORD_ENTER, 0);
|
||||
ENTRNC = VOCWRD(WORD_ENTRNC, 0);
|
||||
LOOK = VOCWRD(WORD_LOOK, 0);
|
||||
NUL = VOCWRD(WORD_NUL, 0);
|
||||
STREAM = VOCWRD(WORD_STREAM, 0);
|
||||
|
||||
/* And some action verbs. */
|
||||
/* Some action verbs. */
|
||||
FIND = VOCWRD(WORD_FIND, 2);
|
||||
INVENT = VOCWRD(WORD_INVENT, 2);
|
||||
LOCK = VOCWRD(WORD_LOCK, 2);
|
||||
|
|
8
main.c
8
main.c
|
@ -43,17 +43,9 @@ struct game_t game;
|
|||
long LNLENG, LNPOSN;
|
||||
char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
|
||||
|
||||
long NUL;
|
||||
long BACK;
|
||||
long LOOK;
|
||||
long CAVE;
|
||||
long FIND;
|
||||
long INVENT;
|
||||
long SAY;
|
||||
long ENTER;
|
||||
long STREAM;
|
||||
long DPRSSN;
|
||||
long ENTRNC;
|
||||
long LOCK;
|
||||
long THROW;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue