UNPKG

homm3-parsers

Version:

Collection of binary parsers able to parse various file formats related to Heroes of Might and Magic III

7 lines 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const binary_markup_1 = require("binary-markup"); const common_bml_1 = require("../common.bml"); exports.guardians = binary_markup_1.struct(common_bml_1.hommString `message`, binary_markup_1.flag `hasCreatures`, binary_markup_1.when(binary_markup_1.ctx `hasCreatures`, common_bml_1.army) `creatures`, binary_markup_1.skip(4)); exports.contents = binary_markup_1.struct(binary_markup_1.uint32 `experience`, binary_markup_1.int32 `spellPoints`, binary_markup_1.int8 `morale`, binary_markup_1.int8 `luck`, common_bml_1.resources `resources`, common_bml_1.primarySkills `primarySkills`, binary_markup_1.uint8 `secondarySkillsCount`, binary_markup_1.array(common_bml_1.secondarySkill, binary_markup_1.ctx `secondarySkillsCount`) `secondarySkills`, binary_markup_1.uint8 `artifactsCount`, binary_markup_1.array(common_bml_1.artifact, binary_markup_1.ctx `artifactsCount`) `artifacts`, binary_markup_1.uint8 `spellsCount`, binary_markup_1.array(common_bml_1.spell, binary_markup_1.ctx `spellsCount`) `spells`, binary_markup_1.uint8 `creaturesCount`, binary_markup_1.array(common_bml_1.creatureSlot, binary_markup_1.ctx `creaturesCount`) `creatures`, binary_markup_1.skip(8)); //# sourceMappingURL=common.bml.js.map