home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17862 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.7 KB  |  46 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gatech!concert!samba!usenet
  3. From: Todd_Lewis@unc.edu (Todd M. Lewis)
  4. Subject: Re: Help reading particular Pixels
  5. Message-ID: <1992Dec28.152222.25316@samba.oit.unc.edu>
  6. Sender: usenet@samba.oit.unc.edu
  7. Nntp-Posting-Host: guitar.oit.unc.edu
  8. Organization: UNC Office of Information Technology
  9. References: <BzvIv4.G2o@uceng.uc.edu>
  10. Distribution: na
  11. Date: Mon, 28 Dec 1992 15:22:22 GMT
  12. Lines: 32
  13.  
  14. In article <BzvIv4.G2o@uceng.uc.edu> rbatra@uceng.uc.edu (Rajesh Batra) writes:
  15. > I am trying to use 
  16. >   BltMaskBitMapRastPort(...,minterm,bltMask), 
  17. > where minterm is 0xc0 (exact copy) and my bltMask contains only 1's
  18. > where I want to read the information.
  19.  
  20. The minterm is probably your problem.  BMBMRP() is more complicated than
  21. it looks, and the minterm is used in a more complicated way than it is
  22. in other functions (BltBitMap() for example).  There are only two
  23. useful values for the minterm for BltMastBitMapRastPort().
  24. The autodoc for BltMaskBitMapRastPort() lists them:
  25.  
  26.     minterm - either (ABC|ABNC|ANBC) if copy source and blit thru mask
  27.               or     (ANBC)          if invert source and blit thru mask
  28.  
  29. Those constants come from <hardware/blit.h>, to wit:
  30.   /* definitions for blitter control register 0 */
  31.   #define ABC    0x80
  32.   #define ABNC   0x40
  33.   #define ANBC   0x20
  34.   #define ANBNC  0x10
  35.   #define NABC   0x8
  36.   #define NABNC  0x4
  37.   #define NANBC  0x2
  38.   #define NANBNC 0x1
  39.  
  40. So, (ABC|ABNC|ANBC) == 0x80 | 0x40 | 0x20 == 0xE0, not 0xC0 as you might
  41. expect.
  42. --
  43.  _/_/_/  _/     Todd_Lewis@unc.edu          You can lead a horse to 
  44.   _/    _/     utoddl@guitar.oit.unc.edu   Mohammad, but you can't make
  45.  _/    _/_/_/                             a mountain drink a mole hill.
  46.