summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2009-11-13 11:35:30 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-13 11:35:30 -0800
commitd1bce8e809525615dc78e09870d73c808b958eb8 (patch)
tree92c0f3d35380b4f6af4086e2c8c06e59bdd46059
parent10c638e1fb86b78b81160da69ec5d088da9ef716 (diff)
parentb0fbfd13a78c298bfb149a71043fb6fb885de66d (diff)
downloadandroid_packages_wallpapers_MagicSmoke-d1bce8e809525615dc78e09870d73c808b958eb8.tar.gz
android_packages_wallpapers_MagicSmoke-d1bce8e809525615dc78e09870d73c808b958eb8.tar.bz2
android_packages_wallpapers_MagicSmoke-d1bce8e809525615dc78e09870d73c808b958eb8.zip
am b0fbfd13: am 7a8980b4: Merge change I97e65a2a into eclair
Merge commit 'b0fbfd13a78c298bfb149a71043fb6fb885de66d' * commit 'b0fbfd13a78c298bfb149a71043fb6fb885de66d': 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) {