p8-data-cart
Version:
Simple tools for generating Pico-8 data carts.
61 lines (60 loc) • 1.34 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CartData = void 0;
class CartData {
_version;
_lua;
_data;
_gfx;
_gff;
_label;
_map;
_sfx;
_music;
constructor() {
this._version = 42;
this._lua = '';
const buffer = new ArrayBuffer(0x4300);
this._data = new Uint8Array(buffer);
this._gfx = new Uint8Array(buffer, 0x0000, 0x2000);
this._map = new Uint8Array(buffer, 0x2000, 0x1000);
this._gff = new Uint8Array(buffer, 0x3000, 0x0100);
this._music = new Uint8Array(buffer, 0x3100, 0x0100);
this._sfx = new Uint8Array(buffer, 0x3200, 0x1100);
this._label = new Uint8Array(128 * 128);
}
get version() {
return this._version;
}
set version(value) {
this._version = value;
}
get lua() {
return this._lua;
}
set lua(value) {
this._lua = value;
}
get data() {
return this._data;
}
get gfx() {
return this._gfx;
}
get gff() {
return this._gff;
}
get label() {
return this._label;
}
get map() {
return this._map;
}
get sfx() {
return this._sfx;
}
get music() {
return this._music;
}
}
exports.CartData = CartData;