1 // Fountain test script
6 int main(int launchID) {
8 int count = Control->count;
9 int rate = Control->rate;
10 float height = getHeight();
11 struct point_s * p = (struct point_s *)point;
14 float rMax = ((float)rate) * 0.005f;
17 int color = ((int)(Control->r * 255.f)) |
18 ((int)(Control->g * 255.f)) << 8 |
19 ((int)(Control->b * 255.f)) << 16 |
21 struct point_s * np = &p[newPart];
24 vec2Rand((float *)&np->delta.x, rMax);
30 if (newPart >= count) {
37 for (ct=0; ct < count; ct++) {
38 float dy = p->delta.y + 0.15f;
39 float posy = p->position.y + dy;
40 if ((posy > height) && (dy > 0)) {
44 p->position.x += p->delta.x;
49 uploadToBufferObject(NAMED_PartBuffer);
50 drawSimpleMesh(NAMED_PartMesh);