Zal0 / ZGB

Game Boy / Color engine with lots of features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpriteManagerLoad() issue loading multiple color palettes from disparate sprites

martzgb opened this issue · comments

I'm observing an issue where the last sprite loaded has its color palette overwrite previous sprites palettes.

Screen Shot 2021-11-22 at 8 08 56 PM

  • a grey box that is supposed to be green. generated from a gbr.
  • a person that appears correct on the right and wrong on the left. generated from a png.
  • a blue hint window that is correct generated from a png.

Screen Shot 2021-11-22 at 8 41 59 PM

I think the strncmp is trying to allow multiple sprites that are sharing colors to share a hardware palette? I don't think it's functioning correctly. Perhaps after filing this issue I'll try to find a more proper fix.

commented

I was using strncmp instead of memcmp... since there is no memcmp yet on GBDK I have added a custom implementation temporarily, but this fixes the bug for now

6bedcf1