Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Scott Cartier Newsgroups: scee.yaroze.freetalk.english Subject: Re: Animation Date: Thu, 28 Jan 1999 09:37:06 -0800 Organization: SCEA News Server Lines: 30 Message-ID: <36B0A042.50A31A82@vmlabs.com> References: <36AC9E5C.D8E74512@which.net> <36B064EF.999056EC@cwcom.net> NNTP-Posting-Host: vmlabs28.vmlabs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win98; U) X-Accept-Language: en Hey, that's a good idea. The way I do it, I just add the width to "U" to get to the next frame. When I reach the end of the row, I add the height to "V" and reset "U". Then reset both when I reach the end. My problem is that to make it general enough I use multiplies (I think I got rid of the divides). Not overly quick. A table look-up is surely faster, if a bit more memory intensive. I might do some experiments to see if there's a marked speed improvement using your method. Scott > Hi Andrew, > > I use the same method (the offset values). > > I've found the easy way to enter frame details is to use an array for > the offset values, I.e. ANIM1_X[10] = {0,10,20,30,40,50,60.....etc} > ANIM1_Y[10]={0,0,0,0,20,20,20,...etc}. > > then to access frame 2 of ANIM_1, you would set the u to ANIM1_X[1] and > v to ANIM1_Y[1]. Easy!! > > Scott's utility sounds good though - I'd give that a whirl. > > Cheers! > > Tones 8)