| 822 | } |
| 823 | |
| 824 | static int |
| 825 | draw_status(PARMBLK *pb) |
| 826 | { |
| 827 | GRECT area = *(GRECT *) &pb->pb_x; |
| 828 | |
| 829 | area.g_x += 2 * status_font.cw - 2; |
| 830 | area.g_w -= 2 * status_font.cw - 2; |
| 831 | if (rc_intersect((GRECT *) &pb->pb_xc, &area)) { |
| 832 | int x = pb->pb_x, y = pb->pb_y, startx, stopx, starty, stopy, i; |
| 833 | char tmp; |
| 834 | |
| 835 | /* void v_set_text(int font,int height,int color,int effect,int |
| 836 | * rotate,int out[4]) */ |
| 837 | v_set_mode(MD_REPLACE); |
| 838 | v_set_text(status_font.id, status_font.size, BLACK, 0, 0, NULL); |
| 839 | x = (x + 2 * status_font.cw + 6) & ~7; |
| 840 | |
| 841 | startx = (area.g_x - x) / status_font.cw; |
| 842 | starty = (area.g_y - y) / status_font.ch; |
| 843 | stopx = |
| 844 | (area.g_x + area.g_w + status_font.ch - 1 - x) / status_font.cw; |
| 845 | stopy = |
| 846 | (area.g_y + area.g_h + status_font.ch - 1 - y) / status_font.ch; |
| 847 | Max(&startx, 0); /* MAR -- Hmm, area.g_x could end up 1 below x */ |
| 848 | Max(&stopx, 0); |
| 849 | x += startx * status_font.cw; |
| 850 | y += starty * status_font.ch; |
| 851 | /* Vsync();*/ |
| 852 | area.g_h = status_font.ch; |
| 853 | for (i = starty; i < min(2, stopy); |
| 854 | i++, area.g_y += status_font.ch, y += status_font.ch) { |
| 855 | my_clear_area(&area); |
| 856 | tmp = status_line[i][stopx]; |
| 857 | status_line[i][stopx] = 0; |
| 858 | (*v_mtext)(x_handle, x, y, &status_line[i][startx]); |
| 859 | status_line[i][stopx] = tmp; |
| 860 | } |
| 861 | } |
| 862 | return (0); |
| 863 | } |
| 864 | |
| 865 | static int |
| 866 | draw_inventory(PARMBLK *pb) |
nothing calls this directly
no test coverage detected