-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScreens.cpp
More file actions
143 lines (110 loc) · 3.05 KB
/
Copy pathScreens.cpp
File metadata and controls
143 lines (110 loc) · 3.05 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#ifndef DECLARATION_H_INCLUDED
#include "Declaration.h"
#endif // DECLARATION_H_INCLUDED
#ifndef GAMEPLAY_H_INCLUDED
#include "GamePlay.h"
#endif // GAMEPLAY_H_INCLUDED
#ifndef CONSOLEAPI_H_INCLUDED
#include "ConsoleAPI.h"
#endif // CONSOLEAPI_H_INCLUDED
#ifndef SOUND_H_INCLUDED
#include "Sound.h"
#endif // SOUND_H_INCLUDED
#include "Screens.h"
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
extern bool gameOver;
void mainMenu()
{
playSound(SOUND_MENU, true);
ConsoleSetup();
makeSafeBorder();
drawScreen();
int line=1, space=3;
goToXY(scrX+space,scrY+(line++));
cout << " ______ __ ";
goToXY(scrX+space,scrY+(line++));
cout << " / \\ | \\ ";
goToXY(scrX+space,scrY+(line++));
cout << "| $$$$$$\\ _______ ______ | $$ __ ______ ";
goToXY(scrX+space,scrY+(line++));
cout << "| $$___\\$$| \\ | \\ | $$ / \\ / \\ ";
goToXY(scrX+space,scrY+(line++));
cout << " \\$$ \\ | $$$$$$$\\ \\$$$$$$\\| $$_/ $$| $$$$$$\\";
goToXY(scrX+space,scrY+(line++));
cout << " _\\$$$$$$\\| $$ | $$ / $$| $$ $$ | $$ $$";
goToXY(scrX+space,scrY+(line++));
cout << "| \\__| $$| $$ | $$| $$$$$$$| $$$$$$\\ | $$$$$$$$";
goToXY(scrX+space,scrY+(line++));
cout << " \\$$ $$| $$ | $$ \\$$ $$| $$ \\$$\\ \\$$ \\";
goToXY(scrX+space,scrY+(line++));
cout << " \\$$$$$$ \\$$ \\$$ \\$$$$$$$ \\$$ \\$$ \\$$$$$$$";
goToXY(scrX+space,scrY+(line++));
cout << "";
goToXY(scrX+space,scrY+(line++));
cout << "";
goToXY(scrX+space,scrY+(line++));
cout << "";
goToXY(scrX+space,scrY+(line++));
cout << " START NEW GAME";
goToXY(scrX+space,scrY+(line++));
cout << " MAP SELECT";
goToXY(scrX+space,scrY+(line++));
cout << " ABOUT";
goToXY(scrX+space,scrY+(line++));
cout << " QUIT GAME :(";
//selectMenu();
getch();
playScreen(); //begin game
}
void playScreen ()
{
stopSound(); //turn off music
system("cls"); //clear menu screen
init();
while (gameOver!=true)
draw();
goToXY(0, scrY + H);
cout << " > GAME OVER\n";
}
void mapScreen()
{
}
void aboutScreen()
{
}
void resultScreen()
{
}
void selectMenu()
{
char _key;
int menuID = 1;
while (_key != KEY_ENTER)
{
_key = _getch();
if (_key == 0 || _key == 224)
{
goToXY(13, 10 + menuID);
cout << " ";
_key = _getch();
switch (_key)
{
case KEY_UP:
menuID--;
break;
case KEY_DOWN:
menuID++;
break;
}
if (menuID > 4)
menuID = 1;
if (menuID < 1)
menuID = 4;
goToXY(13, 10 + menuID);
cout << ">>>";
}
}
}