# HG changeset patch # User wycc # Date 1233682081 -28800 # Node ID 959c4ac544a1868f10ee8fbcf60711696e1447e6 # Parent e885dc875f306e107cee30cc80bf129dd9394211 Add SPPED marcro to adjust the speed diff -r e885dc875f30 -r 959c4ac544a1 examples/menu/main.c --- 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]);