@soapbox.pub/wasmboy
Version:
Soapbox fork of Wasmboy.
10 lines (9 loc) • 349 B
JavaScript
// Function to get the current palette data for
// GBC in memory. This is needed to load state with
// The correct colors
export function getPaletteMemory(libWorker) {
return libWorker.wasmByteMemory.slice(
libWorker.WASMBOY_PALETTE_MEMORY_LOCATION,
libWorker.WASMBOY_PALETTE_MEMORY_LOCATION + libWorker.WASMBOY_PALETTE_MEMORY_SIZE
);
}