src/gen-util.c
void new_player_spot(struct chunk *c, struct player *p)
{
    int y, x;

    /* Try to find a good place to put the player */
    cave_find_in_range(c, &y, 0, c->height, &x, 0, c->width, square_isstart);

    /* Create stairs the player came down if allowed and necessary */
	if (OPT(birth_no_stairs))
		;
	else if (p->upkeep->create_down_stair)
		square_set_feat(c, y, x, FEAT_MORE);
	else if (p->upkeep->create_up_stair)
		square_set_feat(c, y, x, FEAT_LESS);

    player_place(c, p, y, x);
}
/**
 * Place the player at a random starting location.
 * \param c current chunk
 * \param p the player
 */
Place the player at a random starting location.
\param c current chunk
\param p the player
Place the player at a random starting location . \ param c current chunk \ param p the player
void new_player_spot(struct chunk *c, struct player *p)
{
    int y, x;
    cave_find_in_range(c, &y, 0, c->height, &x, 0, c->width, square_isstart);
	if (OPT(birth_no_stairs))
		;
	else if (p->upkeep->create_down_stair)
		square_set_feat(c, y, x, FEAT_MORE);
	else if (p->upkeep->create_up_stair)
		square_set_feat(c, y, x, FEAT_LESS);
    player_place(c, p, y, x);
}
void new_player_spot ( struct chunk * c , struct player * p ) { int y , x ; cave_find_in_range ( c , & y , 0 , c -> height , & x , 0 , c -> width , square_isstart ) ; if ( OPT ( birth_no_stairs ) ) ; else if ( p -> upkeep -> create_down_stair ) square_set_feat ( c , y , x , FEAT_MORE ) ; else if ( p -> upkeep -> create_up_stair ) square_set_feat ( c , y , x , FEAT_LESS ) ; player_place ( c , p , y , x ) ; }
Place the player at a random starting location.
Place the player at a random starting location .
/* Try to find a good place to put the player */ /* Create stairs the player came down if allowed and necessary */