summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2009-11-13 10:58:39 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-13 10:58:39 -0800
commitb0fbfd13a78c298bfb149a71043fb6fb885de66d (patch)
tree92c0f3d35380b4f6af4086e2c8c06e59bdd46059
parent89097fb2716979a0a35543476ff5623c907d4c39 (diff)
parent7a8980b45d74af83443e7b3b6387476abe6eb14a (diff)
downloadandroid_packages_wallpapers_MagicSmoke-b0fbfd13a78c298bfb149a71043fb6fb885de66d.tar.gz
android_packages_wallpapers_MagicSmoke-b0fbfd13a78c298bfb149a71043fb6fb885de66d.tar.bz2
android_packages_wallpapers_MagicSmoke-b0fbfd13a78c298bfb149a71043fb6fb885de66d.zip
am 7a8980b4: Merge change I97e65a2a into eclair
Merge commit '7a8980b45d74af83443e7b3b6387476abe6eb14a' into eclair-mr2 * commit '7a8980b45d74af83443e7b3b6387476abe6eb14a': Make sure texture coordinates and angles don't get too big, since
-rw-r--r--res/raw/clouds.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/res/raw/clouds.rs b/res/raw/clouds.rs
index a468cfb..2d867e9 100644
--- a/res/raw/clouds.rs
+++ b/res/raw/clouds.rs
@@ -94,6 +94,12 @@ void drawClouds(float* ident) {
xshift[4] += 0.00127f;
}
+ // Make sure the texture coordinates don't continuously increase
+ for(i = 0; i < 5; i++) {
+ while (xshift[i] >= 1.f) {
+ xshift[i] -= 1.f;
+ }
+ }
if (State->mRotate != 0) {
rotation[0] += 0.10;
rotation[1] += 0.102f;
@@ -101,6 +107,13 @@ void drawClouds(float* ident) {
rotation[3] += 0.114f;
rotation[4] += 0.123f;
}
+
+ // Make sure the rotation angles don't continuously increase
+ for(i = 0; i < 5; i++) {
+ while (rotation[i] >= 360.f) {
+ rotation[i] -= 360.f;
+ }
+ }
}
int premul(int rgb, int a) {