From f68cc067b5b7fb74421d309f051099e8afc2f41f Mon Sep 17 00:00:00 2001 From: Wintermute Date: Thu, 17 Oct 2013 21:17:34 +0200 Subject: [PATCH 1/1] ambros neuer Vogel, wolfpros Level. Den wir wohl besser als secret level verstecken. --- badge/jumpnrun/enemies.c | 8 ++++++-- badge/jumpnrun/levels.txt | 1 + badge/jumpnrun/wrongturn.lv | 30 ++++++++++++++++++++++++++++++ mock/tools/level-converter.cc | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 badge/jumpnrun/wrongturn.lv diff --git a/badge/jumpnrun/enemies.c b/badge/jumpnrun/enemies.c index 3e2c4db..edc1f82 100644 --- a/badge/jumpnrun/enemies.c +++ b/badge/jumpnrun/enemies.c @@ -68,8 +68,12 @@ static badge_sprite const anim_giraffe[] = { }; static badge_sprite const anim_bird[] = { + { 9, 7, (uint8_t const *) "\x10\x0c\x05\xf7\x4a\xa9\x58\x10" }, + { 9, 7, (uint8_t const *) "\x10\x0c\x05\x87\x47\xa2\x70\x10" } +/* { 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) { @@ -489,8 +493,8 @@ jumpnrun_enemy_type const jumpnrun_enemy_type_data[JUMPNRUN_ENEMY_TYPE_COUNT] = .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) }, + .extent = { FIXED_INT_I(9), FIXED_INT_I(7) }, + .hitbox = { { FIXED_INT_I(1), 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, diff --git a/badge/jumpnrun/levels.txt b/badge/jumpnrun/levels.txt index c6bfbe0..88ed79c 100644 --- a/badge/jumpnrun/levels.txt +++ b/badge/jumpnrun/levels.txt @@ -1,3 +1,4 @@ +wrongturn smb foo gnobbel diff --git a/badge/jumpnrun/wrongturn.lv b/badge/jumpnrun/wrongturn.lv new file mode 100644 index 0000000..af86928 --- /dev/null +++ b/badge/jumpnrun/wrongturn.lv @@ -0,0 +1,30 @@ + ?? ######## 01 ????????01?????????????????????????????# + 01 # 01 23 01 23 # + 23 K# 23 23 23 01 23 # + ##### ########## ##### ### 23 23 23 23 01 01 # + P ? 01 ## # 01 01 ## # 23 M01 ###### 23 ##################### # + 23 M ## # ## ## ### # 23 23 MM # # 23 23 # + # 01 ? 23 ####### ## # ## ## #### # 230123###### # 23 CMKCMKCMKCMK D 23 # + 23 01 23 ## # # # # ##2323 # # 23 CMKCMKCMKCMKCMKCMK 23 # + 23 ? ? 23 CC 23 ## M # # # 2323 ## # C K M C K M C K M ######################### M## # + 23 ############# ######### # # #### ## ##################### ###### # + M 23 # # # ? ? ### # + 23 # # # #### C K M C K # + ######################### ####################################### ######## ##### ##### # ############## ################# # # # # # # # # # # # #################################### # + +[tiles] +0 tube_top_left +1 tube_top_right +2 tube_left +3 tube_right +# brick +? square + +[items] +D doc + +[enemies] +C cat +M mushroom +K kaninchen + diff --git a/mock/tools/level-converter.cc b/mock/tools/level-converter.cc index ca7e58a..04651af 100644 --- a/mock/tools/level-converter.cc +++ b/mock/tools/level-converter.cc @@ -174,7 +174,7 @@ namespace jnrcpp { if(iter != objmap.end()) { unsigned char buf[3]; - buf[0] = static_cast(y) << 4 | static_cast(x >> 8); + buf[0] = static_cast(y + 1) << 4 | static_cast(x >> 8); buf[1] = static_cast(x); buf[2] = static_cast(find_type(types, iter->second, error)); -- 2.20.1