deltabeard / Peanut-GB

A Game Boy (DMG) emulator single header library written in C99. Performance is prioritised over accuracy.
https://projects.deltabeard.com/peanutgb/
283 stars 40 forks source link

Black box when falling in hole in Libbet and the Magic Floor #35

Closed pinobatch closed 1 year ago

pinobatch commented 5 years ago

If bit 7 of a sprite's attributes ($FE03, $FE07, $FE0B, ..., $FE9F) is true, the sprite's pixels are supposed to be drawn behind any background pixels that are not color 0. The comparison with color 0 is supposed to happen before BGP is applied.

To reproduce:

  1. Open Libbet and the Magic Floor v0.04
  2. Press Select to start the demo
  3. Wait for Libbet to roll to the dead end at the top right corner

Expect: Libbet smoothly falls into the hole

Actual: A black square appears on the white cell below Libbet, which would otherwise have been hidden behind the background.

deltabeard commented 1 year ago

Fixed in 878bc90a9766cfef5cb57ba64b8a0269a20bc326. Tested with v0.07.

LIBBET