Path: chuka.playstation.co.uk!news1.scei.co.jp!scea!greg_labrec@interactive.sony.com From: "Manny Najera" Newsgroups: scea.yaroze.programming.2d_graphics Subject: Texture page code Date: 3 May 1997 05:23:07 GMT Organization: SCEA Net Yaroze News Lines: 54 Message-ID: <01bc5782$52939560$8f91b8cd@mannynaj> NNTP-Posting-Host: dgr-il4-15.ix.netcom.com X-Newsreader: Microsoft Internet News 4.70.1155 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) { int testX, testY; static int debugCount3 = 0, debugCount4 = 0; testX = imageInfo->px; testY = imageInfo->py; *u = 0; *v = 0; for (;;) { if (testX % 320 != 0) { testX--; (*u)++; } else break; } for (;;) { if (testY % 256 != 0) { testY--; (*v)++; } else break; } *x = testX; *y = testY; } Methinks that this chunk of code is used to find a place to store the image data for a texture page. Is this right? 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. Manny Najera