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

Function copy_bits

outdated/sys/mac/mactty.c:468–490  ·  view source on GitHub ↗

* Do bits copy depending on if we're using color or not */

Source from the content-addressed store, hash-verified

466 * Do bits copy depending on if we're using color or not
467 */
468static void
469copy_bits(tty_record *record, Rect *bounds, short xfer_mode,
470 RgnHandle mask_rgn)
471{
472 GWorldFlags pix_state;
473 BitMap *source;
474
475 if (record->uses_gworld) {
476 pix_state = GetPixelsState(GetGWorldPixMap(record->offscreen_world));
477 LockPixels(GetGWorldPixMap(record->offscreen_world));
478 source = (BitMapPtr) *GetGWorldPixMap(record->offscreen_world);
479 } else
480 source = &record->its_bits;
481
482 SetPortWindowPort(record->its_window);
483 CopyBits(source,
484 GetPortBitMapForCopyBits(GetWindowPort(record->its_window)),
485 bounds, bounds, xfer_mode, mask_rgn);
486
487 if (record->uses_gworld) {
488 SetPixelsState(GetGWorldPixMap(record->offscreen_world), pix_state);
489 }
490}
491
492/*
493 * Fill an area with the background color

Callers 2

update_ttyFunction · 0.85
do_add_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected