Path: chuka.playstation.co.uk!news From: "John \( QuietBloke \)" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Buggery Title Screen!! Date: Wed, 29 Aug 2001 20:14:51 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 75 Message-ID: <9mjf11$dra3@www.netyaroze-europe.com> References: <9mgsl9$8t81@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-148-176.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Are all the textures located at the top left corner of a texture page ? GetTPage seems to like returning a PageID only if you supply the top left corner of a Page. If your image is offset within a page it wont work. Does that make sense ? The manual mentions this saying the texture page address is limited to multiples of 64 in the x direction and multiples of 256 in the y direction. ( its a bit cryptic to say the least ). In the supplied tutorial files there was a routine ( see below ) where you pass it an image info and it returned x and y as the top left location of the texture page and u,v the offsets within the page of your image. If you call this and then supply the returned x,y values to GetTPage it should work. void FindTopLeftOfTexturePage ( GsIMAGE* imageInfo, int*x, int *y, int* u, int *v ) { int testX; int testY; testX = imageInfo->px; testY = imageInfo->py; *u = 0; *v = 0; for ( ;; ) { if ( testX % 64 != 0 ) { testX--; (*u)++; } else { break; } } for ( ;; ) { if ( testY % 256 != 0 ) { testY--; (*v)++; } else { break; } } *x = testX; *y = testY; } Alternatively you could do the following which seems to work for me when Im loading 8 bit tims. spriteLogo.tpage = GetTPage ( 1, 0, imageInfo.px & 0xffc0, imageInfo.py & 0xff00 ); which basically masks off the right most bits so you end up passing an x value as a multiple of 256 and y value as a multiple of 64 as required. Hope this makes sense and helps. Cheers John ( Quietbloke )