Mercurial > projects > chipmunkd
diff trunk/tests/ChipmunkDemos/main.d @ 16:af2f61a96318
ported chipmunk demos
author | Extrawurst |
---|---|
date | Sat, 04 Dec 2010 02:02:29 +0100 |
parents | |
children | ed2c81f3d1df |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/tests/ChipmunkDemos/main.d Sat Dec 04 02:02:29 2010 +0100 @@ -0,0 +1,39 @@ +/++ + + Authors: Stephan Dilly, www.extrawurst.org + +/ + +module main; + +import gameApp; + +import std.stdio; + +/// +int main(string[] args) { + + try { + + scope auto game = new GameApp(); + game.boot(); + + //game loop + while(true) + { + if(!game.update()) + break; + } + + game.shutdown(); + + writefln("bye !"); + } + catch(Object o) { + + //write out whatever exception is thrown + debug writefln("[exception] E: \"%s\"",o); + + return -1; + } + + return 0; +} \ No newline at end of file