ajout des decos

This commit is contained in:
Milang 2020-02-02 20:31:44 +01:00
parent a8a8550e05
commit ed25c7394a
7 changed files with 21 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -23,6 +23,8 @@ koopa_rouge = (127, 0, 0)
mario_start = (108, 81, 47)
nuage = (127, 127, 127)
def color_compare(color1, color2):
if color1[0] == color2[0] and color1[1] == color2[1] and color1[2] == color2[2]:
return 1
@ -98,6 +100,9 @@ for x in range(0,img.size[0]):
elif color_compare(pixels[x,y], mario_start):
code += write_char(14)
elif color_compare(pixels[x,y], nuage):
code += write_char(15)
else:
code += write_char(0)

View File

@ -30,6 +30,7 @@
#define PACKED_KOOPA_VERT 12
#define PACKED_KOOPA_ROUGE 13
#define PACKED_MARIO_START 14
#define PACKED_NUAGE 15
void malloc_error()
{
@ -266,6 +267,21 @@ static void unpack_level(packed_level_t * p)
cell_t t={END_LEVEL,props};
cell = t;
}
else if (contents==PACKED_NUAGE)
{
int px=1, py=0;
if (pack_access(p,x,y+1)==PACKED_NUAGE)
py=1;
if (pack_access(p,x-1,y)!=PACKED_NUAGE)
px=0;
if (pack_access(p,x+1,y)!=PACKED_NUAGE)
px=2;
cell_t t={NUAGE,16*px+py};
cell = t;
}
ll_sendp(LEVEL_INFO, "\n[i]Converted cell %d,%d\n {%d,%p}\n[i]Writing cell...", x,y, cell.type, cell.data);
cell_set(c,w,h,x,y,cell);

View File

@ -196,7 +196,6 @@ void world_draw()
my+=8;
}
mx+=8;
}
//teleporteurs_display();
//dvline(teleporteurs[0].x-world_get_real_x0(),C_BLACK);