homm3-parsers
Version:
Collection of binary parsers able to parse various file formats related to Heroes of Might and Magic III
19 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const binary_markup_1 = require("binary-markup");
const objects_1 = require("../../../helpers/objects");
const common_bml_1 = require("./common.bml");
const Player_1 = require("../contracts/enums/Player");
exports.event = binary_markup_1.struct(binary_markup_1.flag `hasGuardians`, binary_markup_1.when(binary_markup_1.ctx `hasGuardians`, common_bml_1.guardians) `guardians`, common_bml_1.contents `contents`, objects_1.bitMasksArray(binary_markup_1.bytes(1), [
[
[1, Player_1.Player.Red],
[2, Player_1.Player.Blue],
[4, Player_1.Player.Tan],
[8, Player_1.Player.Green],
[16, Player_1.Player.Orange],
[32, Player_1.Player.Purple],
[64, Player_1.Player.Teal],
[128, Player_1.Player.Pink],
],
]) `appliesToPlayers`, binary_markup_1.flag `appliesToComputer`, binary_markup_1.flag `cancelAfterVisit`, binary_markup_1.skip(4));
//# sourceMappingURL=event.bml.js.map