Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
16 Colour Palettes   Message List  
Reply | Forward Message #9136 of 15019 |
Re: [gbadev] 16 Colour Palettes

Hello kinetic_creationz,

Wednesday, January 02, 2002, 8:48:56 PM, you wrote:

> I'm trying to load 2 different 16 colour palettes for 2 different
> sprites in mode 0. I'm using 16 colour mode for the sprites but when
> I DMA the sprites and the palettes into VRAM one of the sprites isn't
> right. I load one palette like this:

> DmaArrayCopy(3, duckt_pal, (0 * 32) + OBJ_PLTT, 32);

> and the other simply like this:

> DmaArrayCopy(3, square_pal, (1 * 32) + OBJ_PLTT, 32);

> But the sprites both seem to use the first palette. How do you assign
> palette 1 to a sprite? Thanks in advance.
You do activate your palettes, but do you also set their indices in OAM
entries? The highest 4 bits of "attribute 2" [bytes 5/6] should
contain the index (0-15) of your palette (please also make sure that
your sprites use 16x16 mode -- this is bit 10 of "attribute 0", it
should be cleared). So, what you have to do is set palette index for
your second sprite to 1 and it should work ok.

--
cheers,
-Maciej







Thu Jan 3, 2002 1:38 pm

yarpen2002
Offline Offline
Send Email Send Email

Forward
Message #9136 of 15019 |
Expand Messages Author Sort by Date

I'm trying to load 2 different 16 colour palettes for 2 different sprites in mode 0. I'm using 16 colour mode for the sprites but when I DMA the sprites and...
kinetic_creationz
kinetic_crea...
Offline Send Email
Jan 2, 2002
8:18 pm

... assign ... From the cowbite spec (http://www.gbadev.org/files/CowBiteSpec_dec29.zip) You set the palette number by setting the top 4 bits of attribute 2. ...
owaincole
Offline Send Email
Jan 3, 2002
6:04 pm

Hello kinetic_creationz, ... You do activate your palettes, but do you also set their indices in OAM entries? The highest 4 bits of "attribute 2" [bytes 5/6]...
Maciej Sinilo
yarpen2002
Offline Send Email
Jan 3, 2002
6:05 pm

Thanks guys. That was the problem. It's working now. Woohoo!! Cheers. ... OAM...
kinetic_creationz
kinetic_crea...
Offline Send Email
Jan 7, 2002
12:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help