summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2014-03-15 22:27:14 +0100
committeraiju <devnull@localhost>2014-03-15 22:27:14 +0100
commit74778941ed75b0a548d6f00e825d6d56bb5722d8 (patch)
tree8626d96ce897ffbfd5c93b51ddef167b12820d44 /sys/src/games
parent744f038e86aef8f30b3c7abead3be5d30e163a2c (diff)
games/snes: small mode 7 fix
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/snes/ppu.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/src/games/snes/ppu.c b/sys/src/games/snes/ppu.c
index 41d23441d..40ecd75a2 100644
--- a/sys/src/games/snes/ppu.c
+++ b/sys/src/games/snes/ppu.c
@@ -366,8 +366,11 @@ bg7init(int n)
if(p->msz != 1)
y -= y % p->msz;
}
- if(n == 1 && (reg[MOSAIC] & 2) != 0)
- p->msz = (reg[MOSAIC] >> 4) + 1;
+ if(n == 1)
+ if((reg[MOSAIC] & 2) != 0)
+ p->msz = (reg[MOSAIC] >> 4) + 1;
+ else
+ p->msz = 1;
if((m & 2) != 0)
y = 255 - y;
p->x = b7->x0 + ((m7[M7B] * y) & ~63);
@@ -412,12 +415,13 @@ end:
if(++p->mx == p->msz)
p->mx = 0;
}
- if(n == 1)
- if((v & 0x80) != 0)
- pixel(1, v & 0x7f, 0x71);
- else
- pixel(1, v, 0x11);
- else
+ if(n == 1){
+ if((v & 0x7f) != 0)
+ if((v & 0x80) != 0)
+ pixel(1, v & 0x7f, 0x71);
+ else
+ pixel(1, v, 0x11);
+ }else if(v != 0)
pixel(0, v, 0x40);
if((m & 1) != 0){
p->x -= m7[M7A];