summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-05-17 21:52:50 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-05-17 21:52:50 +0200
commit66edbd1db3e2b0edf2e3e00136719bb664aaf489 (patch)
treece5a312a6ccb2977aa97f5d1692b20b21c640afa
parent9edb297bbd720daca3d3211d28d0a01e0a97c620 (diff)
Fixed pattern coordinates.
-rw-r--r--application.cpp16
-rw-r--r--bulletpattern.cpp4
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;
}
}