Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → Have a third color in the pokemon sprite's pallet instead of white

#1 2017-08-12 05:35:33

Ketchup_Raptor
Member
Registered: 2017-04-23
Post 22/27

Have a third color in the pokemon sprite's pallet instead of white

One Idea I had for my hack would be to have the battle background to be black or another dark color, which would allow me to drop the black outlines and give a pokemon a third color in their pallet instead of white,  changing the battle background and text boxes was easy, but the pokemon themselves are proving difficult.
Cyndaquil
I made this sprite recolor following my new rules and built the game
screenshot
(I haven't messed with pidgey yet)
but it leaves my yellow color out for white

the normal.pal file only has two RGB values but the normal.gbcpal has four values bf23 ff14 021d 0000 which all matched the colors I used in my sprite using this converter http://www.budmelvin.com/dev/15bitconverter.html
Something is making the first value default to white, even if stated otherwise in the pallet.

Offline

#2 2017-08-24 22:47:46

Ketchup_Raptor
Member
Registered: 2017-04-23
Post 24/27

Re: Have a third color in the pokemon sprite's pallet instead of white

came back to this after a few days
I found a thing
LoadPalette_White_Col1_Col2_Black on line 567 of color.asm is what I was looking for, I can fiddle with the values below it to get a different color like the image above but I don't know how I would make it read from the pallete for a third value instead of forcing white or whatever color I've forced it to, and I don't see anywhere in this area that black is defined its just $7fff white that is defined twice with some operations done to it. and I can't tell where it loads the value from the actual palletes for col1 and col2 but thats because I havent put in the effort to fully understand assembly but I'm assuming they are stored in [rSVBK] because it copies from it right at the beginning and copies to it before the end of the loop

Offline

#3 2017-08-24 23:47:45

Rangi
Member
Registered: 2016-05-09
Post 794/870

Re: Have a third color in the pokemon sprite's pallet instead of white

The "RGB r, g, b" macro that you use to define colors is just for convenience. The three color channels use five bits each—%rrrrr, %ggggg, and %bbbbb—and they get stored as two bytes: %0bbbbbgg %gggrrrrr.

Say that you have the color RGB 12, 25, 01.
12 decimal = %01100 binary, 25 = %11001, and 01 = %00001.
So that's %0000111 %00101100 , or in hexadecimal, $07 $2C.
And in fact that's what VBA's palette viewer says:

Od1y5Gs.png

Now you can tell what $7fff is. In binary it's %01111111 %1111111, which is equivalent to RGB 31, 31, 31—that's white.
If you see "$7fff / $100" or "$7fff % $100", that's just getting the individual bytes $7f and $ff out of that two-byte value.


Pokémon Polished Crystal (GitHub) — version 2.2.0 released
Pokémon Red★ and Blue★: Space World Edition (GitHub) — updated August 19!
Polished Map: pokered+pokecrystal map, tileset, and palette editor — version 3.5.1 released!

Offline

  • Index
  • → Help/Question
  • → Have a third color in the pokemon sprite's pallet instead of white

Board footer

Powered by FluxBB