Crossfire Server, Branch 1.12
R12190
|
00001 /* 00002 * static char *rcsid_tod_h = 00003 * "$Id: tod.h 9313 2008-06-13 12:05:26Z anmaster $"; 00004 */ 00005 00006 /* 00007 CrossFire, A Multiplayer game for X-windows 00008 00009 Copyright (C) 2003-2006 Mark Wedel & Crossfire Development Team 00010 Copyright (C) 2000 Tim Rightnour 00011 Copyright (C) 1992 Frank Tore Johansen 00012 00013 This program is free software; you can redistribute it and/or modify 00014 it under the terms of the GNU General Public License as published by 00015 the Free Software Foundation; either version 2 of the License, or 00016 (at your option) any later version. 00017 00018 This program is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with this program; if not, write to the Free Software 00025 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00026 00027 The authors can be reached via e-mail at crossfire-devel@real-time.com 00028 */ 00029 00035 #ifndef TOD_H 00036 #define TOD_H 00037 00038 #define PTICKS_PER_CLOCK 1500 00039 00040 /* game time */ 00041 #define HOURS_PER_DAY 28 00042 #define DAYS_PER_WEEK 7 00043 #define WEEKS_PER_MONTH 5 00044 #define MONTHS_PER_YEAR 17 00045 #define SEASONS_PER_YEAR 5 00046 #define PERIODS_PER_DAY 6 00047 00048 /* convenience */ 00049 #define WEEKS_PER_YEAR (WEEKS_PER_MONTH*MONTHS_PER_YEAR) 00050 #define DAYS_PER_MONTH (DAYS_PER_WEEK*WEEKS_PER_MONTH) 00051 #define DAYS_PER_YEAR (DAYS_PER_MONTH*MONTHS_PER_YEAR) 00052 #define HOURS_PER_WEEK (HOURS_PER_DAY*DAYS_PER_WEEK) 00053 #define HOURS_PER_MONTH (HOURS_PER_WEEK*WEEKS_PER_MONTH) 00054 #define HOURS_PER_YEAR (HOURS_PER_MONTH*MONTHS_PER_YEAR) 00055 00056 #define LUNAR_DAYS DAYS_PER_MONTH 00057 00061 typedef struct _timeofday { 00062 int year; 00063 int month; 00064 int day; 00065 int dayofweek; 00066 int hour; 00067 int minute; 00068 int weekofmonth; 00069 int season; 00070 int periodofday; 00071 } timeofday_t; 00072 00073 /* from common/time.c */ 00074 extern void get_tod(timeofday_t *tod); 00075 00076 #endif /* TOD_H */