Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Pepper Miller Newsgroups: scea.yaroze.beginners Subject: Re: Sprite Display problems Date: Sat, 07 Jun 1997 15:38:49 -0500 Organization: SCEA Net Yaroze News Lines: 108 Message-ID: <3399C6D9.5E30@gold.tc.umn.edu> References: <3398D47A.77F3@gold.tc.umn.edu> <3398d5cb.46088567@205.149.189.29> <3398F8CB.24D2@gold.tc.umn.edu> <33997b8e.370186@205.149.189.29> NNTP-Posting-Host: pub-26-a-138.dialup.umn.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02Gold (Win95; I) Here's the latest version of my code, I think the format is off, Code Warrior doesn't exactly like you to get your code out of their program. (forgive me if there was a better way to put my code up, I generally stay away from the Web) #include "libps.h" #include "pad.h" // Defines #define OT_LENGTH 1 #define SPRITE_LOCAL 0x80090000 #define SPRITE_COUNT (1+1) // Global Variables static GsOT WorldOT[2]; static GsOT_TAG OTTags[2][1<px; rect.y = tim->py; rect.w = tim->pw; rect.h = tim->ph; LoadImage(&rect, tim->pixel); rect.x = tim->cx; rect.y = tim->cy; rect.w = tim->cw; rect.h = tim->ch; LoadImage(&rect, tim->clut); sprt.attribute = (0x1<<24); sprt.x = 94; sprt.y = 50; sprt.w = (tim->pw*2)-1; sprt.h = tim->ph; sprt.tpage = GetTPage(1,0,tim->px,tim->py); sprt.u = 0; sprt.v = 0; sprt.cx = tim->cx; sprt.cy = tim->cy; sprt.r = 128; sprt.g = 128; sprt.b = 128; sprt.mx = 0; sprt.my = 0; sprt.scalex = ONE; sprt.scaley = ONE; sprt.rotate = 0; DrawSync(0); GetPadBuf(&bb0, &bb1); while(!(pad & PADstart)) { activeBuff = GsGetActiveBuff(); GsSetWorkBase((PACKET *)GpuPacketArea[activeBuff]); GsClearOt(0,0, &WorldOT[activeBuff]); GsSortFastSprite(&sprt, &WorldOT[activeBuff],0); DrawSync(0); VSync(0); GsSwapDispBuff(); GsSortClear(0,0,4,&WorldOT[activeBuff]); GsDrawOt(&WorldOT[activeBuff]); pad = PadRead(); } printf("End of main.\n"); ResetGraph(3); } static u_long PadRead(void) { return(~(*(bb0+3) | *(bb0+2) << 8 | *(bb1+3) << 16 | *(bb1+2) << 24)); }