|
|
@@ -42,7 +42,7 @@ export class NESPalette extends EventCaller{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.emit("palettes_changed", [{type:"ALL"}]); |
|
|
|
this.emit("palettes_changed", {type:"ALL"}); |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
@@ -60,10 +60,10 @@ export class NESPalette extends EventCaller{ |
|
|
|
} |
|
|
|
if (pci == 0){ |
|
|
|
this.__BGColor = sci; |
|
|
|
this.emit("palettes_changed", [{type:"ALL", cindex:0}]); |
|
|
|
this.emit("palettes_changed", {type:"ALL", cindex:0}); |
|
|
|
} else { |
|
|
|
this.__palette[(p*3) + (pci-1)] = sci; |
|
|
|
this.emit("palettes_changes", [{type:(p < 4) ? "TILE" : "SPRITE", pindex:p, cindex:pci}]); |
|
|
|
this.emit("palettes_changes", {type:(p < 4) ? "TILE" : "SPRITE", pindex:p, cindex:pci}); |
|
|
|
} |
|
|
|
return this; |
|
|
|
} |