updated level 1 and 2

dev
Milang 3 years ago
parent 8210034071
commit 7499b37ccb
  1. 27
      levelconverter/1-2.png.c
  2. 7
      levelconverter/levelconv.py
  3. 59
      src/level.c

@ -286,18 +286,21 @@ world_t lvl[]=
init_level(lvl);
ennemi_t ennemies0[]={
GOOMBA(152, 8, -1),
GOOMBA(168, 8, -1),
GOOMBA(264, 8, -1),
GOOMBA(408, 8, -1),
GOOMBA(424, 8, -1),
GOOMBA(960, 64, -1),
GOOMBA(968, 88, -1),
GOOMBA(1064, 8, -1),
GOOMBA(1320, 8, -1),
GOOMBA(1336, 8, -1),
GOOMBA(1728, 8, -1),
GOOMBA(1744, 8, -1),
GOOMBA(152, 8, -1),
GOOMBA(168, 8, -1),
GOOMBA(264, 8, -1),
GOOMBA(408, 8, -1),
GOOMBA(424, 8, -1),
KOOPA(440, 8, -1),
GOOMBA(960, 64, -1),
GOOMBA(968, 88, -1),
GOOMBA(1064, 8, -1),
GOOMBA(1320, 8, -1),
GOOMBA(1336, 8, -1),
KOOPA(1352, 8, -1),
KOOPA(1648, 8, -1),
GOOMBA(1728, 8, -1),
GOOMBA(1744, 8, -1),
};
ennemis_global_size=12;
init_ennemies(ennemies0);

@ -13,7 +13,7 @@ tuyau_milieu = (0, 255, 102, 255)
tuyau_bout = (50, 255, 0, 255)
goomba = (127, 76, 0, 255)
koopa_vert = (25, 127, 0, 255)
# Load image
@ -164,8 +164,9 @@ for x in range(0,img.size[0]):
if pixels[x,y]==goomba:
nombre_ennemis += 1
ennemis += "\nGOOMBA(" + str(8*x) + ", " + str(8*i) + ", -1),"
ennemis += "\n GOOMBA(" + str(8*x) + ", " + str(8*i) + ", -1),"
elif pixels[x,y]==koopa_vert:
ennemis += "\n KOOPA_V(" + str(8*x) + ", " + str(8*i) + ", -1),"
code += "\n};\ninit_level(lvl);\n"
ennemis += "\n};\nennemis_global_size=" + str(nombre_ennemis) + ";\ninit_ennemies(ennemies0);\n"

@ -69,11 +69,39 @@ static void init_plateformes(plateforme_t * table)
}
/*
//extern image_t img_lvl0;
//w_fond=&img_lvl0;
ennemis_global_size=10;
ennemi_t ennemies0[]=
{
GOOMBA(176,16,-1),
GOOMBA(321,16,-1),
GOOMBA(409,16,-1),
GOOMBA(421,16,-1),
GOOMBA(640,80,-1),
GOOMBA(656,80,-1),
GOOMBA(776,16,-1),
GOOMBA(788,16,-1),
KOOPA_V(856,16,-1),
GOOMBA(912,16,-1),
GOOMBA(924,16,-1)
};
init_ennemies(ennemies0);
plateforme_t plateforme0[]=
{
PLATEFORME_MOVING_H(15,25,16,1,0,60)
};
plateforme_table_size=1;
init_plateformes(plateforme0);*/
void set_level(int n)
{
new_level();
if (n==0)
{
w_current_x=226;
w_current_y=13;
world_t level_0[]=
world_t lvl[]=
{
{EARTH,0x01}, {EARTH,0x00}, {COLLINE,0x01}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0},
{EARTH,0x11}, {EARTH,0x10}, {COLLINE,0x11}, {COLLINE,0x01}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0},
@ -302,11 +330,9 @@ static void init_plateformes(plateforme_t * table)
{EARTH,0x11}, {EARTH,0x10}, {TUYAU,0x11}, {TUYAU,0x10}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0},
{EARTH,0x11}, {EARTH,0x10}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}, {TUYAU,0x03}
};
lvl=(world_t*)&level_0;
*/
init_level(lvl);
/*
ennemis_global_size=10;
ennemis_global_size=10;
ennemi_t ennemies0[]=
{
GOOMBA(176,16,-1),
@ -328,13 +354,16 @@ static void init_plateformes(plateforme_t * table)
PLATEFORME_MOVING_H(15,25,16,1,0,60)
};
plateforme_table_size=1;
init_plateformes(plateforme0);*/
init_plateformes(plateforme0);
void set_level(int n)
{
new_level();
world_t * lvl=0;
if (n==0)
mario_x_max=0;
mario.p.x=25;
mario.p.y=16;
}
if (n==1)
{
w_current_x = 280;
w_current_y = 14;
@ -629,11 +658,14 @@ void set_level(int n)
GOOMBA(264, 8, -1),
GOOMBA(408, 8, -1),
GOOMBA(424, 8, -1),
KOOPA_V(440, 8, -1),
GOOMBA(960, 64, -1),
GOOMBA(968, 88, -1),
GOOMBA(1064, 8, -1),
GOOMBA(1320, 8, -1),
GOOMBA(1336, 8, -1),
KOOPA_V(1352, 8, -1),
KOOPA_V(1648, 8, -1),
GOOMBA(1728, 8, -1),
GOOMBA(1744, 8, -1),
};
@ -644,7 +676,6 @@ void set_level(int n)
mario_x_max=0;
mario.p.x=25;
mario.p.y=32;
init_level(lvl);
}
}

Loading…
Cancel
Save