add macros
This commit is contained in:
parent
66fc645582
commit
715437078a
6
w/w.c
6
w/w.c
|
@ -10,6 +10,8 @@
|
|||
|
||||
#define CMD_NULL "-"
|
||||
#define CMD_FWD 's'
|
||||
#define CMD_ATTACK 'a'
|
||||
#define CMD_FLEE 'f'
|
||||
|
||||
#define SC_TITLE 0
|
||||
#define SC_SETNAME 1
|
||||
|
@ -470,11 +472,11 @@ void update(char command[CMD_LEN])
|
|||
}
|
||||
else if (state.screen == SC_MONSTER)
|
||||
{
|
||||
if (c == 'f')
|
||||
if (c == CMD_FLEE)
|
||||
{
|
||||
state.screen = SC_MAP;
|
||||
}
|
||||
else if (c == 'a')
|
||||
else if (c == CMD_ATTACK)
|
||||
{
|
||||
// hero then monster turn.
|
||||
// possible outcomes: hero dead, monster dead, or still fight
|
||||
|
|
Loading…
Reference in New Issue