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

Function do_add_string

outdated/sys/mac/mactty.c:750–772  ·  view source on GitHub ↗

* Low level add to screen */

Source from the content-addressed store, hash-verified

748 * Low level add to screen
749 */
750static void
751do_add_string(tty_record *record, char *str, short len)
752{
753 Rect r;
754
755 if (len < 1) {
756 return;
757 }
758 select_offscreen_port(record);
759
760 MoveTo(record->x_curs * record->char_width,
761 record->y_curs * record->row_height + record->ascent_height);
762 DrawText(str, 0, len);
763
764 pos_rect(record, &r, record->x_curs, record->y_curs,
765 record->x_curs + len - 1, record->y_curs);
766 select_onscreen_window(record);
767 if (DRAW_DIRECT) {
768 copy_bits(record, &r, srcCopy, (RgnHandle) 0);
769 } else {
770 accumulate_rect(record, &r);
771 }
772}
773
774/*
775 * Low-level cursor handling routine

Callers 2

add_tty_charFunction · 0.85
add_tty_stringFunction · 0.85

Calls 5

select_offscreen_portFunction · 0.85
pos_rectFunction · 0.85
select_onscreen_windowFunction · 0.85
copy_bitsFunction · 0.85
accumulate_rectFunction · 0.85

Tested by

no test coverage detected