Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Calendar Namespace Reference

Calendar related stuff. More...


Compounds

class  cMonth
 Class cMonth. More...

class  cWeekday
 Class cWeekday. More...


Functions

bool chrInStr (char c, char *str)
 check if a charachter is in string

void setSeason (int nSeason)
 sets a season globally

void commitSeason (P_CHAR pc)
 commits season changes to a given player

bool advanceMinute ()
 advances time of a minute. returns true if date has changed

void parseMonth (int m, FILE *F)
 parses a month from the calendar.scp file

void parseWeekday (int m, FILE *F)
 parses a weekday from calendar.scp

void loadCalendarScp ()
 loads calendar.scp file

void parseHour (char *str, int &h, int &m)
 parses an hour from the file


Variables

int g_nWeekday = 1
int g_nDay = 1
int g_nMonth = 1
int g_nYear = 1
int g_nHour = 0
int g_nMinute = 0
int g_nMaxWeekday = 7
int g_nMaxMonth = 12
int g_nCurDawnHour = 7
int g_nCurDawnMin = 30
int g_nCurSunsetHour = 19
int g_nCurSunsetMin = 30
float g_fCurSnowMod = 1.0f
float g_fCurRainMod = 1.0f
float g_fCurDryMod = 1.0f
int g_nWinterOverride = 0
bool g_bInitOk = false
cMonth g_Months [32]
cWeekday g_Weekday [32]


Detailed Description

Calendar related stuff.

Author:
Xanathar
Since:
0.52a


Function Documentation

bool Calendar::advanceMinute  
 

advances time of a minute. returns true if date has changed

Returns:
bool
Author:
Xanathar
Since:
0.52a

bool chrInStr char    c,
char *    str
[static]
 

check if a charachter is in string

Returns:
bool
Author:
Xanathar
Parameters:
c  the char to be found
str  the string to search in
Since:
0.52a

void Calendar::commitSeason P_CHAR    pc
 

commits season changes to a given player

Author:
Xanathar
Parameters:
pc  poniter to char which will rcv season changes
Since:
0.52a

void Calendar::loadCalendarScp  
 

loads calendar.scp file

Author:
Xanathar
Since:
0.52a
Todo:
should be changed when we'll use new scripts with stl maps

void parseHour char *    str,
int &    h,
int &    m
[static]
 

parses an hour from the file

Returns:
static
Author:
Xanathar
Parameters:
str  the string containing the hour
h  the integer which'll contain the hour
m  the integer which'll contain the minutes
Since:
0.52a

void Calendar::parseMonth int    m,
FILE *    F
[static]
 

parses a month from the calendar.scp file

Returns:
static
Author:
Xanathar
Parameters:
m  the current month we're parsing
F  the opened calendar.scp
Since:
0.52a

void Calendar::parseWeekday int    m,
FILE *    F
[static]
 

parses a weekday from calendar.scp

Returns:
static
Author:
Xanathar
Parameters:
m  current weekday we're parsing
F  the opened calendar.scp
Since:
0.52a

void Calendar::setSeason int    nSeason
 

sets a season globally

Author:
Xanathar
Parameters:
nSeason  season number
Since:
0.52a


Variable Documentation

bool Calendar::g_bInitOk = false
 

float Calendar::g_fCurDryMod = 1.0f
 

float Calendar::g_fCurRainMod = 1.0f
 

float Calendar::g_fCurSnowMod = 1.0f
 

cMonth Calendar::g_Months
 

int Calendar::g_nCurDawnHour = 7
 

int Calendar::g_nCurDawnMin = 30
 

int Calendar::g_nCurSunsetHour = 19
 

int Calendar::g_nCurSunsetMin = 30
 

int Calendar::g_nDay = 1
 

int Calendar::g_nHour = 0
 

int Calendar::g_nMaxMonth = 12
 

int Calendar::g_nMaxWeekday = 7
 

int Calendar::g_nMinute = 0
 

int Calendar::g_nMonth = 1
 

int Calendar::g_nWeekday = 1
 

int Calendar::g_nWinterOverride = 0
 

int Calendar::g_nYear = 1
 

cWeekday Calendar::g_Weekday
 

SourceForge.net Logo