aboutsummaryrefslogtreecommitdiff
path: root/src/room.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-03-28 14:11:22 -0400
committerFranklin Wei <git@fwei.tk>2016-03-28 14:11:22 -0400
commit2687778cf7c099e47de410d62d26d874f4dcebba (patch)
tree359759f153ffd0dc6b8c0bfc60460d10c9cd806a /src/room.h
parent13052597a19fd2212efb7f51f19ed73b9f4b6ba4 (diff)
downloadnetcosm-2687778cf7c099e47de410d62d26d874f4dcebba.zip
netcosm-2687778cf7c099e47de410d62d26d874f4dcebba.tar.gz
netcosm-2687778cf7c099e47de410d62d26d874f4dcebba.tar.bz2
netcosm-2687778cf7c099e47de410d62d26d874f4dcebba.tar.xz
kludge things to compile on old linux
Diffstat (limited to 'src/room.h')
-rw-r--r--src/room.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/room.h b/src/room.h
index e9e1953..0b68734 100644
--- a/src/room.h
+++ b/src/room.h
@@ -20,15 +20,14 @@
#include "globals.h"
-#include "obj.h"
-#include "verb.h"
-
/* Our world is an array of rooms, each having a list of objects in
- them, as well as actions that can be performed in the room. Objects
- are added by hooks in rooms, which are provided by the world
- module. */
+ * them, as well as actions that can be performed in them
+ * (verbs). Objects are added by hooks in rooms, which are provided as
+ * function pointers by the world module. */
-typedef struct child_data user_t; // definition of child_data in server.h
+struct child_data;
+struct object_t;
+struct verb_t;
typedef enum room_id { ROOM_NONE = -1 } room_id;
@@ -50,8 +49,10 @@ struct roomdata_t {
/* return values indicate permission to enter/leave,
* setting to NULL defaults to true.
*/
- bool (* const hook_enter)(room_id room, user_t *user);
- bool (* const hook_leave)(room_id room, user_t *user);
+
+ /* NOTE: struct child_data is aliased as "user_t"!!! */
+ bool (* const hook_enter)(room_id room, struct child_data *user);
+ bool (* const hook_leave)(room_id room, struct child_data *user);
void (* const hook_serialize)(room_id room, int fd);
void (* const hook_deserialize)(room_id room, int fd);
void (* const hook_destroy)(room_id room);