projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bfa06be
)
Fix compiler warnings.
author
Eric S. Raymond
<esr@thyrsus.com>
Tue, 13 Jun 2017 18:33:19 +0000
(14:33 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Tue, 13 Jun 2017 18:33:19 +0000
(14:33 -0400)
actions.c
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index 9a68f268429a0f5ed1c9c615164fc1e325996850..6936fa279035c61437b6a74fea6b2515d60da047 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-177,6
+177,7
@@
static int blast(void)
game.bonus=135;
RSPEAK(game.bonus);
score(0);
game.bonus=135;
RSPEAK(game.bonus);
score(0);
+ return GO_CLEAROBJ; /* pacify compiler - we never get here */
}
static int vbreak(token_t verb, token_t obj)
}
static int vbreak(token_t verb, token_t obj)
@@
-234,9
+235,9
@@
static int carry(token_t verb, token_t obj)
if (obj == RUG && game.prop[RUG] == 2)spk=222;
if (obj == SIGN)spk=196;
if (obj == MESSAG) {
if (obj == RUG && game.prop[RUG] == 2)spk=222;
if (obj == SIGN)spk=196;
if (obj == MESSAG) {
- spk=190;
- return GO_CLEAROBJ;
+ RSPEAK(190);
DSTROY(MESSAG);
DSTROY(MESSAG);
+ return GO_CLEAROBJ;
}
if (game.fixed[obj] != 0) {
RSPEAK(spk);
}
if (game.fixed[obj] != 0) {
RSPEAK(spk);
diff --git
a/main.c
b/main.c
index b5d190da2325a7363dcd0d7b9342c69472dc34f0..5a3f2002683de89e3c78aad525adb756b0a447a0 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-264,7
+264,7
@@
bool spotted_by_pirate(int i)
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted.
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted.
- * Note that game.place
(CHEST)
=0 might mean that he's thrown
+ * Note that game.place
[CHEST]
=0 might mean that he's thrown
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
@@
-273,9
+273,7
@@
bool spotted_by_pirate(int i)
for (int j=MINTRS; j<=MAXTRS; j++) {
/* Pirate won't take pyramid from plover room or dark
* room (too easy!). */
for (int j=MINTRS; j<=MAXTRS; j++) {
/* Pirate won't take pyramid from plover room or dark
* room (too easy!). */
- if (j == PYRAM && (game.loc == PLAC[PYRAM] || game.loc == PLAC[EMRALD])) {
- if (HERE(j))
- k=1;
+ if (j==PYRAM && (game.loc==PLAC[PYRAM] || game.loc==PLAC[EMRALD])) {
return true;
}
if (TOTING(j)) {
return true;
}
if (TOTING(j)) {
@@
-297,7
+295,6
@@
bool spotted_by_pirate(int i)
game.dloc[PIRATE]=game.chloc;
game.odloc[PIRATE]=game.chloc;
game.dseen[PIRATE]=false;
game.dloc[PIRATE]=game.chloc;
game.odloc[PIRATE]=game.chloc;
game.dseen[PIRATE]=false;
-
return true;
}
if (HERE(j))
return true;
}
if (HERE(j))