X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=b6992497a12a5219b2f8c7679d66301fb94e8f8c;hp=af9d1239fc2d8faff602347c4d61ad22ac5a74ff;hb=236abc8cab5a6f8d0b1d1921800a8645dcda98a2;hpb=7a3f3ec7a6e28e8cb3e31d60893679922160e52c diff --git a/advent.h b/advent.h index af9d123..b699249 100644 --- a/advent.h +++ b/advent.h @@ -3,6 +3,7 @@ #include #include "common.h" +#include "newdb.h" #define LINESIZE 100 #define NDWARVES 6 /* number of dwarves */ @@ -70,14 +71,14 @@ struct game_t { long fixed[NOBJECTS + 1]; long link[NOBJECTS * 2 + 1]; long place[NOBJECTS + 1]; - long hinted[HNTSIZ + 1]; - long hintlc[HNTSIZ + 1]; + long hinted[HINT_COUNT]; + long hintlc[HINT_COUNT]; long prop[NOBJECTS + 1]; }; extern struct game_t game; -extern long LNLENG, LNPOSN, PARMS[]; +extern long LNLENG, LNPOSN; extern char rawbuf[LINESIZE], INLINE[LINESIZE + 1]; extern const char ascii_to_advent[]; extern const char advent_to_ascii[]; @@ -88,16 +89,15 @@ extern bool oldstyle, editline, prompt; #define READ_MODE "rb" #define WRITE_MODE "wb" extern void* xmalloc(size_t size); -extern char* xstrdup(const char*); extern void packed_to_token(long, char token[]); extern void token_to_packed(char token[], long*); -extern void speak(const char*); +extern void vspeak(const char*, va_list); extern bool wordeq(token_t, token_t); extern bool wordempty(token_t); extern void wordclear(token_t *); -extern void PSPEAK(vocab_t, int); -extern void RSPEAK(vocab_t); -extern void SETPRM(long, long, long); +extern void speak(const char*, ...); +extern void pspeak(vocab_t, int, ...); +extern void rspeak(vocab_t, ...); extern bool GETIN(FILE *, token_t*, token_t*, token_t*, token_t*); extern void echo_input(FILE*, char*, char*); extern char* get_input(void); @@ -185,10 +185,12 @@ struct command_t { enum speechpart part; vocab_t verb; vocab_t obj; + token_t wd1, wd1x; + token_t wd2, wd2x; }; void initialise(void); -int action(FILE *input, struct command_t command); +int action(FILE *input, struct command_t *command); /* Phase codes for action returns. * These were at one time FORTRAN line numbers.