aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-01-18 15:25:07 -0500
committerFranklin Wei <git@fwei.tk>2016-01-18 15:25:07 -0500
commit31d9ec507ee68ce4829ae1687dbf76a911c4cc75 (patch)
tree0f3831b0367b0182178b775311d4b56061793611
parent526f472c822fe567b3b50814b1321a8f7a24c945 (diff)
downloadnetcosm-31d9ec507ee68ce4829ae1687dbf76a911c4cc75.zip
netcosm-31d9ec507ee68ce4829ae1687dbf76a911c4cc75.tar.gz
netcosm-31d9ec507ee68ce4829ae1687dbf76a911c4cc75.tar.bz2
netcosm-31d9ec507ee68ce4829ae1687dbf76a911c4cc75.tar.xz
minor polishing
-rw-r--r--src/globals.h4
-rw-r--r--src/room.h2
-rw-r--r--src/server.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/globals.h b/src/globals.h
index 66088ed..eb04f2e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -50,8 +50,8 @@
/* convenience macros */
#define ARRAYLEN(x) (sizeof(x)/sizeof(x[0]))
-#define MAX(a,b) ((a>b)?(a):(b))
-#define MIN(a,b) ((a<b)?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#define MIN(a,b) (((a)<(b))?(a):(b))
/* global constants */
#define USERFILE "users.dat"
diff --git a/src/room.h b/src/room.h
index d1cf510..68ee413 100644
--- a/src/room.h
+++ b/src/room.h
@@ -20,7 +20,7 @@
typedef enum room_id { ROOM_NONE = -1 } room_id;
-typedef enum obj_id { OBJ_NONE = -1 } obj_id;
+typedef unsigned __int128 obj_id;
enum direction_t { DIR_N = 0, DIR_NE, DIR_E, DIR_SE, DIR_S, DIR_SW, DIR_W, DIR_NW, DIR_UP, DIR_DN, DIR_IN, DIR_OT, NUM_DIRECTIONS };
diff --git a/src/server.c b/src/server.c
index ef82b57..c8fa8c3 100644
--- a/src/server.c
+++ b/src/server.c
@@ -178,7 +178,7 @@ static void load_worldfile(void)
error("cannot access "WORLDFILE);
else
if(!world_load(WORLDFILE, netcosm_world, netcosm_world_sz, netcosm_world_name))
- error("Failed to load world from disk.\nTry removing "WORLDFILE".\n");
+ error("Failed to load world from disk.\nTry removing "WORLDFILE".");
}
static int server_bind(void)
@@ -383,5 +383,5 @@ int main(int argc, char *argv[])
ev_loop(loop, 0);
/* should never get here */
- error("unexpected termination");
+ error("FIXME: unexpected termination");
}