Closed YouMakeTech closed 1 year ago
I tested this with v1.0.0 and the problem occurs there too so I don't think that this is a new issue. I'm working on a debugger to make it easier to discover the reason for these issues. I'll get back to this once I've finished the debugger on branch https://github.com/deltabeard/Peanut-GB/tree/debugger.
The sprites are loading correctly, which is good. So it must be an issue somewhere in __gb_draw_line(). Looking at the BGB VRAM viewer, it seems that the sprite is hidden when it has higher priority. This sprite priority setting must be incorrectly ignored by Peanut-GB somwhere.
I think I've fixed the issue in commit 878bc90a9766cfef5cb57ba64b8a0269a20bc326. Please check.
The background draws over the sprite when required, making it look like Samus is walking behind the bush as shown in the animation above. The extra logic required to get this working will have some impact on LCD drawing performance though.
I'll check today. You're awesome. Thanks!
Thanks Mahyar, it works great. No noticeable change in performance
The changes made seem to introduce some drawing errors in other games now. In certain instances, the sprites will appear miscoloured or overlayed incorrectly. For example, in Super Mario Land 2 when Mario is going into a pipe, the sprite appears inverted colours:
The Jigglypuff in the opening animation in Pokemon R/B is incorrectly overlayed on Gengar on some frames.
I'll reopen this issue so that I can find a better resolution than the current fix.
The issue should be fixed properly now. Before, it was assumed that color 0 of the BG palette was transparent, but in some games like Metroid, colour 0 is black, and instead colour 3 is white.
Sometimes, in some (of my favorite :-)) games (e.g. Metroid II and Batman The Animated Series), the main sprite disappears. Please see example of the beginning of Metroid II, right at the beginning after the main menu: