#define E extern
+#define LEVELS 12 // Levels in the game
+#define MONSTERS 12 // Monsters per level
+
#include <stdarg.h>
#include "player.h"
#include "list.h"
+#include "config.h"
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+
+// The timestamp from load time to be compared against the current midnight time.
+E long timestamp;
+E void save_timestamp();
+E void load_timestamp();
+E long int midnight(long int offset = 8);
// The socket
E int sock;
E char *remoteport;
E char *remotepass;
E char *playerdata;
+E char *adminpass;
+E char *VERSION;
+E char *PACKAGE;
E List<aClient> clients;
E List<aClient> players;
/** gameserv.cpp **/
E void gameserv(char *source, char *buf);
-E Monster *monsters[5][12];
+E Monster *monsters[LEVELS][MONSTERS];
/** forest.cpp **/
E void forest(char *source, char *buf);
/** functions.cpp **/
-E bool is_fighting(char *u);
-E bool isnt_fighting(char *u);
E bool is_playing(char *u);
-E bool has_started(char *u);
+E bool is_playing(aClient *user);
+
E bool is_fighting(char *u);
-E bool isnt_fighting(char *u);
+E bool is_fighting(aClient *user);
+
E bool player_fight(char *u);
+E bool player_fight(aClient *user);
+
E bool master_fight(char *u);
+E bool master_fight(aClient *user);
+
+E bool is_alive(char *u);
+E bool is_alive(aClient *user);
+
+#ifndef HAVE_STRTOK
E char *strtok(char *str, const char *delim);
+#endif
+
E char *spaces(int len, char *seperator);
E void display_monster(char *u);
E void display_players(char *u);
E void delete_masters();
E Monster *getNewMonster(Monster *m);
E void deleteMonster(Monster *m);
-E void refresh(aClient *ni);
+E void refresh(Player *p);
E void refreshall();
E void reset(aClient *ni);
E void do_list(char *u);
+E void do_refresh(char *u);
E void do_register(char *u);
E void do_identify(char *u);
E void do_play(char *u);