@@ -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); | |||
} | |||
} |
@@ -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){ |