Exemple #1
0
/*
 * try not to put in room NR
 */
void
put_player(short nr)
{
    short rn = nr, misses;
    short row, col;

    for (misses = 0; ((misses < 2) && (rn == nr)); misses++) {
        gr_row_col(&row, &col, (FLOOR | TUNNEL | OBJECT | STAIRS));
        rn = get_room_number(row, col);
    }
    rogue.row = row;
    rogue.col = col;

    if (dungeon[rogue.row][rogue.col] & TUNNEL) {
        cur_room = PASSAGE;
    } else {
        cur_room = rn;
    }
    if (cur_room != PASSAGE) {
        light_up_room(cur_room);
    } else {
        light_passage(rogue.row, rogue.col);
    }
    rn = get_room_number(rogue.row, rogue.col);
    wake_room(rn, 1, rogue.row, rogue.col);
    if (new_level_message) {
        messagef(0, "%s", new_level_message);
        new_level_message = NULL;
    }
    mvaddch(rogue.row, rogue.col, rogue.fchar);
}
Exemple #2
0
void
relight(void)
{
	if (cur_room == PASSAGE) {
		light_passage(rogue.row, rogue.col);
	} else {
		light_up_room(cur_room);
	}
	mvaddch(rogue.row, rogue.col, rogue.fchar);
}