version 1.16 | | version 1.17 |
---|
| | |
/* | | /* |
* static char *rcsid_exit_c = | | * static char *rcsid_exit_c = |
* "$Id: exit.c,v 1.16 2001/10/07 06:45:40 mwedel Exp $"; | | * "$Id: exit.c,v 1.17 2004/08/07 23:24:13 temitchell Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
object *the_exit_down; /* harder maze */ | | object *the_exit_down; /* harder maze */ |
object *the_exit_up; /* easier maze */ | | object *the_exit_up; /* easier maze */ |
object *random_sign; /* magic mouth saying this is a random map. */ | | object *random_sign; /* magic mouth saying this is a random map. */ |
| | char buf[512]; |
int cx=-1,cy=-1; /* location of a map center */ | | int cx=-1,cy=-1; /* location of a map center */ |
int upx=-1,upy=-1; /* location of up exit */ | | int upx=-1,upy=-1; /* location of up exit */ |
int downx=-1,downy=-1; | | int downx=-1,downy=-1; |
| | int final_map_exit=1; |
| | |
| | if(RP->exit_on_final_map){ |
| | if(strstr(RP->exit_on_final_map,"no")) final_map_exit=0; |
| | } |
| | |
if(orientation == 0) orientation = RANDOM() % 6 + 1; | | if(orientation == 0) orientation = RANDOM() % 6 + 1; |
| | |
| | |
random_sign->x = the_exit_up->x+freearr_x[j]; | | random_sign->x = the_exit_up->x+freearr_x[j]; |
random_sign->y = the_exit_up->y+freearr_y[j]; | | random_sign->y = the_exit_up->y+freearr_y[j]; |
| | |
random_sign->msg = add_string("This is a random map.\n"); | | sprintf(buf,"This is a random map.\nLevel: %d\n", (RP->dungeon_level)-1); |
| | |
| | random_sign->msg = add_string(buf); |
insert_ob_in_map(random_sign,map,NULL,0); | | insert_ob_in_map(random_sign,map,NULL,0); |
} | | } |
} | | } |
| | |
break; | | break; |
} | | } |
| | |
| | if (final_map_exit == 1) |
| | { |
/* setup the exit back */ | | /* setup the exit back */ |
the_exit_back->slaying = add_string(map->path); | | the_exit_back->slaying = add_string(map->path); |
the_exit_back->stats.hp = the_exit_down->x; | | the_exit_back->stats.hp = the_exit_down->x; |
| | |
the_exit_back->y = MAP_ENTER_Y(new_map); | | the_exit_back->y = MAP_ENTER_Y(new_map); |
| | |
insert_ob_in_map(the_exit_back,new_map,NULL,0); | | insert_ob_in_map(the_exit_back,new_map,NULL,0); |
| | } |
| | |
set_map_timeout(new_map); /* So it gets swapped out */ | | set_map_timeout(new_map); /* So it gets swapped out */ |
} | | } |
else | | else |
| | |
} | | } |
} | | } |
} | | } |
| | |