From 66edbd1db3e2b0edf2e3e00136719bb664aaf489 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 17 May 2010 21:52:50 +0200 Subject: Fixed pattern coordinates. --- application.cpp | 16 ++++++++-------- bulletpattern.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application.cpp b/application.cpp index 75fbb44..c2f5f71 100644 --- a/application.cpp +++ b/application.cpp @@ -24,10 +24,10 @@ class BulletPattern1 : public BulletPattern { int j = 0; for(float i = 0; i < M_PI; i += 0.1, j++) { - bullets[j*4] = 50.0 + sinf(!reverse ? M_PI_2 + i : M_PI - i + M_PI_2) * 9; - bullets[j*4 + 1] = 80 + cosf(M_PI_2 + i) * 10; - bullets[j*4 + 2] = sinf(!reverse ? M_PI_2 + i : M_PI - i + M_PI_2) / 150.0; - bullets[j*4 + 3] = -0.01; + bullets[j*4] = 0.5 + sinf(!reverse ? M_PI_2 + i : M_PI - i + M_PI_2) * 0.09; + bullets[j*4 + 1] = 0.8 + cosf(M_PI_2 + i) * 0.1; + bullets[j*4 + 2] = sinf(!reverse ? M_PI_2 + i : M_PI - i + M_PI_2) / 15000.0; + bullets[j*4 + 3] = -0.0001; } }; void update(unsigned int time, unsigned int step) { @@ -55,10 +55,10 @@ class BulletPattern2 : public BulletPattern { int k = 0; for(int j = 0; j < 8; j++) { for(float i = 0; i < M_PI; i += 0.1, k++) { - bullets[k*5] = 50.0 + sinf(j % 2 ? M_PI_2 + i : M_PI - i + M_PI_2) * 9; - bullets[k*5 + 1] = 80 + cosf(M_PI_2 + i) * 10; - bullets[k*5 + 2] = sinf(j % 2 ? M_PI_2 + i : M_PI - i + M_PI_2) / 150.0; - bullets[k*5 + 3] = -0.01; + bullets[k*5] = 0.5 + sinf(j % 2 ? M_PI_2 + i : M_PI - i + M_PI_2) * 0.09; + bullets[k*5 + 1] = 0.8 + cosf(M_PI_2 + i) * 0.1; + bullets[k*5 + 2] = sinf(j % 2 ? M_PI_2 + i : M_PI - i + M_PI_2) / 15000; + bullets[k*5 + 3] = -0.0001; bullets[k*5 + 4] = base + j * 400 + i * 100; } } diff --git a/bulletpattern.cpp b/bulletpattern.cpp index 5e3d93d..b4b5a31 100644 --- a/bulletpattern.cpp +++ b/bulletpattern.cpp @@ -16,8 +16,8 @@ BulletPattern::BulletPattern() { for(float i = 0; i < M_PI * 16; i += 0.1) { bullets[k++] = 0.5 + cosf(i) * 0.05; bullets[k++] = 0.5 + sinf(i) * 0.05; - bullets[k++] = cosf(i); - bullets[k++] = sinf(i); + bullets[k++] = cosf(i) / 10000.0; + bullets[k++] = sinf(i) / 10000.0; } } -- cgit v1.2.3