Crossfire Server, Trunk
tod.h File Reference
#include "config.h"
+ Include dependency graph for tod.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  timeofday_t
 

Macros

#define DAYS_PER_MONTH   (DAYS_PER_WEEK*WEEKS_PER_MONTH)
 
#define DAYS_PER_WEEK   7
 
#define DAYS_PER_YEAR   (DAYS_PER_MONTH*MONTHS_PER_YEAR)
 
#define HOURS_PER_DAY   28
 
#define HOURS_PER_MONTH   (HOURS_PER_WEEK*WEEKS_PER_MONTH)
 
#define HOURS_PER_WEEK   (HOURS_PER_DAY*DAYS_PER_WEEK)
 
#define HOURS_PER_YEAR   (HOURS_PER_MONTH*MONTHS_PER_YEAR)
 
#define LUNAR_DAYS   DAYS_PER_MONTH
 
#define MONTHS_PER_YEAR   17
 
#define PERIODS_PER_DAY   6
 
#define PTICKS_PER_CLOCK   1500
 
#define SEASONS_PER_YEAR   5
 
#define WEEKS_PER_MONTH   5
 
#define WEEKS_PER_YEAR   (WEEKS_PER_MONTH*MONTHS_PER_YEAR)
 

Functions

void get_tod (timeofday_t *tod)
 

Variables

static const float MOVE_PER_SECOND = MAX_TIME / 1000000.
 
unsigned long todtick
 

Detailed Description

Defines for the ingame clock, ticks management and weather system.

Definition in file tod.h.

Macro Definition Documentation

◆ DAYS_PER_MONTH

#define DAYS_PER_MONTH   (DAYS_PER_WEEK*WEEKS_PER_MONTH)

Definition at line 24 of file tod.h.

◆ DAYS_PER_WEEK

#define DAYS_PER_WEEK   7

Definition at line 16 of file tod.h.

◆ DAYS_PER_YEAR

#define DAYS_PER_YEAR   (DAYS_PER_MONTH*MONTHS_PER_YEAR)

Definition at line 25 of file tod.h.

◆ HOURS_PER_DAY

#define HOURS_PER_DAY   28

Definition at line 15 of file tod.h.

◆ HOURS_PER_MONTH

#define HOURS_PER_MONTH   (HOURS_PER_WEEK*WEEKS_PER_MONTH)

Definition at line 27 of file tod.h.

◆ HOURS_PER_WEEK

#define HOURS_PER_WEEK   (HOURS_PER_DAY*DAYS_PER_WEEK)

Definition at line 26 of file tod.h.

◆ HOURS_PER_YEAR

#define HOURS_PER_YEAR   (HOURS_PER_MONTH*MONTHS_PER_YEAR)

Definition at line 28 of file tod.h.

◆ LUNAR_DAYS

#define LUNAR_DAYS   DAYS_PER_MONTH

Definition at line 30 of file tod.h.

◆ MONTHS_PER_YEAR

#define MONTHS_PER_YEAR   17

Definition at line 18 of file tod.h.

◆ PERIODS_PER_DAY

#define PERIODS_PER_DAY   6

Definition at line 20 of file tod.h.

◆ PTICKS_PER_CLOCK

#define PTICKS_PER_CLOCK   1500

Number of ticks per in-game hour. With defaults, 3 real-life minutes.

Definition at line 12 of file tod.h.

◆ SEASONS_PER_YEAR

#define SEASONS_PER_YEAR   5

Definition at line 19 of file tod.h.

◆ WEEKS_PER_MONTH

#define WEEKS_PER_MONTH   5

Definition at line 17 of file tod.h.

◆ WEEKS_PER_YEAR

#define WEEKS_PER_YEAR   (WEEKS_PER_MONTH*MONTHS_PER_YEAR)

Definition at line 23 of file tod.h.

Function Documentation

◆ get_tod()

Variable Documentation

◆ MOVE_PER_SECOND

const float MOVE_PER_SECOND = MAX_TIME / 1000000.
static

Speed of an object that gives it one move per second, real time.

Definition at line 54 of file tod.h.

Referenced by eat_special_food(), and potion_type_apply().

◆ todtick

unsigned long todtick

Game world time, in in-game hours. See PTICKS_PER_CLOCK.

Definition at line 38 of file time.cpp.

Referenced by get_tod(), init_clocks(), tick_the_clock(), and write_todclock().