cp_time.h File Reference

Campaign geoscape time header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CL_UpdateTime (void)
 Updates date/time and timescale (=timelapse) on the geoscape menu.
void CL_GameTimeStop (void)
 Stop game time speed.
qboolean CL_IsTimeStopped (void)
 Check if time is stopped.
void CL_GameTimeFast (void)
 Increase game time speed.
void CL_GameTimeSlow (void)
 Decrease game time speed.
void CL_SetGameTime_f (void)
 Set a new time game from id.
qboolean Date_LaterThan (date_t now, date_t compare)
 Check wheter given date and time is later than current date.
date_t Date_Add (date_t a, date_t b)
 Add two dates and return the result.
date_t Date_Random (date_t minFrame, date_t maxFrame)
 Return a random relative date which lies between a lower and upper limit.
const char * Date_GetMonthName (int month)
 Returns the monatname to the given month index.

Detailed Description

Campaign geoscape time header.

Definition in file cp_time.h.


Function Documentation

void CL_GameTimeFast ( void   ) 

Increase game time speed.

Definition at line 128 of file cp_time.c.

References ccs, CL_AllowTimeScale(), CL_UpdateTime(), ccs_s::gameLapse, and NUM_TIMELAPSE.

void CL_GameTimeSlow ( void   ) 

Decrease game time speed.

Definition at line 114 of file cp_time.c.

References ccs, CL_AllowTimeScale(), CL_UpdateTime(), and ccs_s::gameLapse.

void CL_GameTimeStop ( void   ) 
qboolean CL_IsTimeStopped ( void   ) 

Check if time is stopped.

Definition at line 93 of file cp_time.c.

References ccs, and ccs_s::gameLapse.

Referenced by CL_CampaignRun().

void CL_SetGameTime_f ( void   ) 

Set a new time game from id.

See also:
CL_SetGameTime
lapse

Definition at line 168 of file cp_time.c.

References CL_SetGameTime(), Cmd_Argc(), Cmd_Argv(), and Com_Printf().

void CL_UpdateTime ( void   ) 
date_t Date_Add ( date_t  a,
date_t  b 
)
const char* Date_GetMonthName ( int  month  ) 

Returns the monatname to the given month index.

Parameters:
[in] month The month index - [0-11]
Returns:
month name as char*

Definition at line 229 of file cp_time.c.

References _.

Referenced by CL_EventAddMail_f(), CL_UpdateTime(), MS_TimestampedText(), SAV_GameSave(), UP_OpenMail_f(), and UP_SetMailHeader().

qboolean Date_LaterThan ( date_t  now,
date_t  compare 
)

Check wheter given date and time is later than current date.

Parameters:
[in] now Current date.
[in] compare Date to compare.
Returns:
True if current date is later than given one.

Definition at line 183 of file cp_time.c.

References date_s::day, qfalse, qtrue, and date_s::sec.

Referenced by CP_CheckMissionEnd().

date_t Date_Random ( date_t  minFrame,
date_t  maxFrame 
)

Return a random relative date which lies between a lower and upper limit.

Parameters:
[in] minFrame Minimal date.
[in] maxFrame Maximal date.
Returns:
A date value between minFrame and maxFrame.

Definition at line 214 of file cp_time.c.

References date_s::day, frand(), date_s::sec, and SECONDS_PER_DAY.

Referenced by CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_CreateNewMission(), CP_HarvestMissionStart(), CP_InterceptAircraftMissionSet(), CP_InterceptAttackInstallation(), CP_ReconMissionAerial(), CP_ReconMissionGround(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), CP_SupplySetStayAtBase(), CP_TerrorMissionStart(), and CP_XVIMissionStart().


Generated by  doxygen 1.6.2