--- deliantra/server/include/tod.h 2008/04/20 05:24:55 1.14 +++ deliantra/server/include/tod.h 2009/09/17 00:07:04 1.17 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2006,2007,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2003-2006,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 2000,2007 Tim Rightnour * Copyright (©) 1992,2007 Frank Tore Johansen @@ -30,15 +30,26 @@ #define TICK2TIME(tick) (tstamp (tick) * TICK) #define TIME2TICK(time) tstamp ((time) / TICK) -#define RUNTIME_PER_HOUR 180. +#define RUNTIME_PER_MINUTE 3. +#define RUNTIME_PER_HOUR (RUNTIME_PER_MINUTE * 60.) #define TICKS_PER_HOUR int (RUNTIME_PER_HOUR / MAX_TIME * 1e6) +// the first year in the game +#define EPOCH 8437 + /* game time */ #define HOURS_PER_DAY 28 #define DAYS_PER_WEEK 7 #define WEEKS_PER_MONTH 5 #define MONTHS_PER_YEAR 17 +// one game minute is 3s +// one game hour is 3m +// one game day is 1h24s +// one game week is 9h48s +// one game month is 2d1h +// one game year is 34d17h + /* convenience */ #define WEEKS_PER_YEAR (WEEKS_PER_MONTH * MONTHS_PER_YEAR) #define DAYS_PER_MONTH (DAYS_PER_WEEK * WEEKS_PER_MONTH) @@ -62,7 +73,10 @@ }; /* from common/time.c */ -extern void get_tod (timeofday_t *tod); +void get_tod (timeofday_t *tod); +char *format_tod (char *buf, int len, timeofday_t *tod); +const char *get_current_tod_str (); +void print_tod (object *op); #endif