annotate Time.h @ 1703:ffef0fe0b59d

m
author Ritor1
date Mon, 23 Sep 2013 09:33:13 +0600
parents f93d17337113
children
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
810
f5156b8c61ad savegame refactoring
Gloval
parents: 783
diff changeset
4
f5156b8c61ad savegame refactoring
Gloval
parents: 783
diff changeset
5
0
Ritor1
parents:
diff changeset
6 /* 61 */
Ritor1
parents:
diff changeset
7 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
8 struct Timer
Ritor1
parents:
diff changeset
9 {
Ritor1
parents:
diff changeset
10 static Timer *Create() {return new Timer;}
Ritor1
parents:
diff changeset
11
Ritor1
parents:
diff changeset
12 Timer():
Ritor1
parents:
diff changeset
13 bReady(false), bPaused(false)
Ritor1
parents:
diff changeset
14 {
Ritor1
parents:
diff changeset
15 bTackGameTime = 0;
Ritor1
parents:
diff changeset
16 uStartTime = 0;
Ritor1
parents:
diff changeset
17 uStopTime = 0;
Ritor1
parents:
diff changeset
18 uGameTimeStart = 0;
Ritor1
parents:
diff changeset
19 field_18 = 0;
Ritor1
parents:
diff changeset
20 uTimeElapsed = 0;
Ritor1
parents:
diff changeset
21 dt_in_some_format = 0;
Ritor1
parents:
diff changeset
22 uTotalGameTimeElapsed = 0;
Ritor1
parents:
diff changeset
23 }
Ritor1
parents:
diff changeset
24
Ritor1
parents:
diff changeset
25 void Initialize();
Ritor1
parents:
diff changeset
26 unsigned __int64 Time();
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 0
diff changeset
27 void Update();
0
Ritor1
parents:
diff changeset
28 void Pause();
Ritor1
parents:
diff changeset
29 void Resume();
Ritor1
parents:
diff changeset
30 void TrackGameTime();
Ritor1
parents:
diff changeset
31 void StopGameTime();
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 unsigned int bReady;
Ritor1
parents:
diff changeset
34 unsigned int bPaused;
Ritor1
parents:
diff changeset
35 int bTackGameTime;
Ritor1
parents:
diff changeset
36 unsigned int uStartTime;
Ritor1
parents:
diff changeset
37 unsigned int uStopTime;
Ritor1
parents:
diff changeset
38 int uGameTimeStart;
Ritor1
parents:
diff changeset
39 int field_18;
Ritor1
parents:
diff changeset
40 unsigned int uTimeElapsed;
Ritor1
parents:
diff changeset
41 int dt_in_some_format;
Ritor1
parents:
diff changeset
42 unsigned int uTotalGameTimeElapsed;
1031
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
43
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
44 static const unsigned int TimeQuant = 128;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
45 static const unsigned int Minute = 2 * TimeQuant;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
46 static const unsigned int Hour = 60 * Minute;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
47 static const unsigned int Day = 24 * Hour;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
48 static const unsigned int Week = 7 * Day;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
49 static const unsigned int Month = 4 * Week;
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
50 static const unsigned int Year = 12 * Month;
0
Ritor1
parents:
diff changeset
51 };
957
1a47a988c0b8 menu Debug
Ritor1
parents: 810
diff changeset
52
0
Ritor1
parents:
diff changeset
53 #pragma pack(pop)
Ritor1
parents:
diff changeset
54
Ritor1
parents:
diff changeset
55
Ritor1
parents:
diff changeset
56
Ritor1
parents:
diff changeset
57 extern Timer *pMiscTimer;
1031
f93d17337113 UI stuff.
Nomad
parents: 957
diff changeset
58 extern Timer *pEventTimer;