- part_draw(part_goal[i].p,
- part_goal[i].c, a,
- radius - 0.05f, rx, ry, r * part_goal[i].w);
+ part_draw(M, part_goal[i].p, radius - 0.05f,
+ t * part_goal[i].w, 1.0f);
+}
+
+void part_draw_jump(const float *M, float radius, float a, float t)
+{
+ int i;
+
+ glBindTexture(GL_TEXTURE_2D, part_text_squiggle);
+
+ for (i = 0; i < PART_MAX_JUMP; i++)
+ {
+ glColor4f(part_jump[i].c[0],
+ part_jump[i].c[1],
+ part_jump[i].c[2],
+ 1.0f - part_jump[i].p[1] / jump_height);
+
+ /*
+ * X is the current time since some Epoch, Y is the time it
+ * takes for a squiggle to grow to its full size and then
+ * shrink again. F is the current scale of the squiggle in
+ * the interval [0.0, 1.0]. The ratio is offset by 0.5 to
+ * have F = 1.0 when X = 0.0.
+ */
+
+#define F(x, y) fabsf(fsinf(((x) / (y) + 0.5f) * PI))
+
+ part_draw(M, part_jump[i].p, radius - 0.05f,
+ 0.0f, F(t, part_jump[i].w));
+
+#undef F
+ }