![]() |
Crossfire Server, Trunk
1.75.0
|
#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 |
| Represents the ingame time. More... | |
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 |
| Number of ticks per in-game hour. More... | |
| #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) |
| Computes the ingame time of the day. More... | |
Variables | |
| static const float | MOVE_PER_SECOND = MAX_TIME / 1000000. |
| Speed of an object that gives it one move per second, real time. More... | |
| unsigned long | todtick |
| Game world time, in in-game hours. More... | |
Defines for the ingame clock, ticks management and weather system.
Definition in file tod.h.
| #define DAYS_PER_MONTH (DAYS_PER_WEEK*WEEKS_PER_MONTH) |
| #define DAYS_PER_YEAR (DAYS_PER_MONTH*MONTHS_PER_YEAR) |
| #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 PTICKS_PER_CLOCK 1500 |
| #define WEEKS_PER_YEAR (WEEKS_PER_MONTH*MONTHS_PER_YEAR) |
| void get_tod | ( | timeofday_t * | tod | ) |
Computes the ingame time of the day.
| [out] | tod | where to store information. Must not be NULL. |
Definition at line 219 of file time.cpp.
References timeofday_t::day, timeofday_t::dayofweek, DAYS_PER_MONTH, DAYS_PER_WEEK, timeofday_t::hour, HOURS_PER_DAY, HOURS_PER_MONTH, HOURS_PER_YEAR, timeofday_t::minute, timeofday_t::month, MONTHS_PER_YEAR, timeofday_t::periodofday, pticks, PTICKS_PER_CLOCK, timeofday_t::season, todtick, timeofday_t::weekofmonth, WEEKS_PER_MONTH, and timeofday_t::year.
Referenced by cfapi_get_time(), cfcitybell_init(), clock_listener(), clock_type_apply(), print_tod(), set_darkness_map(), and tick_the_clock().
Here is the caller graph for this function:
|
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().
| 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().