home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21046 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d88-jwa
  3. From: d88-jwa@dront.nada.kth.se (Jon WΣtte)
  4. Subject: Re: How to get color I want when drawing directly to screen
  5. Message-ID: <1993Jan8.234656.5509@kth.se>
  6. Sender: usenet@kth.se (Usenet)
  7. Nntp-Posting-Host: dront.nada.kth.se
  8. Organization: Royal Institute of Technology, Stockholm, Sweden
  9. References: <1993Jan8.145036.21943@rtsg.mot.com>
  10. Date: Fri, 8 Jan 1993 23:46:56 GMT
  11. Lines: 26
  12.  
  13. In <1993Jan8.145036.21943@rtsg.mot.com> wolfmc@rtsg.mot.com (Michael Wolf) writes:
  14.  
  15. >I am attempting to develop an arcade type game.  So I take over the whole
  16. >screen.  I have my images in an offscreen port.
  17.  
  18. Beware multi-screen setups.
  19.  
  20. >When I draw directly from the offscreen port to the devices screen
  21. >(ie:  directly copying data from oofscreen port to devices pixmap) the colors
  22. >are not what I had wanted.  A copybits from the offscreen port to my front
  23. >most window gives me my image with correct colors.
  24.  
  25. You are suffering from a color table problem. Setting a pallette
  26. for your window is not enough, unless that pallette has pmExplicit
  27. (and maybe pmAnimated) for EACH AND EVERY ENTRY. That's probably
  28. what you want. Then you'll be able to say "color 218 means soft
  29. Red, and ..."
  30.  
  31. Oh, and make sure you're hiding the menu bar, but have a way of
  32. getting back at it (like, when pausing the game)
  33.  
  34. -- 
  35.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  36.  
  37.    Nothing crashes like a Macintosh.
  38.                      -- Guy Kawasaki
  39.