for panning beyond a clipped region; resend the current map data to the interface rather than use docrt()'s regeneration of that data */
| 1775 | /* for panning beyond a clipped region; resend the current map data to |
| 1776 | the interface rather than use docrt()'s regeneration of that data */ |
| 1777 | void |
| 1778 | redraw_map(boolean cursor_on_u) |
| 1779 | { |
| 1780 | coordxy x, y; |
| 1781 | int glyph; |
| 1782 | glyph_info bkglyphinfo = nul_glyphinfo; |
| 1783 | |
| 1784 | /* |
| 1785 | * Not sure whether this is actually necessary; save and restore did |
| 1786 | * used to get much too involved with each dungeon level as it was |
| 1787 | * read and written. |
| 1788 | * |
| 1789 | * !u.ux: display isn't ready yet; (restoring || !on_level()): was part |
| 1790 | * of cliparound() but interface shouldn't access this much internals |
| 1791 | */ |
| 1792 | if (!u.ux || suppress_map_output() || !on_level(&u.uz0, &u.uz)) |
| 1793 | return; |
| 1794 | |
| 1795 | /* |
| 1796 | * This yields sensible clipping when #terrain+getpos is in |
| 1797 | * progress and the screen displays something other than what |
| 1798 | * the map would currently be showing. |
| 1799 | */ |
| 1800 | for (y = 0; y < ROWNO; ++y) |
| 1801 | for (x = 1; x < COLNO; ++x) { |
| 1802 | glyph = _glyph_at(x, y); /* not levl[x][y].glyph */ |
| 1803 | get_bkglyph_and_framecolor(x, y, &bkglyphinfo.glyph, |
| 1804 | &bkglyphinfo.framecolor); |
| 1805 | print_glyph(WIN_MAP, x, y, |
| 1806 | Glyphinfo_at(x, y, glyph), &bkglyphinfo); |
| 1807 | } |
| 1808 | flush_screen(cursor_on_u); |
| 1809 | #ifndef UNBUFFERED_GLYPHINFO |
| 1810 | nhUse(glyph); |
| 1811 | #endif |
| 1812 | } |
| 1813 | |
| 1814 | /* |
| 1815 | * ======================================================= |
no test coverage detected