Crossfire Server, Branches 1.12
R18729
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
tod.h
Go to the documentation of this file.
1
/*
2
* static char *rcsid_tod_h =
3
* "$Id: tod.h 9313 2008-06-13 12:05:26Z anmaster $";
4
*/
5
6
/*
7
CrossFire, A Multiplayer game for X-windows
8
9
Copyright (C) 2003-2006 Mark Wedel & Crossfire Development Team
10
Copyright (C) 2000 Tim Rightnour
11
Copyright (C) 1992 Frank Tore Johansen
12
13
This program is free software; you can redistribute it and/or modify
14
it under the terms of the GNU General Public License as published by
15
the Free Software Foundation; either version 2 of the License, or
16
(at your option) any later version.
17
18
This program is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with this program; if not, write to the Free Software
25
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27
The authors can be reached via e-mail at crossfire-devel@real-time.com
28
*/
29
35
#ifndef TOD_H
36
#define TOD_H
37
38
#define PTICKS_PER_CLOCK 1500
39
40
/* game time */
41
#define HOURS_PER_DAY 28
42
#define DAYS_PER_WEEK 7
43
#define WEEKS_PER_MONTH 5
44
#define MONTHS_PER_YEAR 17
45
#define SEASONS_PER_YEAR 5
46
#define PERIODS_PER_DAY 6
47
48
/* convenience */
49
#define WEEKS_PER_YEAR (WEEKS_PER_MONTH*MONTHS_PER_YEAR)
50
#define DAYS_PER_MONTH (DAYS_PER_WEEK*WEEKS_PER_MONTH)
51
#define DAYS_PER_YEAR (DAYS_PER_MONTH*MONTHS_PER_YEAR)
52
#define HOURS_PER_WEEK (HOURS_PER_DAY*DAYS_PER_WEEK)
53
#define HOURS_PER_MONTH (HOURS_PER_WEEK*WEEKS_PER_MONTH)
54
#define HOURS_PER_YEAR (HOURS_PER_MONTH*MONTHS_PER_YEAR)
55
56
#define LUNAR_DAYS DAYS_PER_MONTH
57
61
typedef
struct
_timeofday
{
62
int
year
;
63
int
month
;
64
int
day
;
65
int
dayofweek
;
66
int
hour
;
67
int
minute
;
68
int
weekofmonth
;
69
int
season
;
70
int
periodofday
;
71
}
timeofday_t
;
72
73
/* from common/time.c */
74
extern
void
get_tod
(
timeofday_t
*tod);
75
76
#endif
/* TOD_H */
_timeofday::minute
int minute
Definition:
tod.h:67
timeofday_t
struct _timeofday timeofday_t
_timeofday::periodofday
int periodofday
Definition:
tod.h:70
_timeofday::year
int year
Definition:
tod.h:62
_timeofday::month
int month
Definition:
tod.h:63
get_tod
void get_tod(timeofday_t *tod)
Definition:
time.c:268
_timeofday::weekofmonth
int weekofmonth
Definition:
tod.h:68
_timeofday::day
int day
Definition:
tod.h:64
_timeofday::dayofweek
int dayofweek
Definition:
tod.h:65
_timeofday
Definition:
tod.h:61
_timeofday::hour
int hour
Definition:
tod.h:66
_timeofday::season
int season
Definition:
tod.h:69
crossfire-code
server
branches
1.12
include
tod.h
Generated on Sun Nov 18 2018 02:40:29 for Crossfire Server, Branches 1.12 by
1.8.6