Mercurial > mm7
comparison Engine/Timer.h @ 2499:68cdef6879a0
engine folder
author | Ritor1 |
---|---|
date | Fri, 19 Sep 2014 02:57:42 +0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2498:92eeeb5200f2 | 2499:68cdef6879a0 |
---|---|
1 #pragma once | |
2 | |
3 | |
4 | |
5 | |
6 /* 61 */ | |
7 #pragma pack(push, 1) | |
8 struct Timer | |
9 { | |
10 static Timer *Create() {return new Timer;} | |
11 | |
12 Timer(): | |
13 bReady(false), bPaused(false) | |
14 { | |
15 bTackGameTime = 0; | |
16 uStartTime = 0; | |
17 uStopTime = 0; | |
18 uGameTimeStart = 0; | |
19 field_18 = 0; | |
20 uTimeElapsed = 0; | |
21 dt_in_some_format = 0; | |
22 uTotalGameTimeElapsed = 0; | |
23 } | |
24 | |
25 void Initialize(); | |
26 unsigned __int64 Time(); | |
27 void Update(); | |
28 void Pause(); | |
29 void Resume(); | |
30 void TrackGameTime(); | |
31 void StopGameTime(); | |
32 | |
33 unsigned int bReady; | |
34 unsigned int bPaused; | |
35 int bTackGameTime; | |
36 unsigned int uStartTime; | |
37 unsigned int uStopTime; | |
38 int uGameTimeStart; | |
39 int field_18; | |
40 unsigned int uTimeElapsed; | |
41 int dt_in_some_format; | |
42 unsigned int uTotalGameTimeElapsed; | |
43 | |
44 static const unsigned int TimeQuant = 128; | |
45 static const unsigned int Minute = 2 * TimeQuant; | |
46 static const unsigned int Hour = 60 * Minute; | |
47 static const unsigned int Day = 24 * Hour; | |
48 static const unsigned int Week = 7 * Day; | |
49 static const unsigned int Month = 4 * Week; | |
50 static const unsigned int Year = 12 * Month; | |
51 }; | |
52 | |
53 #pragma pack(pop) | |
54 | |
55 | |
56 | |
57 extern Timer *pMiscTimer; | |
58 extern Timer *pEventTimer; |