home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / PCRAMDRA.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  1.5 KB  |  59 lines

  1. /*
  2.     pcramdra.c
  3.  
  4.     % PC device interface RAM drawing routines
  5.  
  6.     2/04/89  by Ted.
  7.  
  8.     OWL-PC 1.2
  9.     Copyright (c) 1988, by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14.      2/04/89 Ted    Removed retrace from Read/Draw Pixmap because no text mode.
  15.  
  16.     11/05/89 ted    Added pc_roundbyte calls for scrbox x byte alignment.
  17.      3/28/90 jmd    ansi-fied
  18.      6/06/90 ted    Added planemask arg to ram_copy stuff for EVGA plane drawing.
  19. */
  20.  
  21. #include "pcpriv.h"
  22.  
  23. /* -------------------------------------------------------------------------- */
  24.  
  25. void ram_DrawPixmap(ptd_struct *ptd, pmap_type pmap, opbox *pmboxp)
  26. /*
  27.     Copy from the portion of pixmap that is inside 'pmboxp' to the
  28.     display inside of 'ptd->relboxp'.
  29. */
  30. {
  31.     opbox scrbox;
  32.     opcoord pmx, pmy;
  33.  
  34.     if (copypm_clip(ptd, pmap, pmboxp, &scrbox, &pmx, &pmy)) {
  35.         if (pc_roundbytex(&scrbox, &pmx)) {
  36.             ram_copypm(&scrbox, pmap, pmx, pmy, ram_memtoseg, 1);
  37.         }
  38.     }
  39. }
  40. /* -------------------------------------------------------------------------- */
  41.  
  42. void ram_ReadPixmap(ptd_struct *ptd, pmap_type pmap, opbox *pmboxp)
  43. /*
  44.     Copy into the portion of pixmap that is inside 'pmboxp' from the
  45.     display inside of 'ptd->relboxp'.
  46. */
  47. {
  48.     opbox scrbox;
  49.     opcoord pmx, pmy;
  50.  
  51.     if (copypm_clip(ptd, pmap, pmboxp, &scrbox, &pmx, &pmy)) {
  52.         if (pc_roundbytex(&scrbox, &pmx)) {
  53.             ram_copypm(&scrbox, pmap, pmx, pmy, ram_segtomem, 1);
  54.         }
  55.     }
  56. }
  57. /* -------------------------------------------------------------------------- */
  58.  
  59.