Correct return types for all of the action handling functions in actions, so it's clear we're not just using arbitrary ints

This commit is contained in:
Aaron Traas 2018-12-07 10:36:42 -05:00
parent 2a5dac3d8c
commit e7dc3eab5d
2 changed files with 35 additions and 34 deletions

View file

@ -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 */
@ -235,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);