MCPcopy Create free account
hub / github.com/NetHack/NetHack / draw_lines

Function draw_lines

outdated/win/gem/wingem1.c:688–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686}
687
688static int
689draw_lines(PARMBLK *pb)
690{
691 GRECT area = *(GRECT *) &pb->pb_x;
692
693 if (rc_intersect((GRECT *) &pb->pb_xc, &area)) {
694 char **ptr;
695 int x = pb->pb_x, y = pb->pb_y, start_line = (area.g_y - y);
696
697 v_set_mode((text_font.cw & 7) == 0 && text_font.prop == 0 ? MD_REPLACE
698 : MD_TRANS);
699
700 /* void v_set_text(int font,int height,int color,int effect,int
701 * rotate,int out[4]) */
702 v_set_text(text_font.id, text_font.size, BLACK, 0, 0, NULL);
703 start_line /= text_font.ch;
704 y += start_line * text_font.ch;
705 x -= (int) scroll_menu.px_hpos;
706 ptr = &text_lines[start_line += scroll_menu.vpos];
707 start_line =
708 min((area.g_y - y + area.g_h + text_font.ch - 1) / text_font.ch,
709 Anz_text_lines - start_line);
710 area.g_h = text_font.ch;
711 Vsync();
712 /* x=(x+7) & ~7;*/
713 for (; --start_line >= 0; y += text_font.ch) {
714 area.g_y = y;
715 my_clear_area(&area);
716 if (**ptr - 1) {
717 v_set_text(FAIL, 0, BLUE, 0x01, 0, NULL);
718 (*v_mtext)(x_handle, x, y, (*ptr++) + 1);
719 v_set_text(FAIL, 0, BLACK, 0x00, 0, NULL);
720 } else
721 (*v_mtext)(x_handle, x, y, (*ptr++) + 1);
722 }
723 }
724 return (0);
725}
726
727static int
728draw_rip(PARMBLK *pb)

Callers

nothing calls this directly

Calls 1

my_clear_areaFunction · 0.85

Tested by

no test coverage detected