changeset 298:959c4ac544a1

Add SPPED marcro to adjust the speed
author wycc
date Wed, 04 Feb 2009 01:28:01 +0800
parents e885dc875f30
children 5bf503270419
files examples/menu/main.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/examples/menu/main.c	Wed Feb 04 01:23:45 2009 +0800
+++ b/examples/menu/main.c	Wed Feb 04 01:28:01 2009 +0800
@@ -39,7 +39,7 @@
 
 int menus_y[10];
 int items[10];
-
+#define SPEED 600000
 
 typedef struct {
     int top;
@@ -110,7 +110,7 @@
 
     progm = mb_progm_new(2, MBAPP_RDMAN(myApp));
     MB_TIMEVAL_SET(&start, 0, 0);
-    MB_TIMEVAL_SET(&playing, 0, 300000);
+    MB_TIMEVAL_SET(&playing, 0, SPEED);
     word = mb_progm_next_word(progm, &start, &playing);
     get_now(&now);
 
@@ -138,7 +138,7 @@
     lightbar = (coord_t *) MB_SPRITE_GET_OBJ(sprite, "lightbar");
     mb_shift_new(0,menus_y[data->cur]-coord_y(lightbar),lightbar,word);
     
-    MB_TIMEVAL_SET(&start, 0, 300000);
+    MB_TIMEVAL_SET(&start, 0, SPEED);
     MB_TIMEVAL_SET(&playing, 0, 0);
     word = mb_progm_next_word(progm, &start, &playing);
     snprintf(name, sizeof(name),"item%d", items[8]);
@@ -177,7 +177,7 @@
 
     progm = mb_progm_new(2, MBAPP_RDMAN(myApp));
     MB_TIMEVAL_SET(&start, 0, 0);
-    MB_TIMEVAL_SET(&playing, 0, 300000);
+    MB_TIMEVAL_SET(&playing, 0, SPEED);
     word = mb_progm_next_word(progm, &start, &playing);
     get_now(&now);
 
@@ -202,7 +202,7 @@
     lightbar = (coord_t *) MB_SPRITE_GET_OBJ(sprite, "lightbar");
     mb_shift_new(0,menus_y[data->cur]-coord_y(lightbar),lightbar,word);
 
-    MB_TIMEVAL_SET(&start, 0, 300001);
+    MB_TIMEVAL_SET(&start, 0, SPEED);
     MB_TIMEVAL_SET(&playing, 0, 0);
     word = mb_progm_next_word(progm, &start, &playing);
     snprintf(name, sizeof(name),"item%d", items[0]);