extern bool yes_or_no(const char*, const char*, const char*);
extern void juggle(obj_t);
extern void move(obj_t, loc_t);
-extern loc_t put(obj_t, loc_t, int);
+extern void put(obj_t, loc_t, int);
extern void carry(obj_t, loc_t);
extern void drop(obj_t, loc_t);
extern int atdwrf(loc_t);
* objects he might be carrying (lest he have some which
* could cause trouble, such as the keys). We describe the
* flash of light and trundle back. */
- game.objects[BOTTLE].prop = put(BOTTLE, LOC_NE, EMPTY_BOTTLE);
- game.objects[PLANT].prop = put(PLANT, LOC_NE, PLANT_THIRSTY);
- game.objects[OYSTER].prop = put(OYSTER, LOC_NE, STATE_FOUND);
- game.objects[LAMP].prop = put(LAMP, LOC_NE, LAMP_DARK);
- game.objects[ROD].prop = put(ROD, LOC_NE, STATE_FOUND);
- game.objects[DWARF].prop = put(DWARF, LOC_NE, 0);
+ put(BOTTLE, LOC_NE, EMPTY_BOTTLE);
+ put(PLANT, LOC_NE, PLANT_THIRSTY);
+ put(OYSTER, LOC_NE, STATE_FOUND);
+ put(LAMP, LOC_NE, LAMP_DARK);
+ put(ROD, LOC_NE, STATE_FOUND);
+ put(DWARF, LOC_NE, 0);
game.loc = LOC_NE;
game.oldloc = LOC_NE;
game.newloc = LOC_NE;
move(GRATE, LOC_SW);
move(SIGN, LOC_SW);
game.objects[SIGN].prop = ENDGAME_SIGN;
- game.objects[SNAKE].prop = put(SNAKE, LOC_SW, SNAKE_CHASED);
- game.objects[BIRD].prop = put(BIRD, LOC_SW, BIRD_CAGED);
- game.objects[CAGE].prop = put(CAGE, LOC_SW, STATE_FOUND);
- game.objects[ROD2].prop = put(ROD2, LOC_SW, STATE_FOUND);
- game.objects[PILLOW].prop = put(PILLOW, LOC_SW, STATE_FOUND);
+ put(SNAKE, LOC_SW, SNAKE_CHASED);
+ put(BIRD, LOC_SW, BIRD_CAGED);
+ put(CAGE, LOC_SW, STATE_FOUND);
+ put(ROD2, LOC_SW, STATE_FOUND);
+ put(PILLOW, LOC_SW, STATE_FOUND);
- game.objects[MIRROR].prop = put(MIRROR, LOC_NE, STATE_FOUND);
+ put(MIRROR, LOC_NE, STATE_FOUND);
game.objects[MIRROR].fixed = LOC_SW;
for (int i = 1; i <= NOBJECTS; i++) {
drop(object, where);
}
-loc_t put(obj_t object, loc_t where, int pval)
+void put(obj_t object, loc_t where, int pval)
/* put() is the same as move(), except it returns a value used to set up the
* negated game.prop values for the repository objects. */
{
move(object, where);
- return (-1) - pval;; // Needs to stay sinchronized with STASHED
+ game.objects[object].prop = (-1) - pval;; // Needs to stay synchronized with STASHED
}
void carry(obj_t object, loc_t where)