Mercurial > projects > chipmunkd
comparison trunk/tests/ChipmunkDemos/gameApp.d @ 26:a77be3e27f39
fix macos version
author | Stephan Dilly <stephan@extrawurst.org> |
---|---|
date | Mon, 13 Dec 2010 15:32:42 +0100 |
parents | f2287962b4b7 |
children | b45f0b140d85 |
comparison
equal
deleted
inserted
replaced
25:5497d518b428 | 26:a77be3e27f39 |
---|---|
31 import samples.Player; | 31 import samples.Player; |
32 import samples.Tank; | 32 import samples.Tank; |
33 import samples.Pump; | 33 import samples.Pump; |
34 import samples.TheoJansen; | 34 import samples.TheoJansen; |
35 import samples.UnsafeOps; | 35 import samples.UnsafeOps; |
36 import samples.Nukeit; | |
36 | 37 |
37 // using derelict bindings for sdl/opengl | 38 // using derelict bindings for sdl/opengl |
38 import derelict.opengl.gl; | 39 import derelict.opengl.gl; |
39 import derelict.opengl.glu; | 40 import derelict.opengl.glu; |
40 import derelict.sdl.sdl; | 41 import derelict.sdl.sdl; |
41 | 42 |
42 import std.stdio; | 43 import std.stdio; |
43 import core.thread; | 44 import core.thread; |
44 | 45 |
45 //version = TIME_TRIAL; | 46 version = TIME_TRIAL; |
46 | 47 |
47 cpVect mousePos; | 48 cpVect mousePos; |
48 cpVect arrowDirection; | 49 cpVect arrowDirection; |
49 | 50 |
50 bool key_up = false; | 51 bool key_up = false; |
107 /// | 108 /// |
108 public void boot() { | 109 public void boot() { |
109 | 110 |
110 demos = [ | 111 demos = [ |
111 &LogoSmash, | 112 &LogoSmash, |
112 &Simple, | 113 //&Simple, |
113 &PyramidStack, | 114 &PyramidStack, |
114 &Plink, | 115 &Plink, |
115 &Tumble, | 116 &Tumble, |
116 &PyramidTopple, | 117 &PyramidTopple, |
117 &Bounce, | 118 &Bounce, |
133 | 134 |
134 cp_collision_slop = 0.2f; | 135 cp_collision_slop = 0.2f; |
135 | 136 |
136 version(TIME_TRIAL) | 137 version(TIME_TRIAL) |
137 { | 138 { |
138 Thread.sleep(1_000_000); //1s | 139 Thread.sleep(2_000_000); |
139 ulong duration; | 140 ulong duration; |
140 foreach(i; 0..demos.length) | 141 foreach(i; 0..demos.length) |
141 { | 142 { |
142 if(i == 'l'-'a') continue; | 143 if(i == 'l'-'a') continue; |
143 duration+=time_trial(i, 1000); | 144 duration+=time_trial(i, 1000); |