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

Function BaseCursor

outdated/sys/mac/macwin.c:2183–2206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2181}
2182
2183static void
2184BaseCursor(NhWindow *wind, Point pt)
2185{
2186 char *dir_bas, *dir;
2187 CursHandle ch;
2188
2189 if (cursor_locked)
2190 dir = (char *) 0;
2191 else {
2192 dir_bas = (char *) Cmd.dirchars;
2193 dir =
2194 strchr(dir_bas, *click_to_cmd(pt.h / wind->char_width + 1,
2195 pt.v / wind->row_height, CLICK_1));
2196 }
2197 ch = GetCursor(dir ? dir - dir_bas + 513 : 512);
2198 if (ch) {
2199 HLock((Handle) ch);
2200 SetCursor(*ch);
2201 HUnlock((Handle) ch);
2202 } else {
2203 SetCursor(&qdarrow);
2204 }
2205 return;
2206}
2207
2208#if 0 // TARGET_API_MAC_CARBON
2209static pascal OSStatus

Callers 2

BaseEventFunction · 0.85
macCursorTermFunction · 0.85

Calls 1

click_to_cmdFunction · 0.85

Tested by

no test coverage detected