Abolish VOCWRD().
Action word mnemonics are now enums from adventure.yaml.
This commit is contained in:
parent
2aa5f1dd61
commit
7dc8839249
5 changed files with 5 additions and 34 deletions
8
advent.h
8
advent.h
|
@ -160,19 +160,11 @@ extern int restore(FILE *);
|
|||
#define PCT(N) (randrange(100) < (N))
|
||||
#define GSTONE(OBJ) ((OBJ) == EMERALD || (OBJ) == RUBY || (OBJ) == AMBER || (OBJ) == SAPPH)
|
||||
#define FOREST(LOC) CNDBIT(LOC, COND_FOREST)
|
||||
#define VOCWRD(LETTRS,SECT) (vocab(MAKEWD(LETTRS),SECT))
|
||||
#define SPECIAL(LOC) ((LOC) > SPECIALBASE)
|
||||
#define OUTSID(LOC) (CNDBIT(LOC, COND_ABOVE) || FOREST(LOC))
|
||||
|
||||
#define INDEEP(LOC) ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
|
||||
|
||||
/* vocabulary items */
|
||||
extern long FIND;
|
||||
extern long INVENT;
|
||||
extern long SAY;
|
||||
extern long LOCK;
|
||||
extern long THROW;
|
||||
|
||||
enum speechpart {unknown, intransitive, transitive};
|
||||
|
||||
struct command_t {
|
||||
|
|
|
@ -506,7 +506,7 @@ actions: !!omap
|
|||
- ACT_2:
|
||||
message: ARENT_CARRYING
|
||||
words: ['drop', 'relea', 'free', 'disca', 'dump']
|
||||
- ACT_3:
|
||||
- SAY:
|
||||
message: NO_MESSAGE
|
||||
words: ['say', 'chant', 'sing', 'utter', 'mumbl']
|
||||
- ACT_4:
|
||||
|
@ -515,7 +515,7 @@ actions: !!omap
|
|||
- ACT_5:
|
||||
message: NO_MESSAGE
|
||||
words: ['nothi']
|
||||
- ACT_6:
|
||||
- LOCK:
|
||||
message: NOT_LOCKABLE
|
||||
words: ['lock', 'close']
|
||||
- ACT_7:
|
||||
|
@ -548,16 +548,16 @@ actions: !!omap
|
|||
- ACT_16:
|
||||
message: RUB_NOGO
|
||||
words: ['rub']
|
||||
- ACT_17:
|
||||
- THROW:
|
||||
message: ARENT_CARRYING
|
||||
words: ['throw', 'toss']
|
||||
- ACT_18:
|
||||
message: HUH_MAN
|
||||
words: ['quit']
|
||||
- ACT_19:
|
||||
- FIND:
|
||||
message: NEARBY
|
||||
words: ['find', 'where']
|
||||
- ACT_20:
|
||||
- INVENT:
|
||||
message: NEARBY
|
||||
words: ['inven']
|
||||
- ACT_21:
|
||||
|
|
6
cheat.c
6
cheat.c
|
@ -13,12 +13,6 @@ struct game_t game;
|
|||
long LNLENG, LNPOSN;
|
||||
char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
|
||||
|
||||
long FIND;
|
||||
long INVENT;
|
||||
long SAY;
|
||||
long LOCK;
|
||||
long THROW;
|
||||
|
||||
FILE *logfp = NULL, *rfp = NULL;
|
||||
bool oldstyle = false;
|
||||
bool editline = true;
|
||||
|
|
9
init.c
9
init.c
|
@ -72,15 +72,6 @@ void initialise(void)
|
|||
game.hintlc[i] = 0;
|
||||
}
|
||||
|
||||
/* Define some handy mnemonics. */
|
||||
|
||||
/* Some action verbs. */
|
||||
FIND = VOCWRD(WORD_FIND, 2);
|
||||
INVENT = VOCWRD(WORD_INVENT, 2);
|
||||
LOCK = VOCWRD(WORD_LOCK, 2);
|
||||
SAY = VOCWRD(WORD_SAY, 2);
|
||||
THROW = VOCWRD(WORD_THROW, 2);
|
||||
|
||||
/* Initialise the dwarves. game.dloc is loc of dwarves,
|
||||
* hard-wired in. game.odloc is prior loc of each dwarf,
|
||||
* initially garbage. DALTLC is alternate initial loc for dwarf,
|
||||
|
|
6
main.c
6
main.c
|
@ -43,12 +43,6 @@ struct game_t game;
|
|||
long LNLENG, LNPOSN;
|
||||
char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
|
||||
|
||||
long FIND;
|
||||
long INVENT;
|
||||
long SAY;
|
||||
long LOCK;
|
||||
long THROW;
|
||||
|
||||
FILE *logfp = NULL, *rfp = NULL;
|
||||
bool oldstyle = false;
|
||||
bool editline = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue