Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Many images in one .tim Date: 11 Jul 1998 11:26:57 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 44 Message-ID: <01bdacbe$8768d4c0$bbe4b8c3@Angela1.intelligent-group.com> References: <35A5CB30.14D75ED6@hi.is> <35A67E7F.807E7F4D@reality-bytesX.demon.co.uk> NNTP-Posting-Host: d3-s22-187-telehouse.mistral.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Kevin wrote in article <35A67E7F.807E7F4D@reality-bytesX.demon.co.uk>... > You can display any part of any image individually, take a look at the > GsSPRITE structure, (page 32 of Library Reference book) it has the members > :- > > unsigned short w Width of image > unsigned short h Height of image > unsigned char u x offset of top left of image within TIM > unsigned char v y offset of top left of image within TIM Actually, U & V are offsets within the texture page, not the TIM - these are only the same if you align the TIM to the top left of the tpage (a good idea for this application as it makes the code shorter & quicker). That aside, it's pretty easy to do (my font driver works like that). Craig. > > among others. > > Note that the u and v members are 'unsigned char ' which gives them a > maximum value of 255, because of this, I tend to keep my sprite pages down > to 256 X 256. Erm. This doesn't alway's work that way - it's dependant on the bit depth of the image. You may have to mod the tpage index as well (again, not hard, but something to bear in mind). Keeping within one tpage for the images is the easiest way of doing it..... > > Kevin > Craig.