X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=dc81ed5fd55b6e9c625bfc281493ffc4c441f243;hp=48cb54e16fccf86980025e3313359172236eeb4c;hb=e7dc3eab5d7eb798199e59081e846582af7205a7;hpb=5f4df123b40b8d9c01b88bc506ee5bb8b3c82d70 diff --git a/advent.h b/advent.h index 48cb54e..dc81ed5 100644 --- a/advent.h +++ b/advent.h @@ -102,7 +102,7 @@ typedef enum scorebonus {none, splatter, defeat, victory} score_t; * These were at one time FORTRAN line numbers. * The values don't matter, but perturb their order at your peril. */ -enum phase_codes { +typedef enum { GO_TERMINATE, GO_MOVE, GO_TOP, @@ -111,7 +111,7 @@ enum phase_codes { GO_WORD2, GO_UNKNOWN, GO_DWARFWAKE, -}; +} phase_codes_t; typedef long vocab_t; // index into a vocabulary array */ typedef long verb_t; // index into an actions array */ @@ -210,6 +210,7 @@ extern struct game_t game; extern struct settings_t settings; extern bool get_command_input(command_t *); +extern void clear_command(command_t *); extern void speak(const char*, ...); extern void sspeak(int msg, ...); extern void pspeak(vocab_t, enum speaktype, bool, int, ...); @@ -234,7 +235,7 @@ extern int suspend(void); extern int resume(void); extern int restore(FILE *); extern long initialise(void); -extern int action(command_t); +extern phase_codes_t action(command_t); extern void state_change(obj_t, int); extern bool is_valid(struct game_t);