Stewmath/oracles-disasm

GBA colour recognition

fortwoone opened this issue · 1 comments

Hello,
Can you explain to me how the games change the palettes to adapt to the GBA screen ? I want to make a similar thing in my fangame

I'll be honest, I don't really understand how it works. Of course, you could copy the code if you're not afraid of being sued by Capcom.

I can at least tell you where to look, which is right here, in the code responsible for handling updates to palettes: https://github.com/Drenn1/oracles-disasm/blob/master/code/loadGraphics.s#L58

It uses some function (gbaBrightenPalette) which uses some data table just below it in a way I don't understand. It gets called 4 times, one for each color in the palette I guess. The end result being, of course, each color is a bit brighter than before. I'll leave this issue open in case anyone wants to actually figure out how the algorithm works.