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

Function has_color

outdated/sys/mac/mttymain.c:334–358  ·  view source on GitHub ↗

the tty has_color[] table is filled in during init above */

Source from the content-addressed store, hash-verified

332#if 0 /* this function is commented out */
333/* the tty has_color[] table is filled in during init above */
334int
335has_color(int color)
336{
337#if defined(__SC__) || defined(__MRC__)
338#pragma unused(color)
339#endif
340 Rect r;
341 // Point p = {0, 0};
342 GDHandle gh;
343
344 if (!_mt_in_color)
345 return 0;
346
347 GetWindowBounds(_mt_window, kWindowContentRgn, &r);
348 // SetPortWindowPort(_mt_window);
349 // LocalToGlobal (&p);
350 // OffsetRect (&r, p.h, p.v);
351
352 gh = GetMaxDevice(&r);
353 if (!gh) {
354 return 0;
355 }
356
357 return (*((*gh)->gdPMap))->pixelSize > 4; /* > 4 bpp */
358}
359#endif
360
361void

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected