Fixes #72. Parking this as a draft because all I did was isolate the general area in code where sprite priority is handled and hack together something that fixed the mooneye sprite priority testrom without testrunner regressions. (This definitely wasn't going to be the complete fix.)
It's been a while since I looked at this now; it could be further simplified/localized, and we had been discussing ways to add DMG-on-CGB test coverage to verify further changes like these, but it may be useful as a reference fix for now.
Fixes #72. Parking this as a draft because all I did was isolate the general area in code where sprite priority is handled and hack together something that fixed the mooneye sprite priority testrom without testrunner regressions. (This definitely wasn't going to be the complete fix.)
It's been a while since I looked at this now; it could be further simplified/localized, and we had been discussing ways to add DMG-on-CGB test coverage to verify further changes like these, but it may be useful as a reference fix for now.