X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=432d5d8b795fbd76402ed7614d998c98ad18c7f0;hb=2db3bed3f1ee0a220bf1d1b818716afb90b30b35;hp=b8bc4613bc313c995ece1af9699636433a434bf9;hpb=eebc87f889b0fa1404684aa6e72dda5a5e53d96b;p=open-adventure.git diff --git a/misc.c b/misc.c index b8bc461..432d5d8 100644 --- a/misc.c +++ b/misc.c @@ -1,8 +1,7 @@ /* * I/O and support routines. * - * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods - * SPDX-FileCopyrightText: 2017 by Eric S. Raymond + * SPDX-FileCopyrightText: Copyright 1977, 2005 by Will Crowther and Don Woods, 2017 by Eric S. Raymond * SPDX-License-Identifier: BSD-2-Clause */ @@ -432,6 +431,7 @@ static void get_vocab_metadata(const char* word, vocab_t* id, word_type_t* type) vocab_t ref_num; ref_num = get_motion_vocab_id(word); + // Second conjunct is because the magic-word placeholder is a bit special if (ref_num != WORD_NOT_FOUND) { *id = ref_num; *type = MOTION; @@ -446,7 +446,7 @@ static void get_vocab_metadata(const char* word, vocab_t* id, word_type_t* type) } ref_num = get_action_vocab_id(word); - if (ref_num != WORD_NOT_FOUND) { + if (ref_num != WORD_NOT_FOUND && ref_num != PART) { *id = ref_num; *type = ACTION; return; @@ -595,12 +595,17 @@ void move(obj_t object, loc_t where) 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 + /* (ESR) Read this in combination with the macro defintions in advebt.h. + */ + game.objects[object].prop = PROP_STASHIFY(pval); +#ifdef PROP_SET_SEEN + PROP_SET_SEEN(object); +#endif } void carry(obj_t object, loc_t where)