Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
I try to figure out how to change the color palette (color) of a single sprite to different then the standard.
I want to display a white sprite (I know I can only use 3 colors, because the last color - typically white - will be used as transparent). So I want to change the color of the 2nd to last (light grey) to white.
I understand I have to define OBP0_REG from standard 11 10 01 00 to 11 10 00 00.
But how can I pass this to a specific sprite ?? set_sprite_tile(8, 0x58 ... ??? );
Offline
set_sprite_prop()
there are 2 sprite palettes: OPB0 and OBP1. sprite may use one or the other.
Last edited by toxa (2022-02-10 13:57:07)
Offline
toxa wrote:
set_sprite_prop()
there are 2 sprite palettes: OPB0 and OBP1. sprite may use one or the other.
Yay ! This worked.
I set:
OBP1_REG = 0b11000100;
And then 'flip' the palette bit
set_sprite_prop(34, (get_sprite_prop(34) | 0b00010000));
Many thanks again!
Offline