Path: chuka.playstation.co.uk!news From: SCEE TECH Newsgroups: scee.yaroze.beginners Subject: Re: Backgrounds Date: Fri, 20 Jun 1997 14:38:31 +0100 Organization: Sony Computer Entertainment Europe Lines: 46 Message-ID: <33AA87D7.6184@interactive.sony.com> References: <01bc7d95$a546a200$cb56eccd@nsantos> Reply-To: N/A-Use-Newsgroups NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Nelson Santos wrote: > > I read a couple of messages regarding displaying an entire 320x240 image on > the screen. If you want an easy and crude way of doing it, you can use the > LoadImage to move the entire image into your display and swap buffers > instead of using 2 sprites, and just use a main loop that does nothing but > swap buffers. Like this: > > ... > GsGetTimInfo((u_long *)(PICTURE+1),&Image); > Rect.x = 0; > Rect.y = 0; > Rect.w = 320; > Rect.h = 240; > LoadImage(&Rect,Image.pixel); > Rect.y = 240; > LoadImage(&Rect,Image.pixel); > > while(PadRead(1) != PadSelect) > { > Buffer = GsGetActiveBuff(); > GsSetWorkBase((PACKET *)Packet[Buffer]); > GsClearOt(0,0,&OT[Buffer]); > DrawSync(0); > VSync(0); > GsSwapDispBuff(); > GsDrawOt(&OT[Buffer]); > } > ... > > This is not useable for background images in games and only works with > images that includes the CLUT information in the data, but it's a great way > to do a quick display of a title image for example. > > Nelson. -- One nice advantage of this LoadImage method is that you can specify the TIM coordinates as those of one draw/display buffer in VRAM eg topleft (0, 0) and (w,h) as (320, 240); this means you can fit more things into the rest of VRAM, and so a large title screen need not hinder use of game textures. GsSPRITEs will enable you to display images very flexibly; each one can only show 256by256 pixels of frame buffer, but if you have a larger TIM than 256x256, show it using more than one sprite.