Atrinik Server  4.0
tod.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef TOD_H
31 #define TOD_H
32 
34 #define PTICKS_PER_CLOCK 1500
35 
37 #define HOURS_PER_DAY 24
38 
39 #define DAYS_PER_WEEK 7
40 
41 #define WEEKS_PER_MONTH 4
42 
43 #define MONTHS_PER_YEAR 12
44 
45 #define SEASONS_PER_YEAR 4
46 
47 #define PERIODS_PER_DAY 10
48 
50 #define WEEKS_PER_YEAR (WEEKS_PER_MONTH * MONTHS_PER_YEAR)
51 
52 #define DAYS_PER_MONTH (DAYS_PER_WEEK * WEEKS_PER_MONTH)
53 
54 #define DAYS_PER_YEAR (DAYS_PER_MONTH * MONTHS_PER_YEAR)
55 
56 #define HOURS_PER_WEEK (HOURS_PER_DAY * DAYS_PER_WEEK)
57 
58 #define HOURS_PER_MONTH (HOURS_PER_WEEK * WEEKS_PER_MONTH)
59 
60 #define HOURS_PER_YEAR (HOURS_PER_MONTH * MONTHS_PER_YEAR)
61 
62 #define MONTHS_PER_SEASON (MONTHS_PER_YEAR / SEASONS_PER_YEAR)
63 
65 typedef struct _timeofday {
67  int year;
68 
70  int month;
71 
73  int day;
74 
76  int dayofweek;
77 
79  int hour;
80 
82  int minute;
83 
86 
88  int season;
89 
92 } timeofday_t;
93 
94 #endif
int minute
Definition: tod.h:82
struct _timeofday timeofday_t
int periodofday
Definition: tod.h:91
int year
Definition: tod.h:67
int month
Definition: tod.h:70
int weekofmonth
Definition: tod.h:85
int day
Definition: tod.h:73
int dayofweek
Definition: tod.h:76
Definition: tod.h:65
int hour
Definition: tod.h:79
int season
Definition: tod.h:88