summaryrefslogtreecommitdiffstats
path: root/res/raw
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-09-29 15:28:22 -0700
committerJason Sams <rjsams@android.com>2009-09-29 15:39:17 -0700
commitcd689e14c7331985b3758674e4d486dcb9083f98 (patch)
tree9de8414ea1c86d0de355ada4b4534121cc97a241 /res/raw
parentdd4a83ed79a7f4a217e222c1a5c3d0c45a539f72 (diff)
downloadandroid_packages_apps_Trebuchet-cd689e14c7331985b3758674e4d486dcb9083f98.tar.gz
android_packages_apps_Trebuchet-cd689e14c7331985b3758674e4d486dcb9083f98.tar.bz2
android_packages_apps_Trebuchet-cd689e14c7331985b3758674e4d486dcb9083f98.zip
Minor cleanup and fix for the cannot launch apps bug if the screen is still creeping.
Diffstat (limited to 'res/raw')
-rw-r--r--res/raw/rollo.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
index 8d0912724..58623730e 100644
--- a/res/raw/rollo.c
+++ b/res/raw/rollo.c
@@ -1,7 +1,7 @@
#pragma version(1)
#pragma stateVertex(PV)
-#pragma stateFragment(PF)
-#pragma stateFragmentStore(PFS)
+#pragma stateFragment(PFTexLinear)
+#pragma stateStore(PSIcons)
#define PI 3.14159f
@@ -89,7 +89,6 @@ void fling() {
if (g_PosPage > (g_PageCount - 1)) {
g_PosVelocity = minf(0, g_PosVelocity);
}
- //g_Zoom += (maxf(fabsf(g_PosVelocity), 3) - 3) / 2.f;
}
void touchUp() {
@@ -128,18 +127,10 @@ void updatePos() {
return;
}
- //debugF("g_PosPage", g_PosPage);
- //debugF(" g_PosVelocity", g_PosVelocity);
-
float tablePosNorm = fracf(g_PosPage + 0.5f);
float tablePosF = tablePosNorm * g_PhysicsTableSize;
int tablePosI = tablePosF;
float tablePosFrac = tablePosF - tablePosI;
- //debugF("tablePosNorm", tablePosNorm);
- //debugF("tablePosF", tablePosF);
- //debugF("tablePosI", tablePosI);
- //debugF("tablePosFrac", tablePosFrac);
-
float accel = lerpf(g_AttractionTable[tablePosI],
g_AttractionTable[tablePosI + 1],
tablePosFrac) * g_DT;
@@ -257,14 +248,14 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale)
color(1.0f, 1.0f, 1.0f, 0.99f);
if (state->selectedIconIndex == icon) {
- bindTexture(NAMED_PF, 0, state->selectedIconTexture);
+ bindTexture(NAMED_PFTexLinear, 0, state->selectedIconTexture);
drawQuadTexCoords(
iconLeftX, iconTextureTop, iconLeftZ, 0.0f, 0.0f,
iconRightX, iconTextureTop, iconRightZ, 1.0f, 0.0f,
iconRightX, iconTextureBottom, iconRightZ, 1.0f, 1.0f,
iconLeftX, iconTextureBottom, iconLeftZ, 0.0f, 1.0f);
} else {
- bindTexture(NAMED_PF, 0, loadI32(ALLOC_ICON_IDS, icon));
+ bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_ICON_IDS, icon));
drawQuadTexCoords(
iconLeftX, iconTextureTop, iconLeftZ, 0.0f, 0.0f,
iconRightX, iconTextureTop, iconRightZ, 1.0f, 0.0f,
@@ -281,7 +272,7 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale)
float labelLeftX = centerX - farLabelWidth * 0.5f;
float labelRightX = centerX + farLabelWidth * 0.5f;
- bindTexture(NAMED_PF, 0, loadI32(ALLOC_LABEL_IDS, icon));
+ bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_LABEL_IDS, icon));
drawQuadTexCoords(
labelLeftX, labelTop, centerZ, 0.0f, 0.0f,
labelRightX, labelTop, centerZ, labelTextureWidth, 0.0f,
@@ -346,9 +337,6 @@ main(int launchID)
//debugF(" draw g_PosPage", g_PosPage);
// Draw the icons ========================================
- bindProgramVertex(NAMED_PV);
- bindProgramFragment(NAMED_PF);
- bindProgramFragmentStore(NAMED_PFS);
// Bug makes 1.0f alpha fail.
color(1.0f, 1.0f, 1.0f, 0.99f);