UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cp_time.h
Go to the documentation of this file.
1
5
6
/*
7
Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24
*/
25
26
#pragma once
27
28
#include "
../../DateTime.h
"
29
#include "
../../cl_shared.h
"
30
36
typedef
struct
dateLong_s {
37
short
year
;
38
byte
month
;
39
byte
day
;
40
byte
hour
;
41
byte
min
;
42
byte
sec
;
43
}
dateLong_t
;
44
45
void
CP_DateConvertLong
(
const
DateTime
& date,
dateLong_t
* dateLong);
46
const
char
*
CP_SecondConvert
(
int
second);
47
48
void
CP_UpdateTime
(
void
);
49
void
CP_GameTimeStop
(
void
);
50
bool
CP_IsTimeStopped
(
void
);
51
void
CP_GameTimeFast
(
void
);
52
void
CP_GameTimeSlow
(
void
);
53
void
CP_SetGameTime_f
(
void
);
54
55
int
Date_DateToSeconds
(
const
DateTime
& date);
56
DateTime
Date_Random
(
const
DateTime
& minFrame,
const
DateTime
& maxFrame);
57
const
char
*
Date_GetMonthName
(
int
month);
DateTime.h
DateTime class definition.
cl_shared.h
Share stuff between the different cgame implementations.
DateTime
Class describing a point of time.
Definition
DateTime.h:31
CP_GameTimeFast
void CP_GameTimeFast(void)
Increase game time speed.
Definition
cp_time.cpp:174
CP_SecondConvert
const char * CP_SecondConvert(int second)
Converts a number of second into a char to display.
Definition
cp_time.cpp:57
CP_GameTimeStop
void CP_GameTimeStop(void)
Stop game time speed.
Definition
cp_time.cpp:126
CP_UpdateTime
void CP_UpdateTime(void)
Updates date/time and timescale (=timelapse) on the geoscape menu.
Definition
cp_time.cpp:104
CP_DateConvertLong
void CP_DateConvertLong(const DateTime &date, dateLong_t *dateLong)
Converts a date from the engine in a (longer) human-readable format.
Definition
cp_time.cpp:73
CP_IsTimeStopped
bool CP_IsTimeStopped(void)
Check if time is stopped.
Definition
cp_time.cpp:139
CP_GameTimeSlow
void CP_GameTimeSlow(void)
Decrease game time speed.
Definition
cp_time.cpp:160
CP_SetGameTime_f
void CP_SetGameTime_f(void)
Set a new time game from id.
Definition
cp_time.cpp:214
Date_DateToSeconds
int Date_DateToSeconds(const DateTime &date)
Convert a date to seconds.
Definition
cp_time.cpp:228
Date_GetMonthName
const char * Date_GetMonthName(int month)
Returns the short monthame to the given month index.
Definition
cp_time.cpp:250
Date_Random
DateTime Date_Random(const DateTime &minFrame, const DateTime &maxFrame)
Return a random relative date which lies between a lower and upper limit.
Definition
cp_time.cpp:239
dateLong_t
Human readable time information in the game.
Definition
cp_time.h:36
dateLong_t::hour
byte hour
Definition
cp_time.h:40
dateLong_t::month
byte month
Definition
cp_time.h:38
dateLong_t::day
byte day
Definition
cp_time.h:39
dateLong_t::min
byte min
Definition
cp_time.h:41
dateLong_t::year
short year
Definition
cp_time.h:37
dateLong_t::sec
byte sec
Definition
cp_time.h:42
src
client
cgame
campaign
cp_time.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0