Path: chuka.playstation.co.uk!news From: Phil Gooch Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Transparent screen grabs? Date: Fri, 23 Oct 1998 11:54:54 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 63 Message-ID: <3630607E.69C51AA4@easynet.co.uk> References: <362B0900.27655A77@bristol.ac.uk> <362DD8C8.3290@manc.u-net.com> <362F0A8C.299713D@bristol.ac.uk> NNTP-Posting-Host: 193.131.140.246 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) This came up a while back (I posted the question: Getting a sprite to leave a trail) The easiest way I think is to use James Russell's code he posted which uses sprites. When in the active buffer, point the sprite's tpage to the top left of your active buffer (usually tpage 0), when in the offscreen buffer set the sprite's tpage to the top left of your offscreen (usually tpage 16), and make sure to set the sprite's STP bit and you're there. To grab the whole screen, use two sprites Phil Tom wrote: > I'm doing it in sort of the way you say, although not quite the same, but > that game phsycon (?) that was of the OUKPSM cover cd did it in 640*480. > Hmmm. I'll give your code a bash and see if I can get it to work. > > Tom > > James Shaughnessy wrote: > > > Yes indeed a good question there. You say you've tried setting all > > the STP bits for each frame -- but are you setting them while > > on the frame buffer? This will take in the order of 100,000 HSyncs > > if you are using a LoadImage and a StoreImage for each pixel by my > > reckoning, so as you say causes a rediculous slow-down. > > > > Have you tried StoreImage'ing the whole screen to main memory, > > then doing some speedy bit-masking to all the pixels, then a quick > > LoadImage back to VRAM where the sprite info is? The code could be: > > > > RECT screen = {0, activeBuff*240, 320, 240}; > > u_long *mainmem = (u_long *)RESERVED_MEM_ADDR; // or use malloc() > > > > StoreImage(&screen, &mainmem); > > for (i=0; i<320*240/2; i++;) > > mainmem[i] |= (1<<15) + (1<<31); > > LoadImage(&screen_sprite_area, &mainmem); > > > > Note how TWO pixel STP bits are set for each loop execution, so > > it only (?) needs to loop about 40,000 times. It's only doing one > > logical OR (as 1<<15 + 1<<31 is evaluated at compile time) so it > > should be plenty quick enough and do the trick if no other bright > > soul comes up with a better solution. > > Later, > > Jim > > > > TEJ Madams wrote: > > > Hi there, > > > I've been programming the Yaroze for a couple of weeks with > > > a small amount of sucess but I've come across a problem. I wanted to > > > recreate that 'fade to battle' effect in FFVII and I know how it's > > > done but I don't know exactly how to do it. > > -- > > ----------------------------------------- > > James Shaughnessy james@manc.u-net.com > > http://www.netyaroze-europe.com/~shaughnj > > -----------------------------------------