home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!olivea!apple!goofy!kip-53.apple.com!chris_russo
- From: chris_russo@gateway.qm.apple.com (Christopher Russo)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How to get color I want when drawing directly to screen
- Message-ID: <34502@goofy.apple.COM>
- Date: 12 Jan 93 03:10:24 GMT
- References: <1993Jan8.145036.21943@rtsg.mot.com>
- Sender: usenet@goofy.apple.COM
- Organization: Apple
- Lines: 35
-
- In article <1993Jan8.145036.21943@rtsg.mot.com> Michael Wolf,
- wolfmc@rtsg.mot.com writes:
- >I am attempting to develop an arcade type game. So I take
- over the whole
- >screen. I have my images in an offscreen port.
- >
- >When I draw directly from the offscreen port to the devices
- screen
- >(ie: directly copying data from oofscreen port to devices
- pixmap) the colors
- >are not what I had wanted. A copybits from the offscreen port
- to my front
- >most window gives me my image with correct colors.
-
- Well the problem is that the clut on the device(screen) you're
- drawing to
- is different than your bit image offscreen. So, what you have
- to do is
- set that devices color entries to the ones you want. Load in
- the clut you
- originally drew your sprites with, get the device of the screen
- your
- using with GetMaxDevice(), then use the routine
- SetEntries(start, count,
- &ctspecarray); <IM V or VI> Now, when you blast those pixels
- to your screen,
- they'll appear to be the right colors.
-
- I suffered through most of the headaches for this problem a
- while back.
- Let me know if you need more, I could through together some
- source.
- -----Christopher Russo
- ----- I admire a clever .sig message. Wish I had one. <sigh>
- ----- day 408.974.6070
-