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

Function move_tty_cursor

outdated/sys/mac/mactty.c:689–707  ·  view source on GitHub ↗

* Move the cursor (both as displayed and where drawing goes) * HOWEVER: The cursor is NOT stored in the bitmap! */

Source from the content-addressed store, hash-verified

687 * HOWEVER: The cursor is NOT stored in the bitmap!
688 */
689short
690move_tty_cursor(WindowPtr window, short x_pos, short y_pos)
691{
692 RECORD_EXISTS(record);
693
694 if (record->x_curs == x_pos && record->y_curs == y_pos) {
695 return noErr;
696 }
697 if (record->x_size <= x_pos || x_pos < 0 || record->y_size <= y_pos
698 || y_pos < 0) {
699 return general_failure;
700 }
701 curs_pos(record, record->x_curs, record->y_curs, 0);
702 record->x_curs = x_pos;
703 record->y_curs = y_pos;
704 curs_pos(record, x_pos, y_pos, 1);
705
706 return noErr;
707}
708
709/*
710 * Update the screen to match the current bitmap, after adding stuff

Callers 1

cmovFunction · 0.85

Calls 1

curs_posFunction · 0.85

Tested by

no test coverage detected