16
|
1 /++
|
|
2 + Authors: Stephan Dilly, www.extrawurst.org
|
|
3 +/
|
|
4
|
|
5 module main;
|
|
6
|
|
7 import gameApp;
|
|
8
|
|
9 import std.stdio;
|
|
10
|
|
11 ///
|
|
12 int main(string[] args) {
|
|
13
|
|
14 try {
|
|
15
|
|
16 scope auto game = new GameApp();
|
|
17 game.boot();
|
|
18
|
|
19 //game loop
|
|
20 while(true)
|
|
21 {
|
|
22 if(!game.update())
|
|
23 break;
|
|
24 }
|
|
25
|
|
26 game.shutdown();
|
|
27
|
|
28 writefln("bye !");
|
|
29 }
|
|
30 catch(Object o) {
|
|
31
|
|
32 //write out whatever exception is thrown
|
|
33 debug writefln("[exception] E: \"%s\"",o);
|
|
34
|
|
35 return -1;
|
|
36 }
|
|
37
|
|
38 return 0;
|
|
39 } |