version 1.9 | | version 1.10 |
---|
| | |
int MapObjectOut (mapstruct *target, object *obj, int x, int y) { | | int MapObjectOut (mapstruct *target, object *obj, int x, int y) { |
object *tmp; | | object *tmp; |
for(tmp = obj; tmp; tmp = tmp->more) | | for(tmp = obj; tmp; tmp = tmp->more) |
if(out_of_map(target,x + tmp->x,y + tmp->y)) return 1; | | if(OUT_OF_REAL_MAP(target,x + tmp->x,y + tmp->y)) return 1; |
return 0; | | return 0; |
} | | } |
| | |
| | |
*/ | | */ |
void EditPerformFill(Edit self, int x, int y) | | void EditPerformFill(Edit self, int x, int y) |
{ | | { |
if (self->emap && | | int dx, dy; |
!out_of_map (self->emap, x, y) && | | if (!self->emap) return; |
!get_map_ob(self->emap, x, y) && | | |
EditInsert (self, x, y, 0)) { | | for (dx=x; dx< x+self->app->look.rect.width; dx++) { |
EditPerformFill (self, x+1, y); | | for (dy=y; dy < y+self->app->look.rect.height; dy++) { |
EditPerformFill (self, x+1, y+1); | | if (!OUT_OF_REAL_MAP (self->emap, dx, dy)) |
EditPerformFill (self, x, y+1); | | EditInsert(self, dx, dy, 0); |
EditPerformFill (self, x-1, y+1); | | } |
EditPerformFill (self, x-1, y); | | |
EditPerformFill (self, x-1, y-1); | | |
EditPerformFill (self, x, y-1); | | |
EditPerformFill (self, x+1, y-1); | | |
} | | } |
} | | } |
| | |
| | |
| | |
for (dx=x; dx< x+self->app->look.rect.width; dx++) { | | for (dx=x; dx< x+self->app->look.rect.width; dx++) { |
for (dy=y; dy < y+self->app->look.rect.height; dy++) { | | for (dy=y; dy < y+self->app->look.rect.height; dy++) { |
if (!out_of_map (self->emap, dx, dy)) | | if (!OUT_OF_REAL_MAP (self->emap, dx, dy)) |
EditInsert(self, dx, dy, -1); | | EditInsert(self, dx, dy, -1); |
} | | } |
} | | } |