+void dessineFlammes(DrawingWindow& w, float x0, float y0)
+{
+ for (int i = 0; i < 70; i++) {
+ float dt = 0.05;
+ float vx = frand(-2.5, 2.5);
+ float vy = frand(5, 17);
+ float x = x0;
+ float y = y0;
+ float red = frand(0.5, 1);
+ float green = frand(0, red);
+ float blue = 0;
+ w.setColor(red, green, blue);
+ while (y >= 0.0) {
+ w.drawPoint(rtowX(w, x), rtowY(w, y));
+ x += vx * dt;
+ y += vy * dt;
+ vy -= 9.81 * dt;
+ }
+ w.msleep(30);
+ }
+}
+
+/* Retour : numéro du perdant, 0 sinon
+ x et y contiennent les coordonnées de la collision
+*/
+int tir(DrawingWindow& w,
+ float x0, float y0, float v0, float alpha, float& x, float &y)