diff examples/dynamic/main.c @ 244:d36abace2ce4

Fix bug in *_goto_scene() - Wrong type casting in *_goto_scene() of mb_c_source.m5. Once again! - Change examples/dynamic/main.c that scene is numbered started from zero.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 31 Dec 2008 23:50:53 +0800
parents d3fe0a0f3a8b
children 81458bb0bf34
line wrap: on
line diff
--- a/examples/dynamic/main.c	Wed Dec 31 22:39:28 2008 +0800
+++ b/examples/dynamic/main.c	Wed Dec 31 23:50:53 2008 +0800
@@ -304,9 +304,10 @@
     MB_TIMEVAL_ADD(&timer, &interval);
     mb_tman_timeout( MBApp_getTimer(myApp), &timer, switch_scene, myApp);
 
-    en->currentscene = (en->currentscene+1) %2;
-    printf("switch to scene %d\n", en->currentscene);
-    MB_SPRITE_GOTO_SCENE(myApp->rootsprite,en->currentscene);
+    en->currentscene = (en->currentscene + 1) % 2;
+    printf("switch to scene %d\n", en->currentscene + 1);
+    MB_SPRITE_GOTO_SCENE(myApp->rootsprite,en->currentscene + 1);
+    rdman_redraw_all(myApp->rdman);
 }
 
 int main(int argc, char * const argv[]) {