Lines Matching refs:row
150 short row, col;
159 gr_row_col(&row, &col, (FLOOR | TUNNEL | STAIRS | OBJECT));
160 put_m_at(row, col, monster);
205 mv_1_monster(monster, rogue.row, rogue.col);
221 !mon_can_go(monster, rogue.row, rogue.col)) {
223 mv_1_monster(monster, rogue.row, rogue.col);
228 if (!(flew && mon_can_go(monster, rogue.row, rogue.col))) {
229 mv_1_monster(monster, rogue.row, rogue.col);
249 short row, col;
253 row = col = 0;
264 row = get_rand(rooms[rn].top_row+1,
268 if ((!(dungeon[row][col] & MONSTER)) &&
269 (dungeon[row][col] & (FLOOR | TUNNEL))) {
278 put_m_at(row, col, monster);
287 gmc_row_col(int row, int col)
291 if ((monster = object_at(&level_monsters, row, col)) != NULL) {
320 mv_1_monster(object *monster, short row, short col)
333 rogue_is_around(monster->row, monster->col) &&
348 (!mon_can_go(monster, rogue.row, rogue.col))) {
357 if (mon_can_go(monster, rogue.row, rogue.col)) {
367 if ((monster->trow == monster->row) &&
371 row = monster->trow;
374 if (monster->row > row) {
375 row = monster->row - 1;
376 } else if (monster->row < row) {
377 row = monster->row + 1;
379 if ((dungeon[row][monster->col] & DOOR) &&
380 mtry(monster, row, monster->col)) {
388 if ((dungeon[monster->row][col] & DOOR) &&
389 mtry(monster, monster->row, col)) {
392 if (mtry(monster, row, col)) {
402 if (!tried[n] && mtry(monster, row, monster->col-1)) {
407 if (!tried[n] && mtry(monster, row, monster->col)) {
412 if (!tried[n] && mtry(monster, row, monster->col+1)) {
417 if (!tried[n] && mtry(monster, monster->row-1, col)) {
422 if (!tried[n] && mtry(monster, monster->row, col)) {
427 if (!tried[n] && mtry(monster, monster->row+1, col)) {
439 if ((monster->row == monster->o_row) && (monster->col == monster->o_col)) {
442 (!mon_sees(monster, rogue.row, rogue.col))) {
451 monster->o_row = monster->row;
458 mtry(object *monster, short row, short col)
460 if (mon_can_go(monster, row, col)) {
461 move_mon_to(monster, row, col);
468 move_mon_to(object *monster, short row, short col)
473 mrow = monster->row;
477 dungeon[row][col] |= MONSTER;
495 monster->trail_char = mvinch(row, col);
496 if (!blind && (detect_monster || rogue_can_see(row, col))) {
499 mvaddch(row, col, gmc(monster));
502 if ((dungeon[row][col] & DOOR) &&
503 (get_room_number(row, col) != cur_room) &&
507 if (dungeon[row][col] & DOOR) {
509 row, col);
511 monster->row = row;
517 mon_can_go(const object *monster, short row, short col)
522 dr = monster->row - row; /* check if move distance > 1 */
530 if ((!dungeon[monster->row][col]) || (!dungeon[row][monster->col])) {
533 if ((!is_passable(row, col)) || (dungeon[row][col] & MONSTER)) {
536 if ((monster->row!=row)&&(monster->col!=col)&&((dungeon[row][col]&DOOR) ||
537 (dungeon[monster->row][monster->col]&DOOR))) {
542 if ((monster->row < rogue.row) && (row < monster->row)) return(0);
543 if ((monster->row > rogue.row) && (row > monster->row)) return(0);
547 if (dungeon[row][col] & OBJECT) {
548 obj = object_at(&level_objects, row, col);
565 wake_room(short rn, boolean entering, short row, short col)
579 in_room = (rn == get_room_number(monster->row, monster->col));
584 monster->trow = row;
589 (rn == get_room_number(monster->row, monster->col))) {
616 rogue_is_around(int row, int col)
620 rdif = row - rogue.row;
631 short row, col, i;
648 gr_row_col(&row, &col, (FLOOR | TUNNEL | STAIRS | OBJECT));
649 if (!rogue_can_see(row, col)) {
650 put_m_at(row, col, monster);
673 mvaddch(monster->row, monster->col, monster->m_char);
685 short row, col;
690 row = rogue.row;
694 rand_around(i, &row, &col);
695 if (((row == rogue.row) && (col == rogue.col)) ||
696 (row < MIN_ROW) || (row > (DROWS-2)) ||
700 if ((!(dungeon[row][col] & MONSTER)) &&
701 (dungeon[row][col] & (FLOOR|TUNNEL|STAIRS|DOOR))) {
708 put_m_at(row, col, monster);
709 mvaddch(row, col, gmc(monster));
719 put_m_at(short row, short col, object *monster)
721 monster->row = row;
723 dungeon[row][col] |= MONSTER;
724 monster->trail_char = mvinch(row, col);
734 rn = get_room_number(monster->row, monster->col);
750 rogue_can_see(int row, int col)
755 (((get_room_number(row, col) == cur_room) &&
757 rogue_is_around(row, col));
765 short i, row, col;
776 row = monster->row;
780 rand_around(i, &row, &col);
781 if ((row == rogue.row) && (col == rogue.col)) {
784 if (mtry(monster, row, col)) {
795 short i, row, col;
803 row = monster->row;
807 rand_around(i, &row, &col);
808 if ((row == rogue.row) && (col == rogue.col)) {
811 if (mtry(monster, row, col)) {
856 if (rogue_can_see(monster->row, monster->col)) {
857 mvaddch(monster->row, monster->col, monster->m_char);
864 mon_sees(const object *monster, int row, int col)
868 rn = get_room_number(row, col);
871 (rn == get_room_number(monster->row, monster->col)) &&
875 rdif = row - monster->row;
891 mon_can_go(monster, rogue.row, rogue.col)) {
892 mv_1_monster(monster, rogue.row, rogue.col);