Path: chuka.playstation.co.uk!news From: "James Rutherford" Newsgroups: scee.yaroze.freetalk.english Subject: Re: todays question "tpages" Date: Mon, 19 Mar 2001 19:37:17 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 48 Message-ID: <995mnr$7jl2@www.netyaroze-europe.com> References: <98uj59$6f15@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-72-171.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 "Nigel Critten" wrote in message news:98uj59$6f15@www.netyaroze-europe.com... > Got the map routines working last night, so I can now import a tUME map. > > So to the question, can the tile sheets be wider than 256. Yep, I think so, but .u and .v are u_char, so (countx * 16) won't get you very far. You'll have to access any .u >= 256 by finding out the TPage and then the offset. There may well be a speed hit for this over keeping all your cells in the same TPage (it might wallop the texture cache?). But I'm really not sure. Give it a try ;) J. > for (county =0; county < 13; county++) > { > for (countx = 0; countx < 19; countx++) > { > gscell[count].u = (countx * 16); > gscell[count].v = (county * 16); > gscell[count].cba = GetClut(tilestim.cx, tilestim.cy); > gscell[count].tpage = GetTPage(GsSprite4bit, 0, tilestim.px, > tilestim.py); > gscell[count].flag = 0; > count++; > } > } > > that how I grab the tiles at the moment and everything seems fine except > when the .u goes over 256, the tile sheet is 320 wide, when it reaches tile > 17 it wraps round to 0. 17*16 = 272 which is the first tile to go over the > 256 boundary, the next line down gets stranger... any ideas, i'll post the > source again if its going to help? > > Thanks > Nigel (the pain) > > > >