Crossfire Server, Trunk
tod.h
Go to the documentation of this file.
1
6
#ifndef TOD_H
7
#define TOD_H
8
9
#include "
config.h
"
10
12
#define PTICKS_PER_CLOCK 1500
13
14
/* game time */
15
#define HOURS_PER_DAY 28
16
#define DAYS_PER_WEEK 7
17
#define WEEKS_PER_MONTH 5
18
#define MONTHS_PER_YEAR 17
19
#define SEASONS_PER_YEAR 5
20
#define PERIODS_PER_DAY 6
21
22
/* convenience */
23
#define WEEKS_PER_YEAR (WEEKS_PER_MONTH*MONTHS_PER_YEAR)
24
#define DAYS_PER_MONTH (DAYS_PER_WEEK*WEEKS_PER_MONTH)
25
#define DAYS_PER_YEAR (DAYS_PER_MONTH*MONTHS_PER_YEAR)
26
#define HOURS_PER_WEEK (HOURS_PER_DAY*DAYS_PER_WEEK)
27
#define HOURS_PER_MONTH (HOURS_PER_WEEK*WEEKS_PER_MONTH)
28
#define HOURS_PER_YEAR (HOURS_PER_MONTH*MONTHS_PER_YEAR)
29
30
#define LUNAR_DAYS DAYS_PER_MONTH
31
33
extern
unsigned
long
todtick
;
34
38
struct
timeofday_t
{
39
int
year
;
40
int
month
;
41
int
day
;
42
int
dayofweek
;
43
int
hour
;
44
int
minute
;
45
int
weekofmonth
;
46
int
season
;
47
int
periodofday
;
48
};
49
50
/* from common/time.c */
51
extern
void
get_tod
(
timeofday_t
*tod);
52
54
static
const
float
MOVE_PER_SECOND
=
MAX_TIME
/ 1000000.;
55
56
#endif
/* TOD_H */
timeofday_t::year
int year
Definition:
tod.h:39
timeofday_t::weekofmonth
int weekofmonth
Definition:
tod.h:45
MAX_TIME
#define MAX_TIME
Definition:
config.h:254
timeofday_t
Definition:
tod.h:38
todtick
unsigned long todtick
Definition:
time.cpp:38
get_tod
void get_tod(timeofday_t *tod)
Definition:
time.cpp:219
timeofday_t::day
int day
Definition:
tod.h:41
timeofday_t::periodofday
int periodofday
Definition:
tod.h:47
timeofday_t::dayofweek
int dayofweek
Definition:
tod.h:42
timeofday_t::month
int month
Definition:
tod.h:40
timeofday_t::season
int season
Definition:
tod.h:46
timeofday_t::minute
int minute
Definition:
tod.h:44
timeofday_t::hour
int hour
Definition:
tod.h:43
config.h
MOVE_PER_SECOND
static const float MOVE_PER_SECOND
Definition:
tod.h:54
crossfire-crossfire-server
include
tod.h
Generated by
1.8.17