-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
42 lines (32 loc) · 878 Bytes
/
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
#include <iostream>
#include <cstdlib>
#include <SFML/Graphics.hpp>
#include "src/hpp/Game.hpp"
unsigned short widthRatio, heightRatio, myWidth, myHeight;
int main()
{
srand(time(NULL));
const unsigned short screenWidth = sf::VideoMode::getDesktopMode().width;
const unsigned short screenHeight = sf::VideoMode::getDesktopMode().height *0.9f;
widthRatio = 3;
heightRatio = 4;
myWidth = 0, myHeight = 0;
bool exitLoop = false;
do
{
if (myWidth < screenWidth)
myWidth += widthRatio;
else
exitLoop = true;
if (!exitLoop)
{
if (myHeight < screenHeight)
myHeight += heightRatio;
else
exitLoop = true;
}
} while (!exitLoop);
Game myGame;
myGame.changeScreen(ScreenType::MainMenu);
myGame.gameLoop();
}