| 725 | } |
| 726 | |
| 727 | static int |
| 728 | draw_rip(PARMBLK *pb) |
| 729 | { |
| 730 | GRECT area = *(GRECT *) &pb->pb_x; |
| 731 | if (rc_intersect((GRECT *) &pb->pb_xc, &area)) { |
| 732 | char **ptr; |
| 733 | int x = pb->pb_x, y = pb->pb_y, start_line = (area.g_y - y), |
| 734 | chardim[4], pla[8], i; |
| 735 | v_set_mode(MD_REPLACE); |
| 736 | /* void v_set_text(int font,int height,int color,int effect,int |
| 737 | * rotate,int out[4]) */ |
| 738 | v_set_text(text_font.id, text_font.size, BLACK, 0, 0, chardim); |
| 739 | start_line /= text_font.ch; |
| 740 | y += start_line * text_font.ch; |
| 741 | x -= scroll_menu.px_hpos; |
| 742 | ptr = &text_lines[start_line += scroll_menu.vpos]; |
| 743 | start_line = |
| 744 | min((area.g_y - y + area.g_h + text_font.ch - 1) / text_font.ch, |
| 745 | Anz_text_lines - start_line); |
| 746 | area.g_h = text_font.ch; |
| 747 | Vsync(); |
| 748 | x = (x + 7) & ~7; |
| 749 | for (; --start_line >= 0; y += text_font.ch) { |
| 750 | area.g_y = y; |
| 751 | my_clear_area(&area); |
| 752 | if (**ptr - 1) { |
| 753 | v_set_text(FAIL, 0, BLUE, 0x01, 0, NULL); |
| 754 | (*v_mtext)(x_handle, x, y, (*ptr++) + 1); |
| 755 | v_set_text(FAIL, 0, BLACK, 0x00, 0, NULL); |
| 756 | } else |
| 757 | (*v_mtext)(x_handle, x, y, (*ptr++) + 1); |
| 758 | } |
| 759 | pla[0] = pla[1] = 0; |
| 760 | pla[2] = min(pb->pb_w - 1, Rip_bild.fd_w - 1); |
| 761 | pla[3] = min(pb->pb_h - 1, Rip_bild.fd_h - 1); |
| 762 | pla[6] = pla[4] = |
| 763 | pb->pb_x + (pb->pb_w - Rip_bild.fd_w) / 2; /* x_wert to */ |
| 764 | pla[7] = pla[5] = pb->pb_y; /* y_wert to */ |
| 765 | pla[6] += pla[2]; |
| 766 | pla[7] += pla[3]; |
| 767 | vro_cpyfm(x_handle, S_ONLY, pla, &Rip_bild, screen); |
| 768 | v_set_mode(MD_TRANS); |
| 769 | vst_alignment(x_handle, 1, 5, &i, &i); |
| 770 | pla[5] += 64; |
| 771 | for (i = 0; i < 7; i++, pla[5] += chardim[3]) { |
| 772 | v_set_text(text_font.id, (i == 0 || i == 6) ? text_font.size : 12, |
| 773 | WHITE, 1, 0, chardim); |
| 774 | (*v_mtext)(x_handle, pla[4] + 157, pla[5], rip_line[i]); |
| 775 | v_set_text(text_font.id, (i == 0 || i == 6) ? text_font.size : 12, |
| 776 | BLACK, 0, 0, chardim); |
| 777 | (*v_mtext)(x_handle, pla[4] + 157, pla[5], rip_line[i]); |
| 778 | } |
| 779 | vst_alignment(x_handle, 0, 5, &i, &i); |
| 780 | } |
| 781 | return (0); |
| 782 | } |
| 783 | |
| 784 | static int |
nothing calls this directly
no test coverage detected