Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.beginners Subject: Re: TIM File Attribute Date: Wed, 29 Jul 1998 20:35:52 +0100 Organization: Sony Computer Entertainment Europe Lines: 31 Message-ID: <35BF7998.F5951872@scee.sony.co.uk> References: <6pnohn$3ue14@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en James Banks wrote: > > I know this is probably a really easy question to answer but can anyone > explain how I calculate the attribute number for TIM files ?? I have used > Ira Rainey's Sprite tutorial which uses 8 bit sprites but I am now working > on a breakout game using 4 bit TIM's and it doesn't work !! Someone please > help. The reference manual (under GsSPRITE) states which bits in the attribute mean what, but doesn't state how to calculate the attribute. Depending on the application, you decide what value the bits should be set to (there is a list of valid numbers in the manual) and then just add up all the values after shifting them appropriately. For example, if I want to turn Brightness Regulation off (value 1 at bit 6) and am using a 15bit direct sprite (value 2 at bits 24-25), then the attribute is: attribute = (1 << 6) + (2 << 24); A complete (but rather inefficient) setting would be: attribute = (BRIGHTNESS << 6) + (BitDEPTH << 24) + (RotationON << 27) + (SemiTransRate << 28) + (SemiTransON << 30) + (Displayed << 31); where Brightness, BitDEPTH, etc are the desired values within the ranges specified in the manual. -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Amnesia: You've read the book now read the book.