Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Dim bloke with a TIM Date: Sat, 19 Sep 1998 12:16:34 -0700 Organization: PlayStation Net Yaroze (SCEE) Lines: 49 Message-ID: <36040312.1FBE@dial.pipex.com> References: <3600BC16.1B1AD4F9@cwmail.com> <36015389.64776317@shell.jps.net> <360247CD.3E78@manc.u-net.com> NNTP-Posting-Host: usero788.uk.uudial.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) James Shaughnessy wrote: > > Elliott Lee wrote: > > Oh yeah, play around with the CLUTs too---you can accomplish color > > cycling with that, too. > > The problem with that though is that I have found that the cluts get > cached so changing actual clut entries often has no immediate effect. > Changing the index to the clut (.cx and .cy) is okay and will renew > the sprite's clut but does anyone know how to do this without changing > the .cx.cy values? (Like if you wanted to use MoveImage to do > colour cycling or LoadImage a new clut from normal memory) > I asked this a while back and never got the answer so my solution > was to have two copies of the same clut, and whenever I manually > change an entry I just flip over to the other, double buffer style. > (that's how I light up the green race path line in Gravitation's > menu mapicon sprites) > Is there a better way to renew the cached clut? > > Cheers, > Jim > -- > ----------------------------------------- > James Shaughnessy james@manc.u-net.com > http://www.netyaroze-europe.com/~shaughnj > ----------------------------------------- Hi Jim, The only way I found of getting round this problem with cached CLUTS, was to add a dummy sprite to the OT that has different .cx/.cy values, thus forcing a CLUT cache reload... My problem was that all my sprites were 4bit except for one 8bit sprite whose CLUT I wanted to cycle. However, because of CLUT caching, this wouldn't work until I added a second 8bit sprite that used a different CLUT to the first. On occasions when I only want to display one 8bit sprite with colour cycling, I also add a dummy sprite, as mentioned above. Note, this dummy sprite only has to be 1x1 with an off-screen position (x = y = -100; so that it doesn't actually get displayed) to force a CLUT cache reload! Also, the .cx and .cy members of the dummy dont need to reference a true CLUT since the sprite won't actually get displayed; they simply need to be different to the true sprite's .cx/.cy. This isn't a perfect solution, I know, but it's the only way I've found around the problem. Hope this is some help! Cheers, -Chris