Moved state_change to misc.c to start using it in main.c, too
[open-adventure.git] / advent.h
index 3c3372576b8c9cfdec568b5a296e286e8357a661..470e79ff5879d1a369dd30e308cf6f06a9d29789 100644 (file)
--- a/advent.h
+++ b/advent.h
 
 /* Special object-state values - integers > 0 are object-specific */
 #define STATE_NOTFOUND  -1       // 'Not found" state of treasures */
-#define STATE_GROUND   0         // After discovered, before messed with
+#define STATE_FOUND    0         // After discovered, before messed with
+#define STATE_IN_CAVITY        1         // State value common to all gemstones
+
+/* Special fixed object-state values - integers > 0 are location */
+#define IS_FIXED -1
+#define IS_FREE 0
 
 /* Map a state property value to a negative range, where the object cannot be
  * picked up but the value can be recovered later.  Avoid colliding with -1,
@@ -190,7 +195,7 @@ struct command_t {
     token_t wd2;
     long id1;
     long id2;
-    char raw1[BUFSIZ], raw2[BUFSIZ];
+    char raw1[LINESIZE], raw2[LINESIZE];
 };
 
 extern struct game_t game;
@@ -237,6 +242,8 @@ extern int resume(void);
 extern int restore(FILE *);
 extern long initialise(void);
 extern int action(struct command_t *command);
+extern void state_change(long obj, long state);
+
 
 void bug(enum bugtype, const char *) __attribute__((__noreturn__));