|
UFO: Alien Invasion
|
Campaign geoscape time header. More...


Go to the source code of this file.
Data Structures | |
| struct | dateLong_t |
| Human readable time information in the game. More... | |
Functions | |
| void | CP_DateConvertLong (const DateTime &date, dateLong_t *dateLong) |
| Converts a date from the engine in a (longer) human-readable format. | |
| const char * | CP_SecondConvert (int second) |
| Converts a number of second into a char to display. | |
| void | CP_UpdateTime (void) |
| Updates date/time and timescale (=timelapse) on the geoscape menu. | |
| void | CP_GameTimeStop (void) |
| Stop game time speed. | |
| bool | CP_IsTimeStopped (void) |
| Check if time is stopped. | |
| void | CP_GameTimeFast (void) |
| Increase game time speed. | |
| void | CP_GameTimeSlow (void) |
| Decrease game time speed. | |
| void | CP_SetGameTime_f (void) |
| Set a new time game from id. | |
| int | Date_DateToSeconds (const DateTime &date) |
| Convert a date to seconds. | |
| DateTime | Date_Random (const DateTime &minFrame, const DateTime &maxFrame) |
| Return a random relative date which lies between a lower and upper limit. | |
| const char * | Date_GetMonthName (int month) |
| Returns the short monthame to the given month index. | |
Campaign geoscape time header.
Definition in file cp_time.h.
| void CP_DateConvertLong | ( | const DateTime & | date, |
| dateLong_t * | dateLong ) |
Converts a date from the engine in a (longer) human-readable format.
| [in] | date | Contains the date to be converted. |
| [out] | dateLong | The converted date. |
Definition at line 73 of file cp_time.cpp.
References dateLong_t::day, DAYS_PER_MONTH, DateTime::DAYS_PER_YEAR, DateTime::getDateAsDays(), DateTime::getTimeAsSeconds(), dateLong_t::hour, i, dateLong_t::min, dateLong_t::month, DateTime::MONTHS_PER_YEAR, dateLong_t::sec, DateTime::SECONDS_PER_HOUR, and dateLong_t::year.
Referenced by CL_EventAddMail(), CP_CampaignRun(), CP_UpdateTime(), MS_LoadXML(), MS_TimestampedText(), SAV_GameSave(), UP_OpenMail_f(), and UP_SetMailHeader().
Increase game time speed.
Definition at line 174 of file cp_time.cpp.
References ccs, CP_AllowTimeScale(), CP_UpdateTime(), and NUM_TIMELAPSE.
Decrease game time speed.
Definition at line 160 of file cp_time.cpp.
References ccs, CP_AllowTimeScale(), and CP_UpdateTime().
Stop game time speed.
Definition at line 126 of file cp_time.cpp.
References ccs, cp_missiontest, CP_OnGeoscape(), and CP_UpdateTime().
Referenced by AIR_Move(), B_BuildBase_f(), CAP_CheckOverflow(), CL_DisplayHomebasePopup(), CL_DisplayPopupInterceptMission(), CL_DisplayPopupInterceptUFO(), CP_BaseAttackMissionDestroyBase(), CP_BaseAttackPrepareBattle(), CP_CampaignInit(), CP_MissionAddToGeoscape(), GEO_Click(), MS_AddNewMessage(), MSO_CheckAddNewMessage(), and NAT_HandleBudget().
| bool CP_IsTimeStopped | ( | void | ) |
Check if time is stopped.
Definition at line 139 of file cp_time.cpp.
References ccs.
Referenced by CP_CampaignRun(), and TEST_F().
| const char * CP_SecondConvert | ( | int | second | ) |
Converts a number of second into a char to display.
| [in] | second | Number of second. |
Definition at line 57 of file cp_time.cpp.
References Com_sprintf(), and DateTime::SECONDS_PER_HOUR.
Referenced by CL_DisplayPopupInterceptMission(), GEO_GetAircraftText(), TR_List_f(), and US_SelectStoredUfo_f().
Set a new time game from id.
Definition at line 214 of file cp_time.cpp.
References cgi, and CP_SetGameTime().
Updates date/time and timescale (=timelapse) on the geoscape menu.
Definition at line 104 of file cp_time.cpp.
References _, ccs, cgi, CP_DateConvertLong(), Date_GetMonthName(), dateLong_t::day, dateLong_t::hour, lapse, dateLong_t::min, dateLong_t::month, NUM_TIMELAPSE, and dateLong_t::year.
Referenced by CP_CampaignInit(), CP_CampaignRun(), CP_GameTimeFast(), CP_GameTimeSlow(), CP_GameTimeStop(), CP_SetGameTime(), SAV_GameActionsAfterLoad(), and TEST_F().
Convert a date to seconds.
| [in] | date | The date in DateTime format |
Definition at line 228 of file cp_time.cpp.
References DateTime::getDateAsDays(), DateTime::getTimeAsSeconds(), and DateTime::SECONDS_PER_DAY.
Referenced by TR_List_f(), and US_SelectStoredUfo_f().
| const char * Date_GetMonthName | ( | int | month | ) |
Returns the short monthame to the given month index.
| [in] | month | The month index - [0-11] |
Definition at line 250 of file cp_time.cpp.
References _.
Referenced by CL_EventAddMail(), CP_UpdateTime(), MS_LoadXML(), MS_TimestampedText(), SAV_GameSave(), UP_OpenMail_f(), and UP_SetMailHeader().
Return a random relative date which lies between a lower and upper limit.
| [in] | minFrame | Minimal date. |
| [in] | maxFrame | Maximal date. |
Definition at line 239 of file cp_time.cpp.
References frand(), DateTime::getDateAsDays(), DateTime::getTimeAsSeconds(), and DateTime::SECONDS_PER_DAY.
Referenced by CP_BeginRescueMission(), CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_CreateNewMission(), CP_HarvestMissionStart(), CP_InterceptAircraftMissionSet(), CP_InterceptAttackInstallation(), CP_ReconMissionAerial(), CP_ReconMissionGround(), CP_SpawnCrashSiteMission(), CP_SupplySetStayAtBase(), CP_TerrorMissionStart(), and CP_XVIMissionStart().