"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunicsEquipment = void 0;
const JSONTemplate_1 = require("modloader64_api/JSONTemplate");
const Z64CORE = __importStar(require("../importsZ64"));
class TunicsEquipment extends JSONTemplate_1.JSONTemplate {
    emulator;
    instance = Z64CORE.Z64.Z64_SAVE;
    equipment_addr = this.instance + 0x009c;
    jsonFields = ['kokiriTunic', 'goronTunic', 'zoraTunic'];
    constructor(emulator) {
        super();
        this.emulator = emulator;
    }
    get kokiriTunic() {
        return this.emulator.rdramReadBit8(this.equipment_addr, 7 /* TunicBitMap.KOKIRI */);
    }
    set kokiriTunic(bool) {
        this.emulator.rdramWriteBit8(this.equipment_addr, 7 /* TunicBitMap.KOKIRI */, bool);
    }
    get goronTunic() {
        return this.emulator.rdramReadBit8(this.equipment_addr, 6 /* TunicBitMap.GORON */);
    }
    set goronTunic(bool) {
        this.emulator.rdramWriteBit8(this.equipment_addr, 6 /* TunicBitMap.GORON */, bool);
    }
    get zoraTunic() {
        return this.emulator.rdramReadBit8(this.equipment_addr, 5 /* TunicBitMap.ZORA */);
    }
    set zoraTunic(bool) {
        this.emulator.rdramWriteBit8(this.equipment_addr, 5 /* TunicBitMap.ZORA */, bool);
    }
}
exports.TunicsEquipment = TunicsEquipment;
//# sourceMappingURL=TunicsEquipment.js.map