comparison tools/mb_c_source.m4 @ 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 104d83378582
children 50d253d0fcba a90fd749af82
comparison
equal deleted inserted replaced
243:6c6b62d342ee 244:d36abace2ce4
390 return 1; 390 return 1;
391 391
392 if(sprite->last_scene) { 392 if(sprite->last_scene) {
393 p = sprite->last_scene; 393 p = sprite->last_scene;
394 while(*p != 0) { 394 while(*p != 0) {
395 coord = (coord_t *)MB_SPRITE_OFF_2_PTR(sprite, *p); 395 coord = *(coord_t **)MB_SPRITE_OFF_2_PTR(sprite, *p);
396 coord_hide(coord); 396 coord_hide(coord);
397 rdman_coord_changed(sprite->rdman, coord); 397 rdman_coord_changed(sprite->rdman, coord);
398 p++; 398 p++;
399 } 399 }
400 } 400 }
405 } 405 }
406 406
407 scene = $1_scenes[scene_no]; 407 scene = $1_scenes[scene_no];
408 p = scene; 408 p = scene;
409 while(*p != 0) { 409 while(*p != 0) {
410 coord = (coord_t *)MB_SPRITE_OFF_2_PTR(sprite, *p); 410 coord = *(coord_t **)MB_SPRITE_OFF_2_PTR(sprite, *p);
411 coord_show(coord); 411 coord_show(coord);
412 rdman_coord_changed(sprite->rdman, coord); 412 rdman_coord_changed(sprite->rdman, coord);
413 p++; 413 p++;
414 } 414 }
415 415