| 3647 | } |
| 3648 | |
| 3649 | void |
| 3650 | docorner( |
| 3651 | int xmin, int ymax, |
| 3652 | int ystart_between_menu_pages) |
| 3653 | { |
| 3654 | int y; |
| 3655 | struct WinDesc *cw = wins[WIN_MAP]; |
| 3656 | int ystart = 0; |
| 3657 | #ifdef TTY_PERM_INVENT |
| 3658 | struct WinDesc *icw = 0; |
| 3659 | |
| 3660 | if (WIN_INVEN != WIN_ERR && iflags.perm_invent) |
| 3661 | icw = wins[WIN_INVEN]; |
| 3662 | #endif |
| 3663 | |
| 3664 | HUPSKIP(); |
| 3665 | #if 0 /* this optimization is not valuable enough to justify |
| 3666 | * abusing core internals... */ |
| 3667 | if (u.uswallow) { /* Can be done more efficiently */ |
| 3668 | swallowed(1); |
| 3669 | /* without this flush, if we happen to follow --More-- displayed in |
| 3670 | leftmost column, the cursor gets left in the wrong place after |
| 3671 | <docorner<more<update_topl<tty_putstr calls unwind back to core */ |
| 3672 | flush_screen(0); |
| 3673 | return; |
| 3674 | } |
| 3675 | #endif /*0*/ |
| 3676 | |
| 3677 | #ifdef RESIZABLE |
| 3678 | if (ymax > LI) |
| 3679 | ymax = LI; /* can happen if window gets smaller */ |
| 3680 | #endif |
| 3681 | if (ystart_between_menu_pages) |
| 3682 | ystart = ystart_between_menu_pages; |
| 3683 | |
| 3684 | for (y = ystart; y < ymax; y++) { |
| 3685 | tty_curs(BASE_WINDOW, xmin, y); /* move cursor */ |
| 3686 | if (!ystart_between_menu_pages) |
| 3687 | cl_end(); /* clear to end of line */ |
| 3688 | #ifdef TTY_PERM_INVENT |
| 3689 | /* the whole thing is beyond the board but not necessarily all the |
| 3690 | way to the bottom of the screen */ |
| 3691 | if (icw && y >= (int) icw->offy && y < icw->offy + icw->maxrow) |
| 3692 | tty_refresh_inventory(xmin - (int) icw->offx, icw->maxcol, |
| 3693 | y - (int) icw->offy); |
| 3694 | #endif |
| 3695 | #ifdef CLIPPING |
| 3696 | if (y < (int) cw->offy || y + clipy > ROWNO) |
| 3697 | continue; /* only refresh board */ |
| 3698 | #if defined(TILES_IN_GLYPHMAP) && defined(MSDOS) |
| 3699 | if (iflags.tile_view) |
| 3700 | row_refresh((xmin / 2) + clipx - ((int) cw->offx / 2), COLNO - 1, |
| 3701 | y + clipy - (int) cw->offy); |
| 3702 | else |
| 3703 | #endif |
| 3704 | row_refresh(xmin + clipx - (int) cw->offx, COLNO - 1, |
| 3705 | y + clipy - (int) cw->offy); |
| 3706 | #else |
no test coverage detected