home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21241 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!olivea!apple!goofy!kip-53.apple.com!chris_russo
  2. From: chris_russo@gateway.qm.apple.com (Christopher Russo)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: How to get color I want when drawing directly to screen
  5. Message-ID: <34502@goofy.apple.COM>
  6. Date: 12 Jan 93 03:10:24 GMT
  7. References: <1993Jan8.145036.21943@rtsg.mot.com>
  8. Sender: usenet@goofy.apple.COM
  9. Organization: Apple
  10. Lines: 35
  11.  
  12. In article <1993Jan8.145036.21943@rtsg.mot.com> Michael Wolf,
  13. wolfmc@rtsg.mot.com writes:
  14. >I am attempting to develop an arcade type game.  So I take
  15. over the whole
  16. >screen.  I have my images in an offscreen port.
  17. >
  18. >When I draw directly from the offscreen port to the devices
  19. screen
  20. >(ie:  directly copying data from oofscreen port to devices
  21. pixmap) the colors
  22. >are not what I had wanted.  A copybits from the offscreen port
  23. to my front
  24. >most window gives me my image with correct colors.
  25.  
  26. Well the problem is that the clut on the device(screen) you're
  27. drawing to
  28. is different than your bit image offscreen.  So, what you have
  29. to do is
  30. set that devices color entries to the ones you want. Load in
  31. the clut you
  32. originally drew your sprites with, get the device of the screen
  33. your
  34. using with GetMaxDevice(), then use the routine
  35. SetEntries(start, count,
  36. &ctspecarray); <IM V or VI>  Now, when you blast those pixels
  37. to your screen,
  38. they'll appear to be the right colors. 
  39.  
  40. I suffered through most of the headaches for this problem a
  41. while back.
  42. Let me know if you need more, I could through together some
  43. source.
  44. -----Christopher Russo
  45. ----- I admire a clever .sig message.  Wish I had one. <sigh>
  46. ----- day 408.974.6070
  47.