diff --git a/SuperCbr.g1a b/SuperCbr.g1a index bae469f..77fdbd5 100644 Binary files a/SuperCbr.g1a and b/SuperCbr.g1a differ diff --git a/assets-fx/bin/lvl_1_1.png b/assets-fx/bin/lvl_1_1.png new file mode 100644 index 0000000..49e8123 Binary files /dev/null and b/assets-fx/bin/lvl_1_1.png differ diff --git a/assets-fx/bin/lvl_1_2.png b/assets-fx/bin/lvl_1_2.png index b7c837d..b449811 100644 Binary files a/assets-fx/bin/lvl_1_2.png and b/assets-fx/bin/lvl_1_2.png differ diff --git a/levelconverter/1_1.png b/levelconverter/1_1.png new file mode 100644 index 0000000..1d60519 Binary files /dev/null and b/levelconverter/1_1.png differ diff --git a/levelconverter/1_2.png b/levelconverter/1_2.png index f061941..5c7a37c 100644 Binary files a/levelconverter/1_2.png and b/levelconverter/1_2.png differ diff --git a/levelconverter/levelconv.py b/levelconverter/levelconv.py index fcfb66c..419c6b5 100644 --- a/levelconverter/levelconv.py +++ b/levelconverter/levelconv.py @@ -21,6 +21,8 @@ goomba = (127, 76, 0) koopa_vert = (25, 127, 0) koopa_rouge = (127, 0, 0) +mario_start = (108, 81, 47) + def color_compare(color1, color2): if color1[0] == color2[0] and color1[1] == color2[1] and color1[2] == color2[2]: return 1 @@ -93,6 +95,9 @@ for x in range(0,img.size[0]): elif color_compare(pixels[x,y], koopa_rouge): code += write_char(13) + elif color_compare(pixels[x,y], mario_start): + code += write_char(14) + else: code += write_char(0) diff --git a/src/level.c b/src/level.c index 25f14e6..103647e 100644 --- a/src/level.c +++ b/src/level.c @@ -26,11 +26,10 @@ #define PACKED_TUYAU_BOUT 8 #define PACKED_TUYAU_MIDDLE 9 #define PACKED_FLAG 10 - - #define PACKED_GOOMBA 11 #define PACKED_KOOPA_VERT 12 #define PACKED_KOOPA_ROUGE 13 +#define PACKED_MARIO_START 14 void malloc_error() { @@ -292,6 +291,12 @@ static void unpack_level(packed_level_t * p) ennemis[nombre_ennemis]=e; nombre_ennemis++; } + + if (contents==PACKED_MARIO_START) + { + sx=8*x; + sy=8*y; + } } } ll_sendp(LEVEL_INFO, "\n[i]Converted!\n[i]Sending to level zone...", w,h); @@ -315,6 +320,19 @@ void set_level(int w, int l) ennemis_global_size=0; plateforme_table_size=0; + if (w+1==1 && l+1==1) // 1-2 + { + extern packed_level_t bin_lvl_1_1; + unpack_level(&bin_lvl_1_1); + + teleport_t t[]= + { + {57,6, 215,12, MK_DOWN}, + {227,2, 179,3, MK_RIGHT} + }; + set_teleporteurs(t, sizeof(t)/sizeof(teleport_t)); + } + if (w+1==1 && l+1==2) // 1-2 { extern packed_level_t bin_lvl_1_2;