-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp.bak
92 lines (72 loc) · 2.06 KB
/
main.cpp.bak
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
//! Pre-processor Commands
#define OR ||
//! Libraries
#include <iostream>
#include <graphics.h>
#include <conio.h>
#include <string.h>
#include <windows.h>
#include <stdio.h>
//! User-Defined Header Files
#include "welcomeScreen.h"
#include "r_l_screen.h"
#include "log_regs.h"
#include "introduction.h"
//! User Defined Functions Declarations
void windowSize(std::string);
DWORD getScreenWidth();
DWORD getScreenHeight();
//! Main Program
int main()
{
std::string getWindowSize;
std::cout << "Question : Do you want this program to run full screen?"
<< std::endl
<< "Answer : ";
windowSize(getWindowSize);
return 0;
}
//! User Defined Functions Definitions
void windowSize(std::string getWindowSize) {
std::cin >> getWindowSize;
system("CLS");
if (
(getWindowSize == "y") OR
(getWindowSize == "Y") OR
(getWindowSize == "ys") OR
(getWindowSize == "YS") OR
(getWindowSize == "Ys") OR
(getWindowSize == "yS") OR
(getWindowSize == "yes") OR
(getWindowSize == "Yes") OR
(getWindowSize == "YEs") OR
(getWindowSize == "YES") OR
(getWindowSize == "yEs") OR
(getWindowSize == "yES") OR
(getWindowSize == "yeS")
)
{
//! To get the screen pixel count
DWORD screenWidth = getScreenWidth();
DWORD screenHeight = getScreenHeight();
initwindow(screenWidth, screenHeight, "", -3, -3);
//!projectTitle(); //! To call function "projectTitle" from welcomeScreen.h
intro();
getch();
closegraph();
}
else {
std::cout << std:: endl << "This program is only compatible for fullscreen mode only" << std::endl << std::endl;
main();
}
}
DWORD getScreenWidth() {
//! To get the screen pixel count of x-axis
DWORD screenWidth = GetSystemMetrics(SM_CXSCREEN);
return screenWidth;
}
DWORD getScreenHeight() {
//! To get the screen pixel count of y-axis
DWORD screenHeight = GetSystemMetrics(SM_CYSCREEN);
return screenHeight;
}