home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.mac.programmer:21146 comp.sys.mac.games:14064
- Newsgroups: comp.sys.mac.programmer,comp.sys.mac.games
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!uchinews!grass
- From: grass@cs.uchicago.edu (Joshua Grass)
- Subject: Re: Code for drawing a sprite desired.
- Message-ID: <1993Jan10.222055.342@midway.uchicago.edu>
- Keywords: Bring out the sprites!!!
- Sender: news@uchinews.uchicago.edu (News System)
- Organization: Department of Computer Science, University of Chicago
- References: <1ha3ikINN7tm@uwm.edu>
- Date: Sun, 10 Jan 1993 22:20:55 GMT
- Lines: 33
-
- In article <1ha3ikINN7tm@uwm.edu> bowden@csd4.csd.uwm.edu (John William Bowden) writes:
- >Hiya,
- >
- > THere is alot of interest in writing games for the mac (myself included.)
- >If there's a kindly sagelike programmer out there with a little time on
- >his/her hands, could someone share a technique for copying a sprite from an
- >offscreen grafPort?
- >
- > Here's what I have in mind. A short program that loads in a PICT containing
- >a sprite and its mask into an offscreen grafPort and the copyBits the sprite
- >into a visible window.
- >
- > I suspect that anyone who would provide us neophytes with this little
- >tidbit would earn the undying gratitude of many a ThinkC tinkerer.
- >
- > I may just be dense, but pouring over sample code and IM, it is not at all
- >obvious to me how to use copyBits.
- >
- >Thanks,
- >John
- >
-
- Actually, sprite is not the correct term, (What is that from, TI 99's?) what
- the new equivalent of what you are doing is called is an icon. This is pro-
- bably what you want unless the image you want to move is larger than 64x64
- in which case things can get messy. With Icon's you can build both the image
- and the mask using Res-edit, which if you don't know how to use, you should
- learn ASAP if you want to program on the mac. I can't teach you how to pro-
- gram a mac, but an EXCELLENT book for beginners in the Mac programming Primer
- volume I and II. It won't teach you how to make a game, but it will teach
- you how to make great applications and how to use the inside mac books.
-
- Joshua
-