version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.20 2001/07/31 06:33:23 mwedel Exp $"; | | * "$Id: map.c,v 1.21 2001/08/05 05:07:20 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
op->head = tmp; | | op->head = tmp; |
op->map = m; | | op->map = m; |
last->more = op; | | last->more = op; |
| | if (tmp->name != op->name) { |
| | if (op->name) free_string(op->name); |
| | op->name = add_string(tmp->name); |
| | } |
| | if (tmp->title != op->title) { |
| | if (op->title) free_string(op->title); |
| | op->title = add_string(tmp->title); |
| | } |
/* we could link all the parts onto tmp, and then just | | /* we could link all the parts onto tmp, and then just |
* call insert_ob_in_map once, but the effect is the same, | | * call insert_ob_in_map once, but the effect is the same, |
* as insert_ob_in_map will call itself with each part, and | | * as insert_ob_in_map will call itself with each part, and |
| | |
* | | * |
* Always put the player down for drawing. | | * Always put the player down for drawing. |
*/ | | */ |
if ((tmp->type==PLAYER || QUERY_FLAG(tmp, FLAG_MONSTER)) && !tmp->invisible) { | | if (!tmp->invisible) { |
| | if ((tmp->type==PLAYER || QUERY_FLAG(tmp, FLAG_MONSTER))) |
top = tmp->face; | | top = tmp->face; |
} | | |
else if (QUERY_FLAG(tmp,FLAG_IS_FLOOR)) { | | else if (QUERY_FLAG(tmp,FLAG_IS_FLOOR)) { |
/* If we got a floor, that means middle and top were below it, | | /* If we got a floor, that means middle and top were below it, |
* so should not be visible, so we clear them. | | * so should not be visible, so we clear them. |
*/ | | */ |
middle=blank_face; | | middle=blank_face; |
top=blank_face; | | top=blank_face; |
if (!tmp->invisible) | | |
floor = tmp->face; | | floor = tmp->face; |
} | | } |
/* Flag anywhere have high priority */ | | /* Flag anywhere have high priority */ |
| | |
/* Find the highest visible face around */ | | /* Find the highest visible face around */ |
else if (tmp->face->visibility > middle->visibility && !anywhere) | | else if (tmp->face->visibility > middle->visibility && !anywhere) |
middle = tmp->face; | | middle = tmp->face; |
| | } |
if (tmp==tmp->above) { | | if (tmp==tmp->above) { |
LOG(llevError, "Error in structure of map\n"); | | LOG(llevError, "Error in structure of map\n"); |
exit (-1); | | exit (-1); |