Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Fixed bug in new OAM code causing sprite layering to be wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kelly authored and Michael Kelly committed Mar 31, 2011
1 parent 6114230 commit 08405f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/edu/fit/cs/sno/snes/ppu/OAM.java
Expand Up @@ -73,13 +73,13 @@ public static void loadPixel() {
// Don't draw transparent pixels or when we're disabled
if (color == 0 || !userEnabled) continue;

if (mainScreen && curTile.priority > PPU.priorityMain) {
if (mainScreen && curTile.priority >= PPU.priorityMain) {
PPU.colorMain = color + curTile.paletteOffset;
PPU.priorityMain = curTile.priority;
PPU.sourceMain = PPU.SRC_OAM;
}

if (subScreen && curTile.priority > PPU.prioritySub) {
if (subScreen && curTile.priority >= PPU.prioritySub) {
PPU.colorSub = color + curTile.paletteOffset;
PPU.prioritySub = curTile.priority;
PPU.sourceSub = PPU.SRC_OAM;
Expand Down

0 comments on commit 08405f5

Please sign in to comment.