Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.2d_graphics Subject: CLUT troubles! Date: Fri, 01 Aug 1997 02:25:14 -0700 Organization: PlayStation Net Yaroze (SCEE) Lines: 41 Message-ID: <33E1AB7A.1DEE@dial.pipex.com> NNTP-Posting-Host: ac080.du.pipex.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) Can anyone *please* explain what's happening here: I have a simple 8-bit (256-colour) TIM displayed as a sprite. I want to copy new CLUT entries into the 256-colour CLUT associated to the sprite by using MoveImage(), which works when I change CLUT entries 0-15 (inclusive), but I can't seem to over-write entries 16-255. The same is true if, for example, I use ClearImage() to over-write each CLUT entry in turn by pressing a joypad button: I'm able to change entries 0-15 but anything else is ignored. I've printed all the relevant variables as I go and all seems fine. I've even used a 'test' TIM which simply shows blocks of all 256 colours in the CLUT - using the above example, as I keep pressing the button each colour changes as I'd expect until it gets to CLUT entry 16 then, nothing! Another oddity I discovered is that if I place the CLUT with a tpage X offset other than 0 (i.e. not aligned with the left-hand edge of the tpage) then simply displaying the sprite causes all colours to be 'shifted' in the displayed image by however many the CLUT tpage X offset is e.g. If I have my CLUT at frame buffer address X=1, Y=480 (instead of X=0, Y=480) then pixels in the image that should be displayed using CLUT entry 1 are displayed with the colour of CLUT entry 0 etc. Again, I've displayed all settings and all is reported as normal: the GsSPRITE member .cx is shown as 1 but appears to be using 0!? :( I wasn't aware CLUT's have to be aligned with tpages, certainly, Tim Tool allows them to be positioned anywhere! I hope I've explained the problems cleary enough. Any help would be *much* appreciated! Thanks in advance, Chris