summaryrefslogtreecommitdiffstats
path: root/libs/rs/java/Fountain
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-06-19 16:03:18 -0700
committerJason Sams <rjsams@android.com>2009-06-19 16:03:18 -0700
commit462d11b880cba72584c135397c0a82618ab63217 (patch)
tree4e6f319a95e09d8ed86e28d72a2add3ae56ae4b6 /libs/rs/java/Fountain
parent2d9c39d6e1db86539a4b4b13d918009bcc9ccd6f (diff)
downloadframeworks_base-462d11b880cba72584c135397c0a82618ab63217.zip
frameworks_base-462d11b880cba72584c135397c0a82618ab63217.tar.gz
frameworks_base-462d11b880cba72584c135397c0a82618ab63217.tar.bz2
checkpoint filmstrip, implemented TLS.
Diffstat (limited to 'libs/rs/java/Fountain')
-rw-r--r--libs/rs/java/Fountain/res/raw/fountain.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/libs/rs/java/Fountain/res/raw/fountain.c b/libs/rs/java/Fountain/res/raw/fountain.c
index 54130f9..8a55406 100644
--- a/libs/rs/java/Fountain/res/raw/fountain.c
+++ b/libs/rs/java/Fountain/res/raw/fountain.c
@@ -6,7 +6,7 @@
#pragma stateFragmentStore(parent)
-int main(void* con, int ft, int launchID) {
+int main(int launchID) {
int count, touch, x, y, rate, maxLife, lifeShift;
int life;
int ct, ct2;
@@ -18,10 +18,10 @@ int main(void* con, int ft, int launchID) {
int srcIdx;
int dstIdx;
- count = loadI32(con, 0, 1);
- touch = loadI32(con, 0, 2);
- x = loadI32(con, 0, 3);
- y = loadI32(con, 0, 4);
+ count = loadI32(0, 1);
+ touch = loadI32(0, 2);
+ x = loadI32(0, 3);
+ y = loadI32(0, 4);
rate = 4;
maxLife = (count / rate) - 1;
@@ -34,56 +34,56 @@ int main(void* con, int ft, int launchID) {
}
}
- drawRect(con, 0, 256, 0, 512);
- contextBindProgramFragment(con, NAMED_PgmFragParts);
+ drawRect(0, 256, 0, 512);
+ contextBindProgramFragment(NAMED_PgmFragParts);
if (touch) {
- newPart = loadI32(con, 2, 0);
+ newPart = loadI32(2, 0);
for (ct2=0; ct2<rate; ct2++) {
- dx = scriptRand(con, 0x10000) - 0x8000;
- dy = scriptRand(con, 0x10000) - 0x8000;
+ dx = scriptRand(0x10000) - 0x8000;
+ dy = scriptRand(0x10000) - 0x8000;
idx = newPart * 5 + 1;
- storeI32(con, 2, idx, dx);
- storeI32(con, 2, idx + 1, dy);
- storeI32(con, 2, idx + 2, maxLife);
- storeI32(con, 2, idx + 3, x << 16);
- storeI32(con, 2, idx + 4, y << 16);
+ storeI32(2, idx, dx);
+ storeI32(2, idx + 1, dy);
+ storeI32(2, idx + 2, maxLife);
+ storeI32(2, idx + 3, x << 16);
+ storeI32(2, idx + 4, y << 16);
newPart++;
if (newPart >= count) {
newPart = 0;
}
}
- storeI32(con, 2, 0, newPart);
+ storeI32(2, 0, newPart);
}
drawCount = 0;
for (ct=0; ct < count; ct++) {
srcIdx = ct * 5 + 1;
- dx = loadI32(con, 2, srcIdx);
- dy = loadI32(con, 2, srcIdx + 1);
- life = loadI32(con, 2, srcIdx + 2);
- posx = loadI32(con, 2, srcIdx + 3);
- posy = loadI32(con, 2, srcIdx + 4);
+ dx = loadI32(2, srcIdx);
+ dy = loadI32(2, srcIdx + 1);
+ life = loadI32(2, srcIdx + 2);
+ posx = loadI32(2, srcIdx + 3);
+ posy = loadI32(2, srcIdx + 4);
if (life) {
if (posy < (480 << 16)) {
dstIdx = drawCount * 9;
c = 0xffafcf | ((life >> lifeShift) << 24);
- storeU32(con, 1, dstIdx, c);
- storeI32(con, 1, dstIdx + 1, posx);
- storeI32(con, 1, dstIdx + 2, posy);
+ storeU32(1, dstIdx, c);
+ storeI32(1, dstIdx + 1, posx);
+ storeI32(1, dstIdx + 2, posy);
- storeU32(con, 1, dstIdx + 3, c);
- storeI32(con, 1, dstIdx + 4, posx + 0x10000);
- storeI32(con, 1, dstIdx + 5, posy + dy * 4);
+ storeU32(1, dstIdx + 3, c);
+ storeI32(1, dstIdx + 4, posx + 0x10000);
+ storeI32(1, dstIdx + 5, posy + dy * 4);
- storeU32(con, 1, dstIdx + 6, c);
- storeI32(con, 1, dstIdx + 7, posx - 0x10000);
- storeI32(con, 1, dstIdx + 8, posy + dy * 4);
+ storeU32(1, dstIdx + 6, c);
+ storeI32(1, dstIdx + 7, posx - 0x10000);
+ storeI32(1, dstIdx + 8, posy + dy * 4);
drawCount ++;
} else {
if (dy > 0) {
@@ -96,14 +96,14 @@ int main(void* con, int ft, int launchID) {
dy = dy + 0x400;
life --;
- //storeI32(con, 2, srcIdx, dx);
- storeI32(con, 2, srcIdx + 1, dy);
- storeI32(con, 2, srcIdx + 2, life);
- storeI32(con, 2, srcIdx + 3, posx);
- storeI32(con, 2, srcIdx + 4, posy);
+ //storeI32(2, srcIdx, dx);
+ storeI32(2, srcIdx + 1, dy);
+ storeI32(2, srcIdx + 2, life);
+ storeI32(2, srcIdx + 3, posx);
+ storeI32(2, srcIdx + 4, posy);
}
}
- drawTriangleArray(con, NAMED_PartBuffer, drawCount);
+ drawTriangleArray(NAMED_PartBuffer, drawCount);
return 1;
}