31 { 0, 0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 },
32 { 0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0 },
33 { 0, 0, 0, 0, 0,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0 },
34 { 0, 0, 0, 0, 0,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 },
35 { 0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0 }
57 for (i = 0; i <= tod.
hour; i++) {
void set_darkness_map(mapstruct *m)
Set the darkness level for a map, based on the time of the day.
unsigned long todtick
Game world time, in in-game hours.
void tick_the_clock(void)
This performs the basic function of advancing the clock one tick forward.
Defines for the ingame clock, ticks management and weather system.
Represents the ingame time.
Global type definitions and header inclusions.
int change_map_light(mapstruct *m, int change)
Used to change map light level (darkness) up or down.
mapstruct * first_map
First map.
void write_todclock(void)
Write out the current time to the file so time does not reset every time the server reboots...
void get_tod(timeofday_t *tod)
Computes the ingame time of the day.
static event_registration m
static void dawn_to_dusk(const timeofday_t *tod)
Compute the darkness level for all loaded maps in the game.
uint8_t darkness
Indicates level of darkness of map.
static const int season_timechange[5][HOURS_PER_DAY]
How to alter darkness, based on time of day and season.
This file contains basic map-related structures and macros.
uint32_t outdoor
True if an outdoor map.
mapstruct * next
Next map, linked list.