Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!cbmvax!spence From: spence@cbmvax.commodore.com (Spencer Shanson) Newsgroups: comp.sys.amiga.programmer Subject: Re: hardware sprites Keywords: sprites Message-ID: <22258@cbmvax.commodore.com> Date: 7 Jun 91 21:27:59 GMT References: <19672@csli.Stanford.EDU> <2979@public.BTR.COM> Reply-To: spence@cbmvax.commodore.com (Spencer Shanson) Organization: Commodore, West Chester, PA Lines: 31 In article <2979@public.BTR.COM> valentin@public.BTR.COM (Valentin Pepelea) writes: >In article <19672@csli.Stanford.EDU> bratt@csli.Stanford.EDU (Harry Bratt) >writes: >> >>How do you make a hardware sprite disappear without doing FreeSprite() ? > >>So - should I be doing GetSprite(), FreeSprite() all over the place? >>Should I be doing a ChangeSprite() to point to a block of 0's? >>Should I MoveSprite() outside the bounds of the ViewPort??? >>Could I set the height to 0???????? > >Do not FreeSprite() like crazy. That function might take too long to execute. >The way I clear the sprite is by ChangeSprite()'ing to a buffer full of 0's. >I could just set the height to 0, but I would have to store the current height >into a temporary variable, and I don't want to waste time doing that. > Valentin, ChangeSprite() has to MoveSprite(), whereas FreeSprite() is much simpler - point the sprite to a default sprite of 0s. I would be surprised if you have found ChangeSprite() to be faster than FreeSprite(). >Valentin -- --------------------------------------------------------------------------- Spencer Shanson - Amiga Software Engineer | email: spence@commodore.COM | or uunet!cbmvax!spence All opinions expressed are my own, and do not | Bix: sshanson (necessarily) represent those of Commodore. | "Copper? I hardly even | know her!"