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

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