Vogel.
authorWintermute <wintermute@hannover.ccc.de>
Tue, 15 Oct 2013 21:30:26 +0000 (23:30 +0200)
committerWintermute <wintermute@hannover.ccc.de>
Tue, 15 Oct 2013 21:30:26 +0000 (23:30 +0200)
badge/jumpnrun/enemies.c
badge/jumpnrun/enemies.h
badge/jumpnrun/smb.lv
mock/tools/level-converter.cc

index 0277db7..f5560dc 100644 (file)
@@ -67,6 +67,11 @@ static badge_sprite const anim_giraffe[] = {
   { 8, 10, (uint8_t const *) "\x00\x10\x60\x80\xff\xc1\x00\x03\x3c\x08" }
 };
 
+static badge_sprite const anim_bird[] = {
+  { 10, 8, (uint8_t const *) "\x10\x10\x18\x14\x38\x2e\x29\x29\x2e\x10" },
+  { 10, 8, (uint8_t const *) "\x10\x10\x18\x14\x38\x78\xa8\xa8\x78\x10" }
+};
+
 static void enemy_animation_advance(jumpnrun_enemy *enemy) {
   ++enemy->base.tick_minor;
   if(enemy->base.tick_minor == enemy->type->animation_ticks_per_frame) {
@@ -391,7 +396,7 @@ void enemy_tick_giraffe(jumpnrun_enemy            *self,
 
 jumpnrun_enemy_type const jumpnrun_enemy_type_data[JUMPNRUN_ENEMY_TYPE_COUNT] = {
   {
-    .animation_ticks_per_frame = 16,
+    .animation_ticks_per_frame = 18,
     .animation_length          = ARRAY_SIZE(anim_cat),
     .animation_frames          = anim_cat,
     .extent                    = { FIXED_INT_I(8), FIXED_INT_I(5) },
@@ -457,7 +462,7 @@ jumpnrun_enemy_type const jumpnrun_enemy_type_data[JUMPNRUN_ENEMY_TYPE_COUNT] =
     .collision_player          = enemy_collision_player_deadly,
     .game_tick                 = enemy_tick_stationary
   }, {
-    .animation_ticks_per_frame = 16,
+    .animation_ticks_per_frame = 18,
     .animation_length          = ARRAY_SIZE(anim_dog),
     .animation_frames          = anim_dog,
     .extent                    = { FIXED_INT_I(8), FIXED_INT_I(5) },
@@ -478,5 +483,16 @@ jumpnrun_enemy_type const jumpnrun_enemy_type_data[JUMPNRUN_ENEMY_TYPE_COUNT] =
     .collision_tiles           = enemy_collision_tiles_bounce_horiz,
     .collision_player          = enemy_collision_player_jumpable,
     .game_tick                 = enemy_tick_giraffe
+  }, {
+    .animation_ticks_per_frame = 24,
+    .animation_length          = ARRAY_SIZE(anim_bird),
+    .animation_frames          = anim_bird,
+    .extent                    = { FIXED_INT_I(10), FIXED_INT_I(8) },
+    .hitbox                    = { { FIXED_INT_I(2), FIXED_INT_I(3) },
+                                   { FIXED_INT_I(7), FIXED_INT_I(3) } },
+    .spawn_inertia             = { FIXED_POINT_I(0, -400), FIXED_POINT_I(0, -150) },
+    .collision_tiles           = enemy_collision_tiles_bounce_horiz,
+    .collision_player          = enemy_collision_player_jumpable,
+    .game_tick                 = enemy_tick_swing_up_and_down
   }
 };
index a2e6ae6..9c08f68 100644 (file)
@@ -67,6 +67,7 @@ enum {
   JUMPNRUN_ENEMY_TYPE_ROTOR,
   JUMPNRUN_ENEMY_TYPE_DOG,
   JUMPNRUN_ENEMY_TYPE_GIRAFFE,
+  JUMPNRUN_ENEMY_TYPE_BIRD,
 
   JUMPNRUN_ENEMY_TYPE_COUNT
 };
index e3f54f1..509f8a1 100644 (file)
@@ -7,7 +7,7 @@
                                                                                                                                                                                          ####        #     #
                        G                                                                                                                                                                #####        #    ###
                ?   #?#?#                     01         01                  #?#              #     ##    ?  ?  ?     #          ##      #  #          ##  #            ##?#            ######        #    ###
-                                     01      23         23          @                R R                                               ##  ##        ###  ##                          #######        #   #####
+                                     01  V   23         23          @                R R                                               ##  ##        ###  ##                          #######        #   #####
    P                       01        23      23         23                                                M                           ###  ###      ####  ###     01              01 ########   D    #   #####
                      S     23        23B     23   H H   23                                      C C              C C      C C  H H   ####  ####    #####  ####    23         C C  23#########        #   #####
 ####################################################################  ###############   ################################################################  #####################################################
@@ -32,3 +32,4 @@ S snake
 R rotor
 H dog
 G giraffe
+V bird
index 803da3e..ca7e58a 100644 (file)
@@ -49,6 +49,7 @@ namespace jnrcpp {
         ("rotor"    , JUMPNRUN_ENEMY_TYPE_ROTOR    )
         ("dog"      , JUMPNRUN_ENEMY_TYPE_DOG      )
         ("giraffe"  , JUMPNRUN_ENEMY_TYPE_GIRAFFE  )
+        ("bird"     , JUMPNRUN_ENEMY_TYPE_BIRD     )
         ;
     }
 
This page took 0.027654 seconds and 4 git commands to generate.