Espozo wrote:
Well, I'm 99.9% percent sure that this is good, because I wrote
...
Here's the first part:
Umm I don't want to sound like a smarty-pants, but I think you kinda forgot to loop back to
palette_checker_loop. Running your code in my head, the first time it executes it branches to
done. The second time it falls into
done with X = 1, because there is no loop.
I trust you when you said it works, did you submit the wrong code?
Also, you appear to be preforming a 16 bit check on OnscreenPaletteTable, even though it appears to use 8 bit values. This will cause problems when slot 2 is clear, but slot 3 is allocated.
Espozo wrote:
Well, I actually got around to trying to make it to where I have a giant table in ram that has information for all the object palettes that are going to be used in the game
You appear to have
TotalPalettesTable inside shadow RAM. I'm not sure how big it is, but I guess it would be 2*
Number of Palettes and could easily grow to 256 bytes. Shadow RAM is precious, you only have ~7.5KiB of the stuff to play with.
May I recommend you move
TotalPalettesTable to WRAM bank $7E or $7F and access it through
long, X addressing. There would be some overhead, but as the start_palette_checker/palette_cleanup routines would only be called on object spawn and destroy it is well worth the RAM savings.