comparison examples/dynamic/main.c @ 399:31b6633e3538

- Fix a minor error in src/sprite.c: should check *(s-1) instead of *s or the pointer will stop at '/', which is not what we want. - Fix various load path errors in examples because libtool put .so into .libs directory. - Fix an error in examples/dynamic/Makefile.am: scene_la_SOURCES should be scene.c instead of mytext.c
author john.cylee@gmail.com
date Fri, 12 Jun 2009 18:36:15 +0800
parents 433fa83d16f9
children 84ce2d4a8c3f
comparison
equal deleted inserted replaced
398:674717c2c3ee 399:31b6633e3538
119 MyApp_InitContent() 119 MyApp_InitContent()
120 { 120 {
121 mb_button_t *b; 121 mb_button_t *b;
122 mb_sprite_t *sprite; 122 mb_sprite_t *sprite;
123 123
124 sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); 124 sprite = sprite_load(".libs/button", myApp->rdman, myApp->rdman->root_coord);
125 b = mb_button_new(myApp->rdman, sprite, "btn"); 125 b = mb_button_new(myApp->rdman, sprite, "btn");
126 mb_button_add_onClick(b, test,NULL); 126 mb_button_add_onClick(b, test,NULL);
127 } 127 }
128 128
129 void draw_text() 129 void draw_text()
138 mb_timeval_t tmo,interval; 138 mb_timeval_t tmo,interval;
139 139
140 if (argc > 1) 140 if (argc > 1)
141 myApp = MBApp_Init(argv[1]); 141 myApp = MBApp_Init(argv[1]);
142 else 142 else
143 myApp = MBApp_Init("scene"); 143 myApp = MBApp_Init(".libs/scene");
144 data.currentscene=0; 144 data.currentscene=0;
145 draw_text(); 145 draw_text();
146 MBApp_setData(myApp,&data); 146 MBApp_setData(myApp,&data);
147 MyApp_InitContent(); 147 MyApp_InitContent();
148 get_now(&tmo); 148 get_now(&tmo);