Use more enums

This commit is contained in:
Pasi Kallinen
2018-03-31 08:57:22 +03:00
parent fa89d84fa3
commit 9b7e146807
3 changed files with 38 additions and 24 deletions

View File

@@ -254,6 +254,15 @@ struct Align {
extern const struct Align aligns[]; /* table of available alignments */
enum utraptypes {
TT_BEARTRAP = 0,
TT_PIT,
TT_WEB,
TT_LAVA,
TT_INFLOOR,
TT_BURIEDBALL
};
/*** Information about the player ***/
struct you {
xchar ux, uy; /* current map coordinates */
@@ -270,13 +279,7 @@ struct you {
int ulevel; /* 1 to MAXULEV */
int ulevelmax;
unsigned utrap; /* trap timeout */
unsigned utraptype; /* defined if utrap nonzero */
#define TT_BEARTRAP 0
#define TT_PIT 1
#define TT_WEB 2
#define TT_LAVA 3
#define TT_INFLOOR 4
#define TT_BURIEDBALL 5
unsigned utraptype; /* defined if utrap nonzero. one of utraptypes */
char urooms[5]; /* rooms (roomno + 3) occupied now */
char urooms0[5]; /* ditto, for previous position */
char uentered[5]; /* rooms (roomno + 3) entered this turn */