… | |
… | |
214 | { |
214 | { |
215 | object *wall; |
215 | object *wall; |
216 | |
216 | |
217 | wall = GET_MAP_OB (map, x, y); |
217 | wall = GET_MAP_OB (map, x, y); |
218 | while (wall && (WALL != wall->type)) |
218 | while (wall && (WALL != wall->type)) |
|
|
219 | { |
219 | wall = wall->above; |
220 | wall = wall->above; |
|
|
221 | } |
220 | |
222 | |
221 | return wall; |
223 | return wall; |
222 | } |
224 | } |
223 | |
225 | |
224 | /** |
226 | /** |
… | |
… | |
240 | char archetype[MAX_BUF]; |
242 | char archetype[MAX_BUF]; |
241 | char *underscore; |
243 | char *underscore; |
242 | uint32 old_flags[4]; |
244 | uint32 old_flags[4]; |
243 | struct archetype *new_arch; |
245 | struct archetype *new_arch; |
244 | int flag; |
246 | int flag; |
|
|
247 | |
245 | |
248 | |
246 | /* First, find the wall on that spot */ |
249 | /* First, find the wall on that spot */ |
247 | wall = get_wall (map, x, y); |
250 | wall = get_wall (map, x, y); |
248 | if (!wall) |
251 | if (!wall) |
249 | /* Nothing -> bail out */ |
252 | /* Nothing -> bail out */ |
… | |
… | |
483 | /* Now remove raw item from inventory */ |
486 | /* Now remove raw item from inventory */ |
484 | decrease_ob (material); |
487 | decrease_ob (material); |
485 | |
488 | |
486 | /* And tell player about the fix */ |
489 | /* And tell player about the fix */ |
487 | new_draw_info (NDI_UNIQUE, 0, pl, message); |
490 | new_draw_info (NDI_UNIQUE, 0, pl, message); |
|
|
491 | } |
|
|
492 | |
|
|
493 | /** |
|
|
494 | * Wall radius fix function |
|
|
495 | */ |
|
|
496 | void fix_walls_around (maptile *map, int x, int y) |
|
|
497 | { |
|
|
498 | for (int xt = x - 1; xt <= x + 1; xt++) |
|
|
499 | for (int yt = y - 1; yt <= y + 1; yt++) |
|
|
500 | { |
|
|
501 | if (OUT_OF_REAL_MAP (map, xt, yt)) |
|
|
502 | continue; |
|
|
503 | |
|
|
504 | fix_walls (map, xt, yt); |
|
|
505 | } |
488 | } |
506 | } |
489 | |
507 | |
490 | /** |
508 | /** |
491 | * Wall building function |
509 | * Wall building function |
492 | * |
510 | * |