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