Removed spk from wave, fixed compiler warning
This commit is contained in:
parent
993194bd4d
commit
c7aecb7249
1 changed files with 8 additions and 17 deletions
25
actions.c
25
actions.c
|
@ -1089,47 +1089,40 @@ static int wake(token_t verb, token_t obj)
|
||||||
static token_t birdspeak(void)
|
static token_t birdspeak(void)
|
||||||
{
|
{
|
||||||
switch (game.prop[BIRD]) {
|
switch (game.prop[BIRD]) {
|
||||||
case BIRD_UNCAGED:
|
|
||||||
case BIRD_FOREST_UNCAGED:
|
|
||||||
return FREE_FLY;
|
|
||||||
case BIRD_CAGED:
|
case BIRD_CAGED:
|
||||||
return CAGE_FLY;
|
return CAGE_FLY;
|
||||||
|
default:
|
||||||
|
return FREE_FLY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wave(token_t verb, token_t obj)
|
static int wave(token_t verb, token_t obj)
|
||||||
/* Wave. No effect unless waving rod at fissure or at bird. */
|
/* Wave. No effect unless waving rod at fissure or at bird. */
|
||||||
{
|
{
|
||||||
int spk = actions[verb].message;
|
|
||||||
if ((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2)))
|
|
||||||
spk = ARENT_CARRYING;
|
|
||||||
if (obj != ROD ||
|
if (obj != ROD ||
|
||||||
!TOTING(obj) ||
|
!TOTING(obj) ||
|
||||||
(!HERE(BIRD) && (game.closng || !AT(FISSURE)))) {
|
(!HERE(BIRD) && (game.closng || !AT(FISSURE)))) {
|
||||||
rspeak(spk);
|
rspeak(((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2))) ? ARENT_CARRYING : actions[verb].message);
|
||||||
return GO_CLEAROBJ;
|
return GO_CLEAROBJ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HERE(BIRD))
|
if (game.prop[BIRD] == BIRD_UNCAGED && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
|
||||||
spk = birdspeak();
|
|
||||||
if (spk == FREE_FLY && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
|
|
||||||
drop(JADE, game.loc);
|
drop(JADE, game.loc);
|
||||||
game.prop[JADE] = 0;
|
game.prop[JADE] = 0;
|
||||||
--game.tally;
|
--game.tally;
|
||||||
spk = NECKLACE_FLY;
|
rspeak(NECKLACE_FLY);
|
||||||
rspeak(spk);
|
|
||||||
return GO_CLEAROBJ;
|
return GO_CLEAROBJ;
|
||||||
} else {
|
} else {
|
||||||
if (game.closed) {
|
if (game.closed) {
|
||||||
rspeak(spk);
|
rspeak(birdspeak());
|
||||||
return GO_DWARFWAKE;
|
return GO_DWARFWAKE;
|
||||||
}
|
}
|
||||||
if (game.closng || !AT(FISSURE)) {
|
if (game.closng || !AT(FISSURE)) {
|
||||||
rspeak(spk);
|
rspeak(birdspeak());
|
||||||
return GO_CLEAROBJ;
|
return GO_CLEAROBJ;
|
||||||
}
|
}
|
||||||
if (HERE(BIRD))
|
if (HERE(BIRD))
|
||||||
rspeak(spk);
|
rspeak(birdspeak());
|
||||||
|
|
||||||
/* FIXME: Arithemetic on property values */
|
/* FIXME: Arithemetic on property values */
|
||||||
game.prop[FISSURE] = 1 - game.prop[FISSURE];
|
game.prop[FISSURE] = 1 - game.prop[FISSURE];
|
||||||
|
@ -1138,8 +1131,6 @@ static int wave(token_t verb, token_t obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int action(struct command_t *command)
|
int action(struct command_t *command)
|
||||||
/* Analyse a verb. Remember what it was, go back for object if second word
|
/* Analyse a verb. Remember what it was, go back for object if second word
|
||||||
* unless verb is "say", which snarfs arbitrary second word.
|
* unless verb is "say", which snarfs arbitrary second word.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue