home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4570 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.coventry.ac.uk!not-for-mail
  2. From: dj@coventry.ac.uk (Dave Jackson)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Screen W/Custom Pens.   HELP!
  5. Date: 1 Mar 1996 12:40:47 -0000
  6. Organization: Coventry University
  7. Message-ID: <4h6r8f$71s@leofric.coventry.ac.uk>
  8. References: <4h3geg$qa4@aggedor.rmit.edu.au>
  9. NNTP-Posting-Host: leofric.coventry.ac.uk
  10. Keywords: Custom Screen Pens
  11.  
  12. In article <4h3geg$qa4@aggedor.rmit.edu.au>,
  13. Steve Tanti <t930340@minyos.its.rmit.EDU.AU> wrote:
  14. >
  15. >I am just learning to program my Ami (A1200) and have the RKRM (Libs and 
  16. >Dev's only).
  17. >
  18. >I am trying to get it to open a custom screen with SA_Pens that I want.
  19. >I am doing the following:
  20. >
  21. >static UWORD mypens[] = {
  22. >     0x999, 0x000, 0xfff, 0x57a,
  23. >     0x888, 0xaaa, 0xa98, 0xe9a, ~0
  24. >     };
  25. >
  26.  
  27. I think your pens should be colour INDEX's! i.e.
  28.  
  29. static UWORD mypens[] = { 0, 1, 1, 2, 3, 0, 2, ~0 }  etc.
  30.  
  31. The pens you've defined above are actual colours which you specify 
  32. for SA_Colors.  If you're using an a1200 you can use SA_Colors32 to get 
  33. the full 24-bit palette, the structure is really weird, something like:
  34.  
  35. ULONG mycolours32[] = { num_colours_in_this_struct << 16,
  36.             r << 24, g << 24, b << 24,
  37.             r << 24, g << 24, b << 24,
  38.             . 
  39.             . 
  40.             . 
  41.             NULL    <- not sure about this, can't hurt though
  42.               } ;
  43.  
  44. Dave Jackson
  45.  
  46. -- 
  47.       "To hell with the Champagne, we can celebrate with urine re-cyc!"
  48.  
  49.