Level-Load: Gegner besser positionieren. Außerdem leere Source-Datei entfernt.
authorWintermate <wintermute@hannover.ccc.de>
Sun, 20 Oct 2013 02:21:31 +0000 (04:21 +0200)
committerWintermate <wintermute@hannover.ccc.de>
Sun, 20 Oct 2013 02:21:31 +0000 (04:21 +0200)
badge/jumpnrun/enemies.c
badge/jumpnrun/level_load.c
badge/jumpnrun/moveable.c [deleted file]

index 744e2f9..61859a8 100644 (file)
@@ -517,8 +517,8 @@ jumpnrun_enemy_type const jumpnrun_enemy_type_data[JUMPNRUN_ENEMY_TYPE_COUNT] =
     .animation_ticks_per_frame = 6,
     .animation_length          = ARRAY_SIZE(anim_spiral),
     .animation_frames          = anim_spiral,
-    .hitbox                    = { { FIXED_INT_I(0), FIXED_INT_I(0) },
-                                   { FIXED_INT_I(10), FIXED_INT_I(10) } },
+    .hitbox                    = { { FIXED_INT_I(1), FIXED_INT_I(1) },
+                                   { FIXED_INT_I(8), FIXED_INT_I(8) } },
     .spawn_inertia             = { FIXED_INT_I(0), FIXED_POINT_I(0, -200) },
     .collision_tiles           = enemy_collision_tiles_pass_through,
     .collision_player          = enemy_collision_player_deadly,
index 4b1e499..bcdb390 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_POINT( thing.x      * JUMPNRUN_TILE_PIXEL_WIDTH  + fixed_point_cast_int(dest->type->hitbox.pos.x), 0);
+  dest->spawn_pos.y = FIXED_POINT((thing.y + 1) * JUMPNRUN_TILE_PIXEL_HEIGHT - dest->type->animation_frames[0].height        , 0);
   jumpnrun_enemy_despawn(dest);
 }
 
diff --git a/badge/jumpnrun/moveable.c b/badge/jumpnrun/moveable.c
deleted file mode 100644 (file)
index 26789d3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "moveable.h"
This page took 0.027112 seconds and 4 git commands to generate.