Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!spool.mu.edu!munnari.oz.au!mel.dit.csiro.au!latcs1!slc4.lat.oz.au!stephens From: stephens@slc4.lat.oz.au (Philip J Stephens) Newsgroups: comp.sys.apple2 Subject: Re: Animation Keywords: Animation Message-ID: <1991Apr22.070809.11611@latcs2.lat.oz.au> Date: 22 Apr 91 07:08:09 GMT References: <1991Apr17.061057.22357@cs.uow.edu.au> Sender: news@latcs2.lat.oz.au Organization: Comp Sci, La Trobe Uni, Australia Lines: 25 Nntp-Posting-Host: slc4.lat.oz.au Shane Kelvin Richards writes: > > If I want to put a shape on the screen, I go through a loop pulling >off each background byte...anding it with the shapes mask...then I ora the >shape byte and place this calculated byte back on the screen. The technique is correct; it's just the implementation that might be slowing you down. That is, if you're using indirect indexing to load and store bytes to and from the screen, you may wish to change this to absolute indexing and self-modify the base address for each new row. The same applies if you're using indirect indexing for accessing the shape tables. Self-modifying the code is always faster when dealing with large amounts of data. Also, use a table of row and shape addresses to get the new base from rather than using some form of computation. That should shave off a few more cycles per row. If you're really stuck, I could e-mail you an example of a faster routine for you. <\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\> < Philip J. Stephens >< "Many views yield the truth." > < Hons. student, Computer Science >< "Therefore, be not alone." > < La Trobe University, Melbourne >< - Prime Song of the viggies, from > < AUSTRALIA >< THE ENGIMA SCORE by Sheri S Tepper >