Mercurial > MadButterfly
diff examples/tank/tank_main.c @ 130:3a4d6179e6a9
change mb_c_source.m4 and mb_c_header.m4 to specify parent for SVG object
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 16 Sep 2008 21:23:34 +0800 |
parents | ba581d8a4b9b |
children | 6a8588df68af |
line wrap: on
line diff
--- a/examples/tank/tank_main.c Tue Sep 16 17:35:04 2008 +0800 +++ b/examples/tank/tank_main.c Tue Sep 16 21:23:34 2008 +0800 @@ -152,22 +152,22 @@ for(j = 0; j < 16; j++) { switch(map[i][j]) { case MUD: - mud = mud_new(rdman); + mud = mud_new(rdman, rdman->root_coord); CHANGE_POS(mud, j * 50, i * 50); tank_rt->map[i][j] = (void *)mud; break; case BRI: - brick = brick_new(rdman); + brick = brick_new(rdman, rdman->root_coord); CHANGE_POS(brick, j * 50, i * 50); tank_rt->map[i][j] = (void *)brick; break; case ROC: - rock = rock_new(rdman); + rock = rock_new(rdman, rdman->root_coord); CHANGE_POS(rock, j * 50, i * 50); tank_rt->map[i][j] = (void *)rock; break; case BSH: - bush = bush_new(rdman); + bush = bush_new(rdman, rdman->root_coord); CHANGE_POS(bush, j * 50, i * 50); tank_rt->map[i][j] = (void *)bush; break; @@ -175,12 +175,12 @@ } } - tank_rt->tank1 = tank1_new(rdman); + tank_rt->tank1 = tank1_new(rdman, rdman->root_coord); CHANGE_POS(tank_rt->tank1, 5 * 50, 11 * 50); - tank_rt->tank2 = tank2_new(rdman); + tank_rt->tank2 = tank2_new(rdman, rdman->root_coord); CHANGE_POS(tank_rt->tank2, 10 * 50, 11 * 50); for(i = 0; i < 3; i++) { - tank_rt->tank_enemies[i] = tank_en_new(rdman); + tank_rt->tank_enemies[i] = tank_en_new(rdman, rdman->root_coord); CHANGE_POS(tank_rt->tank_enemies[i], (2 + i * 3) * 50, 0); } tank_rt->n_enemy = i;