Path: chuka.playstation.co.uk!news From: Jim Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: TIM Files Date: Tue, 27 May 1997 13:59:53 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 81 Message-ID: <338ADAC8.5D5058A1@micronetics.com> References: <01bc6a20$ed0421e0$98a1cdcd@default> <338AAA1C.634F1584@micronetics.com> <01bc6a97$8048ec80$7ab113cc@default> NNTP-Posting-Host: jim.micronetics.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.0b4 [en] (Win95; I) X-Priority: 3 (Normal) Nelson Santos wrote: > > > Pixel Mode: 2 > Pixel X: 513 > Pixel Y: 0 > Pixel W: 320 > Pixel H: 240 > Pixel *: 80110014 > CLUT CX: 17 > CLUT CY: 4294963200 > CLUT CW: 8192 > CLUT CH: 0 > CLUT *: 2000 > This is because not all tim files have clut information. check the pmode field to see if it is present. Also note that you should do a DrawSync(0); after a LoadImage or just before you use the memory used by it to ensure that it's operation has completed. Its non-blocking. > little cartoon girlies from the 2D demos) and this is what I got: > > Pixel Mode: 9 > > Which looks perfect to me (except maybe the pixel mode of 9?). Yep its fine, this tim has clut information. >So maybe > something is wrong with my PICTURE? I looked into this possibility >and wrong this small program: > And it displays the PICTURE 100% perfectly. So, what's going on? Your picture doesn't have clut information. And you program does not try to load it. The program is fine, as is the picture. > (The picture by the way is the WIPEOUT title screen found on the > "Playstation Picks" demo disk that originally came with the PSX.) > > Help! I hope this is of some help. I have attached a bit of code from the chrome demo that loads the textures. > > Nelson. Cheers Jim void InitialiseTexture(u_long *timAddr) { GsIMAGE image; RECT t,c; GsGetTimInfo(++timAddr,&image); setRECT(&t,image.px,image.py,image.pw,image.ph); LoadImage(&t,image.pixel); DrawSync(0); // load CLUT as necessary if (image.pmode & 8) { setRECT(&c,image.cx,image.cy,image.cw,image.ch); LoadImage(&c,image.clut); DrawSync(0); } } }