fix c-5 floodfill

This commit is contained in:
Cracker64 2011-01-09 16:16:59 -05:00
parent 6b06d37ca5
commit d6837437f2

View File

@ -5881,13 +5881,13 @@ void create_box(int x1, int y1, int x2, int y2, int c)
int flood_parts(int x, int y, int c, int cm, int bm) int flood_parts(int x, int y, int c, int cm, int bm)
{ {
int x1, x2, dy = (c<PT_NUM)?1:CELL; int x1, x2, dy = (c<PT_NUM)?1:CELL;
int co = c; int co = c, wall;
if(cm==PT_INST&&co==PT_SPRK) if(cm==PT_INST&&co==PT_SPRK)
if((pmap[y][x]&0xFF)==PT_SPRK) if((pmap[y][x]&0xFF)==PT_SPRK)
return 0; return 0;
if(c>=UI_WALLSTART&&c<=UI_WALLSTART+UI_WALLCOUNT) if(c>=UI_WALLSTART&&c<=UI_WALLSTART+UI_WALLCOUNT)
{ {
c = c-100; wall = c-100;
} }
if(cm==-1) if(cm==-1)
{ {
@ -5904,7 +5904,7 @@ int flood_parts(int x, int y, int c, int cm, int bm)
} }
if(bm==-1) if(bm==-1)
{ {
if(c==WL_ERASE) if(wall==WL_ERASE)
{ {
bm = bmap[y/CELL][x/CELL]; bm = bmap[y/CELL][x/CELL];
if(!bm) if(!bm)