Atrinik Server  4.0
Functions | Variables
weather.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

void init_world_darkness (void)
 
void tick_the_clock (void)
 

Variables

const int season_timechange [SEASONS_PER_YEAR][HOURS_PER_DAY]
 

Detailed Description

This file controls weather functions, like ticking the clock and initializing the world darkness.

Definition in file weather.c.

Function Documentation

void init_world_darkness ( void  )

Initializes the world darkness value.

Definition at line 43 of file weather.c.

void tick_the_clock ( void  )

This performs the basic function of advancing the clock one tick forward. Every 20 ticks, the clock is saved to disk. It is also saved on shutdown. Any time dependant functions should be called from this function, and probably be passed tod as an argument. Please don't modify tod in the dependant function.

Definition at line 67 of file weather.c.

Variable Documentation

const int season_timechange[SEASONS_PER_YEAR][HOURS_PER_DAY]
Initial value:
= {
{0, 0, 0, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0},
{0, 0, 0, 0, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0},
{0, 0, 0, 0, 0, -1, -1, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0}
}

Definition at line 33 of file weather.c.