Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Combining multiple images in TIMs for frame animation Date: Thu, 23 Jul 1998 14:03:54 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 27 Message-ID: <35B734BA.1DD@manc.u-net.com> References: <35B67C25.42A6@cadgraphics.com.au> <35B6913D.308CB2B@jps.net> NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) Elliott Lee wrote: > That should do the simple animation for you. Now, there's one thing > more: this example assumed you were using a 16-bit TIM, one byte per > pixel. If you had an 8-bit image, you need to divide your u coords > by 2, 4-bit then by 4. There's a #define above (PIX_PER_BYTE) and > you could set it accordingly: > > if 16-bit: PIX_PER_BYTE = 1. > if 8-bit: PIX_PER_BYTE = 2. > if 4-bit: PIX_PER_BYTE = 4. I think you are incorrect here. u and v values are based on the 256x256 texture page regardless of the bitrate -- the gpu does the messy bit for you. The same goes for the width w value. Eg. if you are using a 256x256 4-bit TIM (64x256 pixels on the frame buffer) you still consider the texture to be 256 pixels wide. Something I discovered by accident and is of course much better than having to worry about changing w and u,v offsets when changing the bit depth. Later, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj -----------------------------------------