-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
96 lines (85 loc) · 1.11 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include "Game.h"
int main(int argc, char* args[])
{
double first, last = 0;
Game game;
Audio audio;
if (!game.Init()) return -1;
while (!game.intro)
{
game.intro = game.Update();
game.OpenIntro();
if (game.intro)
{
game.gameReady = false;
break;
}
}
if (!game.gameReady)
{
game.playMusicMenu();
}
while (!game.gameReady)
{
game.gameReady = game.Update();
game.OpenMenu();
if (game.timerReady)
{
game.playMusicGame();
break;
}
if (game.gameReady)
{
game.play = false;
break;
}
else if (game.close)
{
game.Release();
return 0;
}
}
while (game.timerReady)
{
game.timer();
if (!game.play)
{
break;
}
}
//if (!game.play)
//{
// game.playMusicGame();
//}
while (!game.play)
{
game.play = game.Update();
game.Draw();
if (game.play)
{
game.end = false;
break;
}
if (game.close)
{
game.Release();
return 0;
}
}
if (!game.end)
{
game.playMusicEnd();
}
while (!game.end)
{
game.end = game.Update();
game.OpenEnd();
if (game.end)
{
game.Release();
break;
}
}
game.Release();
return 0;
}