version 1.12 | | version 1.13 |
---|
| | |
/* | | /* |
* static char *rcsid_exit_c = | | * static char *rcsid_exit_c = |
* "$Id: exit.c,v 1.12 2001/04/25 02:32:06 mardahl Exp $"; | | * "$Id: exit.c,v 1.13 2001/04/26 05:37:10 mardahl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
keep things from being dumped on them during the other | | keep things from being dumped on them during the other |
phases of random map generation. */ | | phases of random map generation. */ |
void unblock_exits(mapstruct *map, char **maze, RMParms *RP) { | | void unblock_exits(mapstruct *map, char **maze, RMParms *RP) { |
int i=1,j=1; | | int i=0,j=0; |
object *walk; | | object *walk; |
| | |
/* clear the down exit */ | | for(i=0;i<RP->Xsize;i++) |
find_in_layout(1,'>',&i,&j,maze,RP); | | for(j=0;j<RP->Ysize;j++) |
if(i!=-1) /* found the down exit */ | | if(maze[i][j]=='>' || maze[i][j]=='<') { |
for(walk=get_map_ob(map,i,j);walk!=NULL;walk=walk->above) { | | for(walk=get_map_ob(map,i,j);walk!=NULL;walk=walk->above) { |
if(QUERY_FLAG(walk,FLAG_NO_PASS)) { | | if(QUERY_FLAG(walk,FLAG_NO_PASS)) { |
CLEAR_FLAG(walk,FLAG_NO_PASS); | | CLEAR_FLAG(walk,FLAG_NO_PASS); |
update_object(walk); | | update_object(walk); |
} | | } |
} | | } |
| | |
| | |
/* clear the up exit */ | | |
find_in_layout(1,'<',&i,&j,maze,RP); | | |
if(i!=-1) /* found the down exit */ | | |
for(walk=get_map_ob(map,i,j);walk!=NULL;walk=walk->above) { | | |
if(QUERY_FLAG(walk,FLAG_NO_PASS)) { | | |
CLEAR_FLAG(walk,FLAG_NO_PASS); | | |
update_object(walk); | | |
} | | } |
} | | } |
| | |
} | | |
| | |