blob: af186ff581125664ba560584b50d1c95f8750d7b [file] [log] [blame]
Jason Sams0f505e52009-10-13 17:18:35 -07001#pragma version(1)
2#pragma stateVertex(PV)
3#pragma stateFragment(PFTexLinear)
4#pragma stateStore(PSIcons)
5
6#define PI 3.14159f
7
Jason Sams41b61c82009-10-15 15:40:54 -07008int g_SpecialHWWar;
Jason Sams0f505e52009-10-13 17:18:35 -07009
10// Attraction to center values from page edge to page center.
11float g_AttractionTable[9];
Jason Sams0f505e52009-10-13 17:18:35 -070012float g_PhysicsTableSize;
13
14float g_PosPage;
15float g_PosVelocity;
16float g_LastPositionX;
17int g_LastTouchDown;
18float g_DT;
19int g_LastTime;
20int g_PosMax;
21float g_Zoom;
22float g_OldPosPage;
23float g_OldPosVelocity;
24float g_OldZoom;
Jason Samsc1c521e2009-10-19 14:45:45 -070025float g_MoveToTotalTime;
26float g_MoveToTime;
27float g_MoveToOldPos;
28
Jason Sams0f505e52009-10-13 17:18:35 -070029
30// Drawing constants, should be parameters ======
31#define VIEW_ANGLE 1.28700222f
32
33int g_DrawLastFrame;
34int lastFrame(int draw) {
35 // We draw one extra frame to work around the last frame post bug.
36 // We also need to track if we drew the last frame to deal with large DT
37 // in the physics.
38 int ret = g_DrawLastFrame | draw;
39 g_DrawLastFrame = draw;
40 return ret; // should return draw instead.
41}
42
43void updateReadback() {
44 if ((g_OldPosPage != g_PosPage) ||
45 (g_OldPosVelocity != g_PosVelocity) ||
46 (g_OldZoom != g_Zoom)) {
47
48 g_OldPosPage = g_PosPage;
49 g_OldPosVelocity = g_PosVelocity;
50 g_OldZoom = g_Zoom;
51
52 int i[3];
53 i[0] = g_PosPage * (1 << 16);
54 i[1] = g_PosVelocity * (1 << 16);
55 i[2] = g_OldZoom * (1 << 16);
56 sendToClient(&i[0], 1, 12, 1);
57 }
58}
59
Jason Sams41b61c82009-10-15 15:40:54 -070060void setColor(float r, float g, float b, float a) {
61 if (g_SpecialHWWar) {
62 color(0, 0, 0, 0.001f);
63 } else {
64 color(r, g, b, a);
65 }
66}
Jason Sams0f505e52009-10-13 17:18:35 -070067
68void init() {
69 g_AttractionTable[0] = 6.5f;
70 g_AttractionTable[1] = 6.5f;
71 g_AttractionTable[2] = 7.0f;
72 g_AttractionTable[3] = 6.0f;
73 g_AttractionTable[4] = -6.0f;
74 g_AttractionTable[5] = -7.0f;
75 g_AttractionTable[6] = -6.5f;
76 g_AttractionTable[7] = -6.5f;
77 g_AttractionTable[8] = -6.5f; // dup 7 to avoid a clamp later
Jason Sams0f505e52009-10-13 17:18:35 -070078 g_PhysicsTableSize = 7;
79
80 g_PosVelocity = 0;
81 g_PosPage = 0;
82 g_LastTouchDown = 0;
83 g_LastPositionX = 0;
84 g_Zoom = 0;
Jason Sams41b61c82009-10-15 15:40:54 -070085 g_SpecialHWWar = 1;
Jason Samsc1c521e2009-10-19 14:45:45 -070086 g_MoveToTime = 0;
87 g_MoveToOldPos = 0;
Mike Cleron7d5d7462009-10-20 14:06:00 -070088 g_MoveToTotalTime = 0.2f; // Duration of scrolling 1 line
Jason Sams41b61c82009-10-15 15:40:54 -070089}
90
91void resetHWWar() {
92 g_SpecialHWWar = 1;
Jason Sams0f505e52009-10-13 17:18:35 -070093}
94
95void move() {
96 if (g_LastTouchDown) {
97 float dx = -(state->newPositionX - g_LastPositionX);
98 g_PosVelocity = 0;
99 g_PosPage += dx * 4;
100
101 float pmin = -0.25f;
102 float pmax = g_PosMax + 0.25f;
103 g_PosPage = clampf(g_PosPage, pmin, pmax);
104 }
105 g_LastTouchDown = state->newTouchDown;
106 g_LastPositionX = state->newPositionX;
Jason Samsc1c521e2009-10-19 14:45:45 -0700107 g_MoveToTime = 0;
Jason Sams0f505e52009-10-13 17:18:35 -0700108 //debugF("Move P", g_PosPage);
109}
110
Jason Samsc1c521e2009-10-19 14:45:45 -0700111void moveTo() {
112 g_MoveToTime = g_MoveToTotalTime;
113 g_PosVelocity = 0;
114 g_MoveToOldPos = g_PosPage;
Mike Cleron7d5d7462009-10-20 14:06:00 -0700115
116 // debugF("======= moveTo", state->targetPos);
Jason Samsc1c521e2009-10-19 14:45:45 -0700117}
118
Jason Sams0f505e52009-10-13 17:18:35 -0700119void fling() {
120 g_LastTouchDown = 0;
Jason Sams37e7c2b2009-10-19 12:55:43 -0700121 g_PosVelocity = -state->flingVelocity * 4;
Jason Sams0f505e52009-10-13 17:18:35 -0700122 float av = fabsf(g_PosVelocity);
123 float minVel = 3.5f;
124
125 minVel *= 1.f - (fabsf(fracf(g_PosPage + 0.5f) - 0.5f) * 0.45f);
126
127 if (av < minVel && av > 0.2f) {
128 if (g_PosVelocity > 0) {
129 g_PosVelocity = minVel;
130 } else {
131 g_PosVelocity = -minVel;
132 }
133 }
134
135 if (g_PosPage <= 0) {
136 g_PosVelocity = maxf(0, g_PosVelocity);
137 }
138 if (g_PosPage > g_PosMax) {
139 g_PosVelocity = minf(0, g_PosVelocity);
140 }
141}
142
Jason Sams0f505e52009-10-13 17:18:35 -0700143float
144modf(float x, float y)
145{
146 return x-(y*floorf(x/y));
147}
148
Mike Cleron7d5d7462009-10-20 14:06:00 -0700149
150/*
151 * Interpolates values in the range 0..1 to a curve that eases in
152 * and out.
153 */
154float
155getInterpolation(float input) {
156 return (cosf((input + 1) * PI) / 2.0f) + 0.5f;
157}
158
159
Jason Sams0f505e52009-10-13 17:18:35 -0700160void updatePos() {
161 if (g_LastTouchDown) {
162 return;
163 }
164
165 int outOfRange = 0;
166 float tablePosNorm = fracf(g_PosPage + 0.5f);
167 float tablePosF = tablePosNorm * g_PhysicsTableSize;
168 int tablePosI = tablePosF;
169 float tablePosFrac = tablePosF - tablePosI;
170 float accel = lerpf(g_AttractionTable[tablePosI],
171 g_AttractionTable[tablePosI + 1],
172 tablePosFrac) * g_DT;
Jason Samsb52dfa02009-10-14 20:16:14 -0700173 float friction = 4.f * g_DT;
Jason Sams0f505e52009-10-13 17:18:35 -0700174
Jason Samsc1c521e2009-10-19 14:45:45 -0700175 if (g_MoveToTime) {
Mike Cleron7d5d7462009-10-20 14:06:00 -0700176
177 /*
Jason Samsc1c521e2009-10-19 14:45:45 -0700178 float a = 2.f * (state->targetPos - g_MoveToOldPos) /
179 (g_MoveToTotalTime * g_MoveToTotalTime);
180 if (g_MoveToTime > (g_MoveToTotalTime * 0.5f)) {
181 // slowing
182 g_PosPage = state->targetPos - 0.5f * a * (g_MoveToTime * g_MoveToTime);
183 } else {
184 // accelerating.
185 float t = g_MoveToTotalTime - g_MoveToTime;
186 g_PosPage = g_MoveToOldPos + 0.5f * a * (t * t);
187 }
Mike Cleron7d5d7462009-10-20 14:06:00 -0700188 */
189
190 // New position is old posiition + (total distance) * (interpolated time)
191 g_PosPage = g_MoveToOldPos + (state->targetPos - g_MoveToOldPos) * getInterpolation((g_MoveToTotalTime - g_MoveToTime) / g_MoveToTotalTime);
192
Jason Samsc1c521e2009-10-19 14:45:45 -0700193 g_MoveToTime -= g_DT;
194 if (g_MoveToTime <= 0) {
195 g_MoveToTime = 0;
196 g_PosPage = state->targetPos;
197 }
198 return;
199 }
200
Jason Sams0f505e52009-10-13 17:18:35 -0700201 if (g_PosPage < -0.5f) {
202 accel = g_AttractionTable[0] * g_DT;
Jason Sams0f505e52009-10-13 17:18:35 -0700203 outOfRange = 1;
204 }
205 if ((g_PosPage - g_PosMax) > 0.5f) {
206 accel = g_AttractionTable[(int)g_PhysicsTableSize] * g_DT;
Jason Sams0f505e52009-10-13 17:18:35 -0700207 outOfRange = 1;
208 }
209
210 // If our velocity is low OR acceleration is opposing it, apply it.
Jason Samsb52dfa02009-10-14 20:16:14 -0700211 if (fabsf(g_PosVelocity) < 1.0f || (g_PosVelocity * accel) < 0 || outOfRange) {
Jason Sams0f505e52009-10-13 17:18:35 -0700212 g_PosVelocity += accel;
213 }
214
215 if ((friction > fabsf(g_PosVelocity)) &&
216 (friction > fabsf(accel)) &&
217 !outOfRange) {
218 // Special get back to center and overcome friction physics.
219 float t = tablePosNorm - 0.5f;
220 if (fabsf(t) < (friction * g_DT)) {
221 // really close, just snap
222 g_PosPage = roundf(g_PosPage);
223 g_PosVelocity = 0;
224 } else {
225 if (t > 0) {
226 g_PosVelocity = -friction;
227 } else {
228 g_PosVelocity = friction;
229 }
230 }
231 } else {
232 // Normal physics
233 if (g_PosVelocity > 0) {
234 g_PosVelocity -= friction;
235 g_PosVelocity = maxf(g_PosVelocity, 0);
236 } else {
237 g_PosVelocity += friction;
238 g_PosVelocity = minf(g_PosVelocity, 0);
239 }
240 }
241 g_PosPage += g_PosVelocity * g_DT;
242
243 // Check for out of boundry conditions.
244 if (g_PosPage < 0 && g_PosVelocity < 0) {
245 g_PosPage = maxf(g_PosPage, -0.49);
246 float damp = 1.0 + (g_PosPage * 4);
247 damp = clampf(damp, 0.f, 0.9f);
248 g_PosVelocity *= damp;
249 }
250 if (g_PosPage > g_PosMax && g_PosVelocity > 0) {
251 g_PosPage = minf(g_PosPage, g_PosMax + 0.49);
252 float damp = 1.0 - ((g_PosPage - g_PosMax) * 4);
253 damp = clampf(damp, 0.f, 0.9f);
254 g_PosVelocity *= damp;
255 }
256}
257
Jason Sams09c6fc02009-10-16 17:23:23 -0700258int positionStrip(float row, float column, int isTop, float p)
Jason Sams0f505e52009-10-13 17:18:35 -0700259{
260 float mat1[16];
Jason Sams0f505e52009-10-13 17:18:35 -0700261 float x = 0.5f * (column - 1.5f);
Jason Sams0f505e52009-10-13 17:18:35 -0700262 float scale = 72.f * 3 / getWidth();
Jason Sams0f505e52009-10-13 17:18:35 -0700263
264 if (isTop) {
265 matrixLoadTranslate(mat1, x, 0.8f, 0.f);
266 matrixScale(mat1, scale, scale, 1.f);
267 } else {
268 matrixLoadTranslate(mat1, x, -0.9f, 0.f);
269 matrixScale(mat1, scale, -scale, 1.f);
270 }
Jason Sams461073b2009-10-20 12:06:28 -0700271 matrixTranslate(mat1, 0, p * 2, 0.f);
272 matrixRotate(mat1, -p * 50, 1, 0, 0);
Jason Sams0f505e52009-10-13 17:18:35 -0700273 vpLoadModelMatrix(mat1);
274
Jason Samsb52dfa02009-10-14 20:16:14 -0700275 float soff = -(row * 1.4);
Jason Sams0f505e52009-10-13 17:18:35 -0700276 if (isTop) {
277 matrixLoadScale(mat1, 1.f, -0.85f, 1.f);
Jason Samsb52dfa02009-10-14 20:16:14 -0700278 matrixTranslate(mat1, 0, soff - 0.97f, 0);
Jason Sams0f505e52009-10-13 17:18:35 -0700279 } else {
280 matrixLoadScale(mat1, 1.f, 0.85f, 1.f);
Jason Samsb52dfa02009-10-14 20:16:14 -0700281 matrixTranslate(mat1, 0, soff - 0.45f, 0);
Jason Sams0f505e52009-10-13 17:18:35 -0700282 }
283 vpLoadTextureMatrix(mat1);
Jason Samsb52dfa02009-10-14 20:16:14 -0700284 return -soff * 10.f;
Jason Sams0f505e52009-10-13 17:18:35 -0700285}
286
287void
288draw_home_button()
289{
Jason Sams41b61c82009-10-15 15:40:54 -0700290 setColor(1.0f, 1.0f, 1.0f, 1.0f);
Joe Onoratod63458b2009-10-15 21:19:09 -0700291 bindTexture(NAMED_PFTexLinear, 0, state->homeButtonId);
Jason Sams0f505e52009-10-13 17:18:35 -0700292
293 float scale = 2.0f / SCREEN_WIDTH_PX;
294
295 float x = 0.0f;
296
297 float y = -(SCREEN_HEIGHT_PX / (float)SCREEN_WIDTH_PX);
298 y += g_Zoom * (scale * params->homeButtonTextureHeight / 2);
299
300 float z = 0.0f;
301 drawSprite(x, y, z, params->homeButtonTextureWidth, params->homeButtonTextureHeight);
302}
303
Jason Sams09c6fc02009-10-16 17:23:23 -0700304void drawFrontGrid(float rowOffset, float p)
Jason Sams0f505e52009-10-13 17:18:35 -0700305{
306 float h = getHeight();
307 float w = getWidth();
308
309 int intRowOffset = rowOffset;
310 float rowFrac = rowOffset - intRowOffset;
311 float colWidth = getWidth() / 4;
312 float rowHeight = colWidth + 25.f;
313 float yoff = h - ((h - (rowHeight * 4.f)) / 2);
314
315 yoff -= 110;
316
317 int row, col;
318 int iconNum = intRowOffset * 4;
319 float ymax = yoff;
320 float ymin = yoff - (3 * rowHeight) - 70;
321
322 for (row = 0; row < 5; row++) {
323 float y = yoff - ((-rowFrac + row) * rowHeight);
324
325 for (col=0; col < 4; col++) {
326 if (iconNum >= state->iconCount) {
327 return;
328 }
329
330 if (iconNum >= 0) {
331 float x = colWidth * col - ((128 - colWidth) / 2);
332
333 if ((y >= ymin) && (y <= ymax)) {
Jason Sams41b61c82009-10-15 15:40:54 -0700334 setColor(1.f, 1.f, 1.f, 1.f);
Joe Onorato742d7fc2009-10-15 19:48:16 -0700335
Jason Sams09c6fc02009-10-16 17:23:23 -0700336 if (state->selectedIconIndex == iconNum && !p) {
Joe Onorato742d7fc2009-10-15 19:48:16 -0700337 bindTexture(NAMED_PFTexLinear, 0, state->selectedIconTexture);
338 drawSpriteScreenspace(x, y, 0, 128, 128);
339 }
340
Jason Sams0f505e52009-10-13 17:18:35 -0700341 bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_ICON_IDS, iconNum));
Jason Sams09c6fc02009-10-16 17:23:23 -0700342 if (!p) {
343 drawSpriteScreenspace(x, y, 0, 128, 128);
344 } else {
345 float px = ((x + 64) - (getWidth() / 2)) / (getWidth() / 2);
346 float py = ((y + 64) - (getHeight() / 2)) / (getWidth() / 2);
347 float d = 64.f / (getWidth() / 2);
348 px *= p + 1;
349 py *= p + 1;
350 drawQuadTexCoords(px - d, py - d, -p, 0, 1,
351 px - d, py + d, -p, 0, 0,
352 px + d, py + d, -p, 1, 0,
353 px + d, py - d, -p, 1, 1);
354 }
Jason Sams0f505e52009-10-13 17:18:35 -0700355 }
356
357 float y2 = y - 44;
358 float a = 1.f;
359 if (y2 < ymin) {
360 a = 1.f - (ymin - y2) * 0.02f;
361 }
362 if (y > (ymax + 40)) {
363 a = 1.f - (y - (ymax + 40)) * 0.02f;
364 }
365 a = clampf(a, 0, 1);
Jason Sams09c6fc02009-10-16 17:23:23 -0700366 a *= maxf(0, 1.f - p * 5.f);
Jason Sams0f505e52009-10-13 17:18:35 -0700367
Jason Sams41b61c82009-10-15 15:40:54 -0700368 setColor(1, 1, 1, a);
Jason Sams0f505e52009-10-13 17:18:35 -0700369 bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_LABEL_IDS, iconNum));
370 drawSpriteScreenspace(x, y - 44, 0,
371 params->bubbleBitmapWidth, params->bubbleBitmapHeight);
372 }
373 iconNum++;
374 }
375 }
376}
377
Jason Sams09c6fc02009-10-16 17:23:23 -0700378void drawStrip(float row, float column, int isTop, int iconNum, float p)
Jason Samsb52dfa02009-10-14 20:16:14 -0700379{
380 if (iconNum < 0) return;
Jason Sams09c6fc02009-10-16 17:23:23 -0700381 int offset = positionStrip(row, column, isTop, p);
Jason Samsb52dfa02009-10-14 20:16:14 -0700382 bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_ICON_IDS, iconNum));
383 if (offset < -20) return;
384 offset = clamp(offset, 0, 199 - 20);
Jason Sams37e7c2b2009-10-19 12:55:43 -0700385 drawSimpleMeshRange(NAMED_SMMesh, offset * 6, 20 * 6);
Jason Samsb52dfa02009-10-14 20:16:14 -0700386}
387
Jason Sams461073b2009-10-20 12:06:28 -0700388void drawTop(float rowOffset, float p)
Jason Sams0f505e52009-10-13 17:18:35 -0700389{
Jason Sams0f505e52009-10-13 17:18:35 -0700390 int row, col;
391 int iconNum = 0;
392 for (row = 0; row < rowOffset; row++) {
393 for (col=0; col < 4; col++) {
394 if (iconNum >= state->iconCount) {
395 return;
396 }
Jason Sams461073b2009-10-20 12:06:28 -0700397 drawStrip(rowOffset - row, col, 1, iconNum, p);
Jason Sams0f505e52009-10-13 17:18:35 -0700398 iconNum++;
399 }
400 }
401}
402
Jason Sams09c6fc02009-10-16 17:23:23 -0700403void drawBottom(float rowOffset, float p)
Jason Sams0f505e52009-10-13 17:18:35 -0700404{
405 float pos = -1.f;
406 int intRowOffset = rowOffset;
407 pos -= rowOffset - intRowOffset;
408
409 int row, col;
410 int iconNum = (intRowOffset + 3) * 4;
411 while (1) {
412 for (col=0; col < 4; col++) {
413 if (iconNum >= state->iconCount) {
414 return;
415 }
416 if (pos > -1) {
Jason Sams09c6fc02009-10-16 17:23:23 -0700417 drawStrip(pos, col, 0, iconNum, p);
Jason Sams0f505e52009-10-13 17:18:35 -0700418 }
419 iconNum++;
420 }
421 pos += 1.f;
422 }
423}
424
425int
426main(int launchID)
427{
428 // Compute dt in seconds.
429 int newTime = uptimeMillis();
430 g_DT = (newTime - g_LastTime) / 1000.f;
431 g_LastTime = newTime;
Mike Cleron7d5d7462009-10-20 14:06:00 -0700432
Jason Sams0f505e52009-10-13 17:18:35 -0700433 if (!g_DrawLastFrame) {
434 // If we stopped rendering we cannot use DT.
435 // assume 30fps in this case.
436 g_DT = 0.033f;
437 }
Jason Samsb52dfa02009-10-14 20:16:14 -0700438 // physics may break if DT is large.
439 g_DT = minf(g_DT, 0.2f);
Jason Sams0f505e52009-10-13 17:18:35 -0700440
441 if (g_Zoom != state->zoomTarget) {
Jason Sams09c6fc02009-10-16 17:23:23 -0700442 float dz;
443 if (state->zoomTarget > 0.5f) {
444 dz = (1 - g_Zoom) * 0.2f;
445 } else {
446 dz = -g_DT - (1 - g_Zoom) * 0.2f;
447 }
448 if (dz && (fabsf(dz) < 0.02f)) {
Jason Sams0f505e52009-10-13 17:18:35 -0700449 if (dz > 0) {
Jason Sams09c6fc02009-10-16 17:23:23 -0700450 dz = 0.02f;
Jason Sams0f505e52009-10-13 17:18:35 -0700451 } else {
Jason Sams09c6fc02009-10-16 17:23:23 -0700452 dz = -0.02f;
Jason Sams0f505e52009-10-13 17:18:35 -0700453 }
454 }
455 if (fabsf(g_Zoom - state->zoomTarget) < fabsf(dz)) {
456 g_Zoom = state->zoomTarget;
457 } else {
458 g_Zoom += dz;
459 }
460 updateReadback();
461 }
462
463 // Set clear value to dim the background based on the zoom position.
Jason Sams41b61c82009-10-15 15:40:54 -0700464 if ((g_Zoom < 0.001f) && (state->zoomTarget < 0.001f) && !g_SpecialHWWar) {
Jason Sams0f505e52009-10-13 17:18:35 -0700465 pfClearColor(0.0f, 0.0f, 0.0f, 0.0f);
466 // When we're zoomed out and not tracking motion events, reset the pos to 0.
467 if (!g_LastTouchDown) {
468 g_PosPage = 0;
469 }
470 return lastFrame(0);
Jason Sams0f505e52009-10-13 17:18:35 -0700471 } else {
472 pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
473 }
474
475 // icons & labels
476 int iconCount = state->iconCount;
477 g_PosMax = ((iconCount + 3) / 4) - 4;
478 if (g_PosMax < 0) g_PosMax = 0;
479
480 updatePos(0.1f);
481 updateReadback();
482
483 //debugF(" draw g_PosPage", g_PosPage);
484
485 // Draw the icons ========================================
486
487 //bindProgramFragment(NAMED_PFColor);
488 //positionStrip(1, 0, 0);
Jason Sams37e7c2b2009-10-19 12:55:43 -0700489 //drawSimpleMesh(NAMED_SMMesh);
Jason Sams0f505e52009-10-13 17:18:35 -0700490
491 bindProgramFragment(NAMED_PFTexLinear);
492
493
Jason Sams461073b2009-10-20 12:06:28 -0700494 drawTop(g_PosPage, 1-g_Zoom);
Jason Sams09c6fc02009-10-16 17:23:23 -0700495 drawBottom(g_PosPage, 1-g_Zoom);
Jason Sams0f505e52009-10-13 17:18:35 -0700496
497 {
498 float mat1[16];
499 matrixLoadIdentity(mat1);
500 vpLoadModelMatrix(mat1);
501 vpLoadTextureMatrix(mat1);
502 }
Jason Sams09c6fc02009-10-16 17:23:23 -0700503 drawFrontGrid(g_PosPage, 1-g_Zoom);
Jason Samsb52dfa02009-10-14 20:16:14 -0700504 draw_home_button();
Jason Sams0f505e52009-10-13 17:18:35 -0700505
Jason Sams41b61c82009-10-15 15:40:54 -0700506
507 // This is a WAR to do a rendering pass without drawing during init to
508 // force the driver to preload and compile its shaders.
509 // Without this the first animation does not appear due to the time it
510 // takes to init the driver state.
511 if (g_SpecialHWWar) {
512 g_SpecialHWWar = 0;
513 return 1;
514 }
515
Jason Sams0f505e52009-10-13 17:18:35 -0700516 // Bug workaround where the last frame is not always displayed
517 // So we keep rendering until the bug is fixed.
Mike Cleron7d5d7462009-10-20 14:06:00 -0700518 return lastFrame((g_PosVelocity != 0) || fracf(g_PosPage) || g_Zoom != state->zoomTarget || (g_MoveToTime != 0));
Jason Sams0f505e52009-10-13 17:18:35 -0700519}
520