wolfpros Level schaffbar gemacht.
[hackover2013-badge-firmware.git] / badge / jumpnrun / level_load.c
index 4b1e499..bf491f8 100644 (file)
@@ -51,8 +51,8 @@ static void jumpnrun_level_make_enemy(jumpnrun_enemy *dest, level_thing thing) {
 
   dest->type = &jumpnrun_enemy_type_data[thing.type];
 
-  dest->spawn_pos.x = FIXED_POINT( thing.x      * JUMPNRUN_TILE_PIXEL_WIDTH                                          , 0);
-  dest->spawn_pos.y = FIXED_POINT((thing.y + 1) * JUMPNRUN_TILE_PIXEL_HEIGHT - dest->type->animation_frames[0].height, 0);
+  dest->spawn_pos.x = FIXED_INT( thing.x      * JUMPNRUN_TILE_PIXEL_WIDTH  + fixed_point_cast_int(dest->type->hitbox.pos.x));
+  dest->spawn_pos.y = FIXED_INT((thing.y + 1) * JUMPNRUN_TILE_PIXEL_HEIGHT - fixed_point_cast_int(dest->type->hitbox.extent.y));
   jumpnrun_enemy_despawn(dest);
 }
 
This page took 0.022854 seconds and 4 git commands to generate.