comparison tools/mb_c_source.m4 @ 311:9fa4459c08a9

Mgere the image loader back
author wycc
date Sun, 22 Feb 2009 14:20:39 +0800
parents 2e97e8082d83
children bdf36a26e420
comparison
equal deleted inserted replaced
310:25a68d15e92f 311:9fa4459c08a9
493 493
494 void $1_free($1_t *); 494 void $1_free($1_t *);
495 495
496 $1_t *$1_new(redraw_man_t *rdman, coord_t *parent_coord) { 496 $1_t *$1_new(redraw_man_t *rdman, coord_t *parent_coord) {
497 $1_t *obj; 497 $1_t *obj;
498 mb_img_ldr_t *img_ldr = NULL;
498 grad_stop_t *stops = NULL;]DECLARE_VARS 499 grad_stop_t *stops = NULL;]DECLARE_VARS
499 $2[]dnl 500 $2[]dnl
500 [ 501 [
502 img_ldr = rdman_img_ldr(rdman);
501 obj = ($1_t *)malloc(sizeof($1_t)); 503 obj = ($1_t *)malloc(sizeof($1_t));
502 if(obj == NULL) return NULL; 504 if(obj == NULL) return NULL;
503 505
504 obj->lsym.sprite.free = (void (*)(mb_sprite_t *))$1_free; 506 obj->lsym.sprite.free = (void (*)(mb_sprite_t *))$1_free;
505 obj->lsym.sprite.goto_scene = (int (*)(mb_sprite_t *, int))$1_goto_scene; 507 obj->lsym.sprite.goto_scene = (int (*)(mb_sprite_t *, int))$1_goto_scene;