-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMain.cpp
78 lines (63 loc) · 1.15 KB
/
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
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
#include "Luna.h"
#include <cstdio>
#ifdef __APPLE__
#import <Cocoa/cocoa.h>
#include <OpenGL/OpenGL.h>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CFBundle.h>
#include <CoreFoundation/CFString.h>
#endif
#ifdef WIN32
#include <winsock2.h>
#endif
//#ifdef __EMSCRIPTEN__
//#include <emscripten.h>
//#endif
////#ifdef WIN32
//#define COMPRESS
//#include "Input/Compress/mtar.h"
//////#include "Input/Compress/microtar/src/microtar-stdio.h"
//extern "C"{
//bool extractTar(char);
//
//}
//
//
////#endif // WIN64
int argc1=0;
char** argv1;
bool init=1;
Luna game ( argc1,argv1 );
void main_loop(){
//switch (init){
// case 1:{
// init=false;
// game.Run();
// game.main_loop();
// };break;
// case 0:
// {
game.main_loop();
// };break;
// }
}
int main ( int argc, char** argv )
{
#ifdef __OSX__
NSApplicationLoad();
#endif
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop,0,1);
#else
Luna game ( argc,argv );
//#ifdef WIN32
// extractTar("../media/pydata.tar");
//#endif
game.Run();
while (!game.m_cInGameEvents.Quit){
game.main_loop();
}
#endif // __EMSCRIPTEN__
system("PAUSE");
return 0;
}