Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
bfirsh committed Sep 22, 2021
1 parent 55f8163 commit a753eaf
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/ppu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1225,18 +1225,20 @@ PPU.prototype = {

if (toffset < 8) {
// first half of sprite.
t = this.ptTile[
this.sprTile[0] +
(this.vertFlip[0] ? 1 : 0) +
((this.sprTile[0] & 1) !== 0 ? 255 : 0)
];
t =
this.ptTile[
this.sprTile[0] +
(this.vertFlip[0] ? 1 : 0) +
((this.sprTile[0] & 1) !== 0 ? 255 : 0)
];
} else {
// second half of sprite.
t = this.ptTile[
this.sprTile[0] +
(this.vertFlip[0] ? 0 : 1) +
((this.sprTile[0] & 1) !== 0 ? 255 : 0)
];
t =
this.ptTile[
this.sprTile[0] +
(this.vertFlip[0] ? 0 : 1) +
((this.sprTile[0] & 1) !== 0 ? 255 : 0)
];
if (this.vertFlip[0]) {
toffset = 15 - toffset;
} else {
Expand Down

0 comments on commit a753eaf

Please sign in to comment.