Path: chuka.playstation.co.uk!news1.scei.co.jp!scea!greg_labrec@interactive.sony.com From: mperdue@iquest.net (Mario Perdue) Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: Texture page code Date: Sat, 03 May 1997 14:32:49 GMT Organization: SCEA Net Yaroze News Lines: 44 Message-ID: <336b49e8.999305@205.149.189.29> References: <01bc5782$52939560$8f91b8cd@mannynaj> NNTP-Posting-Host: filter-hrtc1.nortel.net X-Newsreader: Forte Free Agent 1.1/32.230 >Whilst I was learning about using sprites, I found a piece of code that I >-thought- I understood, but I just wanted to make sure: > >void FindTopLeftOfTexturePage (GsIMAGE* imageInfo, int* x, int* y, int* u, >int* v) >{ > > ... > ... > >} > >Methinks that this chunk of code is used to find a place to store the image >data for a texture page. Is this right? It looks like it is trying to find the Upper left corner and offsets of a full screen PAL image relative to a texture page. Without seeing the code that calls this function, I couldn't tell you why it would be used. > >Also, I found that people were using this: > >Sprite->attribute = |=<<25 > >Does that set the 25th bit? If so, how would you turn off the 25th bit? I >apologize for my lack of knowledge on this simple matter, but the only >experience with bits I've had was on the Z80 processor. SET A,7... it >doesn't get any easier than that. Yes, that code is intended to set a bit. I think you may have typed it wrong though (someone correct me if I'm wrong.) I think it should be: Sprite->attribute |= 1<<25; This say to take the value 1 shift it to the left 25 bits and OR it with the original value. It's pretty much the same technique I told you about earlier, just a different way to represent the bit. You would still turn it off the way I showed you before, unless someone else has a trick I don't know about. >Manny Najera