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


#define DAYS_PER_WEEK   7
#define HOURS_PER_DAY   28
#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


void get_tod (timeofday_t *tod)


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



Definition at line 24 of file tod.h.


#define DAYS_PER_WEEK   7

Definition at line 16 of file tod.h.



Definition at line 25 of file tod.h.


#define HOURS_PER_DAY   28

Definition at line 15 of file tod.h.



Definition at line 27 of file tod.h.



Definition at line 26 of file tod.h.



Definition at line 28 of file tod.h.



Definition at line 30 of file tod.h.


#define MONTHS_PER_YEAR   17

Definition at line 18 of file tod.h.


#define PERIODS_PER_DAY   6

Definition at line 20 of file tod.h.


#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.


#define SEASONS_PER_YEAR   5

Definition at line 19 of file tod.h.


#define WEEKS_PER_MONTH   5

Definition at line 17 of file tod.h.



Definition at line 23 of file tod.h.

Function Documentation

◆ get_tod()

Variable Documentation


const float MOVE_PER_SECOND = MAX_TIME / 1000000.

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().