-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (37 loc) · 745 Bytes
/
main.cpp
File metadata and controls
42 lines (37 loc) · 745 Bytes
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 "Source/PlannedObsolescence.h"
#include <iostream>
#include <string>
#ifdef NDEBUG
# define SHOULD_RUN_GAME false
#else
# define SHOULD_RUN_GAME true
#endif
int main(int argc, char* argv[])
{
/* Check we've been opened through the launcher (or are in debug mode). */
bool should_launch = SHOULD_RUN_GAME;
for (int i = 0; i < argc; i++)
{
std::string launch_option = argv[i];
if (launch_option == "PO_Launcher_Auth")
{
should_launch = true;
break;
}
}
/* Run game if so */
if (should_launch)
{
PlannedObsolescence game;
if (!game.init())
{
return -1;
}
game.run();
}
else
{
std::cout << "Must be run through launcher!" << std::endl;
}
return 0;
}