-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (28 loc) · 897 Bytes
/
Copy pathmain.cpp
File metadata and controls
31 lines (28 loc) · 897 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
#include "src/application/application.h"
#include "src/application/global_status.h"
int main(int argc,char* argv[]) {
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];
if (arg=="--rd" && i!=argc-1) {
int render_radius = atoi(argv[i+1]);
if (render_radius>=5&&render_radius<=30) {
global_status::renderRadius = render_radius;
}
}
if (arg=="--ms" && i!=argc-1) {
int mapSeed = atoi(argv[i+1]);
global_status::mapSeed = mapSeed;
}
if (arg=="--ts" && i!=argc-1) {
int treeSeed = atoi(argv[i+1]);
global_status::treeSeed = treeSeed;
}
}
Application* app = Application::create();
app->init(800,600,200);
app->run();
delete app;
std::cout<<"press any key to exit"<<std::endl;
getchar();
return 0;
}