Browse Source

Fixed some confusion in NESBank and CTRLBankTools dealing with palette and side of bank.

dev-bank
Bryan Miller 5 years ago
parent
commit
7ba0c5f533
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      app/js/ctrls/CTRLBankTools.js
  2. +1
    -1
      app/js/models/NESBank.js

+ 3
- 3
app/js/ctrls/CTRLBankTools.js View File

@@ -39,12 +39,12 @@ function HANDLE_ModeChanged(){
if (val !== LastVal){
LastVal = val;
if (val === "all"){
SURF.access_mode = 2;
SURF.access_mode = NESBank.ACCESSMODE_FULL;
} else if (val === "sprites"){
SURF.access_mode = 1;
SURF.access_mode = NESBank.ACCESSMODE_SPRITE;
GlobalEvents.emit("set_palette_mode", 1);
} else if (val === "tiles"){
SURF.access_mode = 0;
SURF.access_mode = NESBank.ACCESSMODE_BACKGROUND;
GlobalEvents.emit("set_palette_mode", 0);
}
}

+ 1
- 1
app/js/models/NESBank.js View File

@@ -254,7 +254,7 @@ export default class NESBank extends ISurface{

var res = LRIdx2TileIdxCo((y*this.width)+x, this.__AccessMode);
var list = (res.lid === 0) ? this.__LP : this.__RP;
var pi = list[res.index].paletteIndex;
var pi = list[res.index].paletteIndex + ((res.lid === 0) ? 4 : 0);
var ci = list[res.index].getPixelIndex(res.x, res.y);

if (this.__palette !== null){

Loading…
Cancel
Save