Path: chuka.playstation.co.uk!news From: "Scott Ward" Newsgroups: scee.yaroze.freetalk.english Subject: Re: The Passmore Tutorial Date: Tue, 27 Jul 1999 20:56:06 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 37 Message-ID: <7nl2q3$oub1@chuka.playstation.co.uk> References: <379CE1FC.D1528C7C@which.net> <7njp7i$i4m33@chuka.playstation.co.uk> NNTP-Posting-Host: p58-falcon-gui.tch.virgin.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sorry to butt in on Max's question but there is something about this that has me confused. > // check if CLUT exists and transfer it to VRAM > if( (tim.pmode >> 3) & 0x01 ) > { > rect.x = tim.cx; > rect.y = tim.cy; > rect.w = tim.cw; > rect.h = tim.ch; > LoadImage(&rect, tim.clut); > } Although I already knew that this was to check for a CLUT I never actually understood HOW it checked for a CLUT. I've been looking through the YAROZE FILE FORMATS doc. to solve it but things don't seem to add up. For a start, in Peter Passmore's tutorial he mentions that pmode=8 for 4-bit and 9 for 8-bit. If this is the case then the first 'bit' of the Flag is being missed out. For example, the FILE FORMATS doc. seems to imply that a 4-bit image with CLUT is: '10000' in binary (16). when in reality it appears to be: '1000' (8). Bit0 is being omitted. Does this have something to do with the (LSB) part on the diagram? Perhaps someone who has a copy of the Yaroze File Formats doc. could explain all this in a bit more detail. What does the (LSB) and (MSB) bits mean? Also, why are hex numbers shown as 0x01, 0x04, 0x09, etc. instead of just 0x1, 0x4, 0x9 and for that matter, why use hex at all? Wouldn't ((tim1.pmode>>3) & 1) be the same as ((tim1.pmode>>3) & 0x01)? Cheers, Scott Ward