From 87ba0d258759a03b2397d63ba5d203cf5fe26c0f Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Sun, 17 Sep 2023 21:03:13 -0600 Subject: [PATCH 1/4] Added more tools --- tools/anim_offsets.js | 37 +- tools/asset_converter.js | 114 +++ tools/merge_assets.js | 37 + tools/offset_find.js | 9 + tools/util.js | 0 tools/yaml/LICENSE | 13 + tools/yaml/README.md | 147 +++ .../dist/compose/compose-collection.js | 76 ++ .../yaml/browser/dist/compose/compose-doc.js | 41 + .../yaml/browser/dist/compose/compose-node.js | 92 ++ .../browser/dist/compose/compose-scalar.js | 80 ++ tools/yaml/browser/dist/compose/composer.js | 217 ++++ .../browser/dist/compose/resolve-block-map.js | 111 ++ .../dist/compose/resolve-block-scalar.js | 194 ++++ .../browser/dist/compose/resolve-block-seq.js | 46 + .../yaml/browser/dist/compose/resolve-end.js | 37 + .../dist/compose/resolve-flow-collection.js | 199 ++++ .../dist/compose/resolve-flow-scalar.js | 223 ++++ .../browser/dist/compose/resolve-props.js | 134 +++ .../dist/compose/util-contains-newline.js | 34 + .../compose/util-empty-scalar-position.js | 27 + .../dist/compose/util-flow-indent-check.js | 15 + .../browser/dist/compose/util-map-includes.js | 17 + tools/yaml/browser/dist/doc/Document.js | 334 ++++++ tools/yaml/browser/dist/doc/anchors.js | 72 ++ tools/yaml/browser/dist/doc/applyReviver.js | 54 + tools/yaml/browser/dist/doc/createNode.js | 89 ++ tools/yaml/browser/dist/doc/directives.js | 169 ++++ tools/yaml/browser/dist/errors.js | 57 ++ tools/yaml/browser/dist/index.js | 17 + tools/yaml/browser/dist/log.js | 16 + .../dist/node_modules/tslib/tslib.es6.js | 21 + tools/yaml/browser/dist/nodes/Alias.js | 101 ++ tools/yaml/browser/dist/nodes/Collection.js | 148 +++ tools/yaml/browser/dist/nodes/Node.js | 38 + tools/yaml/browser/dist/nodes/Pair.js | 36 + tools/yaml/browser/dist/nodes/Scalar.js | 24 + tools/yaml/browser/dist/nodes/YAMLMap.js | 144 +++ tools/yaml/browser/dist/nodes/YAMLSeq.js | 113 +++ .../yaml/browser/dist/nodes/addPairToJSMap.js | 104 ++ tools/yaml/browser/dist/nodes/identity.js | 36 + tools/yaml/browser/dist/nodes/toJS.js | 37 + tools/yaml/browser/dist/parse/cst-scalar.js | 214 ++++ .../yaml/browser/dist/parse/cst-stringify.js | 61 ++ tools/yaml/browser/dist/parse/cst-visit.js | 97 ++ tools/yaml/browser/dist/parse/cst.js | 98 ++ tools/yaml/browser/dist/parse/lexer.js | 701 +++++++++++++ tools/yaml/browser/dist/parse/line-counter.js | 39 + tools/yaml/browser/dist/parse/parser.js | 950 +++++++++++++++++ tools/yaml/browser/dist/public-api.js | 99 ++ tools/yaml/browser/dist/schema/Schema.js | 38 + tools/yaml/browser/dist/schema/common/map.js | 17 + tools/yaml/browser/dist/schema/common/null.js | 15 + tools/yaml/browser/dist/schema/common/seq.js | 17 + .../yaml/browser/dist/schema/common/string.js | 14 + tools/yaml/browser/dist/schema/core/bool.js | 19 + tools/yaml/browser/dist/schema/core/float.js | 43 + tools/yaml/browser/dist/schema/core/int.js | 38 + tools/yaml/browser/dist/schema/core/schema.js | 23 + tools/yaml/browser/dist/schema/json/schema.js | 62 ++ tools/yaml/browser/dist/schema/tags.js | 83 ++ .../browser/dist/schema/yaml-1.1/binary.js | 66 ++ .../yaml/browser/dist/schema/yaml-1.1/bool.js | 26 + .../browser/dist/schema/yaml-1.1/float.js | 46 + .../yaml/browser/dist/schema/yaml-1.1/int.js | 71 ++ .../yaml/browser/dist/schema/yaml-1.1/omap.js | 74 ++ .../browser/dist/schema/yaml-1.1/pairs.js | 78 ++ .../browser/dist/schema/yaml-1.1/schema.js | 37 + .../yaml/browser/dist/schema/yaml-1.1/set.js | 93 ++ .../browser/dist/schema/yaml-1.1/timestamp.js | 101 ++ .../browser/dist/stringify/foldFlowLines.js | 135 +++ .../yaml/browser/dist/stringify/stringify.js | 124 +++ .../dist/stringify/stringifyCollection.js | 151 +++ .../dist/stringify/stringifyComment.js | 20 + .../dist/stringify/stringifyDocument.js | 85 ++ .../browser/dist/stringify/stringifyNumber.js | 24 + .../browser/dist/stringify/stringifyPair.js | 150 +++ .../browser/dist/stringify/stringifyString.js | 328 ++++++ tools/yaml/browser/dist/util.js | 11 + tools/yaml/browser/dist/visit.js | 233 +++++ tools/yaml/browser/index.js | 5 + tools/yaml/browser/package.json | 3 + .../yaml/dist/compose/compose-collection.d.ts | 5 + tools/yaml/dist/compose/compose-collection.js | 78 ++ tools/yaml/dist/compose/compose-doc.d.ts | 7 + tools/yaml/dist/compose/compose-doc.js | 43 + tools/yaml/dist/compose/compose-node.d.ts | 27 + tools/yaml/dist/compose/compose-node.js | 95 ++ tools/yaml/dist/compose/compose-scalar.d.ts | 5 + tools/yaml/dist/compose/compose-scalar.js | 82 ++ tools/yaml/dist/compose/composer.d.ts | 62 ++ tools/yaml/dist/compose/composer.js | 221 ++++ .../yaml/dist/compose/resolve-block-map.d.ts | 7 + tools/yaml/dist/compose/resolve-block-map.js | 113 +++ .../dist/compose/resolve-block-scalar.d.ts | 10 + .../yaml/dist/compose/resolve-block-scalar.js | 196 ++++ .../yaml/dist/compose/resolve-block-seq.d.ts | 6 + tools/yaml/dist/compose/resolve-block-seq.js | 48 + tools/yaml/dist/compose/resolve-end.d.ts | 6 + tools/yaml/dist/compose/resolve-end.js | 39 + .../dist/compose/resolve-flow-collection.d.ts | 7 + .../dist/compose/resolve-flow-collection.js | 201 ++++ .../dist/compose/resolve-flow-scalar.d.ts | 10 + .../yaml/dist/compose/resolve-flow-scalar.js | 225 +++++ tools/yaml/dist/compose/resolve-props.d.ts | 22 + tools/yaml/dist/compose/resolve-props.js | 136 +++ .../dist/compose/util-contains-newline.d.ts | 2 + .../dist/compose/util-contains-newline.js | 36 + .../compose/util-empty-scalar-position.d.ts | 2 + .../compose/util-empty-scalar-position.js | 29 + .../dist/compose/util-flow-indent-check.d.ts | 3 + .../dist/compose/util-flow-indent-check.js | 17 + .../yaml/dist/compose/util-map-includes.d.ts | 4 + tools/yaml/dist/compose/util-map-includes.js | 19 + tools/yaml/dist/doc/Document.d.ts | 141 +++ tools/yaml/dist/doc/Document.js | 336 ++++++ tools/yaml/dist/doc/anchors.d.ts | 24 + tools/yaml/dist/doc/anchors.js | 77 ++ tools/yaml/dist/doc/applyReviver.d.ts | 9 + tools/yaml/dist/doc/applyReviver.js | 56 + tools/yaml/dist/doc/createNode.d.ts | 17 + tools/yaml/dist/doc/createNode.js | 91 ++ tools/yaml/dist/doc/directives.d.ts | 49 + tools/yaml/dist/doc/directives.js | 171 ++++ tools/yaml/dist/errors.d.ts | 21 + tools/yaml/dist/errors.js | 62 ++ tools/yaml/dist/index.d.ts | 22 + tools/yaml/dist/index.js | 50 + tools/yaml/dist/log.d.ts | 3 + tools/yaml/dist/log.js | 19 + tools/yaml/dist/nodes/Alias.d.ts | 28 + tools/yaml/dist/nodes/Alias.js | 103 ++ tools/yaml/dist/nodes/Collection.d.ts | 74 ++ tools/yaml/dist/nodes/Collection.js | 152 +++ tools/yaml/dist/nodes/Node.d.ts | 46 + tools/yaml/dist/nodes/Node.js | 40 + tools/yaml/dist/nodes/Pair.d.ts | 21 + tools/yaml/dist/nodes/Pair.js | 39 + tools/yaml/dist/nodes/Scalar.d.ts | 42 + tools/yaml/dist/nodes/Scalar.js | 27 + tools/yaml/dist/nodes/YAMLMap.d.ts | 53 + tools/yaml/dist/nodes/YAMLMap.js | 147 +++ tools/yaml/dist/nodes/YAMLSeq.d.ts | 60 ++ tools/yaml/dist/nodes/YAMLSeq.js | 115 +++ tools/yaml/dist/nodes/addPairToJSMap.d.ts | 4 + tools/yaml/dist/nodes/addPairToJSMap.js | 106 ++ tools/yaml/dist/nodes/identity.d.ts | 23 + tools/yaml/dist/nodes/identity.js | 53 + tools/yaml/dist/nodes/toJS.d.ts | 27 + tools/yaml/dist/nodes/toJS.js | 39 + tools/yaml/dist/options.d.ts | 338 +++++++ tools/yaml/dist/parse/cst-scalar.d.ts | 64 ++ tools/yaml/dist/parse/cst-scalar.js | 218 ++++ tools/yaml/dist/parse/cst-stringify.d.ts | 8 + tools/yaml/dist/parse/cst-stringify.js | 63 ++ tools/yaml/dist/parse/cst-visit.d.ts | 39 + tools/yaml/dist/parse/cst-visit.js | 99 ++ tools/yaml/dist/parse/cst.d.ts | 106 ++ tools/yaml/dist/parse/cst.js | 112 ++ tools/yaml/dist/parse/lexer.d.ts | 87 ++ tools/yaml/dist/parse/lexer.js | 703 +++++++++++++ tools/yaml/dist/parse/line-counter.d.ts | 22 + tools/yaml/dist/parse/line-counter.js | 41 + tools/yaml/dist/parse/parser.d.ts | 84 ++ tools/yaml/dist/parse/parser.js | 954 ++++++++++++++++++ tools/yaml/dist/public-api.d.ts | 43 + tools/yaml/dist/public-api.js | 104 ++ tools/yaml/dist/schema/Schema.d.ts | 18 + tools/yaml/dist/schema/Schema.js | 40 + tools/yaml/dist/schema/common/map.d.ts | 2 + tools/yaml/dist/schema/common/map.js | 19 + tools/yaml/dist/schema/common/null.d.ts | 4 + tools/yaml/dist/schema/common/null.js | 17 + tools/yaml/dist/schema/common/seq.d.ts | 2 + tools/yaml/dist/schema/common/seq.js | 19 + tools/yaml/dist/schema/common/string.d.ts | 2 + tools/yaml/dist/schema/common/string.js | 16 + tools/yaml/dist/schema/core/bool.d.ts | 4 + tools/yaml/dist/schema/core/bool.js | 21 + tools/yaml/dist/schema/core/float.d.ts | 4 + tools/yaml/dist/schema/core/float.js | 47 + tools/yaml/dist/schema/core/int.d.ts | 4 + tools/yaml/dist/schema/core/int.js | 42 + tools/yaml/dist/schema/core/schema.d.ts | 1 + tools/yaml/dist/schema/core/schema.js | 25 + tools/yaml/dist/schema/json-schema.d.ts | 69 ++ tools/yaml/dist/schema/json/schema.d.ts | 2 + tools/yaml/dist/schema/json/schema.js | 64 ++ tools/yaml/dist/schema/tags.d.ts | 40 + tools/yaml/dist/schema/tags.js | 86 ++ tools/yaml/dist/schema/types.d.ts | 90 ++ tools/yaml/dist/schema/yaml-1.1/binary.d.ts | 2 + tools/yaml/dist/schema/yaml-1.1/binary.js | 68 ++ tools/yaml/dist/schema/yaml-1.1/bool.d.ts | 7 + tools/yaml/dist/schema/yaml-1.1/bool.js | 29 + tools/yaml/dist/schema/yaml-1.1/float.d.ts | 4 + tools/yaml/dist/schema/yaml-1.1/float.js | 50 + tools/yaml/dist/schema/yaml-1.1/int.d.ts | 5 + tools/yaml/dist/schema/yaml-1.1/int.js | 76 ++ tools/yaml/dist/schema/yaml-1.1/omap.d.ts | 28 + tools/yaml/dist/schema/yaml-1.1/omap.js | 77 ++ tools/yaml/dist/schema/yaml-1.1/pairs.d.ts | 10 + tools/yaml/dist/schema/yaml-1.1/pairs.js | 82 ++ tools/yaml/dist/schema/yaml-1.1/schema.d.ts | 1 + tools/yaml/dist/schema/yaml-1.1/schema.js | 39 + tools/yaml/dist/schema/yaml-1.1/set.d.ts | 28 + tools/yaml/dist/schema/yaml-1.1/set.js | 96 ++ .../yaml/dist/schema/yaml-1.1/timestamp.d.ts | 6 + tools/yaml/dist/schema/yaml-1.1/timestamp.js | 105 ++ tools/yaml/dist/stringify/foldFlowLines.d.ts | 34 + tools/yaml/dist/stringify/foldFlowLines.js | 140 +++ tools/yaml/dist/stringify/stringify.d.ts | 21 + tools/yaml/dist/stringify/stringify.js | 127 +++ .../dist/stringify/stringifyCollection.d.ts | 17 + .../dist/stringify/stringifyCollection.js | 153 +++ .../yaml/dist/stringify/stringifyComment.d.ts | 10 + tools/yaml/dist/stringify/stringifyComment.js | 24 + .../dist/stringify/stringifyDocument.d.ts | 4 + .../yaml/dist/stringify/stringifyDocument.js | 87 ++ .../yaml/dist/stringify/stringifyNumber.d.ts | 2 + tools/yaml/dist/stringify/stringifyNumber.js | 26 + tools/yaml/dist/stringify/stringifyPair.d.ts | 3 + tools/yaml/dist/stringify/stringifyPair.js | 152 +++ .../yaml/dist/stringify/stringifyString.d.ts | 9 + tools/yaml/dist/stringify/stringifyString.js | 330 ++++++ tools/yaml/dist/test-events.d.ts | 4 + tools/yaml/dist/test-events.js | 134 +++ tools/yaml/dist/util.d.ts | 12 + tools/yaml/dist/util.js | 28 + tools/yaml/dist/visit.d.ts | 102 ++ tools/yaml/dist/visit.js | 236 +++++ tools/yaml/package.json | 95 ++ tools/yaml/util.js | 2 + 233 files changed, 18284 insertions(+), 13 deletions(-) create mode 100644 tools/asset_converter.js create mode 100644 tools/merge_assets.js create mode 100644 tools/offset_find.js create mode 100644 tools/util.js create mode 100644 tools/yaml/LICENSE create mode 100644 tools/yaml/README.md create mode 100644 tools/yaml/browser/dist/compose/compose-collection.js create mode 100644 tools/yaml/browser/dist/compose/compose-doc.js create mode 100644 tools/yaml/browser/dist/compose/compose-node.js create mode 100644 tools/yaml/browser/dist/compose/compose-scalar.js create mode 100644 tools/yaml/browser/dist/compose/composer.js create mode 100644 tools/yaml/browser/dist/compose/resolve-block-map.js create mode 100644 tools/yaml/browser/dist/compose/resolve-block-scalar.js create mode 100644 tools/yaml/browser/dist/compose/resolve-block-seq.js create mode 100644 tools/yaml/browser/dist/compose/resolve-end.js create mode 100644 tools/yaml/browser/dist/compose/resolve-flow-collection.js create mode 100644 tools/yaml/browser/dist/compose/resolve-flow-scalar.js create mode 100644 tools/yaml/browser/dist/compose/resolve-props.js create mode 100644 tools/yaml/browser/dist/compose/util-contains-newline.js create mode 100644 tools/yaml/browser/dist/compose/util-empty-scalar-position.js create mode 100644 tools/yaml/browser/dist/compose/util-flow-indent-check.js create mode 100644 tools/yaml/browser/dist/compose/util-map-includes.js create mode 100644 tools/yaml/browser/dist/doc/Document.js create mode 100644 tools/yaml/browser/dist/doc/anchors.js create mode 100644 tools/yaml/browser/dist/doc/applyReviver.js create mode 100644 tools/yaml/browser/dist/doc/createNode.js create mode 100644 tools/yaml/browser/dist/doc/directives.js create mode 100644 tools/yaml/browser/dist/errors.js create mode 100644 tools/yaml/browser/dist/index.js create mode 100644 tools/yaml/browser/dist/log.js create mode 100644 tools/yaml/browser/dist/node_modules/tslib/tslib.es6.js create mode 100644 tools/yaml/browser/dist/nodes/Alias.js create mode 100644 tools/yaml/browser/dist/nodes/Collection.js create mode 100644 tools/yaml/browser/dist/nodes/Node.js create mode 100644 tools/yaml/browser/dist/nodes/Pair.js create mode 100644 tools/yaml/browser/dist/nodes/Scalar.js create mode 100644 tools/yaml/browser/dist/nodes/YAMLMap.js create mode 100644 tools/yaml/browser/dist/nodes/YAMLSeq.js create mode 100644 tools/yaml/browser/dist/nodes/addPairToJSMap.js create mode 100644 tools/yaml/browser/dist/nodes/identity.js create mode 100644 tools/yaml/browser/dist/nodes/toJS.js create mode 100644 tools/yaml/browser/dist/parse/cst-scalar.js create mode 100644 tools/yaml/browser/dist/parse/cst-stringify.js create mode 100644 tools/yaml/browser/dist/parse/cst-visit.js create mode 100644 tools/yaml/browser/dist/parse/cst.js create mode 100644 tools/yaml/browser/dist/parse/lexer.js create mode 100644 tools/yaml/browser/dist/parse/line-counter.js create mode 100644 tools/yaml/browser/dist/parse/parser.js create mode 100644 tools/yaml/browser/dist/public-api.js create mode 100644 tools/yaml/browser/dist/schema/Schema.js create mode 100644 tools/yaml/browser/dist/schema/common/map.js create mode 100644 tools/yaml/browser/dist/schema/common/null.js create mode 100644 tools/yaml/browser/dist/schema/common/seq.js create mode 100644 tools/yaml/browser/dist/schema/common/string.js create mode 100644 tools/yaml/browser/dist/schema/core/bool.js create mode 100644 tools/yaml/browser/dist/schema/core/float.js create mode 100644 tools/yaml/browser/dist/schema/core/int.js create mode 100644 tools/yaml/browser/dist/schema/core/schema.js create mode 100644 tools/yaml/browser/dist/schema/json/schema.js create mode 100644 tools/yaml/browser/dist/schema/tags.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/binary.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/bool.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/float.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/int.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/omap.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/pairs.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/schema.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/set.js create mode 100644 tools/yaml/browser/dist/schema/yaml-1.1/timestamp.js create mode 100644 tools/yaml/browser/dist/stringify/foldFlowLines.js create mode 100644 tools/yaml/browser/dist/stringify/stringify.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyCollection.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyComment.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyDocument.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyNumber.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyPair.js create mode 100644 tools/yaml/browser/dist/stringify/stringifyString.js create mode 100644 tools/yaml/browser/dist/util.js create mode 100644 tools/yaml/browser/dist/visit.js create mode 100644 tools/yaml/browser/index.js create mode 100644 tools/yaml/browser/package.json create mode 100644 tools/yaml/dist/compose/compose-collection.d.ts create mode 100644 tools/yaml/dist/compose/compose-collection.js create mode 100644 tools/yaml/dist/compose/compose-doc.d.ts create mode 100644 tools/yaml/dist/compose/compose-doc.js create mode 100644 tools/yaml/dist/compose/compose-node.d.ts create mode 100644 tools/yaml/dist/compose/compose-node.js create mode 100644 tools/yaml/dist/compose/compose-scalar.d.ts create mode 100644 tools/yaml/dist/compose/compose-scalar.js create mode 100644 tools/yaml/dist/compose/composer.d.ts create mode 100644 tools/yaml/dist/compose/composer.js create mode 100644 tools/yaml/dist/compose/resolve-block-map.d.ts create mode 100644 tools/yaml/dist/compose/resolve-block-map.js create mode 100644 tools/yaml/dist/compose/resolve-block-scalar.d.ts create mode 100644 tools/yaml/dist/compose/resolve-block-scalar.js create mode 100644 tools/yaml/dist/compose/resolve-block-seq.d.ts create mode 100644 tools/yaml/dist/compose/resolve-block-seq.js create mode 100644 tools/yaml/dist/compose/resolve-end.d.ts create mode 100644 tools/yaml/dist/compose/resolve-end.js create mode 100644 tools/yaml/dist/compose/resolve-flow-collection.d.ts create mode 100644 tools/yaml/dist/compose/resolve-flow-collection.js create mode 100644 tools/yaml/dist/compose/resolve-flow-scalar.d.ts create mode 100644 tools/yaml/dist/compose/resolve-flow-scalar.js create mode 100644 tools/yaml/dist/compose/resolve-props.d.ts create mode 100644 tools/yaml/dist/compose/resolve-props.js create mode 100644 tools/yaml/dist/compose/util-contains-newline.d.ts create mode 100644 tools/yaml/dist/compose/util-contains-newline.js create mode 100644 tools/yaml/dist/compose/util-empty-scalar-position.d.ts create mode 100644 tools/yaml/dist/compose/util-empty-scalar-position.js create mode 100644 tools/yaml/dist/compose/util-flow-indent-check.d.ts create mode 100644 tools/yaml/dist/compose/util-flow-indent-check.js create mode 100644 tools/yaml/dist/compose/util-map-includes.d.ts create mode 100644 tools/yaml/dist/compose/util-map-includes.js create mode 100644 tools/yaml/dist/doc/Document.d.ts create mode 100644 tools/yaml/dist/doc/Document.js create mode 100644 tools/yaml/dist/doc/anchors.d.ts create mode 100644 tools/yaml/dist/doc/anchors.js create mode 100644 tools/yaml/dist/doc/applyReviver.d.ts create mode 100644 tools/yaml/dist/doc/applyReviver.js create mode 100644 tools/yaml/dist/doc/createNode.d.ts create mode 100644 tools/yaml/dist/doc/createNode.js create mode 100644 tools/yaml/dist/doc/directives.d.ts create mode 100644 tools/yaml/dist/doc/directives.js create mode 100644 tools/yaml/dist/errors.d.ts create mode 100644 tools/yaml/dist/errors.js create mode 100644 tools/yaml/dist/index.d.ts create mode 100644 tools/yaml/dist/index.js create mode 100644 tools/yaml/dist/log.d.ts create mode 100644 tools/yaml/dist/log.js create mode 100644 tools/yaml/dist/nodes/Alias.d.ts create mode 100644 tools/yaml/dist/nodes/Alias.js create mode 100644 tools/yaml/dist/nodes/Collection.d.ts create mode 100644 tools/yaml/dist/nodes/Collection.js create mode 100644 tools/yaml/dist/nodes/Node.d.ts create mode 100644 tools/yaml/dist/nodes/Node.js create mode 100644 tools/yaml/dist/nodes/Pair.d.ts create mode 100644 tools/yaml/dist/nodes/Pair.js create mode 100644 tools/yaml/dist/nodes/Scalar.d.ts create mode 100644 tools/yaml/dist/nodes/Scalar.js create mode 100644 tools/yaml/dist/nodes/YAMLMap.d.ts create mode 100644 tools/yaml/dist/nodes/YAMLMap.js create mode 100644 tools/yaml/dist/nodes/YAMLSeq.d.ts create mode 100644 tools/yaml/dist/nodes/YAMLSeq.js create mode 100644 tools/yaml/dist/nodes/addPairToJSMap.d.ts create mode 100644 tools/yaml/dist/nodes/addPairToJSMap.js create mode 100644 tools/yaml/dist/nodes/identity.d.ts create mode 100644 tools/yaml/dist/nodes/identity.js create mode 100644 tools/yaml/dist/nodes/toJS.d.ts create mode 100644 tools/yaml/dist/nodes/toJS.js create mode 100644 tools/yaml/dist/options.d.ts create mode 100644 tools/yaml/dist/parse/cst-scalar.d.ts create mode 100644 tools/yaml/dist/parse/cst-scalar.js create mode 100644 tools/yaml/dist/parse/cst-stringify.d.ts create mode 100644 tools/yaml/dist/parse/cst-stringify.js create mode 100644 tools/yaml/dist/parse/cst-visit.d.ts create mode 100644 tools/yaml/dist/parse/cst-visit.js create mode 100644 tools/yaml/dist/parse/cst.d.ts create mode 100644 tools/yaml/dist/parse/cst.js create mode 100644 tools/yaml/dist/parse/lexer.d.ts create mode 100644 tools/yaml/dist/parse/lexer.js create mode 100644 tools/yaml/dist/parse/line-counter.d.ts create mode 100644 tools/yaml/dist/parse/line-counter.js create mode 100644 tools/yaml/dist/parse/parser.d.ts create mode 100644 tools/yaml/dist/parse/parser.js create mode 100644 tools/yaml/dist/public-api.d.ts create mode 100644 tools/yaml/dist/public-api.js create mode 100644 tools/yaml/dist/schema/Schema.d.ts create mode 100644 tools/yaml/dist/schema/Schema.js create mode 100644 tools/yaml/dist/schema/common/map.d.ts create mode 100644 tools/yaml/dist/schema/common/map.js create mode 100644 tools/yaml/dist/schema/common/null.d.ts create mode 100644 tools/yaml/dist/schema/common/null.js create mode 100644 tools/yaml/dist/schema/common/seq.d.ts create mode 100644 tools/yaml/dist/schema/common/seq.js create mode 100644 tools/yaml/dist/schema/common/string.d.ts create mode 100644 tools/yaml/dist/schema/common/string.js create mode 100644 tools/yaml/dist/schema/core/bool.d.ts create mode 100644 tools/yaml/dist/schema/core/bool.js create mode 100644 tools/yaml/dist/schema/core/float.d.ts create mode 100644 tools/yaml/dist/schema/core/float.js create mode 100644 tools/yaml/dist/schema/core/int.d.ts create mode 100644 tools/yaml/dist/schema/core/int.js create mode 100644 tools/yaml/dist/schema/core/schema.d.ts create mode 100644 tools/yaml/dist/schema/core/schema.js create mode 100644 tools/yaml/dist/schema/json-schema.d.ts create mode 100644 tools/yaml/dist/schema/json/schema.d.ts create mode 100644 tools/yaml/dist/schema/json/schema.js create mode 100644 tools/yaml/dist/schema/tags.d.ts create mode 100644 tools/yaml/dist/schema/tags.js create mode 100644 tools/yaml/dist/schema/types.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/binary.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/binary.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/bool.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/bool.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/float.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/float.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/int.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/int.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/omap.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/omap.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/pairs.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/pairs.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/schema.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/schema.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/set.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/set.js create mode 100644 tools/yaml/dist/schema/yaml-1.1/timestamp.d.ts create mode 100644 tools/yaml/dist/schema/yaml-1.1/timestamp.js create mode 100644 tools/yaml/dist/stringify/foldFlowLines.d.ts create mode 100644 tools/yaml/dist/stringify/foldFlowLines.js create mode 100644 tools/yaml/dist/stringify/stringify.d.ts create mode 100644 tools/yaml/dist/stringify/stringify.js create mode 100644 tools/yaml/dist/stringify/stringifyCollection.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyCollection.js create mode 100644 tools/yaml/dist/stringify/stringifyComment.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyComment.js create mode 100644 tools/yaml/dist/stringify/stringifyDocument.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyDocument.js create mode 100644 tools/yaml/dist/stringify/stringifyNumber.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyNumber.js create mode 100644 tools/yaml/dist/stringify/stringifyPair.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyPair.js create mode 100644 tools/yaml/dist/stringify/stringifyString.d.ts create mode 100644 tools/yaml/dist/stringify/stringifyString.js create mode 100644 tools/yaml/dist/test-events.d.ts create mode 100644 tools/yaml/dist/test-events.js create mode 100644 tools/yaml/dist/util.d.ts create mode 100644 tools/yaml/dist/util.js create mode 100644 tools/yaml/dist/visit.d.ts create mode 100644 tools/yaml/dist/visit.js create mode 100644 tools/yaml/package.json create mode 100644 tools/yaml/util.js diff --git a/tools/anim_offsets.js b/tools/anim_offsets.js index 3f641b8..91e1ffb 100644 --- a/tools/anim_offsets.js +++ b/tools/anim_offsets.js @@ -1,8 +1,9 @@ const fs = require('fs'); const path = require('path'); +const { off } = require('process'); let _parent = 'assets/reordered'; -let bytes = Buffer.alloc(0); +let bytes = {}; function toHex(value) { let hex = value.toString(16); @@ -19,26 +20,36 @@ function toBEU16(num){ } async function parseAnim(file){ - let fimport = `./${file.replace('.js', '')}` + let fimport = `../${file.replace('.js', '')}` let data = require(fimport) for(let id of fimport.split('_').slice(1)){ let anim = data['anim_'+id]; - let hOffset = bytes.indexOf(Buffer.concat(anim.slice(0, 6).map(toBEU16))); + let offsets = {}; - let bswValues = Buffer.concat(anim[6].map(toBEU16)); - let vsOffset = bytes.indexOf(bswValues); - let bswIndices = Buffer.concat(anim[7].map(toBEU16)); - let idxOffset = bytes.indexOf(bswIndices); - console.log(`"assets/anims/anim_${id}.anim": ${JSON.stringify({ - header: [hOffset, 0x18], - values: [vsOffset, bswValues.length], - indices: [idxOffset, bswIndices.length], - })},`); + for(let key of Object.keys(bytes)){ + let rom = bytes[key]; + let hOffset = rom.indexOf(Buffer.concat(anim.slice(0, 6).map(toBEU16))); + + let bswValues = Buffer.concat(anim[6].map(toBEU16)); + let vsOffset = rom.indexOf(bswValues); + let bswIndices = Buffer.concat(anim[7].map(toBEU16)); + let idxOffset = rom.indexOf(bswIndices); + offsets[key] = { + header: [hOffset, 0x18], + values: [vsOffset, bswValues.length], + indices: [idxOffset, bswIndices.length], + }; + } + + console.log(`"assets/anims/anim_${id}.anim": ${JSON.stringify(offsets)},`); } } async function main(){ - bytes = fs.readFileSync('./baserom.us.z64'); + let roms = fs.readdirSync('./').filter(f => f.endsWith('.z64')); + for(let rom of roms){ + bytes[rom.split('.')[1]] = fs.readFileSync(rom); + } for(let file of fs.readdirSync(_parent)){ let pdir = path.join(_parent, file); let lines = fs.readFileSync(pdir, 'utf8').split('\n').map((line) => diff --git a/tools/asset_converter.js b/tools/asset_converter.js new file mode 100644 index 0000000..7e82acf --- /dev/null +++ b/tools/asset_converter.js @@ -0,0 +1,114 @@ +const YAML = require('./yaml/dist/index') +const fs = require('fs'); +const path = require('path'); +const assets = require('../assets.json'); +const version = 'jp'; + +const map = { + png: texture, + anime: anim, + aiff: audio, + bnk: audio, + bset: audio, + m64: audio, + bin: blob, + sbox: blob +} + +function toYAML(obj){ + let file = `${obj.file}`; + delete obj.file; + return YAML.stringify({ + [file]: obj + }); +} + +function texture(file, data){ + if(!data[3][version]) return; + let format = path.parse(file); + return { + file: path.join(format.dir, format.name), + type: 'TEXTURE', + size: data[2], + width: data[0], + height: data[1], + offset: data[3][version][0], + format: format.ext.toUpperCase().slice(1), + }; +} + +function anim(file, data){ + return { + file: file, + type: 'SM64:ANIM', + header: { + offset: data[version].header[0], + size: data[version].header[1], + }, + values: { + offset: data[version].values[0], + size: data[version].values[1], + }, + indices: { + offset: data[version].indices[0], + size: data[version].indices[1], + } + }; +} + +function audio(file, data, ext){ + if(ext === 'aiff'){ + if(!data[1][version]) return; + return { + file: file, + type: 'SAMPLE', + id: data[1][version][1] + }; + } + if(ext === 'm64'){ + if(!data[version]) return; + return { + file: file, + type: 'SEQUENCE', + offset: data[version]['offset'][0], + size: data[version]['offset'][1], + banks: data['banks'], + }; + } + if(ext === 'bnk'){ + return { + file: file, + type: 'BANK', + id: data[0] + }; + } +} + +function blob(file, data){ + if(!data[1][version]) return; + return { + file: file, + type: 'BLOB', + size: data[0], + offset: data[1][version][0], + mio0: data[1][version][1] == 0, + }; +} + +async function main(){ + let keys = Object.keys(assets).filter(f => f.includes('/')); + let output = path.join('output', version); + fs.rmdirSync(output, { recursive: true }); + fs.mkdirSync(output); + for(let key of keys.sort()){ + let parent = key.split('/')[0]; + let ext = key.split('.').pop(); + let func = map[ext]; + let result = func(key.slice(parent.length + 1, key.indexOf(ext) - 1), assets[key], ext); + if(result){ + fs.appendFileSync(`${output}/${parent}.yml`, toYAML(result)); + } + } +} + +main(); \ No newline at end of file diff --git a/tools/merge_assets.js b/tools/merge_assets.js new file mode 100644 index 0000000..b54397e --- /dev/null +++ b/tools/merge_assets.js @@ -0,0 +1,37 @@ +const fs = require('fs'); +const path = require('path'); +const assets = require('../assets.json'); +const files = {} + +async function main(){ + const m64s = Object.keys(assets).filter(f => f.endsWith('.m64')); + for(let entry of m64s){ + if(entry.includes('sh')) continue; + const size = assets[entry][0]; + const parent = assets[entry][1]; + const keys = Object.keys(parent); + const offset = parent[keys[0]][0]; + const key = `sound/sequences/${path.basename(entry)}` + if(!files[key]){ + files[key] = { + eu: {}, + us: {}, + jp: {}, + banks: [] + } + } + const output = { + offset: [offset, size] + } + + if(keys.length > 1){ + files[key][keys[1]] = parent[keys[1]]; + } + files[key][keys[0]] = output; + } + for(let entry of Object.keys(files)){ + console.log(`"${entry}": ${JSON.stringify(files[entry])},`); + } +} + +main(); \ No newline at end of file diff --git a/tools/offset_find.js b/tools/offset_find.js new file mode 100644 index 0000000..f9796b0 --- /dev/null +++ b/tools/offset_find.js @@ -0,0 +1,9 @@ +const fs = require('fs'); + +const bytes = fs.readFileSync('./baserom.eu.z64'); +const file = fs.readFileSync('./00_sound_player_eu.m64'); + +const offset = bytes.indexOf(file); +const size = file.length; + +console.log(offset, size) \ No newline at end of file diff --git a/tools/util.js b/tools/util.js new file mode 100644 index 0000000..e69de29 diff --git a/tools/yaml/LICENSE b/tools/yaml/LICENSE new file mode 100644 index 0000000..e060aaa --- /dev/null +++ b/tools/yaml/LICENSE @@ -0,0 +1,13 @@ +Copyright Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/tools/yaml/README.md b/tools/yaml/README.md new file mode 100644 index 0000000..61e1a2a --- /dev/null +++ b/tools/yaml/README.md @@ -0,0 +1,147 @@ +# YAML + +`yaml` is a definitive library for [YAML](https://yaml.org/), the human friendly data serialization standard. +This library: + +- Supports both YAML 1.1 and YAML 1.2 and all common data schemas, +- Passes all of the [yaml-test-suite](https://github.com/yaml/yaml-test-suite) tests, +- Can accept any string as input without throwing, parsing as much YAML out of it as it can, and +- Supports parsing, modifying, and writing YAML comments and blank lines. + +The library is released under the ISC open source license, and the code is [available on GitHub](https://github.com/eemeli/yaml/). +It has no external dependencies and runs on Node.js as well as modern browsers. + +For the purposes of versioning, any changes that break any of the documented endpoints or APIs will be considered semver-major breaking changes. +Undocumented library internals may change between minor versions, and previous APIs may be deprecated (but not removed). + +The minimum supported TypeScript version of the included typings is 3.9; +for use in earlier versions you may need to set `skipLibCheck: true` in your config. +This requirement may be updated between minor versions of the library. + +For more information, see the project's documentation site: [**eemeli.org/yaml**](https://eemeli.org/yaml/) + +To install: + +```sh +npm install yaml +``` + +**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation. + +## API Overview + +The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the underlying [Lexer/Parser/Composer](https://eemeli.org/yaml/#parsing-yaml). +The first has the simplest API and "just works", the second gets you all the bells and whistles supported by the library along with a decent [AST](https://eemeli.org/yaml/#content-nodes), and the third lets you get progressively closer to YAML source, if that's your thing. + +```js +import { parse, stringify } from 'yaml' +// or +import YAML from 'yaml' +// or +const YAML = require('yaml') +``` + +### Parse & Stringify + +- [`parse(str, reviver?, options?): value`](https://eemeli.org/yaml/#yaml-parse) +- [`stringify(value, replacer?, options?): string`](https://eemeli.org/yaml/#yaml-stringify) + +### Documents + +- [`Document`](https://eemeli.org/yaml/#documents) + - [`constructor(value, replacer?, options?)`](https://eemeli.org/yaml/#creating-documents) + - [`#anchors`](https://eemeli.org/yaml/#working-with-anchors) + - [`#contents`](https://eemeli.org/yaml/#content-nodes) + - [`#directives`](https://eemeli.org/yaml/#stream-directives) + - [`#errors`](https://eemeli.org/yaml/#errors) + - [`#warnings`](https://eemeli.org/yaml/#errors) +- [`isDocument(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`parseAllDocuments(str, options?): Document[]`](https://eemeli.org/yaml/#parsing-documents) +- [`parseDocument(str, options?): Document`](https://eemeli.org/yaml/#parsing-documents) + +### Content Nodes + +- [`isAlias(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isCollection(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isMap(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isNode(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isPair(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isScalar(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isSeq(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`new Scalar(value)`](https://eemeli.org/yaml/#scalar-values) +- [`new YAMLMap()`](https://eemeli.org/yaml/#collections) +- [`new YAMLSeq()`](https://eemeli.org/yaml/#collections) +- [`doc.createAlias(node, name?): Alias`](https://eemeli.org/yaml/#working-with-anchors) +- [`doc.createNode(value, options?): Node`](https://eemeli.org/yaml/#creating-nodes) +- [`doc.createPair(key, value): Pair`](https://eemeli.org/yaml/#creating-nodes) +- [`visit(node, visitor)`](https://eemeli.org/yaml/#modifying-nodes) + +### Parsing YAML + +- [`new Lexer().lex(src)`](https://eemeli.org/yaml/#lexer) +- [`new Parser(onNewLine?).parse(src)`](https://eemeli.org/yaml/#parser) +- [`new Composer(options?).compose(tokens)`](https://eemeli.org/yaml/#composer) + +## YAML.parse + +```yaml +# file.yml +YAML: + - A human-readable data serialization language + - https://en.wikipedia.org/wiki/YAML +yaml: + - A complete JavaScript implementation + - https://www.npmjs.com/package/yaml +``` + +```js +import fs from 'fs' +import YAML from 'yaml' + +YAML.parse('3.14159') +// 3.14159 + +YAML.parse('[ true, false, maybe, null ]\n') +// [ true, false, 'maybe', null ] + +const file = fs.readFileSync('./file.yml', 'utf8') +YAML.parse(file) +// { YAML: +// [ 'A human-readable data serialization language', +// 'https://en.wikipedia.org/wiki/YAML' ], +// yaml: +// [ 'A complete JavaScript implementation', +// 'https://www.npmjs.com/package/yaml' ] } +``` + +## YAML.stringify + +```js +import YAML from 'yaml' + +YAML.stringify(3.14159) +// '3.14159\n' + +YAML.stringify([true, false, 'maybe', null]) +// `- true +// - false +// - maybe +// - null +// ` + +YAML.stringify({ number: 3, plain: 'string', block: 'two\nlines\n' }) +// `number: 3 +// plain: string +// block: | +// two +// lines +// ` +``` + +--- + +Browser testing provided by: + + + + diff --git a/tools/yaml/browser/dist/compose/compose-collection.js b/tools/yaml/browser/dist/compose/compose-collection.js new file mode 100644 index 0000000..8d4507f --- /dev/null +++ b/tools/yaml/browser/dist/compose/compose-collection.js @@ -0,0 +1,76 @@ +import { isNode } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveBlockMap } from './resolve-block-map.js'; +import { resolveBlockSeq } from './resolve-block-seq.js'; +import { resolveFlowCollection } from './resolve-flow-collection.js'; + +function resolveCollection(CN, ctx, token, onError, tagName, tag) { + const coll = token.type === 'block-map' + ? resolveBlockMap(CN, ctx, token, onError, tag) + : token.type === 'block-seq' + ? resolveBlockSeq(CN, ctx, token, onError, tag) + : resolveFlowCollection(CN, ctx, token, onError, tag); + const Coll = coll.constructor; + // If we got a tagName matching the class, or the tag name is '!', + // then use the tagName from the node class used to create it. + if (tagName === '!' || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; +} +function composeCollection(CN, ctx, token, tagToken, onError) { + const tagName = !tagToken + ? null + : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)); + const expType = token.type === 'block-map' + ? 'map' + : token.type === 'block-seq' + ? 'seq' + : token.start.source === '{' + ? 'map' + : 'seq'; + // shortcut: check if it's a generic YAMLMap or YAMLSeq + // before jumping into the custom tag logic. + if (!tagToken || + !tagName || + tagName === '!' || + (tagName === YAMLMap.tagName && expType === 'map') || + (tagName === YAMLSeq.tagName && expType === 'seq') || + !expType) { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt && kt.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } + else { + if (kt?.collection) { + onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true); + } + else { + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true); + } + return resolveCollection(CN, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll; + const node = isNode(res) + ? res + : new Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; +} + +export { composeCollection }; diff --git a/tools/yaml/browser/dist/compose/compose-doc.js b/tools/yaml/browser/dist/compose/compose-doc.js new file mode 100644 index 0000000..d36c380 --- /dev/null +++ b/tools/yaml/browser/dist/compose/compose-doc.js @@ -0,0 +1,41 @@ +import { Document } from '../doc/Document.js'; +import { composeNode, composeEmptyNode } from './compose-node.js'; +import { resolveEnd } from './resolve-end.js'; +import { resolveProps } from './resolve-props.js'; + +function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document(undefined, opts); + const ctx = { + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps(start, { + indicator: 'doc-start', + next: value ?? end?.[0], + offset, + onError, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && + (value.type === 'block-map' || value.type === 'block-seq') && + !props.hasNewline) + onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); + } + // @ts-expect-error If Contents is set, let's trust the user + doc.contents = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; +} + +export { composeDoc }; diff --git a/tools/yaml/browser/dist/compose/compose-node.js b/tools/yaml/browser/dist/compose/compose-node.js new file mode 100644 index 0000000..39d98e3 --- /dev/null +++ b/tools/yaml/browser/dist/compose/compose-node.js @@ -0,0 +1,92 @@ +import { Alias } from '../nodes/Alias.js'; +import { composeCollection } from './compose-collection.js'; +import { composeScalar } from './compose-scalar.js'; +import { resolveEnd } from './resolve-end.js'; +import { emptyScalarPosition } from './util-empty-scalar-position.js'; + +const CN = { composeNode, composeEmptyNode }; +function composeNode(ctx, token, props, onError) { + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case 'alias': + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties'); + break; + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'block-scalar': + node = composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case 'block-map': + case 'block-seq': + case 'flow-collection': + node = composeCollection(CN, ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + default: { + const message = token.type === 'error' + ? token.message + : `Unsupported token (type: ${token.type})`; + onError(token, 'UNEXPECTED_TOKEN', message); + node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError); + isSrcToken = false; + } + } + if (anchor && node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === 'scalar' && token.source === '') + node.comment = comment; + else + node.commentBefore = comment; + } + // @ts-expect-error Type checking misses meaning of isSrcToken + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; +} +function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: 'scalar', + offset: emptyScalarPosition(offset, before, pos), + indent: -1, + source: '' + }; + const node = composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; +} +function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias(source.substring(1)); + if (alias.source === '') + onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string'); + if (alias.source.endsWith(':')) + onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true); + const valueEnd = offset + source.length; + const re = resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; +} + +export { composeEmptyNode, composeNode }; diff --git a/tools/yaml/browser/dist/compose/compose-scalar.js b/tools/yaml/browser/dist/compose/compose-scalar.js new file mode 100644 index 0000000..fb4447d --- /dev/null +++ b/tools/yaml/browser/dist/compose/compose-scalar.js @@ -0,0 +1,80 @@ +import { SCALAR, isScalar } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { resolveBlockScalar } from './resolve-block-scalar.js'; +import { resolveFlowScalar } from './resolve-flow-scalar.js'; + +function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === 'block-scalar' + ? resolveBlockScalar(token, ctx.options.strict, onError) + : resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken + ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) + : null; + const tag = tagToken && tagName + ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) + : token.type === 'scalar' + ? findScalarTagByTest(ctx, value, token, onError) + : ctx.schema[SCALAR]; + let scalar; + try { + const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); + scalar = isScalar(res) ? res : new Scalar(res); + } + catch (error) { + const msg = error instanceof Error ? error.message : String(error); + onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg); + scalar = new Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; +} +function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === '!') + return schema[SCALAR]; // non-specific tag + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + // Ensure that the known tag is available for stringifying, + // but does not get used by default. + schema.tags.push(Object.assign({}, kt, { default: false, test: undefined })); + return kt; + } + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); + return schema[SCALAR]; +} +function findScalarTagByTest({ directives, schema }, value, token, onError) { + const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[SCALAR]; + if (schema.compat) { + const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? + schema[SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, 'TAG_RESOLVE_FAILED', msg, true); + } + } + return tag; +} + +export { composeScalar }; diff --git a/tools/yaml/browser/dist/compose/composer.js b/tools/yaml/browser/dist/compose/composer.js new file mode 100644 index 0000000..01b387f --- /dev/null +++ b/tools/yaml/browser/dist/compose/composer.js @@ -0,0 +1,217 @@ +import { Directives } from '../doc/directives.js'; +import { Document } from '../doc/Document.js'; +import { YAMLWarning, YAMLParseError } from '../errors.js'; +import { isCollection, isPair } from '../nodes/identity.js'; +import { composeDoc } from './compose-doc.js'; +import { resolveEnd } from './resolve-end.js'; + +function getErrorPos(src) { + if (typeof src === 'number') + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === 'string' ? source.length : 1)]; +} +function parsePrelude(prelude) { + let comment = ''; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case '#': + comment += + (comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') + + (source.substring(1) || ' '); + atComment = true; + afterEmptyLine = false; + break; + case '%': + if (prelude[i + 1]?.[0] !== '#') + i += 1; + atComment = false; + break; + default: + // This may be wrong after doc-end, but in that case it doesn't matter + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; +} +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +class Composer { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new YAMLWarning(pos, code, message)); + else + this.errors.push(new YAMLParseError(pos, code, message)); + }; + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + this.directives = new Directives({ version: options.version || '1.2' }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + //console.log({ dc: doc.comment, prelude, comment }) + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment; + } + else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } + else if (isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + } + if (afterDoc) { + Array.prototype.push.apply(doc.errors, this.errors); + Array.prototype.push.apply(doc.warnings, this.warnings); + } + else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + switch (token.type) { + case 'directive': + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, 'BAD_DIRECTIVE', message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case 'document': { + const doc = composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line'); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; + } + case 'byte-order-mark': + case 'space': + break; + case 'comment': + case 'newline': + this.prelude.push(token.source); + break; + case 'error': { + const msg = token.source + ? `${token.message}: ${JSON.stringify(token.source)}` + : token.message; + const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg); + if (this.atDirectives || !this.doc) + this.errors.push(error); + else + this.doc.errors.push(error); + break; + } + case 'doc-end': { + if (!this.doc) { + const msg = 'Unexpected doc-end without preceding document'; + this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg)); + break; + } + this.doc.directives.docEnd = true; + const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`)); + } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } + else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document(undefined, opts); + if (this.atDirectives) + this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line'); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } +} + +export { Composer }; diff --git a/tools/yaml/browser/dist/compose/resolve-block-map.js b/tools/yaml/browser/dist/compose/resolve-block-map.js new file mode 100644 index 0000000..679b3de --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-block-map.js @@ -0,0 +1,111 @@ +import { Pair } from '../nodes/Pair.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { resolveProps } from './resolve-props.js'; +import { containsNewline } from './util-contains-newline.js'; +import { flowIndentCheck } from './util-flow-indent-check.js'; +import { mapIncludes } from './util-map-includes.js'; + +const startColMsg = 'All mapping items must start at the same column'; +function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap; + const map = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep, value } = collItem; + // key properties + const keyProps = resolveProps(start, { + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === 'block-seq') + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key'); + else if ('indent' in key && key.indent !== bm.indent) + onError(offset, 'BAD_INDENT', startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map.comment) + map.comment += '\n' + keyProps.comment; + else + map.comment = keyProps.comment; + } + continue; + } + if (keyProps.hasNewlineAfterProp || containsNewline(key)) { + onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line'); + } + } + else if (keyProps.found?.indent !== bm.indent) { + onError(offset, 'BAD_INDENT', startColMsg); + } + // key value + const keyStart = keyProps.end; + const keyNode = key + ? composeNode(ctx, key, keyProps, onError) + : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, key, onError); + if (mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + // value properties + const valueProps = resolveProps(sep ?? [], { + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: !key || key.type === 'block-scalar' + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === 'block-map' && !valueProps.hasNewline) + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings'); + if (ctx.options.strict && + keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key'); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : composeEmptyNode(ctx, offset, sep, null, valueProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + else { + // key with no value + if (implicitKey) + onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values'); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content'); + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; +} + +export { resolveBlockMap }; diff --git a/tools/yaml/browser/dist/compose/resolve-block-scalar.js b/tools/yaml/browser/dist/compose/resolve-block-scalar.js new file mode 100644 index 0000000..592d807 --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-block-scalar.js @@ -0,0 +1,194 @@ +import { Scalar } from '../nodes/Scalar.js'; + +function resolveBlockScalar(scalar, strict, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, strict, onError); + if (!header) + return { value: '', type: null, comment: '', range: [start, start, start] }; + const type = header.mode === '>' ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + // determine the end of content & start of chomping + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === '' || content === '\r') + chompStart = i; + else + break; + } + // shortcut for empty contents + if (chompStart === 0) { + const value = header.chomp === '+' && lines.length > 0 + ? '\n'.repeat(Math.max(1, lines.length - 1)) + : ''; + let end = start + header.length; + if (scalar.source) + end += scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; + } + // find the indentation level to trim from start + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === '' || content === '\r') { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } + else { + if (indent.length < trimIndent) { + const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator'; + onError(offset + indent.length, 'MISSING_CHAR', message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; + break; + } + offset += indent.length + content.length + 1; + } + // include trailing more-indented empty lines in content + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; + } + let value = ''; + let sep = ''; + let prevMoreIndented = false; + // leading whitespace is kept intact + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + '\n'; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === '\r'; + if (crlf) + content = content.slice(0, -1); + /* istanbul ignore if already caught in lexer */ + if (content && indent.length < trimIndent) { + const src = header.indent + ? 'explicit indentation indicator' + : 'first line'; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message); + indent = ''; + } + if (type === Scalar.BLOCK_LITERAL) { + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + } + else if (indent.length > trimIndent || content[0] === '\t') { + // more-indented content within a folded block + if (sep === ' ') + sep = '\n'; + else if (!prevMoreIndented && sep === '\n') + sep = '\n\n'; + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + prevMoreIndented = true; + } + else if (content === '') { + // empty line + if (sep === '\n') + value += '\n'; + else + sep = '\n'; + } + else { + value += sep + content; + sep = ' '; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case '-': + break; + case '+': + for (let i = chompStart; i < lines.length; ++i) + value += '\n' + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== '\n') + value += '\n'; + break; + default: + value += '\n'; + } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; +} +function parseBlockScalarHeader({ offset, props }, strict, onError) { + /* istanbul ignore if should not happen */ + if (props[0].type !== 'block-scalar-header') { + onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found'); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ''; + let error = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === '-' || ch === '+')) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error === -1) + error = offset + i; + } + } + if (error !== -1) + onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ''; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case 'space': + hasSpace = true; + // fallthrough + case 'newline': + length += token.source.length; + break; + case 'comment': + if (strict && !hasSpace) { + const message = 'Comments must be separated from other tokens by white space characters'; + onError(token, 'MISSING_CHAR', message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case 'error': + onError(token, 'UNEXPECTED_TOKEN', token.message); + length += token.source.length; + break; + /* istanbul ignore next should not happen */ + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, 'UNEXPECTED_TOKEN', message); + const ts = token.source; + if (ts && typeof ts === 'string') + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; +} +/** @returns Array of lines split up as `[indent, content]` */ +function splitLines(source) { + const split = source.split(/\n( *)/); + const first = split[0]; + const m = first.match(/^( *)/); + const line0 = m?.[1] + ? [m[1], first.slice(m[1].length)] + : ['', first]; + const lines = [line0]; + for (let i = 1; i < split.length; i += 2) + lines.push([split[i], split[i + 1]]); + return lines; +} + +export { resolveBlockScalar }; diff --git a/tools/yaml/browser/dist/compose/resolve-block-seq.js b/tools/yaml/browser/dist/compose/resolve-block-seq.js new file mode 100644 index 0000000..3241ca7 --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-block-seq.js @@ -0,0 +1,46 @@ +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveProps } from './resolve-props.js'; +import { flowIndentCheck } from './util-flow-indent-check.js'; + +function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps(start, { + indicator: 'seq-item-ind', + next: value, + offset, + onError, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value && value.type === 'block-seq') + onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column'); + else + onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator'); + } + else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); + } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; +} + +export { resolveBlockSeq }; diff --git a/tools/yaml/browser/dist/compose/resolve-end.js b/tools/yaml/browser/dist/compose/resolve-end.js new file mode 100644 index 0000000..d5c65d7 --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-end.js @@ -0,0 +1,37 @@ +function resolveEnd(end, offset, reqSpace, onError) { + let comment = ''; + if (end) { + let hasSpace = false; + let sep = ''; + for (const token of end) { + const { source, type } = token; + switch (type) { + case 'space': + hasSpace = true; + break; + case 'comment': { + if (reqSpace && !hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += sep + cb; + sep = ''; + break; + } + case 'newline': + if (comment) + sep += source; + hasSpace = true; + break; + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); + } + offset += source.length; + } + } + return { comment, offset }; +} + +export { resolveEnd }; diff --git a/tools/yaml/browser/dist/compose/resolve-flow-collection.js b/tools/yaml/browser/dist/compose/resolve-flow-collection.js new file mode 100644 index 0000000..fdf929a --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-flow-collection.js @@ -0,0 +1,199 @@ +import { isPair } from '../nodes/identity.js'; +import { Pair } from '../nodes/Pair.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveEnd } from './resolve-end.js'; +import { resolveProps } from './resolve-props.js'; +import { containsNewline } from './util-contains-newline.js'; +import { mapIncludes } from './util-map-includes.js'; + +const blockMsg = 'Block collections are not allowed within flow collections'; +const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq'); +function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === '{'; + const fcName = isMap ? 'flow map' : 'flow sequence'; + const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq)); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep, value } = collItem; + const props = resolveProps(start, { + flow: fcName, + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep && !value) { + if (i === 0 && props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += '\n' + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; + } + if (!isMap && ctx.options.strict && containsNewline(key)) + onError(key, // checked by containsNewline() + 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + } + if (i === 0) { + if (props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + } + else { + if (!props.comma) + onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ''; + loop: for (const st of start) { + switch (st.type) { + case 'comma': + case 'space': + break; + case 'comment': + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += '\n' + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } + } + if (!isMap && !sep && !props.found) { + // item is a value in a seq + // → key & sep are empty, start does not include ? or : + const valueNode = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, sep, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else { + // item is a key+value pair + // key value + const keyStart = props.end; + const keyNode = key + ? composeNode(ctx, key, props, onError) + : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg); + // value properties + const valueProps = resolveProps(sep ?? [], { + flow: fcName, + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep) + for (const st of sep) { + if (st === valueProps.found) + break; + if (st.type === 'newline') { + onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key'); + } + } + else if (value) { + if ('source' in value && value.source && value.source[0] === ':') + onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`); + else + onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : valueProps.found + ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) + : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map = coll; + if (mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + map.items.push(pair); + } + else { + const map = new YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); + coll.items.push(map); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? '}' : ']'; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce && ce.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot + ? `${name} must end with a ${expectedEnd}` + : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += '\n' + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } + else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; +} + +export { resolveFlowCollection }; diff --git a/tools/yaml/browser/dist/compose/resolve-flow-scalar.js b/tools/yaml/browser/dist/compose/resolve-flow-scalar.js new file mode 100644 index 0000000..501cf39 --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-flow-scalar.js @@ -0,0 +1,223 @@ +import { Scalar } from '../nodes/Scalar.js'; +import { resolveEnd } from './resolve-end.js'; + +function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case 'scalar': + _type = Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case 'single-quoted-scalar': + _type = Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case 'double-quoted-scalar': + _type = Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + /* istanbul ignore next should not happen */ + default: + onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`); + return { + value: '', + type: null, + comment: '', + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re = resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; +} +function plainValue(source, onError) { + let badChar = ''; + switch (source[0]) { + /* istanbul ignore next should not happen */ + case '\t': + badChar = 'a tab character'; + break; + case ',': + badChar = 'flow indicator character ,'; + break; + case '%': + badChar = 'directive indicator character %'; + break; + case '|': + case '>': { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case '@': + case '`': { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`); + return foldLines(source); +} +function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, 'MISSING_CHAR', "Missing closing 'quote"); + return foldLines(source.slice(1, -1)).replace(/''/g, "'"); +} +function foldLines(source) { + /** + * The negative lookbehind here and in the `re` RegExp is to + * prevent causing a polynomial search time in certain cases. + * + * The try-catch is for Safari, which doesn't support this yet: + * https://caniuse.com/js-regexp-lookbehind + */ + let first, line; + try { + first = new RegExp('(.*?)(? wsStart ? source.slice(wsStart, i + 1) : ch; + } + else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, 'MISSING_CHAR', 'Missing closing "quote'); + return res; +} +/** + * Fold a single newline into a space, multiple newlines to N - 1 newlines. + * Presumes `source[offset] === '\n'` + */ +function foldNewline(source, offset) { + let fold = ''; + let ch = source[offset + 1]; + while (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') { + if (ch === '\r' && source[offset + 2] !== '\n') + break; + if (ch === '\n') + fold += '\n'; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = ' '; + return { fold, offset }; +} +const escapeCodes = { + '0': '\0', + a: '\x07', + b: '\b', + e: '\x1b', + f: '\f', + n: '\n', + r: '\r', + t: '\t', + v: '\v', + N: '\u0085', + _: '\u00a0', + L: '\u2028', + P: '\u2029', + ' ': ' ', + '"': '"', + '/': '/', + '\\': '\\', + '\t': '\t' +}; +function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`); + return raw; + } + return String.fromCodePoint(code); +} + +export { resolveFlowScalar }; diff --git a/tools/yaml/browser/dist/compose/resolve-props.js b/tools/yaml/browser/dist/compose/resolve-props.js new file mode 100644 index 0000000..ab30f56 --- /dev/null +++ b/tools/yaml/browser/dist/compose/resolve-props.js @@ -0,0 +1,134 @@ +function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ''; + let commentSep = ''; + let hasNewline = false; + let hasNewlineAfterProp = false; + let reqSpace = false; + let anchor = null; + let tag = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== 'space' && + token.type !== 'newline' && + token.type !== 'comma') + onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + reqSpace = false; + } + switch (token.type) { + case 'space': + // At the doc level, tabs at line start may be parsed + // as leading white space rather than indentation. + // In a flow collection, only the parser handles indent. + if (!flow && + atNewline && + indicator !== 'doc-start' && + token.source[0] === '\t') + onError(token, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + hasSpace = true; + break; + case 'comment': { + if (!hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = token.source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ''; + atNewline = false; + break; + } + case 'newline': + if (atNewline) { + if (comment) + comment += token.source; + else + spaceBefore = true; + } + else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + hasNewlineAfterProp = true; + hasSpace = true; + break; + case 'anchor': + if (anchor) + onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor'); + if (token.source.endsWith(':')) + onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true); + anchor = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case 'tag': { + if (tag) + onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag'); + tag = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + } + case indicator: + // Could here handle preceding comments differently + if (anchor || tag) + onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`); + found = token; + atNewline = false; + hasSpace = false; + break; + case 'comma': + if (flow) { + if (comma) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + // else fallthrough + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; + } + } + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && + next && + next.type !== 'space' && + next.type !== 'newline' && + next.type !== 'comma' && + (next.type !== 'scalar' || next.source !== '')) + onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + hasNewlineAfterProp, + anchor, + tag, + end, + start: start ?? end + }; +} + +export { resolveProps }; diff --git a/tools/yaml/browser/dist/compose/util-contains-newline.js b/tools/yaml/browser/dist/compose/util-contains-newline.js new file mode 100644 index 0000000..2d65390 --- /dev/null +++ b/tools/yaml/browser/dist/compose/util-contains-newline.js @@ -0,0 +1,34 @@ +function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case 'alias': + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + if (key.source.includes('\n')) + return true; + if (key.end) + for (const st of key.end) + if (st.type === 'newline') + return true; + return false; + case 'flow-collection': + for (const it of key.items) { + for (const st of it.start) + if (st.type === 'newline') + return true; + if (it.sep) + for (const st of it.sep) + if (st.type === 'newline') + return true; + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } + return false; + default: + return true; + } +} + +export { containsNewline }; diff --git a/tools/yaml/browser/dist/compose/util-empty-scalar-position.js b/tools/yaml/browser/dist/compose/util-empty-scalar-position.js new file mode 100644 index 0000000..ab6e0c9 --- /dev/null +++ b/tools/yaml/browser/dist/compose/util-empty-scalar-position.js @@ -0,0 +1,27 @@ +function emptyScalarPosition(offset, before, pos) { + if (before) { + if (pos === null) + pos = before.length; + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case 'space': + case 'comment': + case 'newline': + offset -= st.source.length; + continue; + } + // Technically, an empty scalar is immediately after the last non-empty + // node, but it's more useful to place it after any whitespace. + st = before[++i]; + while (st?.type === 'space') { + offset += st.source.length; + st = before[++i]; + } + break; + } + } + return offset; +} + +export { emptyScalarPosition }; diff --git a/tools/yaml/browser/dist/compose/util-flow-indent-check.js b/tools/yaml/browser/dist/compose/util-flow-indent-check.js new file mode 100644 index 0000000..c20e670 --- /dev/null +++ b/tools/yaml/browser/dist/compose/util-flow-indent-check.js @@ -0,0 +1,15 @@ +import { containsNewline } from './util-contains-newline.js'; + +function flowIndentCheck(indent, fc, onError) { + if (fc?.type === 'flow-collection') { + const end = fc.end[0]; + if (end.indent === indent && + (end.source === ']' || end.source === '}') && + containsNewline(fc)) { + const msg = 'Flow end indicator should be more indented than parent'; + onError(end, 'BAD_INDENT', msg, true); + } + } +} + +export { flowIndentCheck }; diff --git a/tools/yaml/browser/dist/compose/util-map-includes.js b/tools/yaml/browser/dist/compose/util-map-includes.js new file mode 100644 index 0000000..4e7c269 --- /dev/null +++ b/tools/yaml/browser/dist/compose/util-map-includes.js @@ -0,0 +1,17 @@ +import { isScalar } from '../nodes/identity.js'; + +function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === 'function' + ? uniqueKeys + : (a, b) => a === b || + (isScalar(a) && + isScalar(b) && + a.value === b.value && + !(a.value === '<<' && ctx.schema.merge)); + return items.some(pair => isEqual(pair.key, search)); +} + +export { mapIncludes }; diff --git a/tools/yaml/browser/dist/doc/Document.js b/tools/yaml/browser/dist/doc/Document.js new file mode 100644 index 0000000..ad63426 --- /dev/null +++ b/tools/yaml/browser/dist/doc/Document.js @@ -0,0 +1,334 @@ +import { Alias } from '../nodes/Alias.js'; +import { isEmptyPath, collectionFromPath } from '../nodes/Collection.js'; +import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.js'; +import { Pair } from '../nodes/Pair.js'; +import { toJS } from '../nodes/toJS.js'; +import { Schema } from '../schema/Schema.js'; +import { stringifyDocument } from '../stringify/stringifyDocument.js'; +import { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.js'; +import { applyReviver } from './applyReviver.js'; +import { createNode } from './createNode.js'; +import { Directives } from './directives.js'; + +class Document { + constructor(value, replacer, options) { + /** A comment before this Document */ + this.commentBefore = null; + /** A comment immediately after this Document */ + this.comment = null; + /** Errors encountered during parsing. */ + this.errors = []; + /** Warnings encountered during parsing. */ + this.warnings = []; + Object.defineProperty(this, NODE_TYPE, { value: DOC }); + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: 'warn', + prettyErrors: true, + strict: true, + uniqueKeys: true, + version: '1.2' + }, options); + this.options = opt; + let { version } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version = this.directives.yaml.version; + } + else + this.directives = new Directives({ version }); + this.setSchema(version, options); + // @ts-expect-error We can't really know that this matches Contents. + this.contents = + value === undefined ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(Document.prototype, { + [NODE_TYPE]: { value: DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + // @ts-expect-error We can't really know that this matches Contents. + copy.contents = isNode(this.contents) + ? this.contents.clone(copy.schema) + : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchorNames(this); + node.anchor = + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? findNewAnchor(name || 'a', prev) : name; + } + return new Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = undefined; + if (typeof replacer === 'function') { + value = replacer.call({ '': value }, '', value); + _replacer = replacer; + } + else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || 'a'); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode(value, tag, ctx); + if (flow && isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + if (isEmptyPath(path)) { + if (this.contents == null) + return false; + // @ts-expect-error Presumed impossible if Strict extends false + this.contents = null; + return true; + } + return assertCollection(this.contents) + ? this.contents.deleteIn(path) + : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return isCollection(this.contents) + ? this.contents.get(key, keepScalar) + : undefined; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + if (isEmptyPath(path)) + return !keepScalar && isScalar(this.contents) + ? this.contents.value + : this.contents; + return isCollection(this.contents) + ? this.contents.getIn(path, keepScalar) + : undefined; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path) { + if (isEmptyPath(path)) + return this.contents !== undefined; + return isCollection(this.contents) ? this.contents.hasIn(path) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = collectionFromPath(this.schema, [key], value); + } + else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + if (isEmptyPath(path)) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = value; + } + else if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = collectionFromPath(this.schema, Array.from(path), value); + } + else if (assertCollection(this.contents)) { + this.contents.setIn(path, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version, options = {}) { + if (typeof version === 'number') + version = String(version); + let opt; + switch (version) { + case '1.1': + if (this.directives) + this.directives.yaml.version = '1.1'; + else + this.directives = new Directives({ version: '1.1' }); + opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' }; + break; + case '1.2': + case 'next': + if (this.directives) + this.directives.yaml.version = version; + else + this.directives = new Directives({ version }); + opt = { merge: false, resolveKnownTags: true, schema: 'core' }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + // Not using `instanceof Schema` to allow for duck typing + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS(this.contents, jsonArg ?? '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver(reviver, { '': res }, '', res) + : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error('Document with errors cannot be stringified'); + if ('indent' in options && + (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument(this, options); + } +} +function assertCollection(contents) { + if (isCollection(contents)) + return true; + throw new Error('Expected a YAML collection as document contents'); +} + +export { Document }; diff --git a/tools/yaml/browser/dist/doc/anchors.js b/tools/yaml/browser/dist/doc/anchors.js new file mode 100644 index 0000000..03c2442 --- /dev/null +++ b/tools/yaml/browser/dist/doc/anchors.js @@ -0,0 +1,72 @@ +import { isScalar, isCollection } from '../nodes/identity.js'; +import { visit } from '../visit.js'; + +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; +} +function anchorNames(root) { + const anchors = new Set(); + visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; +} +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; + } +} +function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + if (!prevAnchors) + prevAnchors = anchorNames(doc); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === 'object' && + ref.anchor && + (isScalar(ref.node) || isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } + else { + const error = new Error('Failed to resolve repeated object (this should not happen)'); + error.source = source; + throw error; + } + } + }, + sourceObjects + }; +} + +export { anchorIsValid, anchorNames, createNodeAnchors, findNewAnchor }; diff --git a/tools/yaml/browser/dist/doc/applyReviver.js b/tools/yaml/browser/dist/doc/applyReviver.js new file mode 100644 index 0000000..0e6a93c --- /dev/null +++ b/tools/yaml/browser/dist/doc/applyReviver.js @@ -0,0 +1,54 @@ +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +function applyReviver(reviver, obj, key, val) { + if (val && typeof val === 'object') { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v1 = applyReviver(reviver, val, String(i), v0); + if (v1 === undefined) + delete val[i]; + else if (v1 !== v0) + val[i] = v1; + } + } + else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + val.delete(k); + else if (v1 !== v0) + val.set(k, v1); + } + } + else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === undefined) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } + else { + for (const [k, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + delete val[k]; + else if (v1 !== v0) + val[k] = v1; + } + } + } + return reviver.call(obj, key, val); +} + +export { applyReviver }; diff --git a/tools/yaml/browser/dist/doc/createNode.js b/tools/yaml/browser/dist/doc/createNode.js new file mode 100644 index 0000000..1392269 --- /dev/null +++ b/tools/yaml/browser/dist/doc/createNode.js @@ -0,0 +1,89 @@ +import { Alias } from '../nodes/Alias.js'; +import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; + +const defaultTagPrefix = 'tag:yaml.org,2002:'; +function findTagObject(value, tagName, tags) { + if (tagName) { + const match = tags.filter(t => t.tag === tagName); + const tagObj = match.find(t => !t.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find(t => t.identify?.(value) && !t.format); +} +function createNode(value, tagName, ctx) { + if (isDocument(value)) + value = value.contents; + if (isNode(value)) + return value; + if (isPair(value)) { + const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; + } + if (value instanceof String || + value instanceof Number || + value instanceof Boolean || + (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere + ) { + // https://tc39.es/ecma262/#sec-serializejsonproperty + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + // Detect duplicate references to the same object & use Alias nodes for all + // after first. The `ref` wrapper allows for circular references to resolve. + let ref = undefined; + if (aliasDuplicateObjects && value && typeof value === 'object') { + ref = sourceObjects.get(value); + if (ref) { + if (!ref.anchor) + ref.anchor = onAnchor(value); + return new Alias(ref.anchor); + } + else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } + } + if (tagName?.startsWith('!!')) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + value = value.toJSON(); + } + if (!value || typeof value !== 'object') { + const node = new Scalar(value); + if (ref) + ref.node = node; + return node; + } + tagObj = + value instanceof Map + ? schema[MAP] + : Symbol.iterator in Object(value) + ? schema[SEQ] + : schema[MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode + ? tagObj.createNode(ctx.schema, value, ctx) + : typeof tagObj?.nodeClass?.from === 'function' + ? tagObj.nodeClass.from(ctx.schema, value, ctx) + : new Scalar(value); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; +} + +export { createNode }; diff --git a/tools/yaml/browser/dist/doc/directives.js b/tools/yaml/browser/dist/doc/directives.js new file mode 100644 index 0000000..d8b9686 --- /dev/null +++ b/tools/yaml/browser/dist/doc/directives.js @@ -0,0 +1,169 @@ +import { isNode } from '../nodes/identity.js'; +import { visit } from '../visit.js'; + +const escapeChars = { + '!': '%21', + ',': '%2C', + '[': '%5B', + ']': '%5D', + '{': '%7B', + '}': '%7D' +}; +const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]); +class Directives { + constructor(yaml, tags) { + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + this.docStart = null; + /** The doc-end marker `...`. */ + this.docEnd = false; + this.yaml = Object.assign({}, Directives.defaultYaml, yaml); + this.tags = Object.assign({}, Directives.defaultTags, tags); + } + clone() { + const copy = new Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case '1.1': + this.atNextDocument = true; + break; + case '1.2': + this.atNextDocument = false; + this.yaml = { + explicit: Directives.defaultYaml.explicit, + version: '1.2' + }; + this.tags = Object.assign({}, Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' }; + this.tags = Object.assign({}, Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case '%TAG': { + if (parts.length !== 2) { + onError(0, '%TAG directive should contain exactly two parts'); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case '%YAML': { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, '%YAML directive should contain exactly one part'); + return false; + } + const [version] = parts; + if (version === '1.1' || version === '1.2') { + this.yaml.version = version; + return true; + } + else { + const isValid = /^\d+\.\d+$/.test(version); + onError(6, `Unsupported YAML version ${version}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === '!') + return '!'; // non-specific tag + if (source[0] !== '!') { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === '<') { + const verbatim = source.slice(2, -1); + if (verbatim === '!' || verbatim === '!!') { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== '>') + onError('Verbatim tags must end with a >'); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) + return prefix + decodeURIComponent(suffix); + if (handle === '!') + return source; // local tag + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === '!' ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit + ? [`%YAML ${this.yaml.version || '1.2'}`] + : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && isNode(doc.contents)) { + const tags = {}; + visit(doc.contents, (_key, node) => { + if (isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } + else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === '!!' && prefix === 'tag:yaml.org,2002:') + continue; + if (!doc || tagNames.some(tn => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join('\n'); + } +} +Directives.defaultYaml = { explicit: false, version: '1.2' }; +Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' }; + +export { Directives }; diff --git a/tools/yaml/browser/dist/errors.js b/tools/yaml/browser/dist/errors.js new file mode 100644 index 0000000..ad91290 --- /dev/null +++ b/tools/yaml/browser/dist/errors.js @@ -0,0 +1,57 @@ +class YAMLError extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; + } +} +class YAMLParseError extends YAMLError { + constructor(pos, code, message) { + super('YAMLParseError', pos, code, message); + } +} +class YAMLWarning extends YAMLError { + constructor(pos, code, message) { + super('YAMLWarning', pos, code, message); + } +} +const prettifyError = (src, lc) => (error) => { + if (error.pos[0] === -1) + return; + error.linePos = error.pos.map(pos => lc.linePos(pos)); + const { line, col } = error.linePos[0]; + error.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src + .substring(lc.lineStarts[line - 1], lc.lineStarts[line]) + .replace(/[\n\r]+$/, ''); + // Trim to max 80 chars, keeping col position near the middle + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = '…' + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + '…'; + // Include previous line in context if pointing at line start + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + // Regexp won't match if start is trimmed + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + '…\n'; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count = 1; + const end = error.linePos[1]; + if (end && end.line === line && end.col > col) { + count = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = ' '.repeat(ci) + '^'.repeat(count); + error.message += `:\n\n${lineStr}\n${pointer}\n`; + } +}; + +export { YAMLError, YAMLParseError, YAMLWarning, prettifyError }; diff --git a/tools/yaml/browser/dist/index.js b/tools/yaml/browser/dist/index.js new file mode 100644 index 0000000..097bf24 --- /dev/null +++ b/tools/yaml/browser/dist/index.js @@ -0,0 +1,17 @@ +export { Composer } from './compose/composer.js'; +export { Document } from './doc/Document.js'; +export { Schema } from './schema/Schema.js'; +export { YAMLError, YAMLParseError, YAMLWarning } from './errors.js'; +export { Alias } from './nodes/Alias.js'; +export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js'; +export { Pair } from './nodes/Pair.js'; +export { Scalar } from './nodes/Scalar.js'; +export { YAMLMap } from './nodes/YAMLMap.js'; +export { YAMLSeq } from './nodes/YAMLSeq.js'; +import * as cst from './parse/cst.js'; +export { cst as CST }; +export { Lexer } from './parse/lexer.js'; +export { LineCounter } from './parse/line-counter.js'; +export { Parser } from './parse/parser.js'; +export { parse, parseAllDocuments, parseDocument, stringify } from './public-api.js'; +export { visit, visitAsync } from './visit.js'; diff --git a/tools/yaml/browser/dist/log.js b/tools/yaml/browser/dist/log.js new file mode 100644 index 0000000..c5f8998 --- /dev/null +++ b/tools/yaml/browser/dist/log.js @@ -0,0 +1,16 @@ +function debug(logLevel, ...messages) { + if (logLevel === 'debug') + console.log(...messages); +} +function warn(logLevel, warning) { + if (logLevel === 'debug' || logLevel === 'warn') { + // https://github.com/typescript-eslint/typescript-eslint/issues/7478 + // eslint-disable-next-line @typescript-eslint/prefer-optional-chain + if (typeof process !== 'undefined' && process.emitWarning) + process.emitWarning(warning); + else + console.warn(warning); + } +} + +export { debug, warn }; diff --git a/tools/yaml/browser/dist/node_modules/tslib/tslib.es6.js b/tools/yaml/browser/dist/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..9c794c5 --- /dev/null +++ b/tools/yaml/browser/dist/node_modules/tslib/tslib.es6.js @@ -0,0 +1,21 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +export { __classPrivateFieldGet }; diff --git a/tools/yaml/browser/dist/nodes/Alias.js b/tools/yaml/browser/dist/nodes/Alias.js new file mode 100644 index 0000000..8e34f09 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/Alias.js @@ -0,0 +1,101 @@ +import { anchorIsValid } from '../doc/anchors.js'; +import { visit } from '../visit.js'; +import { ALIAS, isAlias, isCollection, isPair } from './identity.js'; +import { NodeBase } from './Node.js'; +import { toJS } from './toJS.js'; + +class Alias extends NodeBase { + constructor(source) { + super(ALIAS); + this.source = source; + Object.defineProperty(this, 'tag', { + set() { + throw new Error('Alias nodes cannot have tags'); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc) { + let found = undefined; + visit(doc, { + Node: (_key, node) => { + if (node === this) + return visit.BREAK; + if (node.anchor === this.source) + found = node; + } + }); + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors, doc, maxAliasCount } = ctx; + const source = this.resolve(doc); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data = anchors.get(source); + if (!data) { + // Resolve anchors for Node.prototype.toJS() + toJS(source, null, ctx); + data = anchors.get(source); + } + /* istanbul ignore if */ + if (!data || data.res === undefined) { + const msg = 'This should not happen: Alias anchor was not resolved?'; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, source, anchors); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = 'Excessive alias count indicates a resource exhaustion attack'; + throw new ReferenceError(msg); + } + } + return data.res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } +} +function getAliasCount(doc, node, anchors) { + if (isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors && source && anchors.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } + else if (isCollection(node)) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors); + if (c > count) + count = c; + } + return count; + } + else if (isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors); + const vc = getAliasCount(doc, node.value, anchors); + return Math.max(kc, vc); + } + return 1; +} + +export { Alias }; diff --git a/tools/yaml/browser/dist/nodes/Collection.js b/tools/yaml/browser/dist/nodes/Collection.js new file mode 100644 index 0000000..a5f89be --- /dev/null +++ b/tools/yaml/browser/dist/nodes/Collection.js @@ -0,0 +1,148 @@ +import { createNode } from '../doc/createNode.js'; +import { isNode, isPair, isCollection, isScalar } from './identity.js'; +import { NodeBase } from './Node.js'; + +function collectionFromPath(schema, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (typeof k === 'number' && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } + else { + v = new Map([[k, v]]); + } + } + return createNode(v, undefined, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error('This should not happen, please report a bug.'); + }, + schema, + sourceObjects: new Map() + }); +} +// Type guard is intentionally a little wrong so as to be more useful, +// as it does not cover untypable empty non-string iterables (e.g. []). +const isEmptyPath = (path) => path == null || + (typeof path === 'object' && !!path[Symbol.iterator]().next().done); +class Collection extends NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, 'schema', { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path, value) { + if (isEmptyPath(path)) + this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (isCollection(node)) + node.addIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + const [key, ...rest] = path; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && isScalar(node) ? node.value : node; + else + return isCollection(node) ? node.getIn(rest, keepScalar) : undefined; + } + hasAllNullValues(allowScalar) { + return this.items.every(node => { + if (!isPair(node)) + return false; + const n = node.value; + return (n == null || + (allowScalar && + isScalar(n) && + n.value == null && + !n.commentBefore && + !n.comment && + !n.tag)); + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return isCollection(node) ? node.hasIn(rest) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + const [key, ...rest] = path; + if (rest.length === 0) { + this.set(key, value); + } + else { + const node = this.get(key, true); + if (isCollection(node)) + node.setIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } +} +Collection.maxFlowStringSingleLineLength = 60; + +export { Collection, collectionFromPath, isEmptyPath }; diff --git a/tools/yaml/browser/dist/nodes/Node.js b/tools/yaml/browser/dist/nodes/Node.js new file mode 100644 index 0000000..b0eb96b --- /dev/null +++ b/tools/yaml/browser/dist/nodes/Node.js @@ -0,0 +1,38 @@ +import { applyReviver } from '../doc/applyReviver.js'; +import { NODE_TYPE, isDocument } from './identity.js'; +import { toJS } from './toJS.js'; + +class NodeBase { + constructor(type) { + Object.defineProperty(this, NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!isDocument(doc)) + throw new TypeError('A document argument is required'); + const ctx = { + anchors: new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS(this, '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver(reviver, { '': res }, '', res) + : res; + } +} + +export { NodeBase }; diff --git a/tools/yaml/browser/dist/nodes/Pair.js b/tools/yaml/browser/dist/nodes/Pair.js new file mode 100644 index 0000000..6e419f6 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/Pair.js @@ -0,0 +1,36 @@ +import { createNode } from '../doc/createNode.js'; +import { stringifyPair } from '../stringify/stringifyPair.js'; +import { addPairToJSMap } from './addPairToJSMap.js'; +import { NODE_TYPE, PAIR, isNode } from './identity.js'; + +function createPair(key, value, ctx) { + const k = createNode(key, undefined, ctx); + const v = createNode(value, undefined, ctx); + return new Pair(k, v); +} +class Pair { + constructor(key, value = null) { + Object.defineProperty(this, NODE_TYPE, { value: PAIR }); + this.key = key; + this.value = value; + } + clone(schema) { + let { key, value } = this; + if (isNode(key)) + key = key.clone(schema); + if (isNode(value)) + value = value.clone(schema); + return new Pair(key, value); + } + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? new Map() : {}; + return addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc + ? stringifyPair(this, ctx, onComment, onChompKeep) + : JSON.stringify(this); + } +} + +export { Pair, createPair }; diff --git a/tools/yaml/browser/dist/nodes/Scalar.js b/tools/yaml/browser/dist/nodes/Scalar.js new file mode 100644 index 0000000..a9f2673 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/Scalar.js @@ -0,0 +1,24 @@ +import { SCALAR } from './identity.js'; +import { NodeBase } from './Node.js'; +import { toJS } from './toJS.js'; + +const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); +class Scalar extends NodeBase { + constructor(value) { + super(SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } +} +Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; +Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; +Scalar.PLAIN = 'PLAIN'; +Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; +Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; + +export { Scalar, isScalarValue }; diff --git a/tools/yaml/browser/dist/nodes/YAMLMap.js b/tools/yaml/browser/dist/nodes/YAMLMap.js new file mode 100644 index 0000000..5d88737 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/YAMLMap.js @@ -0,0 +1,144 @@ +import { stringifyCollection } from '../stringify/stringifyCollection.js'; +import { addPairToJSMap } from './addPairToJSMap.js'; +import { Collection } from './Collection.js'; +import { isPair, isScalar, MAP } from './identity.js'; +import { Pair, createPair } from './Pair.js'; +import { isScalarValue } from './Scalar.js'; + +function findPair(items, key) { + const k = isScalar(key) ? key.value : key; + for (const it of items) { + if (isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (isScalar(it.key) && it.key.value === k) + return it; + } + } + return undefined; +} +class YAMLMap extends Collection { + static get tagName() { + return 'tag:yaml.org,2002:map'; + } + constructor(schema) { + super(MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map = new this(schema); + const add = (key, value) => { + if (typeof replacer === 'function') + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== undefined || keepUndefined) + map.items.push(createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } + else if (obj && typeof obj === 'object') { + for (const key of Object.keys(obj)) + add(key, obj[key]); + } + if (typeof schema.sortMapEntries === 'function') { + map.items.sort(schema.sortMapEntries); + } + return map; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== 'object' || !('key' in pair)) { + // In TypeScript, this never happens. + _pair = new Pair(pair, pair?.value); + } + else + _pair = new Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + // For scalars, keep the old node & its comments and anchors + if (isScalar(prev.value) && isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } + else if (sortEntries) { + const i = this.items.findIndex(item => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } + else { + this.items.push(_pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && isScalar(node) ? node.value : node) ?? undefined; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map); + for (const item of this.items) + addPairToJSMap(ctx, map, item); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection(this, ctx, { + blockItemPrefix: '', + flowChars: { start: '{', end: '}' }, + itemIndent: ctx.indent || '', + onChompKeep, + onComment + }); + } +} + +export { YAMLMap, findPair }; diff --git a/tools/yaml/browser/dist/nodes/YAMLSeq.js b/tools/yaml/browser/dist/nodes/YAMLSeq.js new file mode 100644 index 0000000..b80de40 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/YAMLSeq.js @@ -0,0 +1,113 @@ +import { createNode } from '../doc/createNode.js'; +import { stringifyCollection } from '../stringify/stringifyCollection.js'; +import { Collection } from './Collection.js'; +import { SEQ, isScalar } from './identity.js'; +import { isScalarValue } from './Scalar.js'; +import { toJS } from './toJS.js'; + +class YAMLSeq extends Collection { + static get tagName() { + return 'tag:yaml.org,2002:seq'; + } + constructor(schema) { + super(SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return undefined; + const it = this.items[idx]; + return !keepScalar && isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === 'number' && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (isScalar(prev) && isScalarValue(value)) + prev.value = value; + else + this.items[idx] = value; + } + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection(this, ctx, { + blockItemPrefix: '- ', + flowChars: { start: '[', end: ']' }, + itemIndent: (ctx.indent || '') + ' ', + onChompKeep, + onComment + }); + } + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === 'function') { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode(it, undefined, ctx)); + } + } + return seq; + } +} +function asItemIndex(key) { + let idx = isScalar(key) ? key.value : key; + if (idx && typeof idx === 'string') + idx = Number(idx); + return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0 + ? idx + : null; +} + +export { YAMLSeq }; diff --git a/tools/yaml/browser/dist/nodes/addPairToJSMap.js b/tools/yaml/browser/dist/nodes/addPairToJSMap.js new file mode 100644 index 0000000..680dcea --- /dev/null +++ b/tools/yaml/browser/dist/nodes/addPairToJSMap.js @@ -0,0 +1,104 @@ +import { warn } from '../log.js'; +import { createStringifyContext } from '../stringify/stringify.js'; +import { isAlias, isSeq, isScalar, isMap, isNode } from './identity.js'; +import { Scalar } from './Scalar.js'; +import { toJS } from './toJS.js'; + +const MERGE_KEY = '<<'; +function addPairToJSMap(ctx, map, { key, value }) { + if (ctx?.doc.schema.merge && isMergeKey(key)) { + value = isAlias(value) ? value.resolve(ctx.doc) : value; + if (isSeq(value)) + for (const it of value.items) + mergeToJSMap(ctx, map, it); + else if (Array.isArray(value)) + for (const it of value) + mergeToJSMap(ctx, map, it); + else + mergeToJSMap(ctx, map, value); + } + else { + const jsKey = toJS(key, '', ctx); + if (map instanceof Map) { + map.set(jsKey, toJS(value, jsKey, ctx)); + } + else if (map instanceof Set) { + map.add(jsKey); + } + else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS(value, stringKey, ctx); + if (stringKey in map) + Object.defineProperty(map, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map[stringKey] = jsValue; + } + } + return map; +} +const isMergeKey = (key) => key === MERGE_KEY || + (isScalar(key) && + key.value === MERGE_KEY && + (!key.type || key.type === Scalar.PLAIN)); +// If the value associated with a merge key is a single mapping node, each of +// its key/value pairs is inserted into the current mapping, unless the key +// already exists in it. If the value associated with the merge key is a +// sequence, then this sequence is expected to contain mapping nodes and each +// of these nodes is merged in turn according to its order in the sequence. +// Keys in mapping nodes earlier in the sequence override keys specified in +// later mapping nodes. -- http://yaml.org/type/merge.html +function mergeToJSMap(ctx, map, value) { + const source = ctx && isAlias(value) ? value.resolve(ctx.doc) : value; + if (!isMap(source)) + throw new Error('Merge sources must be maps or map aliases'); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value); + } + else if (map instanceof Set) { + map.add(key); + } + else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; +} +function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ''; + if (typeof jsKey !== 'object') + return String(jsKey); + if (isNode(key) && ctx?.doc) { + const strCtx = createStringifyContext(ctx.doc, {}); + strCtx.anchors = new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); +} + +export { addPairToJSMap }; diff --git a/tools/yaml/browser/dist/nodes/identity.js b/tools/yaml/browser/dist/nodes/identity.js new file mode 100644 index 0000000..7b79920 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/identity.js @@ -0,0 +1,36 @@ +const ALIAS = Symbol.for('yaml.alias'); +const DOC = Symbol.for('yaml.document'); +const MAP = Symbol.for('yaml.map'); +const PAIR = Symbol.for('yaml.pair'); +const SCALAR = Symbol.for('yaml.scalar'); +const SEQ = Symbol.for('yaml.seq'); +const NODE_TYPE = Symbol.for('yaml.node.type'); +const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS; +const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC; +const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP; +const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR; +const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR; +const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ; +function isCollection(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; +} +function isNode(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; +} +const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + +export { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq }; diff --git a/tools/yaml/browser/dist/nodes/toJS.js b/tools/yaml/browser/dist/nodes/toJS.js new file mode 100644 index 0000000..0ca6250 --- /dev/null +++ b/tools/yaml/browser/dist/nodes/toJS.js @@ -0,0 +1,37 @@ +import { hasAnchor } from './identity.js'; + +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +function toJS(value, arg, ctx) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + if (!ctx || !hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: undefined }; + ctx.anchors.set(value, data); + ctx.onCreate = res => { + data.res = res; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value === 'bigint' && !ctx?.keep) + return Number(value); + return value; +} + +export { toJS }; diff --git a/tools/yaml/browser/dist/parse/cst-scalar.js b/tools/yaml/browser/dist/parse/cst-scalar.js new file mode 100644 index 0000000..d4def99 --- /dev/null +++ b/tools/yaml/browser/dist/parse/cst-scalar.js @@ -0,0 +1,214 @@ +import { resolveBlockScalar } from '../compose/resolve-block-scalar.js'; +import { resolveFlowScalar } from '../compose/resolve-flow-scalar.js'; +import { YAMLParseError } from '../errors.js'; +import { stringifyString } from '../stringify/stringifyString.js'; + +function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return resolveFlowScalar(token, strict, _onError); + case 'block-scalar': + return resolveBlockScalar(token, strict, _onError); + } + } + return null; +} +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context; + const source = stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: 'newline', offset: -1, indent, source: '\n' } + ]; + switch (source[0]) { + case '|': + case '>': { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + return { type: 'block-scalar', offset, indent, props, source: body }; + } + case '"': + return { type: 'double-quoted-scalar', offset, indent, source, end }; + case "'": + return { type: 'single-quoted-scalar', offset, indent, source, end }; + default: + return { type: 'scalar', offset, indent, source, end }; + } +} +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = 'indent' in token ? token.indent : null; + if (afterKey && typeof indent === 'number') + indent += 2; + if (!type) + switch (token.type) { + case 'single-quoted-scalar': + type = 'QUOTE_SINGLE'; + break; + case 'double-quoted-scalar': + type = 'QUOTE_DOUBLE'; + break; + case 'block-scalar': { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL'; + break; + } + default: + type = 'PLAIN'; + } + const source = stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case '|': + case '>': + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, 'double-quoted-scalar'); + break; + case "'": + setFlowScalarValue(token, source, 'single-quoted-scalar'); + break; + default: + setFlowScalarValue(token, source, 'scalar'); + } +} +function setBlockScalarValue(token, source) { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + if (token.type === 'block-scalar') { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + header.source = head; + token.source = body; + } + else { + const { offset } = token; + const indent = 'indent' in token ? token.indent : -1; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type: 'block-scalar', indent, props, source: body }); + } +} +/** @returns `true` if last token is a newline */ +function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case 'space': + case 'comment': + props.push(st); + break; + case 'newline': + props.push(st); + return true; + } + return false; +} +function setFlowScalarValue(token, source, type) { + switch (token.type) { + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + token.type = type; + token.source = source; + break; + case 'block-scalar': { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === 'block-scalar-header') + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; + } + case 'block-map': + case 'block-seq': { + const offset = token.offset + source.length; + const nl = { type: 'newline', offset, indent: token.indent, source: '\n' }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = 'indent' in token ? token.indent : -1; + const end = 'end' in token && Array.isArray(token.end) + ? token.end.filter(st => st.type === 'space' || + st.type === 'comment' || + st.type === 'newline') + : []; + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type, indent, source, end }); + } + } +} + +export { createScalarToken, resolveAsScalar, setScalarValue }; diff --git a/tools/yaml/browser/dist/parse/cst-stringify.js b/tools/yaml/browser/dist/parse/cst-stringify.js new file mode 100644 index 0000000..d6ab58c --- /dev/null +++ b/tools/yaml/browser/dist/parse/cst-stringify.js @@ -0,0 +1,61 @@ +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst); +function stringifyToken(token) { + switch (token.type) { + case 'block-scalar': { + let res = ''; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case 'block-map': + case 'block-seq': { + let res = ''; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case 'flow-collection': { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case 'document': { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; + } + default: { + let res = token.source; + if ('end' in token && token.end) + for (const st of token.end) + res += st.source; + return res; + } + } +} +function stringifyItem({ start, key, sep, value }) { + let res = ''; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep) + for (const st of sep) + res += st.source; + if (value) + res += stringifyToken(value); + return res; +} + +export { stringify }; diff --git a/tools/yaml/browser/dist/parse/cst-visit.js b/tools/yaml/browser/dist/parse/cst-visit.js new file mode 100644 index 0000000..deca086 --- /dev/null +++ b/tools/yaml/browser/dist/parse/cst-visit.js @@ -0,0 +1,97 @@ +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove item'); +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +function visit(cst, visitor) { + if ('type' in cst && cst.type === 'document') + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current item */ +visit.SKIP = SKIP; +/** Remove the current item */ +visit.REMOVE = REMOVE; +/** Find the item at `path` from `cst` as the root */ +visit.itemAtPath = (cst, path) => { + let item = cst; + for (const [field, index] of path) { + const tok = item?.[field]; + if (tok && 'items' in tok) { + item = tok.items[index]; + } + else + return undefined; + } + return item; +}; +/** + * Get the immediate parent collection of the item at `path` from `cst` as the root. + * + * Throws an error if the collection is not found, which should never happen if the item itself exists. + */ +visit.parentCollection = (cst, path) => { + const parent = visit.itemAtPath(cst, path.slice(0, -1)); + const field = path[path.length - 1][0]; + const coll = parent?.[field]; + if (coll && 'items' in coll) + return coll; + throw new Error('Parent collection not found'); +}; +function _visit(path, item, visitor) { + let ctrl = visitor(item, path); + if (typeof ctrl === 'symbol') + return ctrl; + for (const field of ['key', 'value']) { + const token = item[field]; + if (token && 'items' in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === 'function' && field === 'key') + ctrl = ctrl(item, path); + } + } + return typeof ctrl === 'function' ? ctrl(item, path) : ctrl; +} + +export { visit }; diff --git a/tools/yaml/browser/dist/parse/cst.js b/tools/yaml/browser/dist/parse/cst.js new file mode 100644 index 0000000..8bb2f4a --- /dev/null +++ b/tools/yaml/browser/dist/parse/cst.js @@ -0,0 +1,98 @@ +export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js'; +export { stringify } from './cst-stringify.js'; +export { visit } from './cst-visit.js'; + +/** The byte order mark */ +const BOM = '\u{FEFF}'; +/** Start of doc-mode */ +const DOCUMENT = '\x02'; // C0: Start of Text +/** Unexpected end of flow-mode */ +const FLOW_END = '\x18'; // C0: Cancel +/** Next token is a scalar value */ +const SCALAR = '\x1f'; // C0: Unit Separator +/** @returns `true` if `token` is a flow or block collection */ +const isCollection = (token) => !!token && 'items' in token; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +const isScalar = (token) => !!token && + (token.type === 'scalar' || + token.type === 'single-quoted-scalar' || + token.type === 'double-quoted-scalar' || + token.type === 'block-scalar'); +/* istanbul ignore next */ +/** Get a printable representation of a lexer token */ +function prettyToken(token) { + switch (token) { + case BOM: + return ''; + case DOCUMENT: + return ''; + case FLOW_END: + return ''; + case SCALAR: + return ''; + default: + return JSON.stringify(token); + } +} +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +function tokenType(source) { + switch (source) { + case BOM: + return 'byte-order-mark'; + case DOCUMENT: + return 'doc-mode'; + case FLOW_END: + return 'flow-error-end'; + case SCALAR: + return 'scalar'; + case '---': + return 'doc-start'; + case '...': + return 'doc-end'; + case '': + case '\n': + case '\r\n': + return 'newline'; + case '-': + return 'seq-item-ind'; + case '?': + return 'explicit-key-ind'; + case ':': + return 'map-value-ind'; + case '{': + return 'flow-map-start'; + case '}': + return 'flow-map-end'; + case '[': + return 'flow-seq-start'; + case ']': + return 'flow-seq-end'; + case ',': + return 'comma'; + } + switch (source[0]) { + case ' ': + case '\t': + return 'space'; + case '#': + return 'comment'; + case '%': + return 'directive-line'; + case '*': + return 'alias'; + case '&': + return 'anchor'; + case '!': + return 'tag'; + case "'": + return 'single-quoted-scalar'; + case '"': + return 'double-quoted-scalar'; + case '|': + case '>': + return 'block-scalar-header'; + } + return null; +} + +export { BOM, DOCUMENT, FLOW_END, SCALAR, isCollection, isScalar, prettyToken, tokenType }; diff --git a/tools/yaml/browser/dist/parse/lexer.js b/tools/yaml/browser/dist/parse/lexer.js new file mode 100644 index 0000000..20fe13c --- /dev/null +++ b/tools/yaml/browser/dist/parse/lexer.js @@ -0,0 +1,701 @@ +import { BOM, DOCUMENT, FLOW_END, SCALAR } from './cst.js'; + +/* +START -> stream + +stream + directive -> line-end -> stream + indent + line-end -> stream + [else] -> line-start + +line-end + comment -> line-end + newline -> . + input-end -> END + +line-start + doc-start -> doc + doc-end -> stream + [else] -> indent -> block-start + +block-start + seq-item-start -> block-start + explicit-key-start -> block-start + map-value-start -> block-start + [else] -> doc + +doc + line-end -> line-start + spaces -> doc + anchor -> doc + tag -> doc + flow-start -> flow -> doc + flow-end -> error -> doc + seq-item-start -> error -> doc + explicit-key-start -> error -> doc + map-value-start -> doc + alias -> doc + quote-start -> quoted-scalar -> doc + block-scalar-header -> line-end -> block-scalar(min) -> line-start + [else] -> plain-scalar(false, min) -> doc + +flow + line-end -> flow + spaces -> flow + anchor -> flow + tag -> flow + flow-start -> flow -> flow + flow-end -> . + seq-item-start -> error -> flow + explicit-key-start -> flow + map-value-start -> flow + alias -> flow + quote-start -> quoted-scalar -> flow + comma -> flow + [else] -> plain-scalar(true, 0) -> flow + +quoted-scalar + quote-end -> . + [else] -> quoted-scalar + +block-scalar(min) + newline + peek(indent < min) -> . + [else] -> block-scalar(min) + +plain-scalar(is-flow, min) + scalar-end(is-flow) -> . + peek(newline + (indent < min)) -> . + [else] -> plain-scalar(min) +*/ +function isEmpty(ch) { + switch (ch) { + case undefined: + case ' ': + case '\n': + case '\r': + case '\t': + return true; + default: + return false; + } +} +const hexDigits = '0123456789ABCDEFabcdef'.split(''); +const tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(''); +const invalidFlowScalarChars = ',[]{}'.split(''); +const invalidAnchorChars = ' ,[]{}\n\r\t'.split(''); +const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch); +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +class Lexer { + constructor() { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + this.atEnd = false; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + this.blockScalarIndent = -1; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + this.blockScalarKeep = false; + /** Current input */ + this.buffer = ''; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + this.flowKey = false; + /** Count of surrounding flow collection levels. */ + this.flowLevel = 0; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + this.indentNext = 0; + /** Indentation level of the current line. */ + this.indentValue = 0; + /** Position of the next \n character. */ + this.lineEndPos = null; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + this.next = null; + /** A pointer to `buffer`; the current position of the lexer. */ + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? 'stream'; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === ' ' || ch === '\t') + ch = this.buffer[++i]; + if (!ch || ch === '#' || ch === '\n') + return true; + if (ch === '\r') + return this.buffer[i + 1] === '\n'; + return false; + } + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === ' ') + ch = this.buffer[++indent + offset]; + if (ch === '\r') { + const next = this.buffer[indent + offset + 1]; + if (next === '\n' || (!next && !this.atEnd)) + return offset + indent + 1; + } + return ch === '\n' || indent >= this.indentNext || (!ch && !this.atEnd) + ? offset + indent + : -1; + } + if (ch === '-' || ch === '.') { + const dt = this.buffer.substr(offset, 3); + if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== 'number' || (end !== -1 && end < this.pos)) { + end = this.buffer.indexOf('\n', this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === '\r') + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n) { + return this.pos + n <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case 'stream': + return yield* this.parseStream(); + case 'line-start': + return yield* this.parseLineStart(); + case 'block-start': + return yield* this.parseBlockStart(); + case 'doc': + return yield* this.parseDocument(); + case 'flow': + return yield* this.parseFlowCollection(); + case 'quoted-scalar': + return yield* this.parseQuotedScalar(); + case 'block-scalar': + return yield* this.parseBlockScalar(); + case 'plain-scalar': + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext('stream'); + if (line[0] === BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === '%') { + let dirEnd = line.length; + const cs = line.indexOf('#'); + if (cs !== -1) { + const ch = line[cs - 1]; + if (ch === ' ' || ch === '\t') + dirEnd = cs - 1; + } + while (true) { + const ch = line[dirEnd - 1]; + if (ch === ' ' || ch === '\t') + dirEnd -= 1; + else + break; + } + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); // possible comment + this.pushNewline(); + return 'stream'; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return 'stream'; + } + yield DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext('line-start'); + if (ch === '-' || ch === '.') { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext('line-start'); + const s = this.peek(3); + if (s === '---' && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return 'doc'; + } + else if (s === '...' && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + return 'stream'; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext('block-start'); + if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return yield* this.parseBlockStart(); + } + return 'doc'; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext('doc'); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case '#': + yield* this.pushCount(line.length - n); + // fallthrough + case undefined: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return 'flow'; + case '}': + case ']': + // this is an error + yield* this.pushCount(1); + return 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'doc'; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case '|': + case '>': + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } + else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext('flow'); + if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') || + (indent === 0 && + (line.startsWith('---') || line.startsWith('...')) && + isEmpty(line[3]))) { + // Allowing for the terminal ] or } at the same (rather than greater) + // indent level as the initial [ or { is technically invalid, but + // failing here would be surprising to users. + const atFlowEndMarker = indent === this.indentNext - 1 && + this.flowLevel === 1 && + (line[0] === ']' || line[0] === '}'); + if (!atFlowEndMarker) { + // this is an error + this.flowLevel = 0; + yield FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ',') { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case undefined: + return 'flow'; + case '#': + yield* this.pushCount(line.length - n); + return 'flow'; + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return 'flow'; + case '}': + case ']': + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? 'flow' : 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'flow'; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ':': { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ',') { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return 'flow'; + } + } + // fallthrough + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } + else { + // double-quote + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === '\\') + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); + } + } + // Only looking for newlines within the quotes + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf('\n', this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf('\n', cs); + } + if (nl !== -1) { + // this is an error caused by an unexpected unindent + end = nl - (qb[nl - 1] === '\r' ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext('quoted-scalar'); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? 'flow' : 'doc'; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === '+') + this.blockScalarKeep = true; + else if (ch > '0' && ch <= '9') + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== '-') + break; + } + return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#'); + } + *parseBlockScalar() { + let nl = this.pos - 1; // may be -1 if this.pos === 0 + let indent = 0; + let ch; + loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) { + switch (ch) { + case ' ': + indent += 1; + break; + case '\n': + nl = i; + indent = 0; + break; + case '\r': { + const next = this.buffer[i + 1]; + if (!next && !this.atEnd) + return this.setNext('block-scalar'); + if (next === '\n') + break; + } // fallthrough + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext('block-scalar'); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else + this.indentNext += this.blockScalarIndent; + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf('\n', cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext('block-scalar'); + nl = this.buffer.length; + } + } + if (!this.blockScalarKeep) { + do { + let i = nl - 1; + let ch = this.buffer[i]; + if (ch === '\r') + ch = this.buffer[--i]; + const lastChar = i; // Drop the line if last char not more indented + while (ch === ' ' || ch === '\t') + ch = this.buffer[--i]; + if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) + nl = i; + else + break; + } while (true); + } + yield SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while ((ch = this.buffer[++i])) { + if (ch === ':') { + const next = this.buffer[i + 1]; + if (isEmpty(next) || (inFlow && next === ',')) + break; + end = i; + } + else if (isEmpty(ch)) { + let next = this.buffer[i + 1]; + if (ch === '\r') { + if (next === '\n') { + i += 1; + ch = '\n'; + next = this.buffer[i + 1]; + } + else + end = i; + } + if (next === '#' || (inFlow && invalidFlowScalarChars.includes(next))) + break; + if (ch === '\n') { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); // to advance, but still account for ' #' + } + } + else { + if (inFlow && invalidFlowScalarChars.includes(ch)) + break; + end = i; + } + } + if (!ch && !this.atEnd) + return this.setNext('plain-scalar'); + yield SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? 'flow' : 'doc'; + } + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; + } + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } + else if (allowEmpty) + yield ''; + return 0; + } + *pushIndicators() { + switch (this.charAt(0)) { + case '!': + return ((yield* this.pushTag()) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + case '&': + return ((yield* this.pushUntil(isNotAnchorChar)) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + case '-': // this is an error + case '?': // this is an error outside flow collections + case ':': { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || (inFlow && invalidFlowScalarChars.includes(ch1))) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + return ((yield* this.pushCount(1)) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + } + } + } + return 0; + } + *pushTag() { + if (this.charAt(1) === '<') { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty(ch) && ch !== '>') + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false); + } + else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.includes(ch)) + ch = this.buffer[++i]; + else if (ch === '%' && + hexDigits.includes(this.buffer[i + 1]) && + hexDigits.includes(this.buffer[i + 2])) { + ch = this.buffer[(i += 3)]; + } + else + break; + } + return yield* this.pushToIndex(i, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === '\n') + return yield* this.pushCount(1); + else if (ch === '\r' && this.charAt(1) === '\n') + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === ' ' || (allowTabs && ch === '\t')); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; + } + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); + } +} + +export { Lexer }; diff --git a/tools/yaml/browser/dist/parse/line-counter.js b/tools/yaml/browser/dist/parse/line-counter.js new file mode 100644 index 0000000..002ce24 --- /dev/null +++ b/tools/yaml/browser/dist/parse/line-counter.js @@ -0,0 +1,39 @@ +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +class LineCounter { + constructor() { + this.lineStarts = []; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + this.addNewLine = (offset) => this.lineStarts.push(offset); + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = (low + high) >> 1; // Math.floor((low + high) / 2) + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; + } +} + +export { LineCounter }; diff --git a/tools/yaml/browser/dist/parse/parser.js b/tools/yaml/browser/dist/parse/parser.js new file mode 100644 index 0000000..d75e1ee --- /dev/null +++ b/tools/yaml/browser/dist/parse/parser.js @@ -0,0 +1,950 @@ +import { tokenType } from './cst.js'; +import { Lexer } from './lexer.js'; + +function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; +} +function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case 'space': + case 'comment': + case 'newline': + break; + default: + return i; + } + } + return -1; +} +function isFlowToken(token) { + switch (token?.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'flow-collection': + return true; + default: + return false; + } +} +function getPrevProps(parent) { + switch (parent.type) { + case 'document': + return parent.start; + case 'block-map': { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; + } + case 'block-seq': + return parent.items[parent.items.length - 1].start; + /* istanbul ignore next should not happen */ + default: + return []; + } +} +/** Note: May modify input array */ +function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: while (--i >= 0) { + switch (prev[i].type) { + case 'doc-start': + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + case 'newline': + break loop; + } + } + while (prev[++i]?.type === 'space') { + /* loop */ + } + return prev.splice(i, prev.length); +} +function fixFlowSeqItems(fc) { + if (fc.start.type === 'flow-seq-start') { + for (const it of fc.items) { + if (it.sep && + !it.value && + !includesToken(it.start, 'explicit-key-ind') && + !includesToken(it.sep, 'map-value-ind')) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + Array.prototype.push.apply(it.value.end, it.sep); + else + it.value.end = it.sep; + } + else + Array.prototype.push.apply(it.start, it.sep); + delete it.sep; + } + } + } +} +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +class Parser { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + /** If true, space and sequence indicators count as indentation */ + this.atNewLine = true; + /** If true, next token is a scalar value */ + this.atScalar = false; + /** Current indentation level */ + this.indent = 0; + /** Current offset since the start of parsing */ + this.offset = 0; + /** On the same line with a block map key */ + this.onKeyLine = false; + /** Top indicates the node that's currently being built */ + this.stack = []; + /** The source of the current token, set in parse() */ + this.source = ''; + /** The type of the current token, set in parse() */ + this.type = ''; + // Must be defined after `next()` + this.lexer = new Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type = tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: 'error', offset: this.offset, message, source }); + this.offset += source.length; + } + else if (type === 'scalar') { + this.atNewLine = false; + this.atScalar = true; + this.type = 'scalar'; + } + else { + this.type = type; + yield* this.step(); + switch (type) { + case 'newline': + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case 'space': + if (this.atNewLine && source[0] === ' ') + this.indent += source.length; + break; + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + if (this.atNewLine) + this.indent += source.length; + break; + case 'doc-mode': + case 'flow-error-end': + return; + default: + this.atNewLine = false; + } + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: 'doc-end', + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case 'document': + return yield* this.document(top); + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return yield* this.scalar(top); + case 'block-scalar': + return yield* this.blockScalar(top); + case 'block-map': + return yield* this.blockMap(top); + case 'block-seq': + return yield* this.blockSequence(top); + case 'flow-collection': + return yield* this.flowCollection(top); + case 'doc-end': + return yield* this.documentEnd(top); + } + /* istanbul ignore next should not happen */ + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error) { + const token = error ?? this.stack.pop(); + /* istanbul ignore if should not happen */ + if (!token) { + const message = 'Tried to pop an empty stack'; + yield { type: 'error', offset: this.offset, source: '', message }; + } + else if (this.stack.length === 0) { + yield token; + } + else { + const top = this.peek(1); + if (token.type === 'block-scalar') { + // Block scalars use their parent rather than header indent + token.indent = 'indent' in top ? top.indent : 0; + } + else if (token.type === 'flow-collection' && top.type === 'document') { + // Ignore all indent for top-level flow collections + token.indent = 0; + } + if (token.type === 'flow-collection') + fixFlowSeqItems(token); + switch (top.type) { + case 'document': + top.value = token; + break; + case 'block-scalar': + top.props.push(token); // error + break; + case 'block-map': { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } + else if (it.sep) { + it.value = token; + } + else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !includesToken(it.start, 'explicit-key-ind'); + return; + } + break; + } + case 'block-seq': { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case 'flow-collection': { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === 'document' || + top.type === 'block-map' || + top.type === 'block-seq') && + (token.type === 'block-map' || token.type === 'block-seq')) { + const last = token.items[token.items.length - 1]; + if (last && + !last.sep && + !last.value && + last.start.length > 0 && + findNonEmptyIndex(last.start) === -1 && + (token.indent === 0 || + last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) { + if (top.type === 'document') + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } + } + } + *stream() { + switch (this.type) { + case 'directive-line': + yield { type: 'directive', offset: this.offset, source: this.source }; + return; + case 'byte-order-mark': + case 'space': + case 'comment': + case 'newline': + yield this.sourceToken; + return; + case 'doc-mode': + case 'doc-start': { + const doc = { + type: 'document', + offset: this.offset, + start: [] + }; + if (this.type === 'doc-start') + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } + } + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source + }; + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case 'doc-start': { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } + else + doc.start.push(this.sourceToken); + return; + } + case 'anchor': + case 'tag': + case 'space': + case 'comment': + case 'newline': + doc.start.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === 'map-value-ind') { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } + else + sep = [this.sourceToken]; + const map = { + type: 'block-map', + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case 'space': + case 'comment': + case 'newline': + scalar.props.push(this.sourceToken); + return; + case 'scalar': + scalar.source = this.source; + // block-scalar source includes trailing newline + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + yield* this.pop(); + break; + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map) { + const it = map.items[map.items.length - 1]; + // it.sep is true-ish if pair already has key or : separator + switch (this.type) { + case 'newline': + this.onKeyLine = false; + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'space': + case 'comment': + if (it.value) { + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + map.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map.indent) { + const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep; + // For empty nodes, assign newline-separated not indented empty tokens to following node + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case 'newline': + nl.push(i); + break; + case 'space': + break; + case 'comment': + if (st.indent > map.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case 'anchor': + case 'tag': + if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + this.onKeyLine = true; + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'explicit-key-ind': + if (!it.sep && !includesToken(it.start, 'explicit-key-ind')) { + it.start.push(this.sourceToken); + } + else if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + } + else { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }); + } + this.onKeyLine = true; + return; + case 'map-value-ind': + if (includesToken(it.start, 'explicit-key-ind')) { + if (!it.sep) { + if (includesToken(it.start, 'newline')) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else { + const start = getFirstKeyStartProps(it.start); + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + } + else if (it.value) { + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + else if (isFlowToken(it.key) && + !includesToken(it.sep, 'newline')) { + const start = getFirstKeyStartProps(it.start); + const key = it.key; + const sep = it.sep; + sep.push(this.sourceToken); + // @ts-expect-error type guard is wrong here + delete it.key, delete it.sep; + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key, sep }] + }); + } + else if (start.length > 0) { + // Not actually at next item + it.sep = it.sep.concat(start, this.sourceToken); + } + else { + it.sep.push(this.sourceToken); + } + } + else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else if (it.value || atNextItem) { + map.items.push({ start, key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } + else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (atNextItem || it.value) { + map.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } + else if (it.sep) { + this.stack.push(fs); + } + else { + Object.assign(it, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map); + if (bv) { + if (atNextItem && + bv.type !== 'block-seq' && + includesToken(it.start, 'explicit-key-ind')) { + map.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case 'newline': + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } + else + it.start.push(this.sourceToken); + return; + case 'space': + case 'comment': + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case 'anchor': + case 'tag': + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case 'seq-item-ind': + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, 'seq-item-ind')) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); + return; + } + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === 'flow-error-end') { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top && top.type === 'flow-collection'); + } + else if (fc.end.length === 0) { + switch (this.type) { + case 'comma': + case 'explicit-key-ind': + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case 'map-value-ind': + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case 'space': + case 'comment': + case 'newline': + case 'anchor': + case 'tag': + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it.sep) + this.stack.push(fs); + else + Object.assign(it, { key: fs, sep: [] }); + return; + } + case 'flow-map-end': + case 'flow-seq-end': + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + /* istanbul ignore else should not happen */ + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } + else { + const parent = this.peek(2); + if (parent.type === 'block-map' && + ((this.type === 'map-value-ind' && parent.indent === fc.indent) || + (this.type === 'newline' && + !parent.items[parent.items.length - 1].sep))) { + yield* this.pop(); + yield* this.step(); + } + else if (this.type === 'map-value-ind' && + parent.type !== 'flow-collection') { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map = { + type: 'block-map', + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else { + yield* this.lineEnd(fc); + } + } + } + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + } + startBlockValue(parent) { + switch (this.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return this.flowScalar(this.type); + case 'block-scalar-header': + return { + type: 'block-scalar', + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: '' + }; + case 'flow-map-start': + case 'flow-seq-start': + return { + type: 'flow-collection', + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case 'seq-item-ind': + return { + type: 'block-seq', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case 'explicit-key-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start }] + }; + } + case 'map-value-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start, indent) { + if (this.type !== 'comment') + return false; + if (this.indent <= indent) + return false; + return start.every(st => st.type === 'newline' || st.type === 'space'); + } + *documentEnd(docEnd) { + if (this.type !== 'doc-mode') { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case 'comma': + case 'doc-start': + case 'doc-end': + case 'flow-seq-end': + case 'flow-map-end': + case 'map-value-ind': + yield* this.pop(); + yield* this.step(); + break; + case 'newline': + this.onKeyLine = false; + // fallthrough + case 'space': + case 'comment': + default: + // all other values are errors + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } +} + +export { Parser }; diff --git a/tools/yaml/browser/dist/public-api.js b/tools/yaml/browser/dist/public-api.js new file mode 100644 index 0000000..b711aa0 --- /dev/null +++ b/tools/yaml/browser/dist/public-api.js @@ -0,0 +1,99 @@ +import { Composer } from './compose/composer.js'; +import { Document } from './doc/Document.js'; +import { prettifyError, YAMLParseError } from './errors.js'; +import { warn } from './log.js'; +import { LineCounter } from './parse/line-counter.js'; +import { Parser } from './parse/parser.js'; + +function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter = options.lineCounter || (prettyErrors && new LineCounter()) || null; + return { lineCounter, prettyErrors }; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +function parseAllDocuments(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser = new Parser(lineCounter?.addNewLine); + const composer = new Composer(options); + const docs = Array.from(composer.compose(parser.parse(source))); + if (prettyErrors && lineCounter) + for (const doc of docs) { + doc.errors.forEach(prettifyError(source, lineCounter)); + doc.warnings.forEach(prettifyError(source, lineCounter)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer.streamInfo()); +} +/** Parse an input string into a single YAML.Document */ +function parseDocument(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser = new Parser(lineCounter?.addNewLine); + const composer = new Composer(options); + // `doc` is always set by compose.end(true) at the very latest + let doc = null; + for (const _doc of composer.compose(parser.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== 'silent') { + doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()')); + break; + } + } + if (prettyErrors && lineCounter) { + doc.errors.forEach(prettifyError(source, lineCounter)); + doc.warnings.forEach(prettifyError(source, lineCounter)); + } + return doc; +} +function parse(src, reviver, options) { + let _reviver = undefined; + if (typeof reviver === 'function') { + _reviver = reviver; + } + else if (options === undefined && reviver && typeof reviver === 'object') { + options = reviver; + } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach(warning => warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== 'silent') + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); +} +function stringify(value, replacer, options) { + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + } + if (typeof options === 'string') + options = options.length; + if (typeof options === 'number') { + const indent = Math.round(options); + options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === undefined) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return undefined; + } + return new Document(value, _replacer, options).toString(options); +} + +export { parse, parseAllDocuments, parseDocument, stringify }; diff --git a/tools/yaml/browser/dist/schema/Schema.js b/tools/yaml/browser/dist/schema/Schema.js new file mode 100644 index 0000000..6b68b8a --- /dev/null +++ b/tools/yaml/browser/dist/schema/Schema.js @@ -0,0 +1,38 @@ +import { MAP, SCALAR, SEQ } from '../nodes/identity.js'; +import { map } from './common/map.js'; +import { seq } from './common/seq.js'; +import { string } from './common/string.js'; +import { getTags, coreKnownTags } from './tags.js'; + +const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; +class Schema { + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) + ? getTags(compat, 'compat') + : compat + ? getTags(null, compat) + : null; + this.merge = !!merge; + this.name = (typeof schema === 'string' && schema) || 'core'; + this.knownTags = resolveKnownTags ? coreKnownTags : {}; + this.tags = getTags(customTags, this.name); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, MAP, { value: map }); + Object.defineProperty(this, SCALAR, { value: string }); + Object.defineProperty(this, SEQ, { value: seq }); + // Used by createMap() + this.sortMapEntries = + typeof sortMapEntries === 'function' + ? sortMapEntries + : sortMapEntries === true + ? sortMapEntriesByKey + : null; + } + clone() { + const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } +} + +export { Schema }; diff --git a/tools/yaml/browser/dist/schema/common/map.js b/tools/yaml/browser/dist/schema/common/map.js new file mode 100644 index 0000000..af97b78 --- /dev/null +++ b/tools/yaml/browser/dist/schema/common/map.js @@ -0,0 +1,17 @@ +import { isMap } from '../../nodes/identity.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; + +const map = { + collection: 'map', + default: true, + nodeClass: YAMLMap, + tag: 'tag:yaml.org,2002:map', + resolve(map, onError) { + if (!isMap(map)) + onError('Expected a mapping for this tag'); + return map; + }, + createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx) +}; + +export { map }; diff --git a/tools/yaml/browser/dist/schema/common/null.js b/tools/yaml/browser/dist/schema/common/null.js new file mode 100644 index 0000000..fcbe1b7 --- /dev/null +++ b/tools/yaml/browser/dist/schema/common/null.js @@ -0,0 +1,15 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +const nullTag = { + identify: value => value == null, + createNode: () => new Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar(null), + stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) + ? source + : ctx.options.nullStr +}; + +export { nullTag }; diff --git a/tools/yaml/browser/dist/schema/common/seq.js b/tools/yaml/browser/dist/schema/common/seq.js new file mode 100644 index 0000000..1915b60 --- /dev/null +++ b/tools/yaml/browser/dist/schema/common/seq.js @@ -0,0 +1,17 @@ +import { isSeq } from '../../nodes/identity.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; + +const seq = { + collection: 'seq', + default: true, + nodeClass: YAMLSeq, + tag: 'tag:yaml.org,2002:seq', + resolve(seq, onError) { + if (!isSeq(seq)) + onError('Expected a sequence for this tag'); + return seq; + }, + createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx) +}; + +export { seq }; diff --git a/tools/yaml/browser/dist/schema/common/string.js b/tools/yaml/browser/dist/schema/common/string.js new file mode 100644 index 0000000..a064f7b --- /dev/null +++ b/tools/yaml/browser/dist/schema/common/string.js @@ -0,0 +1,14 @@ +import { stringifyString } from '../../stringify/stringifyString.js'; + +const string = { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString(item, ctx, onComment, onChompKeep); + } +}; + +export { string }; diff --git a/tools/yaml/browser/dist/schema/core/bool.js b/tools/yaml/browser/dist/schema/core/bool.js new file mode 100644 index 0000000..ab3c943 --- /dev/null +++ b/tools/yaml/browser/dist/schema/core/bool.js @@ -0,0 +1,19 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +const boolTag = { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: str => new Scalar(str[0] === 't' || str[0] === 'T'), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === 't' || source[0] === 'T'; + if (value === sv) + return source; + } + return value ? ctx.options.trueStr : ctx.options.falseStr; + } +}; + +export { boolTag }; diff --git a/tools/yaml/browser/dist/schema/core/float.js b/tools/yaml/browser/dist/schema/core/float.js new file mode 100644 index 0000000..a632cb7 --- /dev/null +++ b/tools/yaml/browser/dist/schema/core/float.js @@ -0,0 +1,43 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/, + resolve: str => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: str => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar(parseFloat(str)); + const dot = str.indexOf('.'); + if (dot !== -1 && str[str.length - 1] === '0') + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber +}; + +export { float, floatExp, floatNaN }; diff --git a/tools/yaml/browser/dist/schema/core/int.js b/tools/yaml/browser/dist/schema/core/int.js new file mode 100644 index 0000000..7091235 --- /dev/null +++ b/tools/yaml/browser/dist/schema/core/int.js @@ -0,0 +1,38 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber(node); +} +const intOct = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: node => intStringify(node, 8, '0o') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber +}; +const intHex = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +export { int, intHex, intOct }; diff --git a/tools/yaml/browser/dist/schema/core/schema.js b/tools/yaml/browser/dist/schema/core/schema.js new file mode 100644 index 0000000..dd02b2e --- /dev/null +++ b/tools/yaml/browser/dist/schema/core/schema.js @@ -0,0 +1,23 @@ +import { map } from '../common/map.js'; +import { nullTag } from '../common/null.js'; +import { seq } from '../common/seq.js'; +import { string } from '../common/string.js'; +import { boolTag } from './bool.js'; +import { floatNaN, floatExp, float } from './float.js'; +import { intOct, int, intHex } from './int.js'; + +const schema = [ + map, + seq, + string, + nullTag, + boolTag, + intOct, + int, + intHex, + floatNaN, + floatExp, + float +]; + +export { schema }; diff --git a/tools/yaml/browser/dist/schema/json/schema.js b/tools/yaml/browser/dist/schema/json/schema.js new file mode 100644 index 0000000..16d75ce --- /dev/null +++ b/tools/yaml/browser/dist/schema/json/schema.js @@ -0,0 +1,62 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { map } from '../common/map.js'; +import { seq } from '../common/seq.js'; + +function intIdentify(value) { + return typeof value === 'bigint' || Number.isInteger(value); +} +const stringifyJSON = ({ value }) => JSON.stringify(value); +const jsonScalars = [ + { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify: stringifyJSON + }, + { + identify: value => value == null, + createNode: () => new Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^true|false$/, + resolve: str => str === 'true', + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: str => parseFloat(str), + stringify: stringifyJSON + } +]; +const jsonError = { + default: true, + tag: '', + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; + } +}; +const schema = [map, seq].concat(jsonScalars, jsonError); + +export { schema }; diff --git a/tools/yaml/browser/dist/schema/tags.js b/tools/yaml/browser/dist/schema/tags.js new file mode 100644 index 0000000..84e23fc --- /dev/null +++ b/tools/yaml/browser/dist/schema/tags.js @@ -0,0 +1,83 @@ +import { map } from './common/map.js'; +import { nullTag } from './common/null.js'; +import { seq } from './common/seq.js'; +import { string } from './common/string.js'; +import { boolTag } from './core/bool.js'; +import { float, floatExp, floatNaN } from './core/float.js'; +import { int, intHex, intOct } from './core/int.js'; +import { schema } from './core/schema.js'; +import { schema as schema$1 } from './json/schema.js'; +import { binary } from './yaml-1.1/binary.js'; +import { omap } from './yaml-1.1/omap.js'; +import { pairs } from './yaml-1.1/pairs.js'; +import { schema as schema$2 } from './yaml-1.1/schema.js'; +import { set } from './yaml-1.1/set.js'; +import { timestamp, floatTime, intTime } from './yaml-1.1/timestamp.js'; + +const schemas = new Map([ + ['core', schema], + ['failsafe', [map, seq, string]], + ['json', schema$1], + ['yaml11', schema$2], + ['yaml-1.1', schema$2] +]); +const tagsByName = { + binary, + bool: boolTag, + float, + floatExp, + floatNaN, + floatTime, + int, + intHex, + intOct, + intTime, + map, + null: nullTag, + omap, + pairs, + seq, + set, + timestamp +}; +const coreKnownTags = { + 'tag:yaml.org,2002:binary': binary, + 'tag:yaml.org,2002:omap': omap, + 'tag:yaml.org,2002:pairs': pairs, + 'tag:yaml.org,2002:set': set, + 'tag:yaml.org,2002:timestamp': timestamp +}; +function getTags(customTags, schemaName) { + let tags = schemas.get(schemaName); + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys = Array.from(schemas.keys()) + .filter(key => key !== 'yaml11') + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } + else if (typeof customTags === 'function') { + tags = customTags(tags.slice()); + } + return tags.map(tag => { + if (typeof tag !== 'string') + return tag; + const tagObj = tagsByName[tag]; + if (tagObj) + return tagObj; + const keys = Object.keys(tagsByName) + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + }); +} + +export { coreKnownTags, getTags }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/binary.js b/tools/yaml/browser/dist/schema/yaml-1.1/binary.js new file mode 100644 index 0000000..a700819 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/binary.js @@ -0,0 +1,66 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyString } from '../../stringify/stringifyString.js'; + +const binary = { + identify: value => value instanceof Uint8Array, + default: false, + tag: 'tag:yaml.org,2002:binary', + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof Buffer === 'function') { + return Buffer.from(src, 'base64'); + } + else if (typeof atob === 'function') { + // On IE 11, atob() can't handle newlines + const str = atob(src.replace(/[\n\r]/g, '')); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } + else { + onError('This environment does not support reading binary tags; either Buffer or atob is required'); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + const buf = value; // checked earlier by binary.identify() + let str; + if (typeof Buffer === 'function') { + str = + buf instanceof Buffer + ? buf.toString('base64') + : Buffer.from(buf.buffer).toString('base64'); + } + else if (typeof btoa === 'function') { + let s = ''; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } + else { + throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required'); + } + if (!type) + type = Scalar.BLOCK_LITERAL; + if (type !== Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.BLOCK_LITERAL ? '\n' : ' '); + } + return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); + } +}; + +export { binary }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/bool.js b/tools/yaml/browser/dist/schema/yaml-1.1/bool.js new file mode 100644 index 0000000..1ced791 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/bool.js @@ -0,0 +1,26 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; +} +const trueTag = { + identify: value => value === true, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar(true), + stringify: boolStringify +}; +const falseTag = { + identify: value => value === false, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => new Scalar(false), + stringify: boolStringify +}; + +export { falseTag, trueTag }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/float.js b/tools/yaml/browser/dist/schema/yaml-1.1/float.js new file mode 100644 index 0000000..9097266 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/float.js @@ -0,0 +1,46 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, '')), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar(parseFloat(str.replace(/_/g, ''))); + const dot = str.indexOf('.'); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ''); + if (f[f.length - 1] === '0') + node.minFractionDigits = f.length; + } + return node; + }, + stringify: stringifyNumber +}; + +export { float, floatExp, floatNaN }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/int.js b/tools/yaml/browser/dist/schema/yaml-1.1/int.js new file mode 100644 index 0000000..f572823 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/int.js @@ -0,0 +1,71 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === '-' || sign === '+') + offset += 1; + str = str.substring(offset).replace(/_/g, ''); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n = BigInt(str); + return sign === '-' ? BigInt(-1) * n : n; + } + const n = parseInt(str, radix); + return sign === '-' ? -1 * n : n; +} +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? '-' + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber(node); +} +const intBin = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'BIN', + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: node => intStringify(node, 2, '0b') +}; +const intOct = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: node => intStringify(node, 8, '0') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber +}; +const intHex = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +export { int, intBin, intHex, intOct }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/omap.js b/tools/yaml/browser/dist/schema/yaml-1.1/omap.js new file mode 100644 index 0000000..5574ac5 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/omap.js @@ -0,0 +1,74 @@ +import { isScalar, isPair } from '../../nodes/identity.js'; +import { toJS } from '../../nodes/toJS.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; +import { resolvePairs, createPairs } from './pairs.js'; + +class YAMLOMap extends YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.prototype.set.bind(this); + this.tag = YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map = new Map(); + if (ctx?.onCreate) + ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (isPair(pair)) { + key = toJS(pair.key, '', ctx); + value = toJS(pair.value, key, ctx); + } + else { + key = toJS(pair, '', ctx); + } + if (map.has(key)) + throw new Error('Ordered maps must not include duplicate keys'); + map.set(key, value); + } + return map; + } + static from(schema, iterable, ctx) { + const pairs = createPairs(schema, iterable, ctx); + const omap = new this(); + omap.items = pairs.items; + return omap; + } +} +YAMLOMap.tag = 'tag:yaml.org,2002:omap'; +const omap = { + collection: 'seq', + identify: value => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: 'tag:yaml.org,2002:omap', + resolve(seq, onError) { + const pairs = resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs.items) { + if (isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } + else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) +}; + +export { YAMLOMap, omap }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/pairs.js b/tools/yaml/browser/dist/schema/yaml-1.1/pairs.js new file mode 100644 index 0000000..18e3020 --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/pairs.js @@ -0,0 +1,78 @@ +import { isSeq, isPair, isMap } from '../../nodes/identity.js'; +import { Pair, createPair } from '../../nodes/Pair.js'; +import { Scalar } from '../../nodes/Scalar.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; + +function resolvePairs(seq, onError) { + if (isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (isPair(item)) + continue; + else if (isMap(item)) { + if (item.items.length > 1) + onError('Each pair must have its own sequence indicator'); + const pair = item.items[0] || new Pair(new Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore + ? `${item.commentBefore}\n${pair.key.commentBefore}` + : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment + ? `${item.comment}\n${cn.comment}` + : item.comment; + } + item = pair; + } + seq.items[i] = isPair(item) ? item : new Pair(item); + } + } + else + onError('Expected a sequence for this tag'); + return seq; +} +function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs = new YAMLSeq(schema); + pairs.tag = 'tag:yaml.org,2002:pairs'; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === 'function') + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } + else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } + else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } + else { + throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); + } + } + else { + key = it; + } + pairs.items.push(createPair(key, value, ctx)); + } + return pairs; +} +const pairs = { + collection: 'seq', + default: false, + tag: 'tag:yaml.org,2002:pairs', + resolve: resolvePairs, + createNode: createPairs +}; + +export { createPairs, pairs, resolvePairs }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/schema.js b/tools/yaml/browser/dist/schema/yaml-1.1/schema.js new file mode 100644 index 0000000..dc5be5f --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/schema.js @@ -0,0 +1,37 @@ +import { map } from '../common/map.js'; +import { nullTag } from '../common/null.js'; +import { seq } from '../common/seq.js'; +import { string } from '../common/string.js'; +import { binary } from './binary.js'; +import { trueTag, falseTag } from './bool.js'; +import { floatNaN, floatExp, float } from './float.js'; +import { intBin, intOct, int, intHex } from './int.js'; +import { omap } from './omap.js'; +import { pairs } from './pairs.js'; +import { set } from './set.js'; +import { intTime, floatTime, timestamp } from './timestamp.js'; + +const schema = [ + map, + seq, + string, + nullTag, + trueTag, + falseTag, + intBin, + intOct, + int, + intHex, + floatNaN, + floatExp, + float, + binary, + omap, + pairs, + set, + intTime, + floatTime, + timestamp +]; + +export { schema }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/set.js b/tools/yaml/browser/dist/schema/yaml-1.1/set.js new file mode 100644 index 0000000..a3cf4ec --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/set.js @@ -0,0 +1,93 @@ +import { isMap, isPair, isScalar } from '../../nodes/identity.js'; +import { Pair, createPair } from '../../nodes/Pair.js'; +import { YAMLMap, findPair } from '../../nodes/YAMLMap.js'; + +class YAMLSet extends YAMLMap { + constructor(schema) { + super(schema); + this.tag = YAMLSet.tag; + } + add(key) { + let pair; + if (isPair(key)) + pair = key; + else if (key && + typeof key === 'object' && + 'key' in key && + 'value' in key && + key.value === null) + pair = new Pair(key.key, null); + else + pair = new Pair(key, null); + const prev = findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = findPair(this.items, key); + return !keepPair && isPair(pair) + ? isScalar(pair.key) + ? pair.key.value + : pair.key + : pair; + } + set(key, value) { + if (typeof value !== 'boolean') + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } + else if (!prev && value) { + this.items.push(new Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error('Set items must all have null values'); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === 'function') + value = replacer.call(iterable, value, value); + set.items.push(createPair(value, null, ctx)); + } + return set; + } +} +YAMLSet.tag = 'tag:yaml.org,2002:set'; +const set = { + collection: 'map', + identify: value => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: 'tag:yaml.org,2002:set', + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map, onError) { + if (isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); + else + onError('Set items must all have null values'); + } + else + onError('Expected a mapping for this tag'); + return map; + } +}; + +export { YAMLSet, set }; diff --git a/tools/yaml/browser/dist/schema/yaml-1.1/timestamp.js b/tools/yaml/browser/dist/schema/yaml-1.1/timestamp.js new file mode 100644 index 0000000..58986cd --- /dev/null +++ b/tools/yaml/browser/dist/schema/yaml-1.1/timestamp.js @@ -0,0 +1,101 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +/** Internal types handle bigint as number, because TS can't figure it out. */ +function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === '-' || sign === '+' ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts + .replace(/_/g, '') + .split(':') + .reduce((res, p) => res * num(60) + num(p), num(0)); + return (sign === '-' ? num(-1) * res : res); +} +/** + * hhhh:mm:ss.sss + * + * Internal types handle bigint as number, because TS can't figure it out. + */ +function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === 'bigint') + num = n => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber(node); + let sign = ''; + if (value < 0) { + sign = '-'; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; // seconds, including ms + if (value < 60) { + parts.unshift(0); // at least one : is required + } + else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); // minutes + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); // hours + } + } + return (sign + + parts + .map(n => String(n).padStart(2, '0')) + .join(':') + .replace(/000000\d*$/, '') // % 60 may introduce error + ); +} +const intTime = { + identify: value => typeof value === 'bigint' || Number.isInteger(value), + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal +}; +const floatTime = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: str => parseSexagesimal(str, false), + stringify: stringifySexagesimal +}; +const timestamp = { + identify: value => value instanceof Date, + default: true, + tag: 'tag:yaml.org,2002:timestamp', + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd + '(?:' + // time is optional + '(?:t|T|[ \\t]+)' + // t | T | whitespace + '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)? + '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30 + ')?$'), + resolve(str) { + const match = str.match(timestamp.test); + if (!match) + throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== 'Z') { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 60000 * d; + } + return new Date(date); + }, + stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '') +}; + +export { floatTime, intTime, timestamp }; diff --git a/tools/yaml/browser/dist/stringify/foldFlowLines.js b/tools/yaml/browser/dist/stringify/foldFlowLines.js new file mode 100644 index 0000000..01fe787 --- /dev/null +++ b/tools/yaml/browser/dist/stringify/foldFlowLines.js @@ -0,0 +1,135 @@ +const FOLD_FLOW = 'flow'; +const FOLD_BLOCK = 'block'; +const FOLD_QUOTED = 'quoted'; +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === 'number') { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split = undefined; + let prev = undefined; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) + end = i + endStep; + } + for (let ch; (ch = text[(i += 1)]);) { + if (mode === FOLD_QUOTED && ch === '\\') { + escStart = i; + switch (text[i + 1]) { + case 'x': + i += 3; + break; + case 'u': + i += 5; + break; + case 'U': + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === '\n') { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = undefined; + } + else { + if (ch === ' ' && + prev && + prev !== ' ' && + prev !== '\n' && + prev !== '\t') { + // space surrounded by non-space can be replaced with newline + indent + const next = text[i + 1]; + if (next && next !== ' ' && next !== '\n' && next !== '\t') + split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = undefined; + } + else if (mode === FOLD_QUOTED) { + // white-space collected at end may stretch past lineWidth + while (prev === ' ' || prev === '\t') { + prev = ch; + ch = text[(i += 1)]; + overflow = true; + } + // Account for newline escape, but don't break preceding escape + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + // Bail out if lineWidth & minContentWidth are shorter than an escape string + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = undefined; + } + else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i = 0; i < folds.length; ++i) { + const fold = folds[i]; + const end = folds[i + 1] || text.length; + if (fold === 0) + res = `\n${indent}${text.slice(0, end)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += `\n${indent}${text.slice(fold + 1, end)}`; + } + } + return res; +} +/** + * Presumes `i + 1` is at the start of a line + * @returns index of last newline in more-indented block + */ +function consumeMoreIndentedLines(text, i) { + let ch = text[i + 1]; + while (ch === ' ' || ch === '\t') { + do { + ch = text[(i += 1)]; + } while (ch && ch !== '\n'); + ch = text[i + 1]; + } + return i; +} + +export { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines }; diff --git a/tools/yaml/browser/dist/stringify/stringify.js b/tools/yaml/browser/dist/stringify/stringify.js new file mode 100644 index 0000000..760ec4c --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringify.js @@ -0,0 +1,124 @@ +import { anchorIsValid } from '../doc/anchors.js'; +import { isPair, isAlias, isNode, isScalar, isCollection } from '../nodes/identity.js'; +import { stringifyComment } from './stringifyComment.js'; +import { stringifyString } from './stringifyString.js'; + +function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment, + defaultKeyType: null, + defaultStringType: 'PLAIN', + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: 'false', + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: 'null', + simpleKeys: false, + singleQuote: null, + trueStr: 'true', + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case 'block': + inFlow = false; + break; + case 'flow': + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '', + indent: '', + indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ', + inFlow, + options: opt + }; +} +function getTagObject(tags, item) { + if (item.tag) { + const match = tags.filter(t => t.tag === item.tag); + if (match.length > 0) + return match.find(t => t.format === item.format) ?? match[0]; + } + let tagObj = undefined; + let obj; + if (isScalar(item)) { + obj = item.value; + const match = tags.filter(t => t.identify?.(obj)); + tagObj = + match.find(t => t.format === item.format) ?? match.find(t => !t.format); + } + else { + obj = item; + tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; +} +// needs to be called before value stringifier to allow for circular anchor refs +function stringifyProps(node, tagObj, { anchors, doc }) { + if (!doc.directives) + return ''; + const props = []; + const anchor = (isScalar(node) || isCollection(node)) && node.anchor; + if (anchor && anchorIsValid(anchor)) { + anchors.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag; + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(' '); +} +function stringify(item, ctx, onComment, onChompKeep) { + if (isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } + else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = undefined; + const node = isNode(item) + ? item + : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) }); + if (!tagObj) + tagObj = getTagObject(ctx.doc.schema.tags, node); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str = typeof tagObj.stringify === 'function' + ? tagObj.stringify(node, ctx, onComment, onChompKeep) + : isScalar(node) + ? stringifyString(node, ctx, onComment, onChompKeep) + : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str; + return isScalar(node) || str[0] === '{' || str[0] === '[' + ? `${props} ${str}` + : `${props}\n${ctx.indent}${str}`; +} + +export { createStringifyContext, stringify }; diff --git a/tools/yaml/browser/dist/stringify/stringifyCollection.js b/tools/yaml/browser/dist/stringify/stringifyCollection.js new file mode 100644 index 0000000..4817a9d --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyCollection.js @@ -0,0 +1,151 @@ +import { Collection } from '../nodes/Collection.js'; +import { isNode, isPair } from '../nodes/identity.js'; +import { stringify } from './stringify.js'; +import { lineComment, indentComment } from './stringifyComment.js'; + +function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify(collection, ctx, options); +} +function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; // flag for the preceding node's status + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment = item.comment; + } + else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str = stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true)); + if (comment) + str += lineComment(str, itemIndent, commentString(comment)); + if (chompKeep && comment) + chompKeep = false; + lines.push(blockItemPrefix + str); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } + else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? `\n${indent}${line}` : '\n'; + } + } + if (comment) { + str += '\n' + indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; +} +function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (isNode(item)) { + if (item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } + else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } + else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str = stringify(item, itemCtx, () => (comment = null)); + if (i < items.length - 1) + str += ','; + if (comment) + str += lineComment(str, itemIndent, commentString(comment)); + if (!reqNewline && (lines.length > linesAtValue || str.includes('\n'))) + reqNewline = true; + lines.push(str); + linesAtValue = lines.length; + } + let str; + const { start, end } = flowChars; + if (lines.length === 0) { + str = start + end; + } + else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = len > Collection.maxFlowStringSingleLineLength; + } + if (reqNewline) { + str = start; + for (const line of lines) + str += line ? `\n${indentStep}${indent}${line}` : '\n'; + str += `\n${indent}${end}`; + } + else { + str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + } + } + if (comment) { + str += lineComment(str, indent, commentString(comment)); + if (onComment) + onComment(); + } + return str; +} +function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ''); + if (comment) { + const ic = indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); // Avoid double indent on first line + } +} + +export { stringifyCollection }; diff --git a/tools/yaml/browser/dist/stringify/stringifyComment.js b/tools/yaml/browser/dist/stringify/stringifyComment.js new file mode 100644 index 0000000..f16fc91 --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyComment.js @@ -0,0 +1,20 @@ +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); +function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; +} +const lineComment = (str, indent, comment) => str.endsWith('\n') + ? indentComment(comment, indent) + : comment.includes('\n') + ? '\n' + indentComment(comment, indent) + : (str.endsWith(' ') ? '' : ' ') + comment; + +export { indentComment, lineComment, stringifyComment }; diff --git a/tools/yaml/browser/dist/stringify/stringifyDocument.js b/tools/yaml/browser/dist/stringify/stringifyDocument.js new file mode 100644 index 0000000..2a9defa --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyDocument.js @@ -0,0 +1,85 @@ +import { isNode } from '../nodes/identity.js'; +import { createStringifyContext, stringify } from './stringify.js'; +import { indentComment, lineComment } from './stringifyComment.js'; + +function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } + else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push('---'); + const ctx = createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(''); + const cs = commentString(doc.commentBefore); + lines.unshift(indentComment(cs, '')); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(''); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(indentComment(cs, '')); + } + // top-level block scalars need to be indented if followed by a comment + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? undefined : () => (chompKeep = true); + let body = stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep); + if (contentComment) + body += lineComment(body, '', commentString(contentComment)); + if ((body[0] === '|' || body[0] === '>') && + lines[lines.length - 1] === '---') { + // Top-level block scalars with a preceding doc marker ought to use the + // same line for their header. + lines[lines.length - 1] = `--- ${body}`; + } + else + lines.push(body); + } + else { + lines.push(stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes('\n')) { + lines.push('...'); + lines.push(indentComment(cs, '')); + } + else { + lines.push(`... ${cs}`); + } + } + else { + lines.push('...'); + } + } + else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ''); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') + lines.push(''); + lines.push(indentComment(commentString(dc), '')); + } + } + return lines.join('\n') + '\n'; +} + +export { stringifyDocument }; diff --git a/tools/yaml/browser/dist/stringify/stringifyNumber.js b/tools/yaml/browser/dist/stringify/stringifyNumber.js new file mode 100644 index 0000000..3fa35f9 --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyNumber.js @@ -0,0 +1,24 @@ +function stringifyNumber({ format, minFractionDigits, tag, value }) { + if (typeof value === 'bigint') + return String(value); + const num = typeof value === 'number' ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; + let n = JSON.stringify(value); + if (!format && + minFractionDigits && + (!tag || tag === 'tag:yaml.org,2002:float') && + /^\d/.test(n)) { + let i = n.indexOf('.'); + if (i < 0) { + i = n.length; + n += '.'; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += '0'; + } + return n; +} + +export { stringifyNumber }; diff --git a/tools/yaml/browser/dist/stringify/stringifyPair.js b/tools/yaml/browser/dist/stringify/stringifyPair.js new file mode 100644 index 0000000..0807af2 --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyPair.js @@ -0,0 +1,150 @@ +import { isCollection, isNode, isScalar, isSeq } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { stringify } from './stringify.js'; +import { lineComment, indentComment } from './stringifyComment.js'; + +function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = (isNode(key) && key.comment) || null; + if (simpleKeys) { + if (keyComment) { + throw new Error('With simple keys, key nodes cannot have comments'); + } + if (isCollection(key)) { + const msg = 'With simple keys, collection cannot be used as a key value'; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && + (!key || + (keyComment && value == null && !ctx.inFlow) || + isCollection(key) || + (isScalar(key) + ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL + : typeof key === 'object')); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true)); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error('With simple keys, single line scalar must not span more than 1024 characters'); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === '' ? '?' : explicitKey ? `? ${str}` : str; + } + } + else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += lineComment(str, ctx.indent, commentString(keyComment)); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str}\n${indent}:`; + } + else { + str = `${str}:`; + if (keyComment) + str += lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } + else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === 'object') + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && + indentStep.length >= 2 && + !ctx.inFlow && + !explicitKey && + isSeq(value) && + !value.flow && + !value.tag && + !value.anchor) { + // If indentSeq === false, consider '- ' as part of indentation where possible + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true)); + let ws = ' '; + if (keyComment || vsb || vcb) { + ws = vsb ? '\n' : ''; + if (vcb) { + const cs = commentString(vcb); + ws += `\n${indentComment(cs, ctx.indent)}`; + } + if (valueStr === '' && !ctx.inFlow) { + if (ws === '\n') + ws = '\n\n'; + } + else { + ws += `\n${ctx.indent}`; + } + } + else if (!explicitKey && isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf('\n'); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === '&' || vs0 === '!')) { + let sp0 = valueStr.indexOf(' '); + if (vs0 === '&' && + sp0 !== -1 && + sp0 < nl0 && + valueStr[sp0 + 1] === '!') { + sp0 = valueStr.indexOf(' ', sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = `\n${ctx.indent}`; + } + } + else if (valueStr === '' || valueStr[0] === '\n') { + ws = ''; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } + else if (valueComment && !valueCommentDone) { + str += lineComment(str, ctx.indent, commentString(valueComment)); + } + else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str; +} + +export { stringifyPair }; diff --git a/tools/yaml/browser/dist/stringify/stringifyString.js b/tools/yaml/browser/dist/stringify/stringifyString.js new file mode 100644 index 0000000..2f1ceb6 --- /dev/null +++ b/tools/yaml/browser/dist/stringify/stringifyString.js @@ -0,0 +1,328 @@ +import { Scalar } from '../nodes/Scalar.js'; +import { foldFlowLines, FOLD_QUOTED, FOLD_FLOW, FOLD_BLOCK } from './foldFlowLines.js'; + +const getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth +}); +// Also checks for lines starting with %, as parsing the output as YAML 1.1 will +// presume that's starting a new document. +const containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); +function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === '\n') { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } + } + return true; +} +function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + let str = ''; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') { + // space before newline needs to be escaped to not be folded + str += json.slice(start, i) + '\\ '; + i += 1; + start = i; + ch = '\\'; + } + if (ch === '\\') + switch (json[i + 1]) { + case 'u': + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case '0000': + str += '\\0'; + break; + case '0007': + str += '\\a'; + break; + case '000b': + str += '\\v'; + break; + case '001b': + str += '\\e'; + break; + case '0085': + str += '\\N'; + break; + case '00a0': + str += '\\_'; + break; + case '2028': + str += '\\L'; + break; + case '2029': + str += '\\P'; + break; + default: + if (code.substr(0, 2) === '00') + str += '\\x' + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case 'n': + if (implicitKey || + json[i + 2] === '"' || + json.length < minMultiLineLength) { + i += 1; + } + else { + // folding will eat first newline + str += json.slice(start, i) + '\n\n'; + while (json[i + 2] === '\\' && + json[i + 3] === 'n' && + json[i + 4] !== '"') { + str += '\n'; + i += 2; + } + str += indent; + // space after newline needs to be escaped to not be folded + if (json[i + 2] === ' ') + str += '\\'; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey + ? str + : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false)); +} +function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || + (ctx.implicitKey && value.includes('\n')) || + /[ \t]\n|\n[ \t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline + ) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'"; + return ctx.implicitKey + ? res + : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); +} +// The negative lookbehind avoids a polynomial search, +// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind +let blockEndNewlines; +try { + blockEndNewlines = new RegExp('(^|(?\n'; + // determine chomping from whitespace at value end + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== '\n' && ch !== '\t' && ch !== ' ') + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf('\n'); + if (endNlPos === -1) { + chomp = '-'; // strip + } + else if (value === end || endNlPos !== end.length - 1) { + chomp = '+'; // keep + if (onChompKeep) + onChompKeep(); + } + else { + chomp = ''; // clip + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === '\n') + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + // determine indent indicator from whitespace at value start + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === ' ') + startWithSpace = true; + else if (ch === '\n') + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? '2' : '1'; // root is at -1 + let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp; + if (comment) { + header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' ')); + if (onComment) + onComment(); + } + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header}\n${indent}${start}${value}${end}`; + } + value = value + .replace(/\n+/g, '\n$&') + .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded + // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent + .replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines(`${start}${value}${end}`, indent, FOLD_BLOCK, getFoldOptions(ctx, true)); + return `${header}\n${indent}${body}`; +} +function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if ((implicitKey && value.includes('\n')) || + (inFlow && /[[\]{},]/.test(value))) { + return quotedString(value, ctx); + } + if (!value || + /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + // not allowed: + // - empty string, '-' or '?' + // - start with an indicator character (except [?:-]) or /[?-] / + // - '\n ', ': ' or ' \n' anywhere + // - '#' not preceded by a non-space char + // - end with ' ' or ':' + return implicitKey || inFlow || !value.includes('\n') + ? quotedString(value, ctx) + : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && + !inFlow && + type !== Scalar.PLAIN && + value.includes('\n')) { + // Where allowed & type not set explicitly, prefer block style for multiline strings + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === '') { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$&\n${indent}`); + // Verify that output will be parsed as a string, as e.g. plain numbers and + // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'), + // and others in v1.1. + if (actualString) { + const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey + ? str + : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === 'string' + ? item + : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.QUOTE_DOUBLE) { + // force double quotes on control characters & unpaired surrogates + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.BLOCK_FOLDED: + case Scalar.BLOCK_LITERAL: + return implicitKey || inFlow + ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers + : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = (implicitKey && defaultKeyType) || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); + } + return res; +} + +export { stringifyString }; diff --git a/tools/yaml/browser/dist/util.js b/tools/yaml/browser/dist/util.js new file mode 100644 index 0000000..ec59413 --- /dev/null +++ b/tools/yaml/browser/dist/util.js @@ -0,0 +1,11 @@ +export { createNode } from './doc/createNode.js'; +export { debug, warn } from './log.js'; +export { createPair } from './nodes/Pair.js'; +export { findPair } from './nodes/YAMLMap.js'; +export { toJS } from './nodes/toJS.js'; +export { map as mapTag } from './schema/common/map.js'; +export { seq as seqTag } from './schema/common/seq.js'; +export { string as stringTag } from './schema/common/string.js'; +export { foldFlowLines } from './stringify/foldFlowLines.js'; +export { stringifyNumber } from './stringify/stringifyNumber.js'; +export { stringifyString } from './stringify/stringifyString.js'; diff --git a/tools/yaml/browser/dist/visit.js b/tools/yaml/browser/dist/visit.js new file mode 100644 index 0000000..b5eef41 --- /dev/null +++ b/tools/yaml/browser/dist/visit.js @@ -0,0 +1,233 @@ +import { isDocument, isNode, isPair, isCollection, isMap, isSeq, isScalar, isAlias } from './nodes/identity.js'; + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove node'); +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + visit_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current node */ +visit.SKIP = SKIP; +/** Remove the current node */ +visit.REMOVE = REMOVE; +function visit_(key, node, visitor, path) { + const ctrl = callVisitor(key, node, visitor, path); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visit_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = visit_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + await visitAsync_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visitAsync.BREAK = BREAK; +/** Do not visit the children of the current node */ +visitAsync.SKIP = SKIP; +/** Remove the current node */ +visitAsync.REMOVE = REMOVE; +async function visitAsync_(key, node, visitor, path) { + const ctrl = await callVisitor(key, node, visitor, path); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visitAsync_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = await visitAsync_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +function initVisitor(visitor) { + if (typeof visitor === 'object' && + (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; +} +function callVisitor(key, node, visitor, path) { + if (typeof visitor === 'function') + return visitor(key, node, path); + if (isMap(node)) + return visitor.Map?.(key, node, path); + if (isSeq(node)) + return visitor.Seq?.(key, node, path); + if (isPair(node)) + return visitor.Pair?.(key, node, path); + if (isScalar(node)) + return visitor.Scalar?.(key, node, path); + if (isAlias(node)) + return visitor.Alias?.(key, node, path); + return undefined; +} +function replaceNode(key, path, node) { + const parent = path[path.length - 1]; + if (isCollection(parent)) { + parent.items[key] = node; + } + else if (isPair(parent)) { + if (key === 'key') + parent.key = node; + else + parent.value = node; + } + else if (isDocument(parent)) { + parent.contents = node; + } + else { + const pt = isAlias(parent) ? 'alias' : 'scalar'; + throw new Error(`Cannot replace node with ${pt} parent`); + } +} + +export { visit, visitAsync }; diff --git a/tools/yaml/browser/index.js b/tools/yaml/browser/index.js new file mode 100644 index 0000000..5f73271 --- /dev/null +++ b/tools/yaml/browser/index.js @@ -0,0 +1,5 @@ +// `export * as default from ...` fails on Webpack v4 +// https://github.com/eemeli/yaml/issues/228 +import * as YAML from './dist/index.js' +export default YAML +export * from './dist/index.js' diff --git a/tools/yaml/browser/package.json b/tools/yaml/browser/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/tools/yaml/browser/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tools/yaml/dist/compose/compose-collection.d.ts b/tools/yaml/dist/compose/compose-collection.d.ts new file mode 100644 index 0000000..b310e2d --- /dev/null +++ b/tools/yaml/dist/compose/compose-collection.d.ts @@ -0,0 +1,5 @@ +import type { ParsedNode } from '../nodes/Node.js'; +import type { BlockMap, BlockSequence, FlowCollection, SourceToken } from '../parse/cst.js'; +import type { ComposeContext, ComposeNode } from './compose-node.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function composeCollection(CN: ComposeNode, ctx: ComposeContext, token: BlockMap | BlockSequence | FlowCollection, tagToken: SourceToken | null, onError: ComposeErrorHandler): ParsedNode; diff --git a/tools/yaml/dist/compose/compose-collection.js b/tools/yaml/dist/compose/compose-collection.js new file mode 100644 index 0000000..e4b1971 --- /dev/null +++ b/tools/yaml/dist/compose/compose-collection.js @@ -0,0 +1,78 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveBlockMap = require('./resolve-block-map.js'); +var resolveBlockSeq = require('./resolve-block-seq.js'); +var resolveFlowCollection = require('./resolve-flow-collection.js'); + +function resolveCollection(CN, ctx, token, onError, tagName, tag) { + const coll = token.type === 'block-map' + ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag) + : token.type === 'block-seq' + ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag) + : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag); + const Coll = coll.constructor; + // If we got a tagName matching the class, or the tag name is '!', + // then use the tagName from the node class used to create it. + if (tagName === '!' || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; +} +function composeCollection(CN, ctx, token, tagToken, onError) { + const tagName = !tagToken + ? null + : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)); + const expType = token.type === 'block-map' + ? 'map' + : token.type === 'block-seq' + ? 'seq' + : token.start.source === '{' + ? 'map' + : 'seq'; + // shortcut: check if it's a generic YAMLMap or YAMLSeq + // before jumping into the custom tag logic. + if (!tagToken || + !tagName || + tagName === '!' || + (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') || + (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq') || + !expType) { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt && kt.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } + else { + if (kt?.collection) { + onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true); + } + else { + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true); + } + return resolveCollection(CN, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll; + const node = identity.isNode(res) + ? res + : new Scalar.Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; +} + +exports.composeCollection = composeCollection; diff --git a/tools/yaml/dist/compose/compose-doc.d.ts b/tools/yaml/dist/compose/compose-doc.d.ts new file mode 100644 index 0000000..05816a7 --- /dev/null +++ b/tools/yaml/dist/compose/compose-doc.d.ts @@ -0,0 +1,7 @@ +import type { Directives } from '../doc/directives.js'; +import { Document } from '../doc/Document.js'; +import type { ParsedNode } from '../nodes/Node.js'; +import type { DocumentOptions, ParseOptions, SchemaOptions } from '../options.js'; +import type * as CST from '../parse/cst.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function composeDoc(options: ParseOptions & DocumentOptions & SchemaOptions, directives: Directives, { offset, start, value, end }: CST.Document, onError: ComposeErrorHandler): Document.Parsed; diff --git a/tools/yaml/dist/compose/compose-doc.js b/tools/yaml/dist/compose/compose-doc.js new file mode 100644 index 0000000..d19c227 --- /dev/null +++ b/tools/yaml/dist/compose/compose-doc.js @@ -0,0 +1,43 @@ +'use strict'; + +var Document = require('../doc/Document.js'); +var composeNode = require('./compose-node.js'); +var resolveEnd = require('./resolve-end.js'); +var resolveProps = require('./resolve-props.js'); + +function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document.Document(undefined, opts); + const ctx = { + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps.resolveProps(start, { + indicator: 'doc-start', + next: value ?? end?.[0], + offset, + onError, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && + (value.type === 'block-map' || value.type === 'block-seq') && + !props.hasNewline) + onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); + } + // @ts-expect-error If Contents is set, let's trust the user + doc.contents = value + ? composeNode.composeNode(ctx, value, props, onError) + : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd.resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; +} + +exports.composeDoc = composeDoc; diff --git a/tools/yaml/dist/compose/compose-node.d.ts b/tools/yaml/dist/compose/compose-node.d.ts new file mode 100644 index 0000000..8d3e467 --- /dev/null +++ b/tools/yaml/dist/compose/compose-node.d.ts @@ -0,0 +1,27 @@ +import type { Directives } from '../doc/directives.js'; +import type { ParsedNode } from '../nodes/Node.js'; +import type { ParseOptions } from '../options.js'; +import type { SourceToken, Token } from '../parse/cst.js'; +import type { Schema } from '../schema/Schema.js'; +import type { ComposeErrorHandler } from './composer.js'; +export interface ComposeContext { + atRoot: boolean; + directives: Directives; + options: Readonly>>; + schema: Readonly; +} +interface Props { + spaceBefore: boolean; + comment: string; + anchor: SourceToken | null; + tag: SourceToken | null; + end: number; +} +declare const CN: { + composeNode: typeof composeNode; + composeEmptyNode: typeof composeEmptyNode; +}; +export type ComposeNode = typeof CN; +export declare function composeNode(ctx: ComposeContext, token: Token, props: Props, onError: ComposeErrorHandler): ParsedNode; +export declare function composeEmptyNode(ctx: ComposeContext, offset: number, before: Token[] | undefined, pos: number | null, { spaceBefore, comment, anchor, tag, end }: Props, onError: ComposeErrorHandler): import("../index.js").Scalar.Parsed; +export {}; diff --git a/tools/yaml/dist/compose/compose-node.js b/tools/yaml/dist/compose/compose-node.js new file mode 100644 index 0000000..7eb1daf --- /dev/null +++ b/tools/yaml/dist/compose/compose-node.js @@ -0,0 +1,95 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var composeCollection = require('./compose-collection.js'); +var composeScalar = require('./compose-scalar.js'); +var resolveEnd = require('./resolve-end.js'); +var utilEmptyScalarPosition = require('./util-empty-scalar-position.js'); + +const CN = { composeNode, composeEmptyNode }; +function composeNode(ctx, token, props, onError) { + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case 'alias': + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties'); + break; + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'block-scalar': + node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case 'block-map': + case 'block-seq': + case 'flow-collection': + node = composeCollection.composeCollection(CN, ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + default: { + const message = token.type === 'error' + ? token.message + : `Unsupported token (type: ${token.type})`; + onError(token, 'UNEXPECTED_TOKEN', message); + node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError); + isSrcToken = false; + } + } + if (anchor && node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === 'scalar' && token.source === '') + node.comment = comment; + else + node.commentBefore = comment; + } + // @ts-expect-error Type checking misses meaning of isSrcToken + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; +} +function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: 'scalar', + offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos), + indent: -1, + source: '' + }; + const node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; +} +function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias.Alias(source.substring(1)); + if (alias.source === '') + onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string'); + if (alias.source.endsWith(':')) + onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true); + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; +} + +exports.composeEmptyNode = composeEmptyNode; +exports.composeNode = composeNode; diff --git a/tools/yaml/dist/compose/compose-scalar.d.ts b/tools/yaml/dist/compose/compose-scalar.d.ts new file mode 100644 index 0000000..d5d0f79 --- /dev/null +++ b/tools/yaml/dist/compose/compose-scalar.d.ts @@ -0,0 +1,5 @@ +import { Scalar } from '../nodes/Scalar.js'; +import type { BlockScalar, FlowScalar, SourceToken } from '../parse/cst.js'; +import type { ComposeContext } from './compose-node.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function composeScalar(ctx: ComposeContext, token: FlowScalar | BlockScalar, tagToken: SourceToken | null, onError: ComposeErrorHandler): Scalar.Parsed; diff --git a/tools/yaml/dist/compose/compose-scalar.js b/tools/yaml/dist/compose/compose-scalar.js new file mode 100644 index 0000000..ace8964 --- /dev/null +++ b/tools/yaml/dist/compose/compose-scalar.js @@ -0,0 +1,82 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var resolveBlockScalar = require('./resolve-block-scalar.js'); +var resolveFlowScalar = require('./resolve-flow-scalar.js'); + +function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === 'block-scalar' + ? resolveBlockScalar.resolveBlockScalar(token, ctx.options.strict, onError) + : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken + ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) + : null; + const tag = tagToken && tagName + ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) + : token.type === 'scalar' + ? findScalarTagByTest(ctx, value, token, onError) + : ctx.schema[identity.SCALAR]; + let scalar; + try { + const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); + scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res); + } + catch (error) { + const msg = error instanceof Error ? error.message : String(error); + onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg); + scalar = new Scalar.Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; +} +function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === '!') + return schema[identity.SCALAR]; // non-specific tag + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + // Ensure that the known tag is available for stringifying, + // but does not get used by default. + schema.tags.push(Object.assign({}, kt, { default: false, test: undefined })); + return kt; + } + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); + return schema[identity.SCALAR]; +} +function findScalarTagByTest({ directives, schema }, value, token, onError) { + const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[identity.SCALAR]; + if (schema.compat) { + const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? + schema[identity.SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, 'TAG_RESOLVE_FAILED', msg, true); + } + } + return tag; +} + +exports.composeScalar = composeScalar; diff --git a/tools/yaml/dist/compose/composer.d.ts b/tools/yaml/dist/compose/composer.d.ts new file mode 100644 index 0000000..cd3d323 --- /dev/null +++ b/tools/yaml/dist/compose/composer.d.ts @@ -0,0 +1,62 @@ +import { Directives } from '../doc/directives.js'; +import { Document } from '../doc/Document.js'; +import { ErrorCode, YAMLParseError, YAMLWarning } from '../errors.js'; +import type { ParsedNode, Range } from '../nodes/Node.js'; +import type { DocumentOptions, ParseOptions, SchemaOptions } from '../options.js'; +import type { Token } from '../parse/cst.js'; +type ErrorSource = number | [number, number] | Range | { + offset: number; + source?: string; +}; +export type ComposeErrorHandler = (source: ErrorSource, code: ErrorCode, message: string, warning?: boolean) => void; +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +export declare class Composer { + private directives; + private doc; + private options; + private atDirectives; + private prelude; + private errors; + private warnings; + constructor(options?: ParseOptions & DocumentOptions & SchemaOptions); + private onError; + private decorate; + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo(): { + comment: string; + directives: Directives; + errors: YAMLParseError[]; + warnings: YAMLWarning[]; + }; + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + compose(tokens: Iterable, forceDoc?: boolean, endOffset?: number): Generator, void, unknown>; + /** Advance the composer by one CST token. */ + next(token: Token): Generator, void, unknown>; + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + end(forceDoc?: boolean, endOffset?: number): Generator, void, unknown>; +} +export {}; diff --git a/tools/yaml/dist/compose/composer.js b/tools/yaml/dist/compose/composer.js new file mode 100644 index 0000000..0b89117 --- /dev/null +++ b/tools/yaml/dist/compose/composer.js @@ -0,0 +1,221 @@ +'use strict'; + +var directives = require('../doc/directives.js'); +var Document = require('../doc/Document.js'); +var errors = require('../errors.js'); +var identity = require('../nodes/identity.js'); +var composeDoc = require('./compose-doc.js'); +var resolveEnd = require('./resolve-end.js'); + +function getErrorPos(src) { + if (typeof src === 'number') + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === 'string' ? source.length : 1)]; +} +function parsePrelude(prelude) { + let comment = ''; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case '#': + comment += + (comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') + + (source.substring(1) || ' '); + atComment = true; + afterEmptyLine = false; + break; + case '%': + if (prelude[i + 1]?.[0] !== '#') + i += 1; + atComment = false; + break; + default: + // This may be wrong after doc-end, but in that case it doesn't matter + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; +} +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +class Composer { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new errors.YAMLWarning(pos, code, message)); + else + this.errors.push(new errors.YAMLParseError(pos, code, message)); + }; + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + this.directives = new directives.Directives({ version: options.version || '1.2' }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + //console.log({ dc: doc.comment, prelude, comment }) + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment; + } + else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } + else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (identity.isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + } + if (afterDoc) { + Array.prototype.push.apply(doc.errors, this.errors); + Array.prototype.push.apply(doc.warnings, this.warnings); + } + else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + if (process.env.LOG_STREAM) + console.dir(token, { depth: null }); + switch (token.type) { + case 'directive': + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, 'BAD_DIRECTIVE', message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case 'document': { + const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line'); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; + } + case 'byte-order-mark': + case 'space': + break; + case 'comment': + case 'newline': + this.prelude.push(token.source); + break; + case 'error': { + const msg = token.source + ? `${token.message}: ${JSON.stringify(token.source)}` + : token.message; + const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg); + if (this.atDirectives || !this.doc) + this.errors.push(error); + else + this.doc.errors.push(error); + break; + } + case 'doc-end': { + if (!this.doc) { + const msg = 'Unexpected doc-end without preceding document'; + this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg)); + break; + } + this.doc.directives.docEnd = true; + const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`)); + } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } + else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document.Document(undefined, opts); + if (this.atDirectives) + this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line'); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } +} + +exports.Composer = Composer; diff --git a/tools/yaml/dist/compose/resolve-block-map.d.ts b/tools/yaml/dist/compose/resolve-block-map.d.ts new file mode 100644 index 0000000..58855c8 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-map.d.ts @@ -0,0 +1,7 @@ +import type { ParsedNode } from '../nodes/Node.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import type { BlockMap } from '../parse/cst.js'; +import { CollectionTag } from '../schema/types.js'; +import type { ComposeContext, ComposeNode } from './compose-node.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveBlockMap({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bm: BlockMap, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed; diff --git a/tools/yaml/dist/compose/resolve-block-map.js b/tools/yaml/dist/compose/resolve-block-map.js new file mode 100644 index 0000000..8e2b18a --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-map.js @@ -0,0 +1,113 @@ +'use strict'; + +var Pair = require('../nodes/Pair.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var resolveProps = require('./resolve-props.js'); +var utilContainsNewline = require('./util-contains-newline.js'); +var utilFlowIndentCheck = require('./util-flow-indent-check.js'); +var utilMapIncludes = require('./util-map-includes.js'); + +const startColMsg = 'All mapping items must start at the same column'; +function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; + const map = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep, value } = collItem; + // key properties + const keyProps = resolveProps.resolveProps(start, { + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === 'block-seq') + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key'); + else if ('indent' in key && key.indent !== bm.indent) + onError(offset, 'BAD_INDENT', startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map.comment) + map.comment += '\n' + keyProps.comment; + else + map.comment = keyProps.comment; + } + continue; + } + if (keyProps.hasNewlineAfterProp || utilContainsNewline.containsNewline(key)) { + onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line'); + } + } + else if (keyProps.found?.indent !== bm.indent) { + onError(offset, 'BAD_INDENT', startColMsg); + } + // key value + const keyStart = keyProps.end; + const keyNode = key + ? composeNode(ctx, key, keyProps, onError) + : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + // value properties + const valueProps = resolveProps.resolveProps(sep ?? [], { + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: !key || key.type === 'block-scalar' + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === 'block-map' && !valueProps.hasNewline) + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings'); + if (ctx.options.strict && + keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key'); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : composeEmptyNode(ctx, offset, sep, null, valueProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + else { + // key with no value + if (implicitKey) + onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values'); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content'); + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; +} + +exports.resolveBlockMap = resolveBlockMap; diff --git a/tools/yaml/dist/compose/resolve-block-scalar.d.ts b/tools/yaml/dist/compose/resolve-block-scalar.d.ts new file mode 100644 index 0000000..4855b19 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-scalar.d.ts @@ -0,0 +1,10 @@ +import { Range } from '../nodes/Node.js'; +import { Scalar } from '../nodes/Scalar.js'; +import type { BlockScalar } from '../parse/cst.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveBlockScalar(scalar: BlockScalar, strict: boolean, onError: ComposeErrorHandler): { + value: string; + type: Scalar.BLOCK_FOLDED | Scalar.BLOCK_LITERAL | null; + comment: string; + range: Range; +}; diff --git a/tools/yaml/dist/compose/resolve-block-scalar.js b/tools/yaml/dist/compose/resolve-block-scalar.js new file mode 100644 index 0000000..ba89f97 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-scalar.js @@ -0,0 +1,196 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); + +function resolveBlockScalar(scalar, strict, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, strict, onError); + if (!header) + return { value: '', type: null, comment: '', range: [start, start, start] }; + const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + // determine the end of content & start of chomping + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === '' || content === '\r') + chompStart = i; + else + break; + } + // shortcut for empty contents + if (chompStart === 0) { + const value = header.chomp === '+' && lines.length > 0 + ? '\n'.repeat(Math.max(1, lines.length - 1)) + : ''; + let end = start + header.length; + if (scalar.source) + end += scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; + } + // find the indentation level to trim from start + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === '' || content === '\r') { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } + else { + if (indent.length < trimIndent) { + const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator'; + onError(offset + indent.length, 'MISSING_CHAR', message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; + break; + } + offset += indent.length + content.length + 1; + } + // include trailing more-indented empty lines in content + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; + } + let value = ''; + let sep = ''; + let prevMoreIndented = false; + // leading whitespace is kept intact + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + '\n'; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === '\r'; + if (crlf) + content = content.slice(0, -1); + /* istanbul ignore if already caught in lexer */ + if (content && indent.length < trimIndent) { + const src = header.indent + ? 'explicit indentation indicator' + : 'first line'; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message); + indent = ''; + } + if (type === Scalar.Scalar.BLOCK_LITERAL) { + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + } + else if (indent.length > trimIndent || content[0] === '\t') { + // more-indented content within a folded block + if (sep === ' ') + sep = '\n'; + else if (!prevMoreIndented && sep === '\n') + sep = '\n\n'; + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + prevMoreIndented = true; + } + else if (content === '') { + // empty line + if (sep === '\n') + value += '\n'; + else + sep = '\n'; + } + else { + value += sep + content; + sep = ' '; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case '-': + break; + case '+': + for (let i = chompStart; i < lines.length; ++i) + value += '\n' + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== '\n') + value += '\n'; + break; + default: + value += '\n'; + } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; +} +function parseBlockScalarHeader({ offset, props }, strict, onError) { + /* istanbul ignore if should not happen */ + if (props[0].type !== 'block-scalar-header') { + onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found'); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ''; + let error = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === '-' || ch === '+')) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error === -1) + error = offset + i; + } + } + if (error !== -1) + onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ''; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case 'space': + hasSpace = true; + // fallthrough + case 'newline': + length += token.source.length; + break; + case 'comment': + if (strict && !hasSpace) { + const message = 'Comments must be separated from other tokens by white space characters'; + onError(token, 'MISSING_CHAR', message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case 'error': + onError(token, 'UNEXPECTED_TOKEN', token.message); + length += token.source.length; + break; + /* istanbul ignore next should not happen */ + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, 'UNEXPECTED_TOKEN', message); + const ts = token.source; + if (ts && typeof ts === 'string') + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; +} +/** @returns Array of lines split up as `[indent, content]` */ +function splitLines(source) { + const split = source.split(/\n( *)/); + const first = split[0]; + const m = first.match(/^( *)/); + const line0 = m?.[1] + ? [m[1], first.slice(m[1].length)] + : ['', first]; + const lines = [line0]; + for (let i = 1; i < split.length; i += 2) + lines.push([split[i], split[i + 1]]); + return lines; +} + +exports.resolveBlockScalar = resolveBlockScalar; diff --git a/tools/yaml/dist/compose/resolve-block-seq.d.ts b/tools/yaml/dist/compose/resolve-block-seq.d.ts new file mode 100644 index 0000000..3a15f52 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-seq.d.ts @@ -0,0 +1,6 @@ +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import type { BlockSequence } from '../parse/cst.js'; +import { CollectionTag } from '../schema/types.js'; +import type { ComposeContext, ComposeNode } from './compose-node.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed; diff --git a/tools/yaml/dist/compose/resolve-block-seq.js b/tools/yaml/dist/compose/resolve-block-seq.js new file mode 100644 index 0000000..9bb26db --- /dev/null +++ b/tools/yaml/dist/compose/resolve-block-seq.js @@ -0,0 +1,48 @@ +'use strict'; + +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveProps = require('./resolve-props.js'); +var utilFlowIndentCheck = require('./util-flow-indent-check.js'); + +function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps.resolveProps(start, { + indicator: 'seq-item-ind', + next: value, + offset, + onError, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value && value.type === 'block-seq') + onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column'); + else + onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator'); + } + else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); + } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; +} + +exports.resolveBlockSeq = resolveBlockSeq; diff --git a/tools/yaml/dist/compose/resolve-end.d.ts b/tools/yaml/dist/compose/resolve-end.d.ts new file mode 100644 index 0000000..bb2d0b8 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-end.d.ts @@ -0,0 +1,6 @@ +import type { SourceToken } from '../parse/cst.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveEnd(end: SourceToken[] | undefined, offset: number, reqSpace: boolean, onError: ComposeErrorHandler): { + comment: string; + offset: number; +}; diff --git a/tools/yaml/dist/compose/resolve-end.js b/tools/yaml/dist/compose/resolve-end.js new file mode 100644 index 0000000..3a58347 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-end.js @@ -0,0 +1,39 @@ +'use strict'; + +function resolveEnd(end, offset, reqSpace, onError) { + let comment = ''; + if (end) { + let hasSpace = false; + let sep = ''; + for (const token of end) { + const { source, type } = token; + switch (type) { + case 'space': + hasSpace = true; + break; + case 'comment': { + if (reqSpace && !hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += sep + cb; + sep = ''; + break; + } + case 'newline': + if (comment) + sep += source; + hasSpace = true; + break; + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); + } + offset += source.length; + } + } + return { comment, offset }; +} + +exports.resolveEnd = resolveEnd; diff --git a/tools/yaml/dist/compose/resolve-flow-collection.d.ts b/tools/yaml/dist/compose/resolve-flow-collection.d.ts new file mode 100644 index 0000000..8db5985 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-flow-collection.d.ts @@ -0,0 +1,7 @@ +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import type { FlowCollection } from '../parse/cst.js'; +import { CollectionTag } from '../schema/types.js'; +import type { ComposeContext, ComposeNode } from './compose-node.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveFlowCollection({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, fc: FlowCollection, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed | YAMLSeq.Parsed; diff --git a/tools/yaml/dist/compose/resolve-flow-collection.js b/tools/yaml/dist/compose/resolve-flow-collection.js new file mode 100644 index 0000000..ec29d08 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-flow-collection.js @@ -0,0 +1,201 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Pair = require('../nodes/Pair.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveEnd = require('./resolve-end.js'); +var resolveProps = require('./resolve-props.js'); +var utilContainsNewline = require('./util-contains-newline.js'); +var utilMapIncludes = require('./util-map-includes.js'); + +const blockMsg = 'Block collections are not allowed within flow collections'; +const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq'); +function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === '{'; + const fcName = isMap ? 'flow map' : 'flow sequence'; + const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq)); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep, value } = collItem; + const props = resolveProps.resolveProps(start, { + flow: fcName, + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep && !value) { + if (i === 0 && props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += '\n' + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; + } + if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key)) + onError(key, // checked by containsNewline() + 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + } + if (i === 0) { + if (props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + } + else { + if (!props.comma) + onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ''; + loop: for (const st of start) { + switch (st.type) { + case 'comma': + case 'space': + break; + case 'comment': + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (identity.isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += '\n' + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } + } + if (!isMap && !sep && !props.found) { + // item is a value in a seq + // → key & sep are empty, start does not include ? or : + const valueNode = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, sep, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else { + // item is a key+value pair + // key value + const keyStart = props.end; + const keyNode = key + ? composeNode(ctx, key, props, onError) + : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg); + // value properties + const valueProps = resolveProps.resolveProps(sep ?? [], { + flow: fcName, + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep) + for (const st of sep) { + if (st === valueProps.found) + break; + if (st.type === 'newline') { + onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key'); + } + } + else if (value) { + if ('source' in value && value.source && value.source[0] === ':') + onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`); + else + onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : valueProps.found + ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) + : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + map.items.push(pair); + } + else { + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); + coll.items.push(map); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? '}' : ']'; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce && ce.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot + ? `${name} must end with a ${expectedEnd}` + : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += '\n' + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } + else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; +} + +exports.resolveFlowCollection = resolveFlowCollection; diff --git a/tools/yaml/dist/compose/resolve-flow-scalar.d.ts b/tools/yaml/dist/compose/resolve-flow-scalar.d.ts new file mode 100644 index 0000000..0c9204d --- /dev/null +++ b/tools/yaml/dist/compose/resolve-flow-scalar.d.ts @@ -0,0 +1,10 @@ +import { Range } from '../nodes/Node.js'; +import { Scalar } from '../nodes/Scalar.js'; +import type { FlowScalar } from '../parse/cst.js'; +import type { ComposeErrorHandler } from './composer.js'; +export declare function resolveFlowScalar(scalar: FlowScalar, strict: boolean, onError: ComposeErrorHandler): { + value: string; + type: Scalar.PLAIN | Scalar.QUOTE_DOUBLE | Scalar.QUOTE_SINGLE | null; + comment: string; + range: Range; +}; diff --git a/tools/yaml/dist/compose/resolve-flow-scalar.js b/tools/yaml/dist/compose/resolve-flow-scalar.js new file mode 100644 index 0000000..cf6257c --- /dev/null +++ b/tools/yaml/dist/compose/resolve-flow-scalar.js @@ -0,0 +1,225 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); +var resolveEnd = require('./resolve-end.js'); + +function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case 'scalar': + _type = Scalar.Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case 'single-quoted-scalar': + _type = Scalar.Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case 'double-quoted-scalar': + _type = Scalar.Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + /* istanbul ignore next should not happen */ + default: + onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`); + return { + value: '', + type: null, + comment: '', + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; +} +function plainValue(source, onError) { + let badChar = ''; + switch (source[0]) { + /* istanbul ignore next should not happen */ + case '\t': + badChar = 'a tab character'; + break; + case ',': + badChar = 'flow indicator character ,'; + break; + case '%': + badChar = 'directive indicator character %'; + break; + case '|': + case '>': { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case '@': + case '`': { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`); + return foldLines(source); +} +function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, 'MISSING_CHAR', "Missing closing 'quote"); + return foldLines(source.slice(1, -1)).replace(/''/g, "'"); +} +function foldLines(source) { + /** + * The negative lookbehind here and in the `re` RegExp is to + * prevent causing a polynomial search time in certain cases. + * + * The try-catch is for Safari, which doesn't support this yet: + * https://caniuse.com/js-regexp-lookbehind + */ + let first, line; + try { + first = new RegExp('(.*?)(? wsStart ? source.slice(wsStart, i + 1) : ch; + } + else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, 'MISSING_CHAR', 'Missing closing "quote'); + return res; +} +/** + * Fold a single newline into a space, multiple newlines to N - 1 newlines. + * Presumes `source[offset] === '\n'` + */ +function foldNewline(source, offset) { + let fold = ''; + let ch = source[offset + 1]; + while (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') { + if (ch === '\r' && source[offset + 2] !== '\n') + break; + if (ch === '\n') + fold += '\n'; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = ' '; + return { fold, offset }; +} +const escapeCodes = { + '0': '\0', + a: '\x07', + b: '\b', + e: '\x1b', + f: '\f', + n: '\n', + r: '\r', + t: '\t', + v: '\v', + N: '\u0085', + _: '\u00a0', + L: '\u2028', + P: '\u2029', + ' ': ' ', + '"': '"', + '/': '/', + '\\': '\\', + '\t': '\t' +}; +function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`); + return raw; + } + return String.fromCodePoint(code); +} + +exports.resolveFlowScalar = resolveFlowScalar; diff --git a/tools/yaml/dist/compose/resolve-props.d.ts b/tools/yaml/dist/compose/resolve-props.d.ts new file mode 100644 index 0000000..fba44cf --- /dev/null +++ b/tools/yaml/dist/compose/resolve-props.d.ts @@ -0,0 +1,22 @@ +import type { SourceToken, Token } from '../parse/cst.js'; +import type { ComposeErrorHandler } from './composer.js'; +export interface ResolvePropsArg { + flow?: 'flow map' | 'flow sequence'; + indicator: 'doc-start' | 'explicit-key-ind' | 'map-value-ind' | 'seq-item-ind'; + next: Token | null | undefined; + offset: number; + onError: ComposeErrorHandler; + startOnNewline: boolean; +} +export declare function resolveProps(tokens: SourceToken[], { flow, indicator, next, offset, onError, startOnNewline }: ResolvePropsArg): { + comma: SourceToken | null; + found: SourceToken | null; + spaceBefore: boolean; + comment: string; + hasNewline: boolean; + hasNewlineAfterProp: boolean; + anchor: SourceToken | null; + tag: SourceToken | null; + end: number; + start: number; +}; diff --git a/tools/yaml/dist/compose/resolve-props.js b/tools/yaml/dist/compose/resolve-props.js new file mode 100644 index 0000000..bc2ef22 --- /dev/null +++ b/tools/yaml/dist/compose/resolve-props.js @@ -0,0 +1,136 @@ +'use strict'; + +function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ''; + let commentSep = ''; + let hasNewline = false; + let hasNewlineAfterProp = false; + let reqSpace = false; + let anchor = null; + let tag = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== 'space' && + token.type !== 'newline' && + token.type !== 'comma') + onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + reqSpace = false; + } + switch (token.type) { + case 'space': + // At the doc level, tabs at line start may be parsed + // as leading white space rather than indentation. + // In a flow collection, only the parser handles indent. + if (!flow && + atNewline && + indicator !== 'doc-start' && + token.source[0] === '\t') + onError(token, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + hasSpace = true; + break; + case 'comment': { + if (!hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = token.source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ''; + atNewline = false; + break; + } + case 'newline': + if (atNewline) { + if (comment) + comment += token.source; + else + spaceBefore = true; + } + else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + hasNewlineAfterProp = true; + hasSpace = true; + break; + case 'anchor': + if (anchor) + onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor'); + if (token.source.endsWith(':')) + onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true); + anchor = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case 'tag': { + if (tag) + onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag'); + tag = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + } + case indicator: + // Could here handle preceding comments differently + if (anchor || tag) + onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`); + found = token; + atNewline = false; + hasSpace = false; + break; + case 'comma': + if (flow) { + if (comma) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + // else fallthrough + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; + } + } + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && + next && + next.type !== 'space' && + next.type !== 'newline' && + next.type !== 'comma' && + (next.type !== 'scalar' || next.source !== '')) + onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + hasNewlineAfterProp, + anchor, + tag, + end, + start: start ?? end + }; +} + +exports.resolveProps = resolveProps; diff --git a/tools/yaml/dist/compose/util-contains-newline.d.ts b/tools/yaml/dist/compose/util-contains-newline.d.ts new file mode 100644 index 0000000..8155be0 --- /dev/null +++ b/tools/yaml/dist/compose/util-contains-newline.d.ts @@ -0,0 +1,2 @@ +import type { Token } from '../parse/cst.js'; +export declare function containsNewline(key: Token | null | undefined): boolean | null; diff --git a/tools/yaml/dist/compose/util-contains-newline.js b/tools/yaml/dist/compose/util-contains-newline.js new file mode 100644 index 0000000..e7aa82d --- /dev/null +++ b/tools/yaml/dist/compose/util-contains-newline.js @@ -0,0 +1,36 @@ +'use strict'; + +function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case 'alias': + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + if (key.source.includes('\n')) + return true; + if (key.end) + for (const st of key.end) + if (st.type === 'newline') + return true; + return false; + case 'flow-collection': + for (const it of key.items) { + for (const st of it.start) + if (st.type === 'newline') + return true; + if (it.sep) + for (const st of it.sep) + if (st.type === 'newline') + return true; + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } + return false; + default: + return true; + } +} + +exports.containsNewline = containsNewline; diff --git a/tools/yaml/dist/compose/util-empty-scalar-position.d.ts b/tools/yaml/dist/compose/util-empty-scalar-position.d.ts new file mode 100644 index 0000000..90499b8 --- /dev/null +++ b/tools/yaml/dist/compose/util-empty-scalar-position.d.ts @@ -0,0 +1,2 @@ +import type { Token } from '../parse/cst.js'; +export declare function emptyScalarPosition(offset: number, before: Token[] | undefined, pos: number | null): number; diff --git a/tools/yaml/dist/compose/util-empty-scalar-position.js b/tools/yaml/dist/compose/util-empty-scalar-position.js new file mode 100644 index 0000000..b2cd849 --- /dev/null +++ b/tools/yaml/dist/compose/util-empty-scalar-position.js @@ -0,0 +1,29 @@ +'use strict'; + +function emptyScalarPosition(offset, before, pos) { + if (before) { + if (pos === null) + pos = before.length; + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case 'space': + case 'comment': + case 'newline': + offset -= st.source.length; + continue; + } + // Technically, an empty scalar is immediately after the last non-empty + // node, but it's more useful to place it after any whitespace. + st = before[++i]; + while (st?.type === 'space') { + offset += st.source.length; + st = before[++i]; + } + break; + } + } + return offset; +} + +exports.emptyScalarPosition = emptyScalarPosition; diff --git a/tools/yaml/dist/compose/util-flow-indent-check.d.ts b/tools/yaml/dist/compose/util-flow-indent-check.d.ts new file mode 100644 index 0000000..64ed1fc --- /dev/null +++ b/tools/yaml/dist/compose/util-flow-indent-check.d.ts @@ -0,0 +1,3 @@ +import { Token } from '../parse/cst'; +import { ComposeErrorHandler } from './composer'; +export declare function flowIndentCheck(indent: number, fc: Token | null | undefined, onError: ComposeErrorHandler): void; diff --git a/tools/yaml/dist/compose/util-flow-indent-check.js b/tools/yaml/dist/compose/util-flow-indent-check.js new file mode 100644 index 0000000..1e6b06f --- /dev/null +++ b/tools/yaml/dist/compose/util-flow-indent-check.js @@ -0,0 +1,17 @@ +'use strict'; + +var utilContainsNewline = require('./util-contains-newline.js'); + +function flowIndentCheck(indent, fc, onError) { + if (fc?.type === 'flow-collection') { + const end = fc.end[0]; + if (end.indent === indent && + (end.source === ']' || end.source === '}') && + utilContainsNewline.containsNewline(fc)) { + const msg = 'Flow end indicator should be more indented than parent'; + onError(end, 'BAD_INDENT', msg, true); + } + } +} + +exports.flowIndentCheck = flowIndentCheck; diff --git a/tools/yaml/dist/compose/util-map-includes.d.ts b/tools/yaml/dist/compose/util-map-includes.d.ts new file mode 100644 index 0000000..fae2276 --- /dev/null +++ b/tools/yaml/dist/compose/util-map-includes.d.ts @@ -0,0 +1,4 @@ +import type { ParsedNode } from '../nodes/Node.js'; +import type { Pair } from '../nodes/Pair.js'; +import type { ComposeContext } from './compose-node.js'; +export declare function mapIncludes(ctx: ComposeContext, items: Pair[], search: ParsedNode): boolean; diff --git a/tools/yaml/dist/compose/util-map-includes.js b/tools/yaml/dist/compose/util-map-includes.js new file mode 100644 index 0000000..8a8d35c --- /dev/null +++ b/tools/yaml/dist/compose/util-map-includes.js @@ -0,0 +1,19 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); + +function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === 'function' + ? uniqueKeys + : (a, b) => a === b || + (identity.isScalar(a) && + identity.isScalar(b) && + a.value === b.value && + !(a.value === '<<' && ctx.schema.merge)); + return items.some(pair => isEqual(pair.key, search)); +} + +exports.mapIncludes = mapIncludes; diff --git a/tools/yaml/dist/doc/Document.d.ts b/tools/yaml/dist/doc/Document.d.ts new file mode 100644 index 0000000..431b907 --- /dev/null +++ b/tools/yaml/dist/doc/Document.d.ts @@ -0,0 +1,141 @@ +import type { YAMLError, YAMLWarning } from '../errors.js'; +import { Alias } from '../nodes/Alias.js'; +import { NODE_TYPE } from '../nodes/identity.js'; +import type { Node, NodeType, ParsedNode, Range } from '../nodes/Node.js'; +import { Pair } from '../nodes/Pair.js'; +import type { Scalar } from '../nodes/Scalar.js'; +import type { YAMLMap } from '../nodes/YAMLMap.js'; +import type { YAMLSeq } from '../nodes/YAMLSeq.js'; +import type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from '../options.js'; +import { Schema } from '../schema/Schema.js'; +import { Directives } from './directives.js'; +export type Replacer = any[] | ((key: any, value: any) => unknown); +export declare namespace Document { + /** @ts-ignore The typing of directives fails in TS <= 4.2 */ + interface Parsed extends Document { + directives: Directives; + range: Range; + } +} +export declare class Document { + readonly [NODE_TYPE]: symbol; + /** A comment before this Document */ + commentBefore: string | null; + /** A comment immediately after this Document */ + comment: string | null; + /** The document contents. */ + contents: Strict extends true ? Contents | null : Contents; + directives: Strict extends true ? Directives | undefined : Directives; + /** Errors encountered during parsing. */ + errors: YAMLError[]; + options: Required>; + /** + * The `[start, value-end, node-end]` character offsets for the part of the + * source parsed into this document (undefined if not parsed). The `value-end` + * and `node-end` positions are themselves not included in their respective + * ranges. + */ + range?: Range; + /** The schema used with the document. Use `setSchema()` to change. */ + schema: Schema; + /** Warnings encountered during parsing. */ + warnings: YAMLWarning[]; + /** + * @param value - The initial value for the document, which will be wrapped + * in a Node container. + */ + constructor(value?: any, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions); + constructor(value: any, replacer: null | Replacer, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions); + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone(): Document; + /** Adds a value to the document. */ + add(value: any): void; + /** Adds a value to the document. */ + addIn(path: Iterable, value: unknown): void; + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node: Strict extends true ? Scalar | YAMLMap | YAMLSeq : Node, name?: string): Alias; + /** + * Convert any value into a `Node` using the current schema, recursively + * turning objects into collections. + */ + createNode(value: T, options?: CreateNodeOptions): NodeType; + createNode(value: T, replacer: Replacer | CreateNodeOptions | null, options?: CreateNodeOptions): NodeType; + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key: unknown, value: unknown, options?: CreateNodeOptions): Pair; + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key: unknown): boolean; + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path: Iterable | null): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key: unknown, keepScalar?: boolean): Strict extends true ? unknown : any; + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path: Iterable | null, keepScalar?: boolean): Strict extends true ? unknown : any; + /** + * Checks if the document includes a value with the key `key`. + */ + has(key: unknown): boolean; + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path: Iterable | null): boolean; + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key: any, value: unknown): void; + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path: Iterable | null, value: unknown): void; + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version: '1.1' | '1.2' | 'next' | null, options?: SchemaOptions): void; + /** A plain JavaScript representation of the document `contents`. */ + toJS(opt?: ToJSOptions & { + [ignored: string]: unknown; + }): any; + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg?: string | null, onAnchor?: ToJSOptions['onAnchor']): any; + /** A YAML representation of the document. */ + toString(options?: ToStringOptions): string; +} diff --git a/tools/yaml/dist/doc/Document.js b/tools/yaml/dist/doc/Document.js new file mode 100644 index 0000000..a0aa955 --- /dev/null +++ b/tools/yaml/dist/doc/Document.js @@ -0,0 +1,336 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var Collection = require('../nodes/Collection.js'); +var identity = require('../nodes/identity.js'); +var Pair = require('../nodes/Pair.js'); +var toJS = require('../nodes/toJS.js'); +var Schema = require('../schema/Schema.js'); +var stringifyDocument = require('../stringify/stringifyDocument.js'); +var anchors = require('./anchors.js'); +var applyReviver = require('./applyReviver.js'); +var createNode = require('./createNode.js'); +var directives = require('./directives.js'); + +class Document { + constructor(value, replacer, options) { + /** A comment before this Document */ + this.commentBefore = null; + /** A comment immediately after this Document */ + this.comment = null; + /** Errors encountered during parsing. */ + this.errors = []; + /** Warnings encountered during parsing. */ + this.warnings = []; + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC }); + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: 'warn', + prettyErrors: true, + strict: true, + uniqueKeys: true, + version: '1.2' + }, options); + this.options = opt; + let { version } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version = this.directives.yaml.version; + } + else + this.directives = new directives.Directives({ version }); + this.setSchema(version, options); + // @ts-expect-error We can't really know that this matches Contents. + this.contents = + value === undefined ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(Document.prototype, { + [identity.NODE_TYPE]: { value: identity.DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + // @ts-expect-error We can't really know that this matches Contents. + copy.contents = identity.isNode(this.contents) + ? this.contents.clone(copy.schema) + : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchors.anchorNames(this); + node.anchor = + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name; + } + return new Alias.Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = undefined; + if (typeof replacer === 'function') { + value = replacer.call({ '': value }, '', value); + _replacer = replacer; + } + else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || 'a'); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode.createNode(value, tag, ctx); + if (flow && identity.isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair.Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + if (Collection.isEmptyPath(path)) { + if (this.contents == null) + return false; + // @ts-expect-error Presumed impossible if Strict extends false + this.contents = null; + return true; + } + return assertCollection(this.contents) + ? this.contents.deleteIn(path) + : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return identity.isCollection(this.contents) + ? this.contents.get(key, keepScalar) + : undefined; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + if (Collection.isEmptyPath(path)) + return !keepScalar && identity.isScalar(this.contents) + ? this.contents.value + : this.contents; + return identity.isCollection(this.contents) + ? this.contents.getIn(path, keepScalar) + : undefined; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return identity.isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path) { + if (Collection.isEmptyPath(path)) + return this.contents !== undefined; + return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = Collection.collectionFromPath(this.schema, [key], value); + } + else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + if (Collection.isEmptyPath(path)) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = value; + } + else if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value); + } + else if (assertCollection(this.contents)) { + this.contents.setIn(path, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version, options = {}) { + if (typeof version === 'number') + version = String(version); + let opt; + switch (version) { + case '1.1': + if (this.directives) + this.directives.yaml.version = '1.1'; + else + this.directives = new directives.Directives({ version: '1.1' }); + opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' }; + break; + case '1.2': + case 'next': + if (this.directives) + this.directives.yaml.version = version; + else + this.directives = new directives.Directives({ version }); + opt = { merge: false, resolveKnownTags: true, schema: 'core' }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + // Not using `instanceof Schema` to allow for duck typing + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema.Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS.toJS(this.contents, jsonArg ?? '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver.applyReviver(reviver, { '': res }, '', res) + : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error('Document with errors cannot be stringified'); + if ('indent' in options && + (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument.stringifyDocument(this, options); + } +} +function assertCollection(contents) { + if (identity.isCollection(contents)) + return true; + throw new Error('Expected a YAML collection as document contents'); +} + +exports.Document = Document; diff --git a/tools/yaml/dist/doc/anchors.d.ts b/tools/yaml/dist/doc/anchors.d.ts new file mode 100644 index 0000000..f5e967c --- /dev/null +++ b/tools/yaml/dist/doc/anchors.d.ts @@ -0,0 +1,24 @@ +import type { Node } from '../nodes/Node.js'; +import type { Document } from './Document.js'; +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +export declare function anchorIsValid(anchor: string): true; +export declare function anchorNames(root: Document | Node): Set; +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +export declare function findNewAnchor(prefix: string, exclude: Set): string; +export declare function createNodeAnchors(doc: Document, prefix: string): { + onAnchor: (source: unknown) => string; + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => void; + sourceObjects: Map; +}; diff --git a/tools/yaml/dist/doc/anchors.js b/tools/yaml/dist/doc/anchors.js new file mode 100644 index 0000000..223639a --- /dev/null +++ b/tools/yaml/dist/doc/anchors.js @@ -0,0 +1,77 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var visit = require('../visit.js'); + +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; +} +function anchorNames(root) { + const anchors = new Set(); + visit.visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; +} +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; + } +} +function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + if (!prevAnchors) + prevAnchors = anchorNames(doc); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === 'object' && + ref.anchor && + (identity.isScalar(ref.node) || identity.isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } + else { + const error = new Error('Failed to resolve repeated object (this should not happen)'); + error.source = source; + throw error; + } + } + }, + sourceObjects + }; +} + +exports.anchorIsValid = anchorIsValid; +exports.anchorNames = anchorNames; +exports.createNodeAnchors = createNodeAnchors; +exports.findNewAnchor = findNewAnchor; diff --git a/tools/yaml/dist/doc/applyReviver.d.ts b/tools/yaml/dist/doc/applyReviver.d.ts new file mode 100644 index 0000000..e125b08 --- /dev/null +++ b/tools/yaml/dist/doc/applyReviver.d.ts @@ -0,0 +1,9 @@ +export type Reviver = (key: unknown, value: unknown) => unknown; +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +export declare function applyReviver(reviver: Reviver, obj: unknown, key: unknown, val: any): unknown; diff --git a/tools/yaml/dist/doc/applyReviver.js b/tools/yaml/dist/doc/applyReviver.js new file mode 100644 index 0000000..8734579 --- /dev/null +++ b/tools/yaml/dist/doc/applyReviver.js @@ -0,0 +1,56 @@ +'use strict'; + +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +function applyReviver(reviver, obj, key, val) { + if (val && typeof val === 'object') { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v1 = applyReviver(reviver, val, String(i), v0); + if (v1 === undefined) + delete val[i]; + else if (v1 !== v0) + val[i] = v1; + } + } + else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + val.delete(k); + else if (v1 !== v0) + val.set(k, v1); + } + } + else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === undefined) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } + else { + for (const [k, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + delete val[k]; + else if (v1 !== v0) + val[k] = v1; + } + } + } + return reviver.call(obj, key, val); +} + +exports.applyReviver = applyReviver; diff --git a/tools/yaml/dist/doc/createNode.d.ts b/tools/yaml/dist/doc/createNode.d.ts new file mode 100644 index 0000000..1619981 --- /dev/null +++ b/tools/yaml/dist/doc/createNode.d.ts @@ -0,0 +1,17 @@ +import type { Node } from '../nodes/Node.js'; +import type { Schema } from '../schema/Schema.js'; +import type { CollectionTag, ScalarTag } from '../schema/types.js'; +import type { Replacer } from './Document.js'; +export interface CreateNodeContext { + aliasDuplicateObjects: boolean; + keepUndefined: boolean; + onAnchor: (source: unknown) => string; + onTagObj?: (tagObj: ScalarTag | CollectionTag) => void; + sourceObjects: Map; + replacer?: Replacer; + schema: Schema; +} +export declare function createNode(value: unknown, tagName: string | undefined, ctx: CreateNodeContext): Node; diff --git a/tools/yaml/dist/doc/createNode.js b/tools/yaml/dist/doc/createNode.js new file mode 100644 index 0000000..64dd31a --- /dev/null +++ b/tools/yaml/dist/doc/createNode.js @@ -0,0 +1,91 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); + +const defaultTagPrefix = 'tag:yaml.org,2002:'; +function findTagObject(value, tagName, tags) { + if (tagName) { + const match = tags.filter(t => t.tag === tagName); + const tagObj = match.find(t => !t.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find(t => t.identify?.(value) && !t.format); +} +function createNode(value, tagName, ctx) { + if (identity.isDocument(value)) + value = value.contents; + if (identity.isNode(value)) + return value; + if (identity.isPair(value)) { + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; + } + if (value instanceof String || + value instanceof Number || + value instanceof Boolean || + (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere + ) { + // https://tc39.es/ecma262/#sec-serializejsonproperty + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + // Detect duplicate references to the same object & use Alias nodes for all + // after first. The `ref` wrapper allows for circular references to resolve. + let ref = undefined; + if (aliasDuplicateObjects && value && typeof value === 'object') { + ref = sourceObjects.get(value); + if (ref) { + if (!ref.anchor) + ref.anchor = onAnchor(value); + return new Alias.Alias(ref.anchor); + } + else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } + } + if (tagName?.startsWith('!!')) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + value = value.toJSON(); + } + if (!value || typeof value !== 'object') { + const node = new Scalar.Scalar(value); + if (ref) + ref.node = node; + return node; + } + tagObj = + value instanceof Map + ? schema[identity.MAP] + : Symbol.iterator in Object(value) + ? schema[identity.SEQ] + : schema[identity.MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode + ? tagObj.createNode(ctx.schema, value, ctx) + : typeof tagObj?.nodeClass?.from === 'function' + ? tagObj.nodeClass.from(ctx.schema, value, ctx) + : new Scalar.Scalar(value); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; +} + +exports.createNode = createNode; diff --git a/tools/yaml/dist/doc/directives.d.ts b/tools/yaml/dist/doc/directives.d.ts new file mode 100644 index 0000000..ff8a2cb --- /dev/null +++ b/tools/yaml/dist/doc/directives.d.ts @@ -0,0 +1,49 @@ +import type { Document } from './Document.js'; +export declare class Directives { + static defaultYaml: Directives['yaml']; + static defaultTags: Directives['tags']; + yaml: { + version: '1.1' | '1.2' | 'next'; + explicit?: boolean; + }; + tags: Record; + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + docStart: true | null; + /** The doc-end marker `...`. */ + docEnd: boolean; + /** + * Used when parsing YAML 1.1, where: + * > If the document specifies no directives, it is parsed using the same + * > settings as the previous document. If the document does specify any + * > directives, all directives of previous documents, if any, are ignored. + */ + private atNextDocument?; + constructor(yaml?: Directives['yaml'], tags?: Directives['tags']); + clone(): Directives; + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument(): Directives; + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line: string, onError: (offset: number, message: string, warning?: boolean) => void): boolean; + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source: string, onError: (message: string) => void): string | null; + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag: string): string; + toString(doc?: Document): string; +} diff --git a/tools/yaml/dist/doc/directives.js b/tools/yaml/dist/doc/directives.js new file mode 100644 index 0000000..854c7e5 --- /dev/null +++ b/tools/yaml/dist/doc/directives.js @@ -0,0 +1,171 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var visit = require('../visit.js'); + +const escapeChars = { + '!': '%21', + ',': '%2C', + '[': '%5B', + ']': '%5D', + '{': '%7B', + '}': '%7D' +}; +const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]); +class Directives { + constructor(yaml, tags) { + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + this.docStart = null; + /** The doc-end marker `...`. */ + this.docEnd = false; + this.yaml = Object.assign({}, Directives.defaultYaml, yaml); + this.tags = Object.assign({}, Directives.defaultTags, tags); + } + clone() { + const copy = new Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case '1.1': + this.atNextDocument = true; + break; + case '1.2': + this.atNextDocument = false; + this.yaml = { + explicit: Directives.defaultYaml.explicit, + version: '1.2' + }; + this.tags = Object.assign({}, Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' }; + this.tags = Object.assign({}, Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case '%TAG': { + if (parts.length !== 2) { + onError(0, '%TAG directive should contain exactly two parts'); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case '%YAML': { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, '%YAML directive should contain exactly one part'); + return false; + } + const [version] = parts; + if (version === '1.1' || version === '1.2') { + this.yaml.version = version; + return true; + } + else { + const isValid = /^\d+\.\d+$/.test(version); + onError(6, `Unsupported YAML version ${version}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === '!') + return '!'; // non-specific tag + if (source[0] !== '!') { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === '<') { + const verbatim = source.slice(2, -1); + if (verbatim === '!' || verbatim === '!!') { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== '>') + onError('Verbatim tags must end with a >'); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) + return prefix + decodeURIComponent(suffix); + if (handle === '!') + return source; // local tag + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === '!' ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit + ? [`%YAML ${this.yaml.version || '1.2'}`] + : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) { + const tags = {}; + visit.visit(doc.contents, (_key, node) => { + if (identity.isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } + else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === '!!' && prefix === 'tag:yaml.org,2002:') + continue; + if (!doc || tagNames.some(tn => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join('\n'); + } +} +Directives.defaultYaml = { explicit: false, version: '1.2' }; +Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' }; + +exports.Directives = Directives; diff --git a/tools/yaml/dist/errors.d.ts b/tools/yaml/dist/errors.d.ts new file mode 100644 index 0000000..1b7b612 --- /dev/null +++ b/tools/yaml/dist/errors.d.ts @@ -0,0 +1,21 @@ +import type { LineCounter } from './parse/line-counter'; +export type ErrorCode = 'ALIAS_PROPS' | 'BAD_ALIAS' | 'BAD_DIRECTIVE' | 'BAD_DQ_ESCAPE' | 'BAD_INDENT' | 'BAD_PROP_ORDER' | 'BAD_SCALAR_START' | 'BLOCK_AS_IMPLICIT_KEY' | 'BLOCK_IN_FLOW' | 'DUPLICATE_KEY' | 'IMPOSSIBLE' | 'KEY_OVER_1024_CHARS' | 'MISSING_CHAR' | 'MULTILINE_IMPLICIT_KEY' | 'MULTIPLE_ANCHORS' | 'MULTIPLE_DOCS' | 'MULTIPLE_TAGS' | 'TAB_AS_INDENT' | 'TAG_RESOLVE_FAILED' | 'UNEXPECTED_TOKEN' | 'BAD_COLLECTION_TYPE'; +export type LinePos = { + line: number; + col: number; +}; +export declare class YAMLError extends Error { + name: 'YAMLParseError' | 'YAMLWarning'; + code: ErrorCode; + message: string; + pos: [number, number]; + linePos?: [LinePos] | [LinePos, LinePos]; + constructor(name: YAMLError['name'], pos: [number, number], code: ErrorCode, message: string); +} +export declare class YAMLParseError extends YAMLError { + constructor(pos: [number, number], code: ErrorCode, message: string); +} +export declare class YAMLWarning extends YAMLError { + constructor(pos: [number, number], code: ErrorCode, message: string); +} +export declare const prettifyError: (src: string, lc: LineCounter) => (error: YAMLError) => void; diff --git a/tools/yaml/dist/errors.js b/tools/yaml/dist/errors.js new file mode 100644 index 0000000..9d04c60 --- /dev/null +++ b/tools/yaml/dist/errors.js @@ -0,0 +1,62 @@ +'use strict'; + +class YAMLError extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; + } +} +class YAMLParseError extends YAMLError { + constructor(pos, code, message) { + super('YAMLParseError', pos, code, message); + } +} +class YAMLWarning extends YAMLError { + constructor(pos, code, message) { + super('YAMLWarning', pos, code, message); + } +} +const prettifyError = (src, lc) => (error) => { + if (error.pos[0] === -1) + return; + error.linePos = error.pos.map(pos => lc.linePos(pos)); + const { line, col } = error.linePos[0]; + error.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src + .substring(lc.lineStarts[line - 1], lc.lineStarts[line]) + .replace(/[\n\r]+$/, ''); + // Trim to max 80 chars, keeping col position near the middle + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = '…' + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + '…'; + // Include previous line in context if pointing at line start + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + // Regexp won't match if start is trimmed + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + '…\n'; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count = 1; + const end = error.linePos[1]; + if (end && end.line === line && end.col > col) { + count = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = ' '.repeat(ci) + '^'.repeat(count); + error.message += `:\n\n${lineStr}\n${pointer}\n`; + } +}; + +exports.YAMLError = YAMLError; +exports.YAMLParseError = YAMLParseError; +exports.YAMLWarning = YAMLWarning; +exports.prettifyError = prettifyError; diff --git a/tools/yaml/dist/index.d.ts b/tools/yaml/dist/index.d.ts new file mode 100644 index 0000000..66e784e --- /dev/null +++ b/tools/yaml/dist/index.d.ts @@ -0,0 +1,22 @@ +export { Composer } from './compose/composer.js'; +export { Document } from './doc/Document.js'; +export { Schema } from './schema/Schema.js'; +export { ErrorCode, YAMLError, YAMLParseError, YAMLWarning } from './errors.js'; +export { Alias } from './nodes/Alias.js'; +export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js'; +export { Node, ParsedNode, Range } from './nodes/Node.js'; +export { Pair } from './nodes/Pair.js'; +export { Scalar } from './nodes/Scalar.js'; +export { YAMLMap } from './nodes/YAMLMap.js'; +export { YAMLSeq } from './nodes/YAMLSeq.js'; +export type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options.js'; +export * as CST from './parse/cst.js'; +export { Lexer } from './parse/lexer.js'; +export { LineCounter } from './parse/line-counter.js'; +export { Parser } from './parse/parser.js'; +export { EmptyStream, parse, parseAllDocuments, parseDocument, stringify } from './public-api.js'; +export type { TagId, Tags } from './schema/tags'; +export type { CollectionTag, ScalarTag } from './schema/types'; +export type { YAMLOMap } from './schema/yaml-1.1/omap'; +export type { YAMLSet } from './schema/yaml-1.1/set'; +export { asyncVisitor, asyncVisitorFn, visit, visitAsync, visitor, visitorFn } from './visit.js'; diff --git a/tools/yaml/dist/index.js b/tools/yaml/dist/index.js new file mode 100644 index 0000000..18c0cb6 --- /dev/null +++ b/tools/yaml/dist/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var composer = require('./compose/composer.js'); +var Document = require('./doc/Document.js'); +var Schema = require('./schema/Schema.js'); +var errors = require('./errors.js'); +var Alias = require('./nodes/Alias.js'); +var identity = require('./nodes/identity.js'); +var Pair = require('./nodes/Pair.js'); +var Scalar = require('./nodes/Scalar.js'); +var YAMLMap = require('./nodes/YAMLMap.js'); +var YAMLSeq = require('./nodes/YAMLSeq.js'); +var cst = require('./parse/cst.js'); +var lexer = require('./parse/lexer.js'); +var lineCounter = require('./parse/line-counter.js'); +var parser = require('./parse/parser.js'); +var publicApi = require('./public-api.js'); +var visit = require('./visit.js'); + + + +exports.Composer = composer.Composer; +exports.Document = Document.Document; +exports.Schema = Schema.Schema; +exports.YAMLError = errors.YAMLError; +exports.YAMLParseError = errors.YAMLParseError; +exports.YAMLWarning = errors.YAMLWarning; +exports.Alias = Alias.Alias; +exports.isAlias = identity.isAlias; +exports.isCollection = identity.isCollection; +exports.isDocument = identity.isDocument; +exports.isMap = identity.isMap; +exports.isNode = identity.isNode; +exports.isPair = identity.isPair; +exports.isScalar = identity.isScalar; +exports.isSeq = identity.isSeq; +exports.Pair = Pair.Pair; +exports.Scalar = Scalar.Scalar; +exports.YAMLMap = YAMLMap.YAMLMap; +exports.YAMLSeq = YAMLSeq.YAMLSeq; +exports.CST = cst; +exports.Lexer = lexer.Lexer; +exports.LineCounter = lineCounter.LineCounter; +exports.Parser = parser.Parser; +exports.parse = publicApi.parse; +exports.parseAllDocuments = publicApi.parseAllDocuments; +exports.parseDocument = publicApi.parseDocument; +exports.stringify = publicApi.stringify; +exports.visit = visit.visit; +exports.visitAsync = visit.visitAsync; diff --git a/tools/yaml/dist/log.d.ts b/tools/yaml/dist/log.d.ts new file mode 100644 index 0000000..5e21612 --- /dev/null +++ b/tools/yaml/dist/log.d.ts @@ -0,0 +1,3 @@ +export type LogLevelId = 'silent' | 'error' | 'warn' | 'debug'; +export declare function debug(logLevel: LogLevelId, ...messages: any[]): void; +export declare function warn(logLevel: LogLevelId, warning: string | Error): void; diff --git a/tools/yaml/dist/log.js b/tools/yaml/dist/log.js new file mode 100644 index 0000000..afb6895 --- /dev/null +++ b/tools/yaml/dist/log.js @@ -0,0 +1,19 @@ +'use strict'; + +function debug(logLevel, ...messages) { + if (logLevel === 'debug') + console.log(...messages); +} +function warn(logLevel, warning) { + if (logLevel === 'debug' || logLevel === 'warn') { + // https://github.com/typescript-eslint/typescript-eslint/issues/7478 + // eslint-disable-next-line @typescript-eslint/prefer-optional-chain + if (typeof process !== 'undefined' && process.emitWarning) + process.emitWarning(warning); + else + console.warn(warning); + } +} + +exports.debug = debug; +exports.warn = warn; diff --git a/tools/yaml/dist/nodes/Alias.d.ts b/tools/yaml/dist/nodes/Alias.d.ts new file mode 100644 index 0000000..b55ebae --- /dev/null +++ b/tools/yaml/dist/nodes/Alias.d.ts @@ -0,0 +1,28 @@ +import type { Document } from '../doc/Document.js'; +import type { FlowScalar } from '../parse/cst.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import { NodeBase, Range } from './Node.js'; +import type { Scalar } from './Scalar'; +import { ToJSContext } from './toJS.js'; +import type { YAMLMap } from './YAMLMap.js'; +import type { YAMLSeq } from './YAMLSeq.js'; +export declare namespace Alias { + interface Parsed extends Alias { + range: Range; + srcToken?: FlowScalar & { + type: 'alias'; + }; + } +} +export declare class Alias extends NodeBase { + source: string; + anchor?: never; + constructor(source: string); + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc: Document): Scalar | YAMLMap | YAMLSeq | undefined; + toJSON(_arg?: unknown, ctx?: ToJSContext): {} | null; + toString(ctx?: StringifyContext, _onComment?: () => void, _onChompKeep?: () => void): string; +} diff --git a/tools/yaml/dist/nodes/Alias.js b/tools/yaml/dist/nodes/Alias.js new file mode 100644 index 0000000..46b37d9 --- /dev/null +++ b/tools/yaml/dist/nodes/Alias.js @@ -0,0 +1,103 @@ +'use strict'; + +var anchors = require('../doc/anchors.js'); +var visit = require('../visit.js'); +var identity = require('./identity.js'); +var Node = require('./Node.js'); +var toJS = require('./toJS.js'); + +class Alias extends Node.NodeBase { + constructor(source) { + super(identity.ALIAS); + this.source = source; + Object.defineProperty(this, 'tag', { + set() { + throw new Error('Alias nodes cannot have tags'); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc) { + let found = undefined; + visit.visit(doc, { + Node: (_key, node) => { + if (node === this) + return visit.visit.BREAK; + if (node.anchor === this.source) + found = node; + } + }); + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors, doc, maxAliasCount } = ctx; + const source = this.resolve(doc); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data = anchors.get(source); + if (!data) { + // Resolve anchors for Node.prototype.toJS() + toJS.toJS(source, null, ctx); + data = anchors.get(source); + } + /* istanbul ignore if */ + if (!data || data.res === undefined) { + const msg = 'This should not happen: Alias anchor was not resolved?'; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, source, anchors); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = 'Excessive alias count indicates a resource exhaustion attack'; + throw new ReferenceError(msg); + } + } + return data.res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchors.anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } +} +function getAliasCount(doc, node, anchors) { + if (identity.isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors && source && anchors.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } + else if (identity.isCollection(node)) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors); + if (c > count) + count = c; + } + return count; + } + else if (identity.isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors); + const vc = getAliasCount(doc, node.value, anchors); + return Math.max(kc, vc); + } + return 1; +} + +exports.Alias = Alias; diff --git a/tools/yaml/dist/nodes/Collection.d.ts b/tools/yaml/dist/nodes/Collection.d.ts new file mode 100644 index 0000000..981ca11 --- /dev/null +++ b/tools/yaml/dist/nodes/Collection.d.ts @@ -0,0 +1,74 @@ +import type { Schema } from '../schema/Schema.js'; +import { NODE_TYPE } from './identity.js'; +import { NodeBase } from './Node.js'; +export declare function collectionFromPath(schema: Schema, path: unknown[], value: unknown): import("./Node.js").Node; +export declare const isEmptyPath: (path: Iterable | null | undefined) => path is null | undefined; +export declare abstract class Collection extends NodeBase { + static maxFlowStringSingleLineLength: number; + schema: Schema | undefined; + [NODE_TYPE]: symbol; + items: unknown[]; + /** An optional anchor on this node. Used by alias nodes. */ + anchor?: string; + /** + * If true, stringify this and all child nodes using flow rather than + * block styles. + */ + flow?: boolean; + constructor(type: symbol, schema?: Schema); + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema?: Schema): Collection; + /** Adds a value to the collection. */ + abstract add(value: unknown): void; + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + abstract delete(key: unknown): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + abstract get(key: unknown, keepScalar?: boolean): unknown; + /** + * Checks if the collection includes a value with the key `key`. + */ + abstract has(key: unknown): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + abstract set(key: unknown, value: unknown): void; + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path: Iterable, value: unknown): void; + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path: Iterable): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path: Iterable, keepScalar?: boolean): unknown; + hasAllNullValues(allowScalar?: boolean): boolean; + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path: Iterable): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path: Iterable, value: unknown): void; +} diff --git a/tools/yaml/dist/nodes/Collection.js b/tools/yaml/dist/nodes/Collection.js new file mode 100644 index 0000000..1c03294 --- /dev/null +++ b/tools/yaml/dist/nodes/Collection.js @@ -0,0 +1,152 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var identity = require('./identity.js'); +var Node = require('./Node.js'); + +function collectionFromPath(schema, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (typeof k === 'number' && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } + else { + v = new Map([[k, v]]); + } + } + return createNode.createNode(v, undefined, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error('This should not happen, please report a bug.'); + }, + schema, + sourceObjects: new Map() + }); +} +// Type guard is intentionally a little wrong so as to be more useful, +// as it does not cover untypable empty non-string iterables (e.g. []). +const isEmptyPath = (path) => path == null || + (typeof path === 'object' && !!path[Symbol.iterator]().next().done); +class Collection extends Node.NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, 'schema', { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path, value) { + if (isEmptyPath(path)) + this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (identity.isCollection(node)) + node.addIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (identity.isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + const [key, ...rest] = path; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && identity.isScalar(node) ? node.value : node; + else + return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined; + } + hasAllNullValues(allowScalar) { + return this.items.every(node => { + if (!identity.isPair(node)) + return false; + const n = node.value; + return (n == null || + (allowScalar && + identity.isScalar(n) && + n.value == null && + !n.commentBefore && + !n.comment && + !n.tag)); + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return identity.isCollection(node) ? node.hasIn(rest) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + const [key, ...rest] = path; + if (rest.length === 0) { + this.set(key, value); + } + else { + const node = this.get(key, true); + if (identity.isCollection(node)) + node.setIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } +} +Collection.maxFlowStringSingleLineLength = 60; + +exports.Collection = Collection; +exports.collectionFromPath = collectionFromPath; +exports.isEmptyPath = isEmptyPath; diff --git a/tools/yaml/dist/nodes/Node.d.ts b/tools/yaml/dist/nodes/Node.d.ts new file mode 100644 index 0000000..fe91ba6 --- /dev/null +++ b/tools/yaml/dist/nodes/Node.d.ts @@ -0,0 +1,46 @@ +import type { Document } from '../doc/Document.js'; +import type { ToJSOptions } from '../options.js'; +import { Token } from '../parse/cst.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import type { Alias } from './Alias.js'; +import { NODE_TYPE } from './identity.js'; +import type { Scalar } from './Scalar.js'; +import type { YAMLMap } from './YAMLMap.js'; +import type { YAMLSeq } from './YAMLSeq.js'; +export type Node = Alias | Scalar | YAMLMap | YAMLSeq; +/** Utility type mapper */ +export type NodeType = T extends string | number | bigint | boolean | null | undefined ? Scalar : T extends Date ? Scalar : T extends Array ? YAMLSeq> : T extends { + [key: string]: any; +} ? YAMLMap, NodeType> : T extends { + [key: number]: any; +} ? YAMLMap, NodeType> : Node; +export type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed; +export type Range = [number, number, number]; +export declare abstract class NodeBase { + readonly [NODE_TYPE]: symbol; + /** A comment on or immediately after this */ + comment?: string | null; + /** A comment before this */ + commentBefore?: string | null; + /** + * The `[start, value-end, node-end]` character offsets for the part of the + * source parsed into this node (undefined if not parsed). The `value-end` + * and `node-end` positions are themselves not included in their respective + * ranges. + */ + range?: Range | null; + /** A blank line before this node and its commentBefore */ + spaceBefore?: boolean; + /** The CST token that was composed into this node. */ + srcToken?: Token; + /** A fully qualified tag, if required */ + tag?: string; + /** A plain JS representation of this node */ + abstract toJSON(): any; + abstract toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + constructor(type: symbol); + /** Create a copy of this node. */ + clone(): NodeBase; + /** A plain JavaScript representation of this node. */ + toJS(doc: Document, { mapAsMap, maxAliasCount, onAnchor, reviver }?: ToJSOptions): any; +} diff --git a/tools/yaml/dist/nodes/Node.js b/tools/yaml/dist/nodes/Node.js new file mode 100644 index 0000000..d384e1c --- /dev/null +++ b/tools/yaml/dist/nodes/Node.js @@ -0,0 +1,40 @@ +'use strict'; + +var applyReviver = require('../doc/applyReviver.js'); +var identity = require('./identity.js'); +var toJS = require('./toJS.js'); + +class NodeBase { + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!identity.isDocument(doc)) + throw new TypeError('A document argument is required'); + const ctx = { + anchors: new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS.toJS(this, '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver.applyReviver(reviver, { '': res }, '', res) + : res; + } +} + +exports.NodeBase = NodeBase; diff --git a/tools/yaml/dist/nodes/Pair.d.ts b/tools/yaml/dist/nodes/Pair.d.ts new file mode 100644 index 0000000..e87fe66 --- /dev/null +++ b/tools/yaml/dist/nodes/Pair.d.ts @@ -0,0 +1,21 @@ +import { CreateNodeContext } from '../doc/createNode.js'; +import type { CollectionItem } from '../parse/cst.js'; +import type { Schema } from '../schema/Schema.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import { addPairToJSMap } from './addPairToJSMap.js'; +import { NODE_TYPE } from './identity.js'; +import type { ToJSContext } from './toJS.js'; +export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair | import("./Scalar.js").Scalar | import("./Alias.js").Alias | import("./YAMLSeq.js").YAMLSeq>; +export declare class Pair { + readonly [NODE_TYPE]: symbol; + /** Always Node or null when parsed, but can be set to anything. */ + key: K; + /** Always Node or null when parsed, but can be set to anything. */ + value: V | null; + /** The CST token that was composed into this pair. */ + srcToken?: CollectionItem; + constructor(key: K, value?: V | null); + clone(schema?: Schema): Pair; + toJSON(_?: unknown, ctx?: ToJSContext): ReturnType; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +} diff --git a/tools/yaml/dist/nodes/Pair.js b/tools/yaml/dist/nodes/Pair.js new file mode 100644 index 0000000..ae4c772 --- /dev/null +++ b/tools/yaml/dist/nodes/Pair.js @@ -0,0 +1,39 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var stringifyPair = require('../stringify/stringifyPair.js'); +var addPairToJSMap = require('./addPairToJSMap.js'); +var identity = require('./identity.js'); + +function createPair(key, value, ctx) { + const k = createNode.createNode(key, undefined, ctx); + const v = createNode.createNode(value, undefined, ctx); + return new Pair(k, v); +} +class Pair { + constructor(key, value = null) { + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR }); + this.key = key; + this.value = value; + } + clone(schema) { + let { key, value } = this; + if (identity.isNode(key)) + key = key.clone(schema); + if (identity.isNode(value)) + value = value.clone(schema); + return new Pair(key, value); + } + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? new Map() : {}; + return addPairToJSMap.addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc + ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) + : JSON.stringify(this); + } +} + +exports.Pair = Pair; +exports.createPair = createPair; diff --git a/tools/yaml/dist/nodes/Scalar.d.ts b/tools/yaml/dist/nodes/Scalar.d.ts new file mode 100644 index 0000000..dd330b2 --- /dev/null +++ b/tools/yaml/dist/nodes/Scalar.d.ts @@ -0,0 +1,42 @@ +import type { BlockScalar, FlowScalar } from '../parse/cst.js'; +import { NodeBase, Range } from './Node.js'; +import { ToJSContext } from './toJS.js'; +export declare const isScalarValue: (value: unknown) => boolean; +export declare namespace Scalar { + interface Parsed extends Scalar { + range: Range; + source: string; + srcToken?: FlowScalar | BlockScalar; + } + type BLOCK_FOLDED = 'BLOCK_FOLDED'; + type BLOCK_LITERAL = 'BLOCK_LITERAL'; + type PLAIN = 'PLAIN'; + type QUOTE_DOUBLE = 'QUOTE_DOUBLE'; + type QUOTE_SINGLE = 'QUOTE_SINGLE'; + type Type = BLOCK_FOLDED | BLOCK_LITERAL | PLAIN | QUOTE_DOUBLE | QUOTE_SINGLE; +} +export declare class Scalar extends NodeBase { + static readonly BLOCK_FOLDED = "BLOCK_FOLDED"; + static readonly BLOCK_LITERAL = "BLOCK_LITERAL"; + static readonly PLAIN = "PLAIN"; + static readonly QUOTE_DOUBLE = "QUOTE_DOUBLE"; + static readonly QUOTE_SINGLE = "QUOTE_SINGLE"; + value: T; + /** An optional anchor on this node. Used by alias nodes. */ + anchor?: string; + /** + * By default (undefined), numbers use decimal notation. + * The YAML 1.2 core schema only supports 'HEX' and 'OCT'. + * The YAML 1.1 schema also supports 'BIN' and 'TIME' + */ + format?: string; + /** If `value` is a number, use this value when stringifying this node. */ + minFractionDigits?: number; + /** Set during parsing to the source string value */ + source?: string; + /** The scalar style used for the node's string representation */ + type?: Scalar.Type; + constructor(value: T); + toJSON(arg?: any, ctx?: ToJSContext): any; + toString(): string; +} diff --git a/tools/yaml/dist/nodes/Scalar.js b/tools/yaml/dist/nodes/Scalar.js new file mode 100644 index 0000000..bd7d4d2 --- /dev/null +++ b/tools/yaml/dist/nodes/Scalar.js @@ -0,0 +1,27 @@ +'use strict'; + +var identity = require('./identity.js'); +var Node = require('./Node.js'); +var toJS = require('./toJS.js'); + +const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); +class Scalar extends Node.NodeBase { + constructor(value) { + super(identity.SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } +} +Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; +Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; +Scalar.PLAIN = 'PLAIN'; +Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; +Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; + +exports.Scalar = Scalar; +exports.isScalarValue = isScalarValue; diff --git a/tools/yaml/dist/nodes/YAMLMap.d.ts b/tools/yaml/dist/nodes/YAMLMap.d.ts new file mode 100644 index 0000000..cef75f0 --- /dev/null +++ b/tools/yaml/dist/nodes/YAMLMap.d.ts @@ -0,0 +1,53 @@ +import type { BlockMap, FlowCollection } from '../parse/cst.js'; +import type { Schema } from '../schema/Schema.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import { CreateNodeContext } from '../util.js'; +import { Collection } from './Collection.js'; +import type { ParsedNode, Range } from './Node.js'; +import { Pair } from './Pair.js'; +import { Scalar } from './Scalar.js'; +import type { ToJSContext } from './toJS.js'; +export type MapLike = Map | Set | Record; +export declare function findPair(items: Iterable>, key: unknown): Pair | undefined; +export declare namespace YAMLMap { + interface Parsed extends YAMLMap { + items: Pair[]; + range: Range; + srcToken?: BlockMap | FlowCollection; + } +} +export declare class YAMLMap extends Collection { + static get tagName(): 'tag:yaml.org,2002:map'; + items: Pair[]; + constructor(schema?: Schema); + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema: Schema, obj: unknown, ctx: CreateNodeContext): YAMLMap; + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair: Pair | { + key: K; + value: V; + }, overwrite?: boolean): void; + delete(key: unknown): boolean; + get(key: unknown, keepScalar: true): Scalar | undefined; + get(key: unknown, keepScalar?: false): V | undefined; + get(key: unknown, keepScalar?: boolean): V | Scalar | undefined; + has(key: unknown): boolean; + set(key: K, value: V): void; + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON>(_?: unknown, ctx?: ToJSContext, Type?: { + new (): T; + }): any; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +} diff --git a/tools/yaml/dist/nodes/YAMLMap.js b/tools/yaml/dist/nodes/YAMLMap.js new file mode 100644 index 0000000..210abbf --- /dev/null +++ b/tools/yaml/dist/nodes/YAMLMap.js @@ -0,0 +1,147 @@ +'use strict'; + +var stringifyCollection = require('../stringify/stringifyCollection.js'); +var addPairToJSMap = require('./addPairToJSMap.js'); +var Collection = require('./Collection.js'); +var identity = require('./identity.js'); +var Pair = require('./Pair.js'); +var Scalar = require('./Scalar.js'); + +function findPair(items, key) { + const k = identity.isScalar(key) ? key.value : key; + for (const it of items) { + if (identity.isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (identity.isScalar(it.key) && it.key.value === k) + return it; + } + } + return undefined; +} +class YAMLMap extends Collection.Collection { + static get tagName() { + return 'tag:yaml.org,2002:map'; + } + constructor(schema) { + super(identity.MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map = new this(schema); + const add = (key, value) => { + if (typeof replacer === 'function') + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== undefined || keepUndefined) + map.items.push(Pair.createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } + else if (obj && typeof obj === 'object') { + for (const key of Object.keys(obj)) + add(key, obj[key]); + } + if (typeof schema.sortMapEntries === 'function') { + map.items.sort(schema.sortMapEntries); + } + return map; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (identity.isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== 'object' || !('key' in pair)) { + // In TypeScript, this never happens. + _pair = new Pair.Pair(pair, pair?.value); + } + else + _pair = new Pair.Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + // For scalars, keep the old node & its comments and anchors + if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } + else if (sortEntries) { + const i = this.items.findIndex(item => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } + else { + this.items.push(_pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair.Pair(key, value), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map); + for (const item of this.items) + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!identity.isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: '', + flowChars: { start: '{', end: '}' }, + itemIndent: ctx.indent || '', + onChompKeep, + onComment + }); + } +} + +exports.YAMLMap = YAMLMap; +exports.findPair = findPair; diff --git a/tools/yaml/dist/nodes/YAMLSeq.d.ts b/tools/yaml/dist/nodes/YAMLSeq.d.ts new file mode 100644 index 0000000..47fe24d --- /dev/null +++ b/tools/yaml/dist/nodes/YAMLSeq.d.ts @@ -0,0 +1,60 @@ +import { CreateNodeContext } from '../doc/createNode.js'; +import type { BlockSequence, FlowCollection } from '../parse/cst.js'; +import type { Schema } from '../schema/Schema.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import { Collection } from './Collection.js'; +import type { ParsedNode, Range } from './Node.js'; +import type { Pair } from './Pair.js'; +import { Scalar } from './Scalar.js'; +import { ToJSContext } from './toJS.js'; +export declare namespace YAMLSeq { + interface Parsed = ParsedNode> extends YAMLSeq { + items: T[]; + range: Range; + srcToken?: BlockSequence | FlowCollection; + } +} +export declare class YAMLSeq extends Collection { + static get tagName(): 'tag:yaml.org,2002:seq'; + items: T[]; + constructor(schema?: Schema); + add(value: T): void; + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key: unknown): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + get(key: unknown, keepScalar: true): Scalar | undefined; + get(key: unknown, keepScalar?: false): T | undefined; + get(key: unknown, keepScalar?: boolean): T | Scalar | undefined; + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key: unknown): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key: unknown, value: T): void; + toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + static from(schema: Schema, obj: unknown, ctx: CreateNodeContext): YAMLSeq; +} diff --git a/tools/yaml/dist/nodes/YAMLSeq.js b/tools/yaml/dist/nodes/YAMLSeq.js new file mode 100644 index 0000000..a2af086 --- /dev/null +++ b/tools/yaml/dist/nodes/YAMLSeq.js @@ -0,0 +1,115 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var stringifyCollection = require('../stringify/stringifyCollection.js'); +var Collection = require('./Collection.js'); +var identity = require('./identity.js'); +var Scalar = require('./Scalar.js'); +var toJS = require('./toJS.js'); + +class YAMLSeq extends Collection.Collection { + static get tagName() { + return 'tag:yaml.org,2002:seq'; + } + constructor(schema) { + super(identity.SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return undefined; + const it = this.items[idx]; + return !keepScalar && identity.isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === 'number' && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (identity.isScalar(prev) && Scalar.isScalarValue(value)) + prev.value = value; + else + this.items[idx] = value; + } + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS.toJS(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: '- ', + flowChars: { start: '[', end: ']' }, + itemIndent: (ctx.indent || '') + ' ', + onChompKeep, + onComment + }); + } + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === 'function') { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode.createNode(it, undefined, ctx)); + } + } + return seq; + } +} +function asItemIndex(key) { + let idx = identity.isScalar(key) ? key.value : key; + if (idx && typeof idx === 'string') + idx = Number(idx); + return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0 + ? idx + : null; +} + +exports.YAMLSeq = YAMLSeq; diff --git a/tools/yaml/dist/nodes/addPairToJSMap.d.ts b/tools/yaml/dist/nodes/addPairToJSMap.d.ts new file mode 100644 index 0000000..70d9e62 --- /dev/null +++ b/tools/yaml/dist/nodes/addPairToJSMap.d.ts @@ -0,0 +1,4 @@ +import type { Pair } from './Pair.js'; +import { ToJSContext } from './toJS.js'; +import type { MapLike } from './YAMLMap.js'; +export declare function addPairToJSMap(ctx: ToJSContext | undefined, map: MapLike, { key, value }: Pair): MapLike; diff --git a/tools/yaml/dist/nodes/addPairToJSMap.js b/tools/yaml/dist/nodes/addPairToJSMap.js new file mode 100644 index 0000000..30f6f95 --- /dev/null +++ b/tools/yaml/dist/nodes/addPairToJSMap.js @@ -0,0 +1,106 @@ +'use strict'; + +var log = require('../log.js'); +var stringify = require('../stringify/stringify.js'); +var identity = require('./identity.js'); +var Scalar = require('./Scalar.js'); +var toJS = require('./toJS.js'); + +const MERGE_KEY = '<<'; +function addPairToJSMap(ctx, map, { key, value }) { + if (ctx?.doc.schema.merge && isMergeKey(key)) { + value = identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (identity.isSeq(value)) + for (const it of value.items) + mergeToJSMap(ctx, map, it); + else if (Array.isArray(value)) + for (const it of value) + mergeToJSMap(ctx, map, it); + else + mergeToJSMap(ctx, map, value); + } + else { + const jsKey = toJS.toJS(key, '', ctx); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } + else if (map instanceof Set) { + map.add(jsKey); + } + else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS.toJS(value, stringKey, ctx); + if (stringKey in map) + Object.defineProperty(map, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map[stringKey] = jsValue; + } + } + return map; +} +const isMergeKey = (key) => key === MERGE_KEY || + (identity.isScalar(key) && + key.value === MERGE_KEY && + (!key.type || key.type === Scalar.Scalar.PLAIN)); +// If the value associated with a merge key is a single mapping node, each of +// its key/value pairs is inserted into the current mapping, unless the key +// already exists in it. If the value associated with the merge key is a +// sequence, then this sequence is expected to contain mapping nodes and each +// of these nodes is merged in turn according to its order in the sequence. +// Keys in mapping nodes earlier in the sequence override keys specified in +// later mapping nodes. -- http://yaml.org/type/merge.html +function mergeToJSMap(ctx, map, value) { + const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (!identity.isMap(source)) + throw new Error('Merge sources must be maps or map aliases'); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value); + } + else if (map instanceof Set) { + map.add(key); + } + else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; +} +function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ''; + if (typeof jsKey !== 'object') + return String(jsKey); + if (identity.isNode(key) && ctx?.doc) { + const strCtx = stringify.createStringifyContext(ctx.doc, {}); + strCtx.anchors = new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); +} + +exports.addPairToJSMap = addPairToJSMap; diff --git a/tools/yaml/dist/nodes/identity.d.ts b/tools/yaml/dist/nodes/identity.d.ts new file mode 100644 index 0000000..c12fdf7 --- /dev/null +++ b/tools/yaml/dist/nodes/identity.d.ts @@ -0,0 +1,23 @@ +import type { Document } from '../doc/Document.js'; +import type { Alias } from './Alias.js'; +import type { Node } from './Node.js'; +import type { Pair } from './Pair.js'; +import type { Scalar } from './Scalar.js'; +import type { YAMLMap } from './YAMLMap.js'; +import type { YAMLSeq } from './YAMLSeq.js'; +export declare const ALIAS: unique symbol; +export declare const DOC: unique symbol; +export declare const MAP: unique symbol; +export declare const PAIR: unique symbol; +export declare const SCALAR: unique symbol; +export declare const SEQ: unique symbol; +export declare const NODE_TYPE: unique symbol; +export declare const isAlias: (node: any) => node is Alias; +export declare const isDocument: (node: any) => node is Document; +export declare const isMap: (node: any) => node is YAMLMap; +export declare const isPair: (node: any) => node is Pair; +export declare const isScalar: (node: any) => node is Scalar; +export declare const isSeq: (node: any) => node is YAMLSeq; +export declare function isCollection(node: any): node is YAMLMap | YAMLSeq; +export declare function isNode(node: any): node is Node; +export declare const hasAnchor: (node: unknown) => node is Scalar | YAMLMap | YAMLSeq; diff --git a/tools/yaml/dist/nodes/identity.js b/tools/yaml/dist/nodes/identity.js new file mode 100644 index 0000000..5794aa3 --- /dev/null +++ b/tools/yaml/dist/nodes/identity.js @@ -0,0 +1,53 @@ +'use strict'; + +const ALIAS = Symbol.for('yaml.alias'); +const DOC = Symbol.for('yaml.document'); +const MAP = Symbol.for('yaml.map'); +const PAIR = Symbol.for('yaml.pair'); +const SCALAR = Symbol.for('yaml.scalar'); +const SEQ = Symbol.for('yaml.seq'); +const NODE_TYPE = Symbol.for('yaml.node.type'); +const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS; +const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC; +const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP; +const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR; +const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR; +const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ; +function isCollection(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; +} +function isNode(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; +} +const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + +exports.ALIAS = ALIAS; +exports.DOC = DOC; +exports.MAP = MAP; +exports.NODE_TYPE = NODE_TYPE; +exports.PAIR = PAIR; +exports.SCALAR = SCALAR; +exports.SEQ = SEQ; +exports.hasAnchor = hasAnchor; +exports.isAlias = isAlias; +exports.isCollection = isCollection; +exports.isDocument = isDocument; +exports.isMap = isMap; +exports.isNode = isNode; +exports.isPair = isPair; +exports.isScalar = isScalar; +exports.isSeq = isSeq; diff --git a/tools/yaml/dist/nodes/toJS.d.ts b/tools/yaml/dist/nodes/toJS.d.ts new file mode 100644 index 0000000..dcd0642 --- /dev/null +++ b/tools/yaml/dist/nodes/toJS.d.ts @@ -0,0 +1,27 @@ +import type { Document } from '../doc/Document.js'; +import type { Node } from './Node.js'; +export interface AnchorData { + aliasCount: number; + count: number; + res: unknown; +} +export interface ToJSContext { + anchors: Map; + doc: Document; + keep: boolean; + mapAsMap: boolean; + mapKeyWarned: boolean; + maxAliasCount: number; + onCreate?: (res: unknown) => void; +} +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any; diff --git a/tools/yaml/dist/nodes/toJS.js b/tools/yaml/dist/nodes/toJS.js new file mode 100644 index 0000000..a012823 --- /dev/null +++ b/tools/yaml/dist/nodes/toJS.js @@ -0,0 +1,39 @@ +'use strict'; + +var identity = require('./identity.js'); + +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +function toJS(value, arg, ctx) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + if (!ctx || !identity.hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: undefined }; + ctx.anchors.set(value, data); + ctx.onCreate = res => { + data.res = res; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value === 'bigint' && !ctx?.keep) + return Number(value); + return value; +} + +exports.toJS = toJS; diff --git a/tools/yaml/dist/options.d.ts b/tools/yaml/dist/options.d.ts new file mode 100644 index 0000000..85bec7e --- /dev/null +++ b/tools/yaml/dist/options.d.ts @@ -0,0 +1,338 @@ +import type { Reviver } from './doc/applyReviver.js'; +import type { Directives } from './doc/directives.js'; +import type { LogLevelId } from './log.js'; +import type { ParsedNode } from './nodes/Node.js'; +import type { Pair } from './nodes/Pair.js'; +import type { Scalar } from './nodes/Scalar.js'; +import type { LineCounter } from './parse/line-counter.js'; +import type { Schema } from './schema/Schema.js'; +import type { Tags } from './schema/tags.js'; +import type { CollectionTag, ScalarTag } from './schema/types.js'; +export type ParseOptions = { + /** + * Whether integers should be parsed into BigInt rather than number values. + * + * Default: `false` + * + * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/BigInt + */ + intAsBigInt?: boolean; + /** + * Include a `srcToken` value on each parsed `Node`, containing the CST token + * that was composed into this node. + * + * Default: `false` + */ + keepSourceTokens?: boolean; + /** + * If set, newlines will be tracked, to allow for `lineCounter.linePos(offset)` + * to provide the `{ line, col }` positions within the input. + */ + lineCounter?: LineCounter; + /** + * Include line/col position & node type directly in parse errors. + * + * Default: `true` + */ + prettyErrors?: boolean; + /** + * Detect and report errors that are required by the YAML 1.2 spec, + * but are caused by unambiguous content. + * + * Default: `true` + */ + strict?: boolean; + /** + * YAML requires map keys to be unique. By default, this is checked by + * comparing scalar values with `===`; deep equality is not checked for + * aliases or collections. If merge keys are enabled by the schema, + * multiple `<<` keys are allowed. + * + * Set `false` to disable, or provide your own comparator function to + * customise. The comparator will be passed two `ParsedNode` values, and + * is expected to return a `boolean` indicating their equality. + * + * Default: `true` + */ + uniqueKeys?: boolean | ((a: ParsedNode, b: ParsedNode) => boolean); +}; +export type DocumentOptions = { + /** + * @internal + * Used internally by Composer. If set and includes an explicit version, + * that overrides the `version` option. + */ + _directives?: Directives; + /** + * Control the logging level during parsing + * + * Default: `'warn'` + */ + logLevel?: LogLevelId; + /** + * The YAML version used by documents without a `%YAML` directive. + * + * Default: `"1.2"` + */ + version?: '1.1' | '1.2' | 'next'; +}; +export type SchemaOptions = { + /** + * When parsing, warn about compatibility issues with the given schema. + * When stringifying, use scalar styles that are parsed correctly + * by the `compat` schema as well as the actual schema. + * + * Default: `null` + */ + compat?: string | Tags | null; + /** + * Array of additional tags to include in the schema, or a function that may + * modify the schema's base tag array. + */ + customTags?: Tags | ((tags: Tags) => Tags) | null; + /** + * Enable support for `<<` merge keys. + * + * Default: `false` for YAML 1.2, `true` for earlier versions + */ + merge?: boolean; + /** + * When using the `'core'` schema, support parsing values with these + * explicit YAML 1.1 tags: + * + * `!!binary`, `!!omap`, `!!pairs`, `!!set`, `!!timestamp`. + * + * Default `true` + */ + resolveKnownTags?: boolean; + /** + * The base schema to use. + * + * The core library has built-in support for the following: + * - `'failsafe'`: A minimal schema that parses all scalars as strings + * - `'core'`: The YAML 1.2 core schema + * - `'json'`: The YAML 1.2 JSON schema, with minimal rules for JSON compatibility + * - `'yaml-1.1'`: The YAML 1.1 schema + * + * If using another (custom) schema, the `customTags` array needs to + * fully define the schema's tags. + * + * Default: `'core'` for YAML 1.2, `'yaml-1.1'` for earlier versions + */ + schema?: string | Schema; + /** + * When adding to or stringifying a map, sort the entries. + * If `true`, sort by comparing key values with `<`. + * Does not affect item order when parsing. + * + * Default: `false` + */ + sortMapEntries?: boolean | ((a: Pair, b: Pair) => number); + /** + * Override default values for `toString()` options. + */ + toStringDefaults?: ToStringOptions; +}; +export type CreateNodeOptions = { + /** + * During node construction, use anchors and aliases to keep strictly equal + * non-null objects as equivalent in YAML. + * + * Default: `true` + */ + aliasDuplicateObjects?: boolean; + /** + * Default prefix for anchors. + * + * Default: `'a'`, resulting in anchors `a1`, `a2`, etc. + */ + anchorPrefix?: string; + /** Force the top-level collection node to use flow style. */ + flow?: boolean; + /** + * Keep `undefined` object values when creating mappings, rather than + * discarding them. + * + * Default: `false` + */ + keepUndefined?: boolean | null; + onTagObj?: (tagObj: ScalarTag | CollectionTag) => void; + /** + * Specify the top-level collection type, e.g. `"!!omap"`. Note that this + * requires the corresponding tag to be available in this document's schema. + */ + tag?: string; +}; +export type ToJSOptions = { + /** + * Use Map rather than Object to represent mappings. + * + * Default: `false` + */ + mapAsMap?: boolean; + /** + * Prevent exponential entity expansion attacks by limiting data aliasing count; + * set to `-1` to disable checks; `0` disallows all alias nodes. + * + * Default: `100` + */ + maxAliasCount?: number; + /** + * If defined, called with the resolved `value` and reference `count` for + * each anchor in the document. + */ + onAnchor?: (value: unknown, count: number) => void; + /** + * Optional function that may filter or modify the output JS value + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter + */ + reviver?: Reviver; +}; +export type ToStringOptions = { + /** + * Use block quote styles for scalar values where applicable. + * Set to `false` to disable block quotes completely. + * + * Default: `true` + */ + blockQuote?: boolean | 'folded' | 'literal'; + /** + * Enforce `'block'` or `'flow'` style on maps and sequences. + * Empty collections will always be stringified as `{}` or `[]`. + * + * Default: `'any'`, allowing each node to set its style separately + * with its `flow: boolean` (default `false`) property. + */ + collectionStyle?: 'any' | 'block' | 'flow'; + /** + * Comment stringifier. + * Output should be valid for the current schema. + * + * By default, empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ + commentString?: (comment: string) => string; + /** + * The default type of string literal used to stringify implicit key values. + * Output may use other types if required to fully represent the value. + * + * If `null`, the value of `defaultStringType` is used. + * + * Default: `null` + */ + defaultKeyType?: Scalar.Type | null; + /** + * The default type of string literal used to stringify values in general. + * Output may use other types if required to fully represent the value. + * + * Default: `'PLAIN'` + */ + defaultStringType?: Scalar.Type; + /** + * Include directives in the output. + * + * - If `true`, at least the document-start marker `---` is always included. + * This does not force the `%YAML` directive to be included. To do that, + * set `doc.directives.yaml.explicit = true`. + * - If `false`, no directives or marker is ever included. If using the `%TAG` + * directive, you are expected to include it manually in the stream before + * its use. + * - If `null`, directives and marker may be included if required. + * + * Default: `null` + */ + directives?: boolean | null; + /** + * Restrict double-quoted strings to use JSON-compatible syntax. + * + * Default: `false` + */ + doubleQuotedAsJSON?: boolean; + /** + * Minimum length for double-quoted strings to use multiple lines to + * represent the value. Ignored if `doubleQuotedAsJSON` is set. + * + * Default: `40` + */ + doubleQuotedMinMultiLineLength?: number; + /** + * String representation for `false`. + * With the core schema, use `'false'`, `'False'`, or `'FALSE'`. + * + * Default: `'false'` + */ + falseStr?: string; + /** + * When true, a single space of padding will be added inside the delimiters + * of non-empty single-line flow collections. + * + * Default: `true` + */ + flowCollectionPadding?: boolean; + /** + * The number of spaces to use when indenting code. + * + * Default: `2` + */ + indent?: number; + /** + * Whether block sequences should be indented. + * + * Default: `true` + */ + indentSeq?: boolean; + /** + * Maximum line width (set to `0` to disable folding). + * + * This is a soft limit, as only double-quoted semantics allow for inserting + * a line break in the middle of a word, as well as being influenced by the + * `minContentWidth` option. + * + * Default: `80` + */ + lineWidth?: number; + /** + * Minimum line width for highly-indented content (set to `0` to disable). + * + * Default: `20` + */ + minContentWidth?: number; + /** + * String representation for `null`. + * With the core schema, use `'null'`, `'Null'`, `'NULL'`, `'~'`, or an empty + * string `''`. + * + * Default: `'null'` + */ + nullStr?: string; + /** + * Require keys to be scalars and to use implicit rather than explicit notation. + * + * Default: `false` + */ + simpleKeys?: boolean; + /** + * Use 'single quote' rather than "double quote" where applicable. + * Set to `false` to disable single quotes completely. + * + * Default: `null` + */ + singleQuote?: boolean | null; + /** + * String representation for `true`. + * With the core schema, use `'true'`, `'True'`, or `'TRUE'`. + * + * Default: `'true'` + */ + trueStr?: string; + /** + * The anchor used by an alias must be defined before the alias node. As it's + * possible for the document to be modified manually, the order may be + * verified during stringification. + * + * Default: `'true'` + */ + verifyAliasOrder?: boolean; +}; diff --git a/tools/yaml/dist/parse/cst-scalar.d.ts b/tools/yaml/dist/parse/cst-scalar.d.ts new file mode 100644 index 0000000..a7bd1d6 --- /dev/null +++ b/tools/yaml/dist/parse/cst-scalar.d.ts @@ -0,0 +1,64 @@ +import { ErrorCode } from '../errors.js'; +import { Range } from '../nodes/Node.js'; +import type { Scalar } from '../nodes/Scalar.js'; +import type { BlockScalar, FlowScalar, SourceToken, Token } from './cst.js'; +/** + * If `token` is a CST flow or block scalar, determine its string value and a few other attributes. + * Otherwise, return `null`. + */ +export declare function resolveAsScalar(token: FlowScalar | BlockScalar, strict?: boolean, onError?: (offset: number, code: ErrorCode, message: string) => void): { + value: string; + type: Scalar.Type | null; + comment: string; + range: Range; +}; +export declare function resolveAsScalar(token: Token | null | undefined, strict?: boolean, onError?: (offset: number, code: ErrorCode, message: string) => void): { + value: string; + type: Scalar.Type | null; + comment: string; + range: Range; +} | null; +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +export declare function createScalarToken(value: string, context: { + end?: SourceToken[]; + implicitKey?: boolean; + indent: number; + inFlow?: boolean; + offset?: number; + type?: Scalar.Type; +}): BlockScalar | FlowScalar; +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +export declare function setScalarValue(token: Token, value: string, context?: { + afterKey?: boolean; + implicitKey?: boolean; + inFlow?: boolean; + type?: Scalar.Type; +}): void; diff --git a/tools/yaml/dist/parse/cst-scalar.js b/tools/yaml/dist/parse/cst-scalar.js new file mode 100644 index 0000000..11c5fcc --- /dev/null +++ b/tools/yaml/dist/parse/cst-scalar.js @@ -0,0 +1,218 @@ +'use strict'; + +var resolveBlockScalar = require('../compose/resolve-block-scalar.js'); +var resolveFlowScalar = require('../compose/resolve-flow-scalar.js'); +var errors = require('../errors.js'); +var stringifyString = require('../stringify/stringifyString.js'); + +function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new errors.YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return resolveFlowScalar.resolveFlowScalar(token, strict, _onError); + case 'block-scalar': + return resolveBlockScalar.resolveBlockScalar(token, strict, _onError); + } + } + return null; +} +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context; + const source = stringifyString.stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: 'newline', offset: -1, indent, source: '\n' } + ]; + switch (source[0]) { + case '|': + case '>': { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + return { type: 'block-scalar', offset, indent, props, source: body }; + } + case '"': + return { type: 'double-quoted-scalar', offset, indent, source, end }; + case "'": + return { type: 'single-quoted-scalar', offset, indent, source, end }; + default: + return { type: 'scalar', offset, indent, source, end }; + } +} +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = 'indent' in token ? token.indent : null; + if (afterKey && typeof indent === 'number') + indent += 2; + if (!type) + switch (token.type) { + case 'single-quoted-scalar': + type = 'QUOTE_SINGLE'; + break; + case 'double-quoted-scalar': + type = 'QUOTE_DOUBLE'; + break; + case 'block-scalar': { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL'; + break; + } + default: + type = 'PLAIN'; + } + const source = stringifyString.stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case '|': + case '>': + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, 'double-quoted-scalar'); + break; + case "'": + setFlowScalarValue(token, source, 'single-quoted-scalar'); + break; + default: + setFlowScalarValue(token, source, 'scalar'); + } +} +function setBlockScalarValue(token, source) { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + if (token.type === 'block-scalar') { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + header.source = head; + token.source = body; + } + else { + const { offset } = token; + const indent = 'indent' in token ? token.indent : -1; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type: 'block-scalar', indent, props, source: body }); + } +} +/** @returns `true` if last token is a newline */ +function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case 'space': + case 'comment': + props.push(st); + break; + case 'newline': + props.push(st); + return true; + } + return false; +} +function setFlowScalarValue(token, source, type) { + switch (token.type) { + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + token.type = type; + token.source = source; + break; + case 'block-scalar': { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === 'block-scalar-header') + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; + } + case 'block-map': + case 'block-seq': { + const offset = token.offset + source.length; + const nl = { type: 'newline', offset, indent: token.indent, source: '\n' }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = 'indent' in token ? token.indent : -1; + const end = 'end' in token && Array.isArray(token.end) + ? token.end.filter(st => st.type === 'space' || + st.type === 'comment' || + st.type === 'newline') + : []; + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type, indent, source, end }); + } + } +} + +exports.createScalarToken = createScalarToken; +exports.resolveAsScalar = resolveAsScalar; +exports.setScalarValue = setScalarValue; diff --git a/tools/yaml/dist/parse/cst-stringify.d.ts b/tools/yaml/dist/parse/cst-stringify.d.ts new file mode 100644 index 0000000..dbf66d6 --- /dev/null +++ b/tools/yaml/dist/parse/cst-stringify.d.ts @@ -0,0 +1,8 @@ +import type { CollectionItem, Token } from './cst.js'; +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +export declare const stringify: (cst: Token | CollectionItem) => string; diff --git a/tools/yaml/dist/parse/cst-stringify.js b/tools/yaml/dist/parse/cst-stringify.js new file mode 100644 index 0000000..78e8c37 --- /dev/null +++ b/tools/yaml/dist/parse/cst-stringify.js @@ -0,0 +1,63 @@ +'use strict'; + +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst); +function stringifyToken(token) { + switch (token.type) { + case 'block-scalar': { + let res = ''; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case 'block-map': + case 'block-seq': { + let res = ''; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case 'flow-collection': { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case 'document': { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; + } + default: { + let res = token.source; + if ('end' in token && token.end) + for (const st of token.end) + res += st.source; + return res; + } + } +} +function stringifyItem({ start, key, sep, value }) { + let res = ''; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep) + for (const st of sep) + res += st.source; + if (value) + res += stringifyToken(value); + return res; +} + +exports.stringify = stringify; diff --git a/tools/yaml/dist/parse/cst-visit.d.ts b/tools/yaml/dist/parse/cst-visit.d.ts new file mode 100644 index 0000000..4f21f05 --- /dev/null +++ b/tools/yaml/dist/parse/cst-visit.d.ts @@ -0,0 +1,39 @@ +import type { CollectionItem, Document } from './cst.js'; +export type VisitPath = readonly ['key' | 'value', number][]; +export type Visitor = (item: CollectionItem, path: VisitPath) => number | symbol | Visitor | void; +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +export declare function visit(cst: Document | CollectionItem, visitor: Visitor): void; +export declare namespace visit { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; + var itemAtPath: (cst: Document | CollectionItem, path: VisitPath) => CollectionItem | undefined; + var parentCollection: (cst: Document | CollectionItem, path: VisitPath) => import("./cst.js").BlockMap | import("./cst.js").BlockSequence | import("./cst.js").FlowCollection; +} diff --git a/tools/yaml/dist/parse/cst-visit.js b/tools/yaml/dist/parse/cst-visit.js new file mode 100644 index 0000000..9ceee93 --- /dev/null +++ b/tools/yaml/dist/parse/cst-visit.js @@ -0,0 +1,99 @@ +'use strict'; + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove item'); +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +function visit(cst, visitor) { + if ('type' in cst && cst.type === 'document') + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current item */ +visit.SKIP = SKIP; +/** Remove the current item */ +visit.REMOVE = REMOVE; +/** Find the item at `path` from `cst` as the root */ +visit.itemAtPath = (cst, path) => { + let item = cst; + for (const [field, index] of path) { + const tok = item?.[field]; + if (tok && 'items' in tok) { + item = tok.items[index]; + } + else + return undefined; + } + return item; +}; +/** + * Get the immediate parent collection of the item at `path` from `cst` as the root. + * + * Throws an error if the collection is not found, which should never happen if the item itself exists. + */ +visit.parentCollection = (cst, path) => { + const parent = visit.itemAtPath(cst, path.slice(0, -1)); + const field = path[path.length - 1][0]; + const coll = parent?.[field]; + if (coll && 'items' in coll) + return coll; + throw new Error('Parent collection not found'); +}; +function _visit(path, item, visitor) { + let ctrl = visitor(item, path); + if (typeof ctrl === 'symbol') + return ctrl; + for (const field of ['key', 'value']) { + const token = item[field]; + if (token && 'items' in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === 'function' && field === 'key') + ctrl = ctrl(item, path); + } + } + return typeof ctrl === 'function' ? ctrl(item, path) : ctrl; +} + +exports.visit = visit; diff --git a/tools/yaml/dist/parse/cst.d.ts b/tools/yaml/dist/parse/cst.d.ts new file mode 100644 index 0000000..bfe7fc1 --- /dev/null +++ b/tools/yaml/dist/parse/cst.d.ts @@ -0,0 +1,106 @@ +export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js'; +export { stringify } from './cst-stringify.js'; +export { visit, Visitor, VisitPath } from './cst-visit.js'; +export interface SourceToken { + type: 'byte-order-mark' | 'doc-mode' | 'doc-start' | 'space' | 'comment' | 'newline' | 'directive-line' | 'anchor' | 'tag' | 'seq-item-ind' | 'explicit-key-ind' | 'map-value-ind' | 'flow-map-start' | 'flow-map-end' | 'flow-seq-start' | 'flow-seq-end' | 'flow-error-end' | 'comma' | 'block-scalar-header'; + offset: number; + indent: number; + source: string; +} +export interface ErrorToken { + type: 'error'; + offset: number; + source: string; + message: string; +} +export interface Directive { + type: 'directive'; + offset: number; + source: string; +} +export interface Document { + type: 'document'; + offset: number; + start: SourceToken[]; + value?: Token; + end?: SourceToken[]; +} +export interface DocumentEnd { + type: 'doc-end'; + offset: number; + source: string; + end?: SourceToken[]; +} +export interface FlowScalar { + type: 'alias' | 'scalar' | 'single-quoted-scalar' | 'double-quoted-scalar'; + offset: number; + indent: number; + source: string; + end?: SourceToken[]; +} +export interface BlockScalar { + type: 'block-scalar'; + offset: number; + indent: number; + props: Token[]; + source: string; +} +export interface BlockMap { + type: 'block-map'; + offset: number; + indent: number; + items: Array<{ + start: SourceToken[]; + key?: never; + sep?: never; + value?: never; + } | { + start: SourceToken[]; + key: Token | null; + sep: SourceToken[]; + value?: Token; + }>; +} +export interface BlockSequence { + type: 'block-seq'; + offset: number; + indent: number; + items: Array<{ + start: SourceToken[]; + key?: never; + sep?: never; + value?: Token; + }>; +} +export type CollectionItem = { + start: SourceToken[]; + key?: Token | null; + sep?: SourceToken[]; + value?: Token; +}; +export interface FlowCollection { + type: 'flow-collection'; + offset: number; + indent: number; + start: SourceToken; + items: CollectionItem[]; + end: SourceToken[]; +} +export type Token = SourceToken | ErrorToken | Directive | Document | DocumentEnd | FlowScalar | BlockScalar | BlockMap | BlockSequence | FlowCollection; +export type TokenType = SourceToken['type'] | DocumentEnd['type'] | FlowScalar['type']; +/** The byte order mark */ +export declare const BOM = "\uFEFF"; +/** Start of doc-mode */ +export declare const DOCUMENT = "\u0002"; +/** Unexpected end of flow-mode */ +export declare const FLOW_END = "\u0018"; +/** Next token is a scalar value */ +export declare const SCALAR = "\u001F"; +/** @returns `true` if `token` is a flow or block collection */ +export declare const isCollection: (token: Token | null | undefined) => token is BlockMap | BlockSequence | FlowCollection; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +export declare const isScalar: (token: Token | null | undefined) => token is BlockScalar | FlowScalar; +/** Get a printable representation of a lexer token */ +export declare function prettyToken(token: string): string; +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +export declare function tokenType(source: string): TokenType | null; diff --git a/tools/yaml/dist/parse/cst.js b/tools/yaml/dist/parse/cst.js new file mode 100644 index 0000000..613c229 --- /dev/null +++ b/tools/yaml/dist/parse/cst.js @@ -0,0 +1,112 @@ +'use strict'; + +var cstScalar = require('./cst-scalar.js'); +var cstStringify = require('./cst-stringify.js'); +var cstVisit = require('./cst-visit.js'); + +/** The byte order mark */ +const BOM = '\u{FEFF}'; +/** Start of doc-mode */ +const DOCUMENT = '\x02'; // C0: Start of Text +/** Unexpected end of flow-mode */ +const FLOW_END = '\x18'; // C0: Cancel +/** Next token is a scalar value */ +const SCALAR = '\x1f'; // C0: Unit Separator +/** @returns `true` if `token` is a flow or block collection */ +const isCollection = (token) => !!token && 'items' in token; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +const isScalar = (token) => !!token && + (token.type === 'scalar' || + token.type === 'single-quoted-scalar' || + token.type === 'double-quoted-scalar' || + token.type === 'block-scalar'); +/* istanbul ignore next */ +/** Get a printable representation of a lexer token */ +function prettyToken(token) { + switch (token) { + case BOM: + return ''; + case DOCUMENT: + return ''; + case FLOW_END: + return ''; + case SCALAR: + return ''; + default: + return JSON.stringify(token); + } +} +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +function tokenType(source) { + switch (source) { + case BOM: + return 'byte-order-mark'; + case DOCUMENT: + return 'doc-mode'; + case FLOW_END: + return 'flow-error-end'; + case SCALAR: + return 'scalar'; + case '---': + return 'doc-start'; + case '...': + return 'doc-end'; + case '': + case '\n': + case '\r\n': + return 'newline'; + case '-': + return 'seq-item-ind'; + case '?': + return 'explicit-key-ind'; + case ':': + return 'map-value-ind'; + case '{': + return 'flow-map-start'; + case '}': + return 'flow-map-end'; + case '[': + return 'flow-seq-start'; + case ']': + return 'flow-seq-end'; + case ',': + return 'comma'; + } + switch (source[0]) { + case ' ': + case '\t': + return 'space'; + case '#': + return 'comment'; + case '%': + return 'directive-line'; + case '*': + return 'alias'; + case '&': + return 'anchor'; + case '!': + return 'tag'; + case "'": + return 'single-quoted-scalar'; + case '"': + return 'double-quoted-scalar'; + case '|': + case '>': + return 'block-scalar-header'; + } + return null; +} + +exports.createScalarToken = cstScalar.createScalarToken; +exports.resolveAsScalar = cstScalar.resolveAsScalar; +exports.setScalarValue = cstScalar.setScalarValue; +exports.stringify = cstStringify.stringify; +exports.visit = cstVisit.visit; +exports.BOM = BOM; +exports.DOCUMENT = DOCUMENT; +exports.FLOW_END = FLOW_END; +exports.SCALAR = SCALAR; +exports.isCollection = isCollection; +exports.isScalar = isScalar; +exports.prettyToken = prettyToken; +exports.tokenType = tokenType; diff --git a/tools/yaml/dist/parse/lexer.d.ts b/tools/yaml/dist/parse/lexer.d.ts new file mode 100644 index 0000000..238e7b5 --- /dev/null +++ b/tools/yaml/dist/parse/lexer.d.ts @@ -0,0 +1,87 @@ +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +export declare class Lexer { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + private atEnd; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + private blockScalarIndent; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + private blockScalarKeep; + /** Current input */ + private buffer; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + private flowKey; + /** Count of surrounding flow collection levels. */ + private flowLevel; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + private indentNext; + /** Indentation level of the current line. */ + private indentValue; + /** Position of the next \n character. */ + private lineEndPos; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + private next; + /** A pointer to `buffer`; the current position of the lexer. */ + private pos; + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + lex(source: string, incomplete?: boolean): Generator; + private atLineEnd; + private charAt; + private continueScalar; + private getLine; + private hasChars; + private setNext; + private peek; + private parseNext; + private parseStream; + private parseLineStart; + private parseBlockStart; + private parseDocument; + private parseFlowCollection; + private parseQuotedScalar; + private parseBlockScalarHeader; + private parseBlockScalar; + private parsePlainScalar; + private pushCount; + private pushToIndex; + private pushIndicators; + private pushTag; + private pushNewline; + private pushSpaces; + private pushUntil; +} diff --git a/tools/yaml/dist/parse/lexer.js b/tools/yaml/dist/parse/lexer.js new file mode 100644 index 0000000..f408ce4 --- /dev/null +++ b/tools/yaml/dist/parse/lexer.js @@ -0,0 +1,703 @@ +'use strict'; + +var cst = require('./cst.js'); + +/* +START -> stream + +stream + directive -> line-end -> stream + indent + line-end -> stream + [else] -> line-start + +line-end + comment -> line-end + newline -> . + input-end -> END + +line-start + doc-start -> doc + doc-end -> stream + [else] -> indent -> block-start + +block-start + seq-item-start -> block-start + explicit-key-start -> block-start + map-value-start -> block-start + [else] -> doc + +doc + line-end -> line-start + spaces -> doc + anchor -> doc + tag -> doc + flow-start -> flow -> doc + flow-end -> error -> doc + seq-item-start -> error -> doc + explicit-key-start -> error -> doc + map-value-start -> doc + alias -> doc + quote-start -> quoted-scalar -> doc + block-scalar-header -> line-end -> block-scalar(min) -> line-start + [else] -> plain-scalar(false, min) -> doc + +flow + line-end -> flow + spaces -> flow + anchor -> flow + tag -> flow + flow-start -> flow -> flow + flow-end -> . + seq-item-start -> error -> flow + explicit-key-start -> flow + map-value-start -> flow + alias -> flow + quote-start -> quoted-scalar -> flow + comma -> flow + [else] -> plain-scalar(true, 0) -> flow + +quoted-scalar + quote-end -> . + [else] -> quoted-scalar + +block-scalar(min) + newline + peek(indent < min) -> . + [else] -> block-scalar(min) + +plain-scalar(is-flow, min) + scalar-end(is-flow) -> . + peek(newline + (indent < min)) -> . + [else] -> plain-scalar(min) +*/ +function isEmpty(ch) { + switch (ch) { + case undefined: + case ' ': + case '\n': + case '\r': + case '\t': + return true; + default: + return false; + } +} +const hexDigits = '0123456789ABCDEFabcdef'.split(''); +const tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(''); +const invalidFlowScalarChars = ',[]{}'.split(''); +const invalidAnchorChars = ' ,[]{}\n\r\t'.split(''); +const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch); +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +class Lexer { + constructor() { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + this.atEnd = false; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + this.blockScalarIndent = -1; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + this.blockScalarKeep = false; + /** Current input */ + this.buffer = ''; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + this.flowKey = false; + /** Count of surrounding flow collection levels. */ + this.flowLevel = 0; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + this.indentNext = 0; + /** Indentation level of the current line. */ + this.indentValue = 0; + /** Position of the next \n character. */ + this.lineEndPos = null; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + this.next = null; + /** A pointer to `buffer`; the current position of the lexer. */ + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? 'stream'; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === ' ' || ch === '\t') + ch = this.buffer[++i]; + if (!ch || ch === '#' || ch === '\n') + return true; + if (ch === '\r') + return this.buffer[i + 1] === '\n'; + return false; + } + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === ' ') + ch = this.buffer[++indent + offset]; + if (ch === '\r') { + const next = this.buffer[indent + offset + 1]; + if (next === '\n' || (!next && !this.atEnd)) + return offset + indent + 1; + } + return ch === '\n' || indent >= this.indentNext || (!ch && !this.atEnd) + ? offset + indent + : -1; + } + if (ch === '-' || ch === '.') { + const dt = this.buffer.substr(offset, 3); + if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== 'number' || (end !== -1 && end < this.pos)) { + end = this.buffer.indexOf('\n', this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === '\r') + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n) { + return this.pos + n <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case 'stream': + return yield* this.parseStream(); + case 'line-start': + return yield* this.parseLineStart(); + case 'block-start': + return yield* this.parseBlockStart(); + case 'doc': + return yield* this.parseDocument(); + case 'flow': + return yield* this.parseFlowCollection(); + case 'quoted-scalar': + return yield* this.parseQuotedScalar(); + case 'block-scalar': + return yield* this.parseBlockScalar(); + case 'plain-scalar': + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext('stream'); + if (line[0] === cst.BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === '%') { + let dirEnd = line.length; + const cs = line.indexOf('#'); + if (cs !== -1) { + const ch = line[cs - 1]; + if (ch === ' ' || ch === '\t') + dirEnd = cs - 1; + } + while (true) { + const ch = line[dirEnd - 1]; + if (ch === ' ' || ch === '\t') + dirEnd -= 1; + else + break; + } + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); // possible comment + this.pushNewline(); + return 'stream'; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return 'stream'; + } + yield cst.DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext('line-start'); + if (ch === '-' || ch === '.') { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext('line-start'); + const s = this.peek(3); + if (s === '---' && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return 'doc'; + } + else if (s === '...' && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + return 'stream'; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext('block-start'); + if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return yield* this.parseBlockStart(); + } + return 'doc'; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext('doc'); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case '#': + yield* this.pushCount(line.length - n); + // fallthrough + case undefined: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return 'flow'; + case '}': + case ']': + // this is an error + yield* this.pushCount(1); + return 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'doc'; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case '|': + case '>': + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } + else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext('flow'); + if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') || + (indent === 0 && + (line.startsWith('---') || line.startsWith('...')) && + isEmpty(line[3]))) { + // Allowing for the terminal ] or } at the same (rather than greater) + // indent level as the initial [ or { is technically invalid, but + // failing here would be surprising to users. + const atFlowEndMarker = indent === this.indentNext - 1 && + this.flowLevel === 1 && + (line[0] === ']' || line[0] === '}'); + if (!atFlowEndMarker) { + // this is an error + this.flowLevel = 0; + yield cst.FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ',') { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case undefined: + return 'flow'; + case '#': + yield* this.pushCount(line.length - n); + return 'flow'; + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return 'flow'; + case '}': + case ']': + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? 'flow' : 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'flow'; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ':': { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ',') { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return 'flow'; + } + } + // fallthrough + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } + else { + // double-quote + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === '\\') + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); + } + } + // Only looking for newlines within the quotes + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf('\n', this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf('\n', cs); + } + if (nl !== -1) { + // this is an error caused by an unexpected unindent + end = nl - (qb[nl - 1] === '\r' ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext('quoted-scalar'); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? 'flow' : 'doc'; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === '+') + this.blockScalarKeep = true; + else if (ch > '0' && ch <= '9') + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== '-') + break; + } + return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#'); + } + *parseBlockScalar() { + let nl = this.pos - 1; // may be -1 if this.pos === 0 + let indent = 0; + let ch; + loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) { + switch (ch) { + case ' ': + indent += 1; + break; + case '\n': + nl = i; + indent = 0; + break; + case '\r': { + const next = this.buffer[i + 1]; + if (!next && !this.atEnd) + return this.setNext('block-scalar'); + if (next === '\n') + break; + } // fallthrough + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext('block-scalar'); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else + this.indentNext += this.blockScalarIndent; + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf('\n', cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext('block-scalar'); + nl = this.buffer.length; + } + } + if (!this.blockScalarKeep) { + do { + let i = nl - 1; + let ch = this.buffer[i]; + if (ch === '\r') + ch = this.buffer[--i]; + const lastChar = i; // Drop the line if last char not more indented + while (ch === ' ' || ch === '\t') + ch = this.buffer[--i]; + if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) + nl = i; + else + break; + } while (true); + } + yield cst.SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while ((ch = this.buffer[++i])) { + if (ch === ':') { + const next = this.buffer[i + 1]; + if (isEmpty(next) || (inFlow && next === ',')) + break; + end = i; + } + else if (isEmpty(ch)) { + let next = this.buffer[i + 1]; + if (ch === '\r') { + if (next === '\n') { + i += 1; + ch = '\n'; + next = this.buffer[i + 1]; + } + else + end = i; + } + if (next === '#' || (inFlow && invalidFlowScalarChars.includes(next))) + break; + if (ch === '\n') { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); // to advance, but still account for ' #' + } + } + else { + if (inFlow && invalidFlowScalarChars.includes(ch)) + break; + end = i; + } + } + if (!ch && !this.atEnd) + return this.setNext('plain-scalar'); + yield cst.SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? 'flow' : 'doc'; + } + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; + } + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } + else if (allowEmpty) + yield ''; + return 0; + } + *pushIndicators() { + switch (this.charAt(0)) { + case '!': + return ((yield* this.pushTag()) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + case '&': + return ((yield* this.pushUntil(isNotAnchorChar)) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + case '-': // this is an error + case '?': // this is an error outside flow collections + case ':': { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || (inFlow && invalidFlowScalarChars.includes(ch1))) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + return ((yield* this.pushCount(1)) + + (yield* this.pushSpaces(true)) + + (yield* this.pushIndicators())); + } + } + } + return 0; + } + *pushTag() { + if (this.charAt(1) === '<') { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty(ch) && ch !== '>') + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false); + } + else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.includes(ch)) + ch = this.buffer[++i]; + else if (ch === '%' && + hexDigits.includes(this.buffer[i + 1]) && + hexDigits.includes(this.buffer[i + 2])) { + ch = this.buffer[(i += 3)]; + } + else + break; + } + return yield* this.pushToIndex(i, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === '\n') + return yield* this.pushCount(1); + else if (ch === '\r' && this.charAt(1) === '\n') + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === ' ' || (allowTabs && ch === '\t')); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; + } + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); + } +} + +exports.Lexer = Lexer; diff --git a/tools/yaml/dist/parse/line-counter.d.ts b/tools/yaml/dist/parse/line-counter.d.ts new file mode 100644 index 0000000..b469095 --- /dev/null +++ b/tools/yaml/dist/parse/line-counter.d.ts @@ -0,0 +1,22 @@ +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +export declare class LineCounter { + lineStarts: number[]; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + addNewLine: (offset: number) => number; + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + linePos: (offset: number) => { + line: number; + col: number; + }; +} diff --git a/tools/yaml/dist/parse/line-counter.js b/tools/yaml/dist/parse/line-counter.js new file mode 100644 index 0000000..0e7383b --- /dev/null +++ b/tools/yaml/dist/parse/line-counter.js @@ -0,0 +1,41 @@ +'use strict'; + +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +class LineCounter { + constructor() { + this.lineStarts = []; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + this.addNewLine = (offset) => this.lineStarts.push(offset); + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = (low + high) >> 1; // Math.floor((low + high) / 2) + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; + } +} + +exports.LineCounter = LineCounter; diff --git a/tools/yaml/dist/parse/parser.d.ts b/tools/yaml/dist/parse/parser.d.ts new file mode 100644 index 0000000..8f3159f --- /dev/null +++ b/tools/yaml/dist/parse/parser.d.ts @@ -0,0 +1,84 @@ +import { Token } from './cst.js'; +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +export declare class Parser { + private onNewLine?; + /** If true, space and sequence indicators count as indentation */ + private atNewLine; + /** If true, next token is a scalar value */ + private atScalar; + /** Current indentation level */ + private indent; + /** Current offset since the start of parsing */ + offset: number; + /** On the same line with a block map key */ + private onKeyLine; + /** Top indicates the node that's currently being built */ + stack: Token[]; + /** The source of the current token, set in parse() */ + private source; + /** The type of the current token, set in parse() */ + private type; + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine?: (offset: number) => void); + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + parse(source: string, incomplete?: boolean): Generator; + /** + * Advance the parser by the `source` of one lexical token. + */ + next(source: string): Generator; + private lexer; + /** Call at end of input to push out any remaining constructions */ + end(): Generator; + private get sourceToken(); + private step; + private peek; + private pop; + private stream; + private document; + private scalar; + private blockScalar; + private blockMap; + private blockSequence; + private flowCollection; + private flowScalar; + private startBlockValue; + private atIndentedComment; + private documentEnd; + private lineEnd; +} diff --git a/tools/yaml/dist/parse/parser.js b/tools/yaml/dist/parse/parser.js new file mode 100644 index 0000000..8dcdf5d --- /dev/null +++ b/tools/yaml/dist/parse/parser.js @@ -0,0 +1,954 @@ +'use strict'; + +var cst = require('./cst.js'); +var lexer = require('./lexer.js'); + +function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; +} +function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case 'space': + case 'comment': + case 'newline': + break; + default: + return i; + } + } + return -1; +} +function isFlowToken(token) { + switch (token?.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'flow-collection': + return true; + default: + return false; + } +} +function getPrevProps(parent) { + switch (parent.type) { + case 'document': + return parent.start; + case 'block-map': { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; + } + case 'block-seq': + return parent.items[parent.items.length - 1].start; + /* istanbul ignore next should not happen */ + default: + return []; + } +} +/** Note: May modify input array */ +function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: while (--i >= 0) { + switch (prev[i].type) { + case 'doc-start': + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + case 'newline': + break loop; + } + } + while (prev[++i]?.type === 'space') { + /* loop */ + } + return prev.splice(i, prev.length); +} +function fixFlowSeqItems(fc) { + if (fc.start.type === 'flow-seq-start') { + for (const it of fc.items) { + if (it.sep && + !it.value && + !includesToken(it.start, 'explicit-key-ind') && + !includesToken(it.sep, 'map-value-ind')) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + Array.prototype.push.apply(it.value.end, it.sep); + else + it.value.end = it.sep; + } + else + Array.prototype.push.apply(it.start, it.sep); + delete it.sep; + } + } + } +} +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +class Parser { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + /** If true, space and sequence indicators count as indentation */ + this.atNewLine = true; + /** If true, next token is a scalar value */ + this.atScalar = false; + /** Current indentation level */ + this.indent = 0; + /** Current offset since the start of parsing */ + this.offset = 0; + /** On the same line with a block map key */ + this.onKeyLine = false; + /** Top indicates the node that's currently being built */ + this.stack = []; + /** The source of the current token, set in parse() */ + this.source = ''; + /** The type of the current token, set in parse() */ + this.type = ''; + // Must be defined after `next()` + this.lexer = new lexer.Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (process.env.LOG_TOKENS) + console.log('|', cst.prettyToken(source)); + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type = cst.tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: 'error', offset: this.offset, message, source }); + this.offset += source.length; + } + else if (type === 'scalar') { + this.atNewLine = false; + this.atScalar = true; + this.type = 'scalar'; + } + else { + this.type = type; + yield* this.step(); + switch (type) { + case 'newline': + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case 'space': + if (this.atNewLine && source[0] === ' ') + this.indent += source.length; + break; + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + if (this.atNewLine) + this.indent += source.length; + break; + case 'doc-mode': + case 'flow-error-end': + return; + default: + this.atNewLine = false; + } + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: 'doc-end', + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case 'document': + return yield* this.document(top); + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return yield* this.scalar(top); + case 'block-scalar': + return yield* this.blockScalar(top); + case 'block-map': + return yield* this.blockMap(top); + case 'block-seq': + return yield* this.blockSequence(top); + case 'flow-collection': + return yield* this.flowCollection(top); + case 'doc-end': + return yield* this.documentEnd(top); + } + /* istanbul ignore next should not happen */ + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error) { + const token = error ?? this.stack.pop(); + /* istanbul ignore if should not happen */ + if (!token) { + const message = 'Tried to pop an empty stack'; + yield { type: 'error', offset: this.offset, source: '', message }; + } + else if (this.stack.length === 0) { + yield token; + } + else { + const top = this.peek(1); + if (token.type === 'block-scalar') { + // Block scalars use their parent rather than header indent + token.indent = 'indent' in top ? top.indent : 0; + } + else if (token.type === 'flow-collection' && top.type === 'document') { + // Ignore all indent for top-level flow collections + token.indent = 0; + } + if (token.type === 'flow-collection') + fixFlowSeqItems(token); + switch (top.type) { + case 'document': + top.value = token; + break; + case 'block-scalar': + top.props.push(token); // error + break; + case 'block-map': { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } + else if (it.sep) { + it.value = token; + } + else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !includesToken(it.start, 'explicit-key-ind'); + return; + } + break; + } + case 'block-seq': { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case 'flow-collection': { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === 'document' || + top.type === 'block-map' || + top.type === 'block-seq') && + (token.type === 'block-map' || token.type === 'block-seq')) { + const last = token.items[token.items.length - 1]; + if (last && + !last.sep && + !last.value && + last.start.length > 0 && + findNonEmptyIndex(last.start) === -1 && + (token.indent === 0 || + last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) { + if (top.type === 'document') + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } + } + } + *stream() { + switch (this.type) { + case 'directive-line': + yield { type: 'directive', offset: this.offset, source: this.source }; + return; + case 'byte-order-mark': + case 'space': + case 'comment': + case 'newline': + yield this.sourceToken; + return; + case 'doc-mode': + case 'doc-start': { + const doc = { + type: 'document', + offset: this.offset, + start: [] + }; + if (this.type === 'doc-start') + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } + } + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source + }; + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case 'doc-start': { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } + else + doc.start.push(this.sourceToken); + return; + } + case 'anchor': + case 'tag': + case 'space': + case 'comment': + case 'newline': + doc.start.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === 'map-value-ind') { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } + else + sep = [this.sourceToken]; + const map = { + type: 'block-map', + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case 'space': + case 'comment': + case 'newline': + scalar.props.push(this.sourceToken); + return; + case 'scalar': + scalar.source = this.source; + // block-scalar source includes trailing newline + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + yield* this.pop(); + break; + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map) { + const it = map.items[map.items.length - 1]; + // it.sep is true-ish if pair already has key or : separator + switch (this.type) { + case 'newline': + this.onKeyLine = false; + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'space': + case 'comment': + if (it.value) { + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + map.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map.indent) { + const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep; + // For empty nodes, assign newline-separated not indented empty tokens to following node + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case 'newline': + nl.push(i); + break; + case 'space': + break; + case 'comment': + if (st.indent > map.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case 'anchor': + case 'tag': + if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + this.onKeyLine = true; + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'explicit-key-ind': + if (!it.sep && !includesToken(it.start, 'explicit-key-ind')) { + it.start.push(this.sourceToken); + } + else if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + } + else { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }); + } + this.onKeyLine = true; + return; + case 'map-value-ind': + if (includesToken(it.start, 'explicit-key-ind')) { + if (!it.sep) { + if (includesToken(it.start, 'newline')) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else { + const start = getFirstKeyStartProps(it.start); + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + } + else if (it.value) { + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + else if (isFlowToken(it.key) && + !includesToken(it.sep, 'newline')) { + const start = getFirstKeyStartProps(it.start); + const key = it.key; + const sep = it.sep; + sep.push(this.sourceToken); + // @ts-expect-error type guard is wrong here + delete it.key, delete it.sep; + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key, sep }] + }); + } + else if (start.length > 0) { + // Not actually at next item + it.sep = it.sep.concat(start, this.sourceToken); + } + else { + it.sep.push(this.sourceToken); + } + } + else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else if (it.value || atNextItem) { + map.items.push({ start, key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } + else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (atNextItem || it.value) { + map.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } + else if (it.sep) { + this.stack.push(fs); + } + else { + Object.assign(it, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map); + if (bv) { + if (atNextItem && + bv.type !== 'block-seq' && + includesToken(it.start, 'explicit-key-ind')) { + map.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case 'newline': + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } + else + it.start.push(this.sourceToken); + return; + case 'space': + case 'comment': + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case 'anchor': + case 'tag': + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case 'seq-item-ind': + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, 'seq-item-ind')) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); + return; + } + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === 'flow-error-end') { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top && top.type === 'flow-collection'); + } + else if (fc.end.length === 0) { + switch (this.type) { + case 'comma': + case 'explicit-key-ind': + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case 'map-value-ind': + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case 'space': + case 'comment': + case 'newline': + case 'anchor': + case 'tag': + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it.sep) + this.stack.push(fs); + else + Object.assign(it, { key: fs, sep: [] }); + return; + } + case 'flow-map-end': + case 'flow-seq-end': + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + /* istanbul ignore else should not happen */ + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } + else { + const parent = this.peek(2); + if (parent.type === 'block-map' && + ((this.type === 'map-value-ind' && parent.indent === fc.indent) || + (this.type === 'newline' && + !parent.items[parent.items.length - 1].sep))) { + yield* this.pop(); + yield* this.step(); + } + else if (this.type === 'map-value-ind' && + parent.type !== 'flow-collection') { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map = { + type: 'block-map', + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else { + yield* this.lineEnd(fc); + } + } + } + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + } + startBlockValue(parent) { + switch (this.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return this.flowScalar(this.type); + case 'block-scalar-header': + return { + type: 'block-scalar', + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: '' + }; + case 'flow-map-start': + case 'flow-seq-start': + return { + type: 'flow-collection', + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case 'seq-item-ind': + return { + type: 'block-seq', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case 'explicit-key-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start }] + }; + } + case 'map-value-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start, indent) { + if (this.type !== 'comment') + return false; + if (this.indent <= indent) + return false; + return start.every(st => st.type === 'newline' || st.type === 'space'); + } + *documentEnd(docEnd) { + if (this.type !== 'doc-mode') { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case 'comma': + case 'doc-start': + case 'doc-end': + case 'flow-seq-end': + case 'flow-map-end': + case 'map-value-ind': + yield* this.pop(); + yield* this.step(); + break; + case 'newline': + this.onKeyLine = false; + // fallthrough + case 'space': + case 'comment': + default: + // all other values are errors + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } +} + +exports.Parser = Parser; diff --git a/tools/yaml/dist/public-api.d.ts b/tools/yaml/dist/public-api.d.ts new file mode 100644 index 0000000..2b771ca --- /dev/null +++ b/tools/yaml/dist/public-api.d.ts @@ -0,0 +1,43 @@ +import { Composer } from './compose/composer.js'; +import type { Reviver } from './doc/applyReviver.js'; +import { Document, Replacer } from './doc/Document.js'; +import type { Node, ParsedNode } from './nodes/Node.js'; +import type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options.js'; +export interface EmptyStream extends Array, ReturnType { + empty: true; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +export declare function parseAllDocuments(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Array : Document> | EmptyStream; +/** Parse an input string into a single YAML.Document */ +export declare function parseDocument(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Contents extends ParsedNode ? Document.Parsed : Document; +/** + * Parse an input string into JavaScript. + * + * Only supports input consisting of a single YAML document; for multi-document + * support you should use `YAML.parseAllDocuments`. May throw on error, and may + * log warnings using `console.warn`. + * + * @param str - A string with YAML formatting. + * @param reviver - A reviver function, as in `JSON.parse()` + * @returns The value will match the type of the root value of the parsed YAML + * document, so Maps become objects, Sequences arrays, and scalars result in + * nulls, booleans, numbers and strings. + */ +export declare function parse(src: string, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any; +export declare function parse(src: string, reviver: Reviver, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any; +/** + * Stringify a value as a YAML document. + * + * @param replacer - A replacer array or function, as in `JSON.stringify()` + * @returns Will always include `\n` as the last character, as is expected of YAML documents. + */ +export declare function stringify(value: any, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions): string; +export declare function stringify(value: any, replacer?: Replacer | null, options?: string | number | (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions)): string; diff --git a/tools/yaml/dist/public-api.js b/tools/yaml/dist/public-api.js new file mode 100644 index 0000000..38aad92 --- /dev/null +++ b/tools/yaml/dist/public-api.js @@ -0,0 +1,104 @@ +'use strict'; + +var composer = require('./compose/composer.js'); +var Document = require('./doc/Document.js'); +var errors = require('./errors.js'); +var log = require('./log.js'); +var lineCounter = require('./parse/line-counter.js'); +var parser = require('./parse/parser.js'); + +function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null; + return { lineCounter: lineCounter$1, prettyErrors }; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +function parseAllDocuments(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter?.addNewLine); + const composer$1 = new composer.Composer(options); + const docs = Array.from(composer$1.compose(parser$1.parse(source))); + if (prettyErrors && lineCounter) + for (const doc of docs) { + doc.errors.forEach(errors.prettifyError(source, lineCounter)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer$1.streamInfo()); +} +/** Parse an input string into a single YAML.Document */ +function parseDocument(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter?.addNewLine); + const composer$1 = new composer.Composer(options); + // `doc` is always set by compose.end(true) at the very latest + let doc = null; + for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== 'silent') { + doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()')); + break; + } + } + if (prettyErrors && lineCounter) { + doc.errors.forEach(errors.prettifyError(source, lineCounter)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter)); + } + return doc; +} +function parse(src, reviver, options) { + let _reviver = undefined; + if (typeof reviver === 'function') { + _reviver = reviver; + } + else if (options === undefined && reviver && typeof reviver === 'object') { + options = reviver; + } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== 'silent') + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); +} +function stringify(value, replacer, options) { + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + } + if (typeof options === 'string') + options = options.length; + if (typeof options === 'number') { + const indent = Math.round(options); + options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === undefined) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return undefined; + } + return new Document.Document(value, _replacer, options).toString(options); +} + +exports.parse = parse; +exports.parseAllDocuments = parseAllDocuments; +exports.parseDocument = parseDocument; +exports.stringify = stringify; diff --git a/tools/yaml/dist/schema/Schema.d.ts b/tools/yaml/dist/schema/Schema.d.ts new file mode 100644 index 0000000..fdd9e6b --- /dev/null +++ b/tools/yaml/dist/schema/Schema.d.ts @@ -0,0 +1,18 @@ +import { MAP, SCALAR, SEQ } from '../nodes/identity.js'; +import type { Pair } from '../nodes/Pair.js'; +import type { SchemaOptions, ToStringOptions } from '../options.js'; +import type { CollectionTag, ScalarTag } from './types.js'; +export declare class Schema { + compat: Array | null; + knownTags: Record; + merge: boolean; + name: string; + sortMapEntries: ((a: Pair, b: Pair) => number) | null; + tags: Array; + toStringOptions: Readonly | null; + readonly [MAP]: CollectionTag; + readonly [SCALAR]: ScalarTag; + readonly [SEQ]: CollectionTag; + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }: SchemaOptions); + clone(): Schema; +} diff --git a/tools/yaml/dist/schema/Schema.js b/tools/yaml/dist/schema/Schema.js new file mode 100644 index 0000000..91521d0 --- /dev/null +++ b/tools/yaml/dist/schema/Schema.js @@ -0,0 +1,40 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var map = require('./common/map.js'); +var seq = require('./common/seq.js'); +var string = require('./common/string.js'); +var tags = require('./tags.js'); + +const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; +class Schema { + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) + ? tags.getTags(compat, 'compat') + : compat + ? tags.getTags(null, compat) + : null; + this.merge = !!merge; + this.name = (typeof schema === 'string' && schema) || 'core'; + this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; + this.tags = tags.getTags(customTags, this.name); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, identity.MAP, { value: map.map }); + Object.defineProperty(this, identity.SCALAR, { value: string.string }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); + // Used by createMap() + this.sortMapEntries = + typeof sortMapEntries === 'function' + ? sortMapEntries + : sortMapEntries === true + ? sortMapEntriesByKey + : null; + } + clone() { + const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } +} + +exports.Schema = Schema; diff --git a/tools/yaml/dist/schema/common/map.d.ts b/tools/yaml/dist/schema/common/map.d.ts new file mode 100644 index 0000000..9b300f8 --- /dev/null +++ b/tools/yaml/dist/schema/common/map.d.ts @@ -0,0 +1,2 @@ +import type { CollectionTag } from '../types.js'; +export declare const map: CollectionTag; diff --git a/tools/yaml/dist/schema/common/map.js b/tools/yaml/dist/schema/common/map.js new file mode 100644 index 0000000..649c3b9 --- /dev/null +++ b/tools/yaml/dist/schema/common/map.js @@ -0,0 +1,19 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); + +const map = { + collection: 'map', + default: true, + nodeClass: YAMLMap.YAMLMap, + tag: 'tag:yaml.org,2002:map', + resolve(map, onError) { + if (!identity.isMap(map)) + onError('Expected a mapping for this tag'); + return map; + }, + createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) +}; + +exports.map = map; diff --git a/tools/yaml/dist/schema/common/null.d.ts b/tools/yaml/dist/schema/common/null.d.ts new file mode 100644 index 0000000..66abea5 --- /dev/null +++ b/tools/yaml/dist/schema/common/null.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types.js'; +export declare const nullTag: ScalarTag & { + test: RegExp; +}; diff --git a/tools/yaml/dist/schema/common/null.js b/tools/yaml/dist/schema/common/null.js new file mode 100644 index 0000000..cb353a7 --- /dev/null +++ b/tools/yaml/dist/schema/common/null.js @@ -0,0 +1,17 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +const nullTag = { + identify: value => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar.Scalar(null), + stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) + ? source + : ctx.options.nullStr +}; + +exports.nullTag = nullTag; diff --git a/tools/yaml/dist/schema/common/seq.d.ts b/tools/yaml/dist/schema/common/seq.d.ts new file mode 100644 index 0000000..c038d30 --- /dev/null +++ b/tools/yaml/dist/schema/common/seq.d.ts @@ -0,0 +1,2 @@ +import type { CollectionTag } from '../types.js'; +export declare const seq: CollectionTag; diff --git a/tools/yaml/dist/schema/common/seq.js b/tools/yaml/dist/schema/common/seq.js new file mode 100644 index 0000000..9c54bc9 --- /dev/null +++ b/tools/yaml/dist/schema/common/seq.js @@ -0,0 +1,19 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); + +const seq = { + collection: 'seq', + default: true, + nodeClass: YAMLSeq.YAMLSeq, + tag: 'tag:yaml.org,2002:seq', + resolve(seq, onError) { + if (!identity.isSeq(seq)) + onError('Expected a sequence for this tag'); + return seq; + }, + createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx) +}; + +exports.seq = seq; diff --git a/tools/yaml/dist/schema/common/string.d.ts b/tools/yaml/dist/schema/common/string.d.ts new file mode 100644 index 0000000..539c9b1 --- /dev/null +++ b/tools/yaml/dist/schema/common/string.d.ts @@ -0,0 +1,2 @@ +import type { ScalarTag } from '../types.js'; +export declare const string: ScalarTag; diff --git a/tools/yaml/dist/schema/common/string.js b/tools/yaml/dist/schema/common/string.js new file mode 100644 index 0000000..7601420 --- /dev/null +++ b/tools/yaml/dist/schema/common/string.js @@ -0,0 +1,16 @@ +'use strict'; + +var stringifyString = require('../../stringify/stringifyString.js'); + +const string = { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); + } +}; + +exports.string = string; diff --git a/tools/yaml/dist/schema/core/bool.d.ts b/tools/yaml/dist/schema/core/bool.d.ts new file mode 100644 index 0000000..e4bdc4c --- /dev/null +++ b/tools/yaml/dist/schema/core/bool.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types.js'; +export declare const boolTag: ScalarTag & { + test: RegExp; +}; diff --git a/tools/yaml/dist/schema/core/bool.js b/tools/yaml/dist/schema/core/bool.js new file mode 100644 index 0000000..4def73c --- /dev/null +++ b/tools/yaml/dist/schema/core/bool.js @@ -0,0 +1,21 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +const boolTag = { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === 't' || source[0] === 'T'; + if (value === sv) + return source; + } + return value ? ctx.options.trueStr : ctx.options.falseStr; + } +}; + +exports.boolTag = boolTag; diff --git a/tools/yaml/dist/schema/core/float.d.ts b/tools/yaml/dist/schema/core/float.d.ts new file mode 100644 index 0000000..22f0249 --- /dev/null +++ b/tools/yaml/dist/schema/core/float.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types.js'; +export declare const floatNaN: ScalarTag; +export declare const floatExp: ScalarTag; +export declare const float: ScalarTag; diff --git a/tools/yaml/dist/schema/core/float.js b/tools/yaml/dist/schema/core/float.js new file mode 100644 index 0000000..a1c96dd --- /dev/null +++ b/tools/yaml/dist/schema/core/float.js @@ -0,0 +1,47 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/, + resolve: str => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: str => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str)); + const dot = str.indexOf('.'); + if (dot !== -1 && str[str.length - 1] === '0') + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber.stringifyNumber +}; + +exports.float = float; +exports.floatExp = floatExp; +exports.floatNaN = floatNaN; diff --git a/tools/yaml/dist/schema/core/int.d.ts b/tools/yaml/dist/schema/core/int.d.ts new file mode 100644 index 0000000..35e2d4b --- /dev/null +++ b/tools/yaml/dist/schema/core/int.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types.js'; +export declare const intOct: ScalarTag; +export declare const int: ScalarTag; +export declare const intHex: ScalarTag; diff --git a/tools/yaml/dist/schema/core/int.js b/tools/yaml/dist/schema/core/int.js new file mode 100644 index 0000000..fe4c9ca --- /dev/null +++ b/tools/yaml/dist/schema/core/int.js @@ -0,0 +1,42 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber.stringifyNumber(node); +} +const intOct = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: node => intStringify(node, 8, '0o') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber +}; +const intHex = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +exports.int = int; +exports.intHex = intHex; +exports.intOct = intOct; diff --git a/tools/yaml/dist/schema/core/schema.d.ts b/tools/yaml/dist/schema/core/schema.d.ts new file mode 100644 index 0000000..f5bdd21 --- /dev/null +++ b/tools/yaml/dist/schema/core/schema.d.ts @@ -0,0 +1 @@ +export declare const schema: (import("../types.js").CollectionTag | import("../types.js").ScalarTag)[]; diff --git a/tools/yaml/dist/schema/core/schema.js b/tools/yaml/dist/schema/core/schema.js new file mode 100644 index 0000000..6ab87f2 --- /dev/null +++ b/tools/yaml/dist/schema/core/schema.js @@ -0,0 +1,25 @@ +'use strict'; + +var map = require('../common/map.js'); +var _null = require('../common/null.js'); +var seq = require('../common/seq.js'); +var string = require('../common/string.js'); +var bool = require('./bool.js'); +var float = require('./float.js'); +var int = require('./int.js'); + +const schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float +]; + +exports.schema = schema; diff --git a/tools/yaml/dist/schema/json-schema.d.ts b/tools/yaml/dist/schema/json-schema.d.ts new file mode 100644 index 0000000..6d51f40 --- /dev/null +++ b/tools/yaml/dist/schema/json-schema.d.ts @@ -0,0 +1,69 @@ +type JsonSchema = boolean | ArraySchema | ObjectSchema | NumberSchema | StringSchema; +type JsonType = 'array' | 'object' | 'string' | 'number' | 'integer' | 'boolean' | 'null'; +interface CommonSchema { + type?: JsonType | JsonType[]; + const?: unknown; + enum?: unknown[]; + format?: string; + allOf?: JsonSchema[]; + anyOf?: JsonSchema[]; + oneOf?: JsonSchema[]; + not?: JsonSchema; + if?: JsonSchema; + then?: JsonSchema; + else?: JsonSchema; + $id?: string; + $defs?: Record; + $anchor?: string; + $dynamicAnchor?: string; + $ref?: string; + $dynamicRef?: string; + $schema?: string; + $vocabulary?: Record; + $comment?: string; + default?: unknown; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + title?: string; + description?: string; + examples?: unknown[]; +} +interface ArraySchema extends CommonSchema { + prefixItems?: JsonSchema[]; + items?: JsonSchema; + contains?: JsonSchema; + unevaluatedItems?: JsonSchema; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; +} +interface ObjectSchema extends CommonSchema { + properties?: Record; + patternProperties?: Record; + additionalProperties?: JsonSchema; + propertyNames?: JsonSchema; + unevaluatedProperties?: JsonSchema; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + dependentSchemas?: Record; +} +interface StringSchema extends CommonSchema { + maxLength?: number; + minLength?: number; + patter?: string; + contentEncoding?: string; + contentMediaType?: string; + contentSchema?: JsonSchema; +} +interface NumberSchema extends CommonSchema { + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; +} diff --git a/tools/yaml/dist/schema/json/schema.d.ts b/tools/yaml/dist/schema/json/schema.d.ts new file mode 100644 index 0000000..76a4301 --- /dev/null +++ b/tools/yaml/dist/schema/json/schema.d.ts @@ -0,0 +1,2 @@ +import { CollectionTag, ScalarTag } from '../types.js'; +export declare const schema: (CollectionTag | ScalarTag)[]; diff --git a/tools/yaml/dist/schema/json/schema.js b/tools/yaml/dist/schema/json/schema.js new file mode 100644 index 0000000..31d0b4d --- /dev/null +++ b/tools/yaml/dist/schema/json/schema.js @@ -0,0 +1,64 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var map = require('../common/map.js'); +var seq = require('../common/seq.js'); + +function intIdentify(value) { + return typeof value === 'bigint' || Number.isInteger(value); +} +const stringifyJSON = ({ value }) => JSON.stringify(value); +const jsonScalars = [ + { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify: stringifyJSON + }, + { + identify: value => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^true|false$/, + resolve: str => str === 'true', + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: str => parseFloat(str), + stringify: stringifyJSON + } +]; +const jsonError = { + default: true, + tag: '', + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; + } +}; +const schema = [map.map, seq.seq].concat(jsonScalars, jsonError); + +exports.schema = schema; diff --git a/tools/yaml/dist/schema/tags.d.ts b/tools/yaml/dist/schema/tags.d.ts new file mode 100644 index 0000000..133333f --- /dev/null +++ b/tools/yaml/dist/schema/tags.d.ts @@ -0,0 +1,40 @@ +import { SchemaOptions } from '../options.js'; +import type { CollectionTag, ScalarTag } from './types.js'; +declare const tagsByName: { + binary: ScalarTag; + bool: ScalarTag & { + test: RegExp; + }; + float: ScalarTag; + floatExp: ScalarTag; + floatNaN: ScalarTag; + floatTime: ScalarTag; + int: ScalarTag; + intHex: ScalarTag; + intOct: ScalarTag; + intTime: ScalarTag; + map: CollectionTag; + null: ScalarTag & { + test: RegExp; + }; + omap: CollectionTag; + pairs: CollectionTag; + seq: CollectionTag; + set: CollectionTag; + timestamp: ScalarTag & { + test: RegExp; + }; +}; +export type TagId = keyof typeof tagsByName; +export type Tags = Array; +export declare const coreKnownTags: { + 'tag:yaml.org,2002:binary': ScalarTag; + 'tag:yaml.org,2002:omap': CollectionTag; + 'tag:yaml.org,2002:pairs': CollectionTag; + 'tag:yaml.org,2002:set': CollectionTag; + 'tag:yaml.org,2002:timestamp': ScalarTag & { + test: RegExp; + }; +}; +export declare function getTags(customTags: SchemaOptions['customTags'] | undefined, schemaName: string): (CollectionTag | ScalarTag)[]; +export {}; diff --git a/tools/yaml/dist/schema/tags.js b/tools/yaml/dist/schema/tags.js new file mode 100644 index 0000000..e49d2b0 --- /dev/null +++ b/tools/yaml/dist/schema/tags.js @@ -0,0 +1,86 @@ +'use strict'; + +var map = require('./common/map.js'); +var _null = require('./common/null.js'); +var seq = require('./common/seq.js'); +var string = require('./common/string.js'); +var bool = require('./core/bool.js'); +var float = require('./core/float.js'); +var int = require('./core/int.js'); +var schema = require('./core/schema.js'); +var schema$1 = require('./json/schema.js'); +var binary = require('./yaml-1.1/binary.js'); +var omap = require('./yaml-1.1/omap.js'); +var pairs = require('./yaml-1.1/pairs.js'); +var schema$2 = require('./yaml-1.1/schema.js'); +var set = require('./yaml-1.1/set.js'); +var timestamp = require('./yaml-1.1/timestamp.js'); + +const schemas = new Map([ + ['core', schema.schema], + ['failsafe', [map.map, seq.seq, string.string]], + ['json', schema$1.schema], + ['yaml11', schema$2.schema], + ['yaml-1.1', schema$2.schema] +]); +const tagsByName = { + binary: binary.binary, + bool: bool.boolTag, + float: float.float, + floatExp: float.floatExp, + floatNaN: float.floatNaN, + floatTime: timestamp.floatTime, + int: int.int, + intHex: int.intHex, + intOct: int.intOct, + intTime: timestamp.intTime, + map: map.map, + null: _null.nullTag, + omap: omap.omap, + pairs: pairs.pairs, + seq: seq.seq, + set: set.set, + timestamp: timestamp.timestamp +}; +const coreKnownTags = { + 'tag:yaml.org,2002:binary': binary.binary, + 'tag:yaml.org,2002:omap': omap.omap, + 'tag:yaml.org,2002:pairs': pairs.pairs, + 'tag:yaml.org,2002:set': set.set, + 'tag:yaml.org,2002:timestamp': timestamp.timestamp +}; +function getTags(customTags, schemaName) { + let tags = schemas.get(schemaName); + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys = Array.from(schemas.keys()) + .filter(key => key !== 'yaml11') + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } + else if (typeof customTags === 'function') { + tags = customTags(tags.slice()); + } + return tags.map(tag => { + if (typeof tag !== 'string') + return tag; + const tagObj = tagsByName[tag]; + if (tagObj) + return tagObj; + const keys = Object.keys(tagsByName) + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + }); +} + +exports.coreKnownTags = coreKnownTags; +exports.getTags = getTags; diff --git a/tools/yaml/dist/schema/types.d.ts b/tools/yaml/dist/schema/types.d.ts new file mode 100644 index 0000000..e814f1e --- /dev/null +++ b/tools/yaml/dist/schema/types.d.ts @@ -0,0 +1,90 @@ +import type { CreateNodeContext } from '../doc/createNode.js'; +import type { Node } from '../nodes/Node.js'; +import type { Scalar } from '../nodes/Scalar.js'; +import type { YAMLMap } from '../nodes/YAMLMap.js'; +import type { YAMLSeq } from '../nodes/YAMLSeq.js'; +import type { ParseOptions } from '../options.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import type { Schema } from './Schema.js'; +interface TagBase { + /** + * An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes. + */ + createNode?: (schema: Schema, value: unknown, ctx: CreateNodeContext) => Node; + /** + * If `true`, together with `test` allows for values to be stringified without + * an explicit tag. For most cases, it's unlikely that you'll actually want to + * use this, even if you first think you do. + */ + default?: boolean; + /** + * If a tag has multiple forms that should be parsed and/or stringified + * differently, use `format` to identify them. + */ + format?: string; + /** + * Used by `YAML.createNode` to detect your data type, e.g. using `typeof` or + * `instanceof`. + */ + identify?: (value: unknown) => boolean; + /** + * The identifier for your data type, with which its stringified form will be + * prefixed. Should either be a !-prefixed local `!tag`, or a fully qualified + * `tag:domain,date:foo`. + */ + tag: string; +} +export interface ScalarTag extends TagBase { + collection?: never; + nodeClass?: never; + /** + * Turns a value into an AST node. + * If returning a non-`Node` value, the output will be wrapped as a `Scalar`. + */ + resolve(value: string, onError: (message: string) => void, options: ParseOptions): unknown; + /** + * Optional function stringifying a Scalar node. If your data includes a + * suitable `.toString()` method, you can probably leave this undefined and + * use the default stringifier. + * + * @param item The node being stringified. + * @param ctx Contains the stringifying context variables. + * @param onComment Callback to signal that the stringifier includes the + * item's comment in its output. + * @param onChompKeep Callback to signal that the output uses a block scalar + * type with the `+` chomping indicator. + */ + stringify?: (item: Scalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void) => string; + /** + * Together with `default` allows for values to be stringified without an + * explicit tag and detected using a regular expression. For most cases, it's + * unlikely that you'll actually want to use these, even if you first think + * you do. + */ + test?: RegExp; +} +export interface CollectionTag extends TagBase { + stringify?: never; + test?: never; + /** The source collection type supported by this tag. */ + collection: 'map' | 'seq'; + /** + * The `Node` child class that implements this tag. + * If set, used to select this tag when stringifying. + * + * If the class provides a static `from` method, then that + * will be used if the tag object doesn't have a `createNode` method. + */ + nodeClass?: { + new (schema?: Schema): Node; + from?: (schema: Schema, obj: unknown, ctx: CreateNodeContext) => Node; + }; + /** + * Turns a value into an AST node. + * If returning a non-`Node` value, the output will be wrapped as a `Scalar`. + * + * Note: this is required if nodeClass is not provided. + */ + resolve?: (value: YAMLMap.Parsed | YAMLSeq.Parsed, onError: (message: string) => void, options: ParseOptions) => unknown; +} +export {}; diff --git a/tools/yaml/dist/schema/yaml-1.1/binary.d.ts b/tools/yaml/dist/schema/yaml-1.1/binary.d.ts new file mode 100644 index 0000000..2054970 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/binary.d.ts @@ -0,0 +1,2 @@ +import type { ScalarTag } from '../types.js'; +export declare const binary: ScalarTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/binary.js b/tools/yaml/dist/schema/yaml-1.1/binary.js new file mode 100644 index 0000000..df93e05 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/binary.js @@ -0,0 +1,68 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var stringifyString = require('../../stringify/stringifyString.js'); + +const binary = { + identify: value => value instanceof Uint8Array, + default: false, + tag: 'tag:yaml.org,2002:binary', + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof Buffer === 'function') { + return Buffer.from(src, 'base64'); + } + else if (typeof atob === 'function') { + // On IE 11, atob() can't handle newlines + const str = atob(src.replace(/[\n\r]/g, '')); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } + else { + onError('This environment does not support reading binary tags; either Buffer or atob is required'); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + const buf = value; // checked earlier by binary.identify() + let str; + if (typeof Buffer === 'function') { + str = + buf instanceof Buffer + ? buf.toString('base64') + : Buffer.from(buf.buffer).toString('base64'); + } + else if (typeof btoa === 'function') { + let s = ''; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } + else { + throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required'); + } + if (!type) + type = Scalar.Scalar.BLOCK_LITERAL; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\n' : ' '); + } + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); + } +}; + +exports.binary = binary; diff --git a/tools/yaml/dist/schema/yaml-1.1/bool.d.ts b/tools/yaml/dist/schema/yaml-1.1/bool.d.ts new file mode 100644 index 0000000..587b55b --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/bool.d.ts @@ -0,0 +1,7 @@ +import type { ScalarTag } from '../types.js'; +export declare const trueTag: ScalarTag & { + test: RegExp; +}; +export declare const falseTag: ScalarTag & { + test: RegExp; +}; diff --git a/tools/yaml/dist/schema/yaml-1.1/bool.js b/tools/yaml/dist/schema/yaml-1.1/bool.js new file mode 100644 index 0000000..fdb3b46 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/bool.js @@ -0,0 +1,29 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; +} +const trueTag = { + identify: value => value === true, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar.Scalar(true), + stringify: boolStringify +}; +const falseTag = { + identify: value => value === false, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => new Scalar.Scalar(false), + stringify: boolStringify +}; + +exports.falseTag = falseTag; +exports.trueTag = trueTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/float.d.ts b/tools/yaml/dist/schema/yaml-1.1/float.d.ts new file mode 100644 index 0000000..22f0249 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/float.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types.js'; +export declare const floatNaN: ScalarTag; +export declare const floatExp: ScalarTag; +export declare const float: ScalarTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/float.js b/tools/yaml/dist/schema/yaml-1.1/float.js new file mode 100644 index 0000000..4aea19a --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/float.js @@ -0,0 +1,50 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, '')), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ''))); + const dot = str.indexOf('.'); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ''); + if (f[f.length - 1] === '0') + node.minFractionDigits = f.length; + } + return node; + }, + stringify: stringifyNumber.stringifyNumber +}; + +exports.float = float; +exports.floatExp = floatExp; +exports.floatNaN = floatNaN; diff --git a/tools/yaml/dist/schema/yaml-1.1/int.d.ts b/tools/yaml/dist/schema/yaml-1.1/int.d.ts new file mode 100644 index 0000000..3d92f37 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/int.d.ts @@ -0,0 +1,5 @@ +import type { ScalarTag } from '../types.js'; +export declare const intBin: ScalarTag; +export declare const intOct: ScalarTag; +export declare const int: ScalarTag; +export declare const intHex: ScalarTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/int.js b/tools/yaml/dist/schema/yaml-1.1/int.js new file mode 100644 index 0000000..fdf47ca --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/int.js @@ -0,0 +1,76 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === '-' || sign === '+') + offset += 1; + str = str.substring(offset).replace(/_/g, ''); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n = BigInt(str); + return sign === '-' ? BigInt(-1) * n : n; + } + const n = parseInt(str, radix); + return sign === '-' ? -1 * n : n; +} +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? '-' + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber.stringifyNumber(node); +} +const intBin = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'BIN', + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: node => intStringify(node, 2, '0b') +}; +const intOct = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: node => intStringify(node, 8, '0') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber +}; +const intHex = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +exports.int = int; +exports.intBin = intBin; +exports.intHex = intHex; +exports.intOct = intOct; diff --git a/tools/yaml/dist/schema/yaml-1.1/omap.d.ts b/tools/yaml/dist/schema/yaml-1.1/omap.d.ts new file mode 100644 index 0000000..12727dc --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/omap.d.ts @@ -0,0 +1,28 @@ +import { ToJSContext } from '../../nodes/toJS.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; +import { CreateNodeContext } from '../../util.js'; +import type { Schema } from '../Schema.js'; +import { CollectionTag } from '../types.js'; +export declare class YAMLOMap extends YAMLSeq { + static tag: string; + constructor(); + add: (pair: import("../../index.js").Pair | { + key: any; + value: any; + }, overwrite?: boolean | undefined) => void; + delete: (key: unknown) => boolean; + get: { + (key: unknown, keepScalar: true): import("../../index.js").Scalar | undefined; + (key: unknown, keepScalar?: false | undefined): any; + (key: unknown, keepScalar?: boolean | undefined): any; + }; + has: (key: unknown) => boolean; + set: (key: any, value: any) => void; + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; + static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLOMap; +} +export declare const omap: CollectionTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/omap.js b/tools/yaml/dist/schema/yaml-1.1/omap.js new file mode 100644 index 0000000..3ca141d --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/omap.js @@ -0,0 +1,77 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var toJS = require('../../nodes/toJS.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); +var pairs = require('./pairs.js'); + +class YAMLOMap extends YAMLSeq.YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.YAMLMap.prototype.set.bind(this); + this.tag = YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map = new Map(); + if (ctx?.onCreate) + ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (identity.isPair(pair)) { + key = toJS.toJS(pair.key, '', ctx); + value = toJS.toJS(pair.value, key, ctx); + } + else { + key = toJS.toJS(pair, '', ctx); + } + if (map.has(key)) + throw new Error('Ordered maps must not include duplicate keys'); + map.set(key, value); + } + return map; + } + static from(schema, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema, iterable, ctx); + const omap = new this(); + omap.items = pairs$1.items; + return omap; + } +} +YAMLOMap.tag = 'tag:yaml.org,2002:omap'; +const omap = { + collection: 'seq', + identify: value => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: 'tag:yaml.org,2002:omap', + resolve(seq, onError) { + const pairs$1 = pairs.resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs$1.items) { + if (identity.isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } + else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs$1); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) +}; + +exports.YAMLOMap = YAMLOMap; +exports.omap = omap; diff --git a/tools/yaml/dist/schema/yaml-1.1/pairs.d.ts b/tools/yaml/dist/schema/yaml-1.1/pairs.d.ts new file mode 100644 index 0000000..20bb907 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/pairs.d.ts @@ -0,0 +1,10 @@ +import type { CreateNodeContext } from '../../doc/createNode.js'; +import type { ParsedNode } from '../../nodes/Node.js'; +import { Pair } from '../../nodes/Pair.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; +import type { Schema } from '../../schema/Schema.js'; +import type { CollectionTag } from '../types.js'; +export declare function resolvePairs(seq: YAMLSeq.Parsed> | YAMLMap.Parsed, onError: (message: string) => void): YAMLSeq.Parsed>; +export declare function createPairs(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSeq; +export declare const pairs: CollectionTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/pairs.js b/tools/yaml/dist/schema/yaml-1.1/pairs.js new file mode 100644 index 0000000..aa32e0f --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/pairs.js @@ -0,0 +1,82 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var Pair = require('../../nodes/Pair.js'); +var Scalar = require('../../nodes/Scalar.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); + +function resolvePairs(seq, onError) { + if (identity.isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (identity.isPair(item)) + continue; + else if (identity.isMap(item)) { + if (item.items.length > 1) + onError('Each pair must have its own sequence indicator'); + const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore + ? `${item.commentBefore}\n${pair.key.commentBefore}` + : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment + ? `${item.comment}\n${cn.comment}` + : item.comment; + } + item = pair; + } + seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item); + } + } + else + onError('Expected a sequence for this tag'); + return seq; +} +function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs = new YAMLSeq.YAMLSeq(schema); + pairs.tag = 'tag:yaml.org,2002:pairs'; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === 'function') + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } + else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } + else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } + else { + throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); + } + } + else { + key = it; + } + pairs.items.push(Pair.createPair(key, value, ctx)); + } + return pairs; +} +const pairs = { + collection: 'seq', + default: false, + tag: 'tag:yaml.org,2002:pairs', + resolve: resolvePairs, + createNode: createPairs +}; + +exports.createPairs = createPairs; +exports.pairs = pairs; +exports.resolvePairs = resolvePairs; diff --git a/tools/yaml/dist/schema/yaml-1.1/schema.d.ts b/tools/yaml/dist/schema/yaml-1.1/schema.d.ts new file mode 100644 index 0000000..f5bdd21 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/schema.d.ts @@ -0,0 +1 @@ +export declare const schema: (import("../types.js").CollectionTag | import("../types.js").ScalarTag)[]; diff --git a/tools/yaml/dist/schema/yaml-1.1/schema.js b/tools/yaml/dist/schema/yaml-1.1/schema.js new file mode 100644 index 0000000..c04270a --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/schema.js @@ -0,0 +1,39 @@ +'use strict'; + +var map = require('../common/map.js'); +var _null = require('../common/null.js'); +var seq = require('../common/seq.js'); +var string = require('../common/string.js'); +var binary = require('./binary.js'); +var bool = require('./bool.js'); +var float = require('./float.js'); +var int = require('./int.js'); +var omap = require('./omap.js'); +var pairs = require('./pairs.js'); +var set = require('./set.js'); +var timestamp = require('./timestamp.js'); + +const schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp +]; + +exports.schema = schema; diff --git a/tools/yaml/dist/schema/yaml-1.1/set.d.ts b/tools/yaml/dist/schema/yaml-1.1/set.d.ts new file mode 100644 index 0000000..2054fb7 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/set.d.ts @@ -0,0 +1,28 @@ +import { Pair } from '../../nodes/Pair.js'; +import { Scalar } from '../../nodes/Scalar.js'; +import { ToJSContext } from '../../nodes/toJS.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; +import type { Schema } from '../../schema/Schema.js'; +import type { StringifyContext } from '../../stringify/stringify.js'; +import { CreateNodeContext } from '../../util.js'; +import type { CollectionTag } from '../types.js'; +export declare class YAMLSet extends YAMLMap | null> { + static tag: string; + constructor(schema?: Schema); + add(key: T | Pair | null> | { + key: T; + value: Scalar | null; + }): void; + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key: unknown, keepPair?: boolean): any; + set(key: T, value: boolean): void; + /** @deprecated Will throw; `value` must be boolean */ + set(key: T, value: null): void; + toJSON(_?: unknown, ctx?: ToJSContext): any; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet; +} +export declare const set: CollectionTag; diff --git a/tools/yaml/dist/schema/yaml-1.1/set.js b/tools/yaml/dist/schema/yaml-1.1/set.js new file mode 100644 index 0000000..650c250 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/set.js @@ -0,0 +1,96 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var Pair = require('../../nodes/Pair.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); + +class YAMLSet extends YAMLMap.YAMLMap { + constructor(schema) { + super(schema); + this.tag = YAMLSet.tag; + } + add(key) { + let pair; + if (identity.isPair(key)) + pair = key; + else if (key && + typeof key === 'object' && + 'key' in key && + 'value' in key && + key.value === null) + pair = new Pair.Pair(key.key, null); + else + pair = new Pair.Pair(key, null); + const prev = YAMLMap.findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = YAMLMap.findPair(this.items, key); + return !keepPair && identity.isPair(pair) + ? identity.isScalar(pair.key) + ? pair.key.value + : pair.key + : pair; + } + set(key, value) { + if (typeof value !== 'boolean') + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = YAMLMap.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } + else if (!prev && value) { + this.items.push(new Pair.Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error('Set items must all have null values'); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === 'function') + value = replacer.call(iterable, value, value); + set.items.push(Pair.createPair(value, null, ctx)); + } + return set; + } +} +YAMLSet.tag = 'tag:yaml.org,2002:set'; +const set = { + collection: 'map', + identify: value => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: 'tag:yaml.org,2002:set', + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map, onError) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); + else + onError('Set items must all have null values'); + } + else + onError('Expected a mapping for this tag'); + return map; + } +}; + +exports.YAMLSet = YAMLSet; +exports.set = set; diff --git a/tools/yaml/dist/schema/yaml-1.1/timestamp.d.ts b/tools/yaml/dist/schema/yaml-1.1/timestamp.d.ts new file mode 100644 index 0000000..0c1d2d4 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/timestamp.d.ts @@ -0,0 +1,6 @@ +import type { ScalarTag } from '../types.js'; +export declare const intTime: ScalarTag; +export declare const floatTime: ScalarTag; +export declare const timestamp: ScalarTag & { + test: RegExp; +}; diff --git a/tools/yaml/dist/schema/yaml-1.1/timestamp.js b/tools/yaml/dist/schema/yaml-1.1/timestamp.js new file mode 100644 index 0000000..c0b29e8 --- /dev/null +++ b/tools/yaml/dist/schema/yaml-1.1/timestamp.js @@ -0,0 +1,105 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +/** Internal types handle bigint as number, because TS can't figure it out. */ +function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === '-' || sign === '+' ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts + .replace(/_/g, '') + .split(':') + .reduce((res, p) => res * num(60) + num(p), num(0)); + return (sign === '-' ? num(-1) * res : res); +} +/** + * hhhh:mm:ss.sss + * + * Internal types handle bigint as number, because TS can't figure it out. + */ +function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === 'bigint') + num = n => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber.stringifyNumber(node); + let sign = ''; + if (value < 0) { + sign = '-'; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; // seconds, including ms + if (value < 60) { + parts.unshift(0); // at least one : is required + } + else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); // minutes + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); // hours + } + } + return (sign + + parts + .map(n => String(n).padStart(2, '0')) + .join(':') + .replace(/000000\d*$/, '') // % 60 may introduce error + ); +} +const intTime = { + identify: value => typeof value === 'bigint' || Number.isInteger(value), + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal +}; +const floatTime = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: str => parseSexagesimal(str, false), + stringify: stringifySexagesimal +}; +const timestamp = { + identify: value => value instanceof Date, + default: true, + tag: 'tag:yaml.org,2002:timestamp', + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd + '(?:' + // time is optional + '(?:t|T|[ \\t]+)' + // t | T | whitespace + '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)? + '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30 + ')?$'), + resolve(str) { + const match = str.match(timestamp.test); + if (!match) + throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== 'Z') { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 60000 * d; + } + return new Date(date); + }, + stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '') +}; + +exports.floatTime = floatTime; +exports.intTime = intTime; +exports.timestamp = timestamp; diff --git a/tools/yaml/dist/stringify/foldFlowLines.d.ts b/tools/yaml/dist/stringify/foldFlowLines.d.ts new file mode 100644 index 0000000..aac3cac --- /dev/null +++ b/tools/yaml/dist/stringify/foldFlowLines.d.ts @@ -0,0 +1,34 @@ +export declare const FOLD_FLOW = "flow"; +export declare const FOLD_BLOCK = "block"; +export declare const FOLD_QUOTED = "quoted"; +/** + * `'block'` prevents more-indented lines from being folded; + * `'quoted'` allows for `\` escapes, including escaped newlines + */ +export type FoldMode = 'flow' | 'block' | 'quoted'; +export interface FoldOptions { + /** + * Accounts for leading contents on the first line, defaulting to + * `indent.length` + */ + indentAtStart?: number; + /** Default: `80` */ + lineWidth?: number; + /** + * Allow highly indented lines to stretch the line width or indent content + * from the start. + * + * Default: `20` + */ + minContentWidth?: number; + /** Called once if the text is folded */ + onFold?: () => void; + /** Called once if any line of text exceeds lineWidth characters */ + onOverflow?: () => void; +} +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +export declare function foldFlowLines(text: string, indent: string, mode?: FoldMode, { indentAtStart, lineWidth, minContentWidth, onFold, onOverflow }?: FoldOptions): string; diff --git a/tools/yaml/dist/stringify/foldFlowLines.js b/tools/yaml/dist/stringify/foldFlowLines.js new file mode 100644 index 0000000..efe7a25 --- /dev/null +++ b/tools/yaml/dist/stringify/foldFlowLines.js @@ -0,0 +1,140 @@ +'use strict'; + +const FOLD_FLOW = 'flow'; +const FOLD_BLOCK = 'block'; +const FOLD_QUOTED = 'quoted'; +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === 'number') { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split = undefined; + let prev = undefined; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) + end = i + endStep; + } + for (let ch; (ch = text[(i += 1)]);) { + if (mode === FOLD_QUOTED && ch === '\\') { + escStart = i; + switch (text[i + 1]) { + case 'x': + i += 3; + break; + case 'u': + i += 5; + break; + case 'U': + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === '\n') { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = undefined; + } + else { + if (ch === ' ' && + prev && + prev !== ' ' && + prev !== '\n' && + prev !== '\t') { + // space surrounded by non-space can be replaced with newline + indent + const next = text[i + 1]; + if (next && next !== ' ' && next !== '\n' && next !== '\t') + split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = undefined; + } + else if (mode === FOLD_QUOTED) { + // white-space collected at end may stretch past lineWidth + while (prev === ' ' || prev === '\t') { + prev = ch; + ch = text[(i += 1)]; + overflow = true; + } + // Account for newline escape, but don't break preceding escape + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + // Bail out if lineWidth & minContentWidth are shorter than an escape string + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = undefined; + } + else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i = 0; i < folds.length; ++i) { + const fold = folds[i]; + const end = folds[i + 1] || text.length; + if (fold === 0) + res = `\n${indent}${text.slice(0, end)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += `\n${indent}${text.slice(fold + 1, end)}`; + } + } + return res; +} +/** + * Presumes `i + 1` is at the start of a line + * @returns index of last newline in more-indented block + */ +function consumeMoreIndentedLines(text, i) { + let ch = text[i + 1]; + while (ch === ' ' || ch === '\t') { + do { + ch = text[(i += 1)]; + } while (ch && ch !== '\n'); + ch = text[i + 1]; + } + return i; +} + +exports.FOLD_BLOCK = FOLD_BLOCK; +exports.FOLD_FLOW = FOLD_FLOW; +exports.FOLD_QUOTED = FOLD_QUOTED; +exports.foldFlowLines = foldFlowLines; diff --git a/tools/yaml/dist/stringify/stringify.d.ts b/tools/yaml/dist/stringify/stringify.d.ts new file mode 100644 index 0000000..f408b75 --- /dev/null +++ b/tools/yaml/dist/stringify/stringify.d.ts @@ -0,0 +1,21 @@ +import type { Document } from '../doc/Document.js'; +import type { Alias } from '../nodes/Alias.js'; +import type { ToStringOptions } from '../options.js'; +export type StringifyContext = { + actualString?: boolean; + allNullValues?: boolean; + anchors: Set; + doc: Document; + forceBlockIndent?: boolean; + implicitKey?: boolean; + indent: string; + indentStep: string; + indentAtStart?: number; + inFlow: boolean | null; + inStringifyKey?: boolean; + flowCollectionPadding: string; + options: Readonly>>; + resolvedAliases?: Set; +}; +export declare function createStringifyContext(doc: Document, options: ToStringOptions): StringifyContext; +export declare function stringify(item: unknown, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; diff --git a/tools/yaml/dist/stringify/stringify.js b/tools/yaml/dist/stringify/stringify.js new file mode 100644 index 0000000..1b472a6 --- /dev/null +++ b/tools/yaml/dist/stringify/stringify.js @@ -0,0 +1,127 @@ +'use strict'; + +var anchors = require('../doc/anchors.js'); +var identity = require('../nodes/identity.js'); +var stringifyComment = require('./stringifyComment.js'); +var stringifyString = require('./stringifyString.js'); + +function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment.stringifyComment, + defaultKeyType: null, + defaultStringType: 'PLAIN', + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: 'false', + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: 'null', + simpleKeys: false, + singleQuote: null, + trueStr: 'true', + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case 'block': + inFlow = false; + break; + case 'flow': + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '', + indent: '', + indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ', + inFlow, + options: opt + }; +} +function getTagObject(tags, item) { + if (item.tag) { + const match = tags.filter(t => t.tag === item.tag); + if (match.length > 0) + return match.find(t => t.format === item.format) ?? match[0]; + } + let tagObj = undefined; + let obj; + if (identity.isScalar(item)) { + obj = item.value; + const match = tags.filter(t => t.identify?.(obj)); + tagObj = + match.find(t => t.format === item.format) ?? match.find(t => !t.format); + } + else { + obj = item; + tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; +} +// needs to be called before value stringifier to allow for circular anchor refs +function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) { + if (!doc.directives) + return ''; + const props = []; + const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor; + if (anchor && anchors.anchorIsValid(anchor)) { + anchors$1.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag; + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(' '); +} +function stringify(item, ctx, onComment, onChompKeep) { + if (identity.isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (identity.isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } + else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = undefined; + const node = identity.isNode(item) + ? item + : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) }); + if (!tagObj) + tagObj = getTagObject(ctx.doc.schema.tags, node); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str = typeof tagObj.stringify === 'function' + ? tagObj.stringify(node, ctx, onComment, onChompKeep) + : identity.isScalar(node) + ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) + : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str; + return identity.isScalar(node) || str[0] === '{' || str[0] === '[' + ? `${props} ${str}` + : `${props}\n${ctx.indent}${str}`; +} + +exports.createStringifyContext = createStringifyContext; +exports.stringify = stringify; diff --git a/tools/yaml/dist/stringify/stringifyCollection.d.ts b/tools/yaml/dist/stringify/stringifyCollection.d.ts new file mode 100644 index 0000000..207d703 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyCollection.d.ts @@ -0,0 +1,17 @@ +import { Collection } from '../nodes/Collection.js'; +import { StringifyContext } from './stringify.js'; +interface StringifyCollectionOptions { + blockItemPrefix: string; + flowChars: { + start: '{'; + end: '}'; + } | { + start: '['; + end: ']'; + }; + itemIndent: string; + onChompKeep?: () => void; + onComment?: () => void; +} +export declare function stringifyCollection(collection: Readonly, ctx: StringifyContext, options: StringifyCollectionOptions): string; +export {}; diff --git a/tools/yaml/dist/stringify/stringifyCollection.js b/tools/yaml/dist/stringify/stringifyCollection.js new file mode 100644 index 0000000..750efc1 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyCollection.js @@ -0,0 +1,153 @@ +'use strict'; + +var Collection = require('../nodes/Collection.js'); +var identity = require('../nodes/identity.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify(collection, ctx, options); +} +function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; // flag for the preceding node's status + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (identity.isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment = item.comment; + } + else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true)); + if (comment) + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + if (chompKeep && comment) + chompKeep = false; + lines.push(blockItemPrefix + str); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } + else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? `\n${indent}${line}` : '\n'; + } + } + if (comment) { + str += '\n' + stringifyComment.indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; +} +function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (identity.isNode(item)) { + if (item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } + else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = identity.isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } + else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str = stringify.stringify(item, itemCtx, () => (comment = null)); + if (i < items.length - 1) + str += ','; + if (comment) + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + if (!reqNewline && (lines.length > linesAtValue || str.includes('\n'))) + reqNewline = true; + lines.push(str); + linesAtValue = lines.length; + } + let str; + const { start, end } = flowChars; + if (lines.length === 0) { + str = start + end; + } + else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = len > Collection.Collection.maxFlowStringSingleLineLength; + } + if (reqNewline) { + str = start; + for (const line of lines) + str += line ? `\n${indentStep}${indent}${line}` : '\n'; + str += `\n${indent}${end}`; + } + else { + str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + } + } + if (comment) { + str += stringifyComment.lineComment(str, indent, commentString(comment)); + if (onComment) + onComment(); + } + return str; +} +function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ''); + if (comment) { + const ic = stringifyComment.indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); // Avoid double indent on first line + } +} + +exports.stringifyCollection = stringifyCollection; diff --git a/tools/yaml/dist/stringify/stringifyComment.d.ts b/tools/yaml/dist/stringify/stringifyComment.d.ts new file mode 100644 index 0000000..9fcf48d --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyComment.d.ts @@ -0,0 +1,10 @@ +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +export declare const stringifyComment: (str: string) => string; +export declare function indentComment(comment: string, indent: string): string; +export declare const lineComment: (str: string, indent: string, comment: string) => string; diff --git a/tools/yaml/dist/stringify/stringifyComment.js b/tools/yaml/dist/stringify/stringifyComment.js new file mode 100644 index 0000000..26bf361 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyComment.js @@ -0,0 +1,24 @@ +'use strict'; + +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); +function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; +} +const lineComment = (str, indent, comment) => str.endsWith('\n') + ? indentComment(comment, indent) + : comment.includes('\n') + ? '\n' + indentComment(comment, indent) + : (str.endsWith(' ') ? '' : ' ') + comment; + +exports.indentComment = indentComment; +exports.lineComment = lineComment; +exports.stringifyComment = stringifyComment; diff --git a/tools/yaml/dist/stringify/stringifyDocument.d.ts b/tools/yaml/dist/stringify/stringifyDocument.d.ts new file mode 100644 index 0000000..1eeb177 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyDocument.d.ts @@ -0,0 +1,4 @@ +import type { Document } from '../doc/Document.js'; +import type { Node } from '../nodes/Node.js'; +import type { ToStringOptions } from '../options.js'; +export declare function stringifyDocument(doc: Readonly>, options: ToStringOptions): string; diff --git a/tools/yaml/dist/stringify/stringifyDocument.js b/tools/yaml/dist/stringify/stringifyDocument.js new file mode 100644 index 0000000..fb9d73c --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyDocument.js @@ -0,0 +1,87 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } + else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push('---'); + const ctx = stringify.createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(''); + const cs = commentString(doc.commentBefore); + lines.unshift(stringifyComment.indentComment(cs, '')); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (identity.isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(''); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(stringifyComment.indentComment(cs, '')); + } + // top-level block scalars need to be indented if followed by a comment + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? undefined : () => (chompKeep = true); + let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep); + if (contentComment) + body += stringifyComment.lineComment(body, '', commentString(contentComment)); + if ((body[0] === '|' || body[0] === '>') && + lines[lines.length - 1] === '---') { + // Top-level block scalars with a preceding doc marker ought to use the + // same line for their header. + lines[lines.length - 1] = `--- ${body}`; + } + else + lines.push(body); + } + else { + lines.push(stringify.stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes('\n')) { + lines.push('...'); + lines.push(stringifyComment.indentComment(cs, '')); + } + else { + lines.push(`... ${cs}`); + } + } + else { + lines.push('...'); + } + } + else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ''); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') + lines.push(''); + lines.push(stringifyComment.indentComment(commentString(dc), '')); + } + } + return lines.join('\n') + '\n'; +} + +exports.stringifyDocument = stringifyDocument; diff --git a/tools/yaml/dist/stringify/stringifyNumber.d.ts b/tools/yaml/dist/stringify/stringifyNumber.d.ts new file mode 100644 index 0000000..3c14df1 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyNumber.d.ts @@ -0,0 +1,2 @@ +import type { Scalar } from '../nodes/Scalar.js'; +export declare function stringifyNumber({ format, minFractionDigits, tag, value }: Scalar): string; diff --git a/tools/yaml/dist/stringify/stringifyNumber.js b/tools/yaml/dist/stringify/stringifyNumber.js new file mode 100644 index 0000000..4118ff6 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyNumber.js @@ -0,0 +1,26 @@ +'use strict'; + +function stringifyNumber({ format, minFractionDigits, tag, value }) { + if (typeof value === 'bigint') + return String(value); + const num = typeof value === 'number' ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; + let n = JSON.stringify(value); + if (!format && + minFractionDigits && + (!tag || tag === 'tag:yaml.org,2002:float') && + /^\d/.test(n)) { + let i = n.indexOf('.'); + if (i < 0) { + i = n.length; + n += '.'; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += '0'; + } + return n; +} + +exports.stringifyNumber = stringifyNumber; diff --git a/tools/yaml/dist/stringify/stringifyPair.d.ts b/tools/yaml/dist/stringify/stringifyPair.d.ts new file mode 100644 index 0000000..c512149 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyPair.d.ts @@ -0,0 +1,3 @@ +import type { Pair } from '../nodes/Pair.js'; +import { StringifyContext } from './stringify.js'; +export declare function stringifyPair({ key, value }: Readonly, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; diff --git a/tools/yaml/dist/stringify/stringifyPair.js b/tools/yaml/dist/stringify/stringifyPair.js new file mode 100644 index 0000000..f5fc0ba --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyPair.js @@ -0,0 +1,152 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = (identity.isNode(key) && key.comment) || null; + if (simpleKeys) { + if (keyComment) { + throw new Error('With simple keys, key nodes cannot have comments'); + } + if (identity.isCollection(key)) { + const msg = 'With simple keys, collection cannot be used as a key value'; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && + (!key || + (keyComment && value == null && !ctx.inFlow) || + identity.isCollection(key) || + (identity.isScalar(key) + ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL + : typeof key === 'object')); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true)); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error('With simple keys, single line scalar must not span more than 1024 characters'); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === '' ? '?' : explicitKey ? `? ${str}` : str; + } + } + else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str}\n${indent}:`; + } + else { + str = `${str}:`; + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (identity.isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } + else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === 'object') + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && identity.isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && + indentStep.length >= 2 && + !ctx.inFlow && + !explicitKey && + identity.isSeq(value) && + !value.flow && + !value.tag && + !value.anchor) { + // If indentSeq === false, consider '- ' as part of indentation where possible + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true)); + let ws = ' '; + if (keyComment || vsb || vcb) { + ws = vsb ? '\n' : ''; + if (vcb) { + const cs = commentString(vcb); + ws += `\n${stringifyComment.indentComment(cs, ctx.indent)}`; + } + if (valueStr === '' && !ctx.inFlow) { + if (ws === '\n') + ws = '\n\n'; + } + else { + ws += `\n${ctx.indent}`; + } + } + else if (!explicitKey && identity.isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf('\n'); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === '&' || vs0 === '!')) { + let sp0 = valueStr.indexOf(' '); + if (vs0 === '&' && + sp0 !== -1 && + sp0 < nl0 && + valueStr[sp0 + 1] === '!') { + sp0 = valueStr.indexOf(' ', sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = `\n${ctx.indent}`; + } + } + else if (valueStr === '' || valueStr[0] === '\n') { + ws = ''; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } + else if (valueComment && !valueCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); + } + else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str; +} + +exports.stringifyPair = stringifyPair; diff --git a/tools/yaml/dist/stringify/stringifyString.d.ts b/tools/yaml/dist/stringify/stringifyString.d.ts new file mode 100644 index 0000000..017cc4e --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyString.d.ts @@ -0,0 +1,9 @@ +import { Scalar } from '../nodes/Scalar.js'; +import type { StringifyContext } from './stringify.js'; +interface StringifyScalar { + value: string; + comment?: string | null; + type?: string; +} +export declare function stringifyString(item: Scalar | StringifyScalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +export {}; diff --git a/tools/yaml/dist/stringify/stringifyString.js b/tools/yaml/dist/stringify/stringifyString.js new file mode 100644 index 0000000..339e331 --- /dev/null +++ b/tools/yaml/dist/stringify/stringifyString.js @@ -0,0 +1,330 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); +var foldFlowLines = require('./foldFlowLines.js'); + +const getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth +}); +// Also checks for lines starting with %, as parsing the output as YAML 1.1 will +// presume that's starting a new document. +const containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); +function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === '\n') { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } + } + return true; +} +function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + let str = ''; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') { + // space before newline needs to be escaped to not be folded + str += json.slice(start, i) + '\\ '; + i += 1; + start = i; + ch = '\\'; + } + if (ch === '\\') + switch (json[i + 1]) { + case 'u': + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case '0000': + str += '\\0'; + break; + case '0007': + str += '\\a'; + break; + case '000b': + str += '\\v'; + break; + case '001b': + str += '\\e'; + break; + case '0085': + str += '\\N'; + break; + case '00a0': + str += '\\_'; + break; + case '2028': + str += '\\L'; + break; + case '2029': + str += '\\P'; + break; + default: + if (code.substr(0, 2) === '00') + str += '\\x' + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case 'n': + if (implicitKey || + json[i + 2] === '"' || + json.length < minMultiLineLength) { + i += 1; + } + else { + // folding will eat first newline + str += json.slice(start, i) + '\n\n'; + while (json[i + 2] === '\\' && + json[i + 3] === 'n' && + json[i + 4] !== '"') { + str += '\n'; + i += 2; + } + str += indent; + // space after newline needs to be escaped to not be folded + if (json[i + 2] === ' ') + str += '\\'; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey + ? str + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); +} +function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || + (ctx.implicitKey && value.includes('\n')) || + /[ \t]\n|\n[ \t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline + ) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'"; + return ctx.implicitKey + ? res + : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); +} +function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); +} +// The negative lookbehind avoids a polynomial search, +// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind +let blockEndNewlines; +try { + blockEndNewlines = new RegExp('(^|(?\n'; + // determine chomping from whitespace at value end + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== '\n' && ch !== '\t' && ch !== ' ') + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf('\n'); + if (endNlPos === -1) { + chomp = '-'; // strip + } + else if (value === end || endNlPos !== end.length - 1) { + chomp = '+'; // keep + if (onChompKeep) + onChompKeep(); + } + else { + chomp = ''; // clip + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === '\n') + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + // determine indent indicator from whitespace at value start + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === ' ') + startWithSpace = true; + else if (ch === '\n') + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? '2' : '1'; // root is at -1 + let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp; + if (comment) { + header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' ')); + if (onComment) + onComment(); + } + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header}\n${indent}${start}${value}${end}`; + } + value = value + .replace(/\n+/g, '\n$&') + .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded + // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent + .replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true)); + return `${header}\n${indent}${body}`; +} +function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if ((implicitKey && value.includes('\n')) || + (inFlow && /[[\]{},]/.test(value))) { + return quotedString(value, ctx); + } + if (!value || + /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + // not allowed: + // - empty string, '-' or '?' + // - start with an indicator character (except [?:-]) or /[?-] / + // - '\n ', ': ' or ' \n' anywhere + // - '#' not preceded by a non-space char + // - end with ' ' or ':' + return implicitKey || inFlow || !value.includes('\n') + ? quotedString(value, ctx) + : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && + !inFlow && + type !== Scalar.Scalar.PLAIN && + value.includes('\n')) { + // Where allowed & type not set explicitly, prefer block style for multiline strings + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === '') { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$&\n${indent}`); + // Verify that output will be parsed as a string, as e.g. plain numbers and + // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'), + // and others in v1.1. + if (actualString) { + const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey + ? str + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); +} +function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === 'string' + ? item + : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + // force double quotes on control characters & unpaired surrogates + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.Scalar.BLOCK_FOLDED: + case Scalar.Scalar.BLOCK_LITERAL: + return implicitKey || inFlow + ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers + : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = (implicitKey && defaultKeyType) || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); + } + return res; +} + +exports.stringifyString = stringifyString; diff --git a/tools/yaml/dist/test-events.d.ts b/tools/yaml/dist/test-events.d.ts new file mode 100644 index 0000000..d1a2348 --- /dev/null +++ b/tools/yaml/dist/test-events.d.ts @@ -0,0 +1,4 @@ +export declare function testEvents(src: string): { + events: string[]; + error: unknown; +}; diff --git a/tools/yaml/dist/test-events.js b/tools/yaml/dist/test-events.js new file mode 100644 index 0000000..f38d336 --- /dev/null +++ b/tools/yaml/dist/test-events.js @@ -0,0 +1,134 @@ +'use strict'; + +var identity = require('./nodes/identity.js'); +var publicApi = require('./public-api.js'); +var visit = require('./visit.js'); + +const scalarChar = { + BLOCK_FOLDED: '>', + BLOCK_LITERAL: '|', + PLAIN: ':', + QUOTE_DOUBLE: '"', + QUOTE_SINGLE: "'" +}; +function anchorExists(doc, anchor) { + let found = false; + visit.visit(doc, { + Value(_key, node) { + if (node.anchor === anchor) { + found = true; + return visit.visit.BREAK; + } + } + }); + return found; +} +// test harness for yaml-test-suite event tests +function testEvents(src) { + const docs = publicApi.parseAllDocuments(src); + const errDoc = docs.find(doc => doc.errors.length > 0); + const error = errDoc ? errDoc.errors[0].message : null; + const events = ['+STR']; + try { + for (let i = 0; i < docs.length; ++i) { + const doc = docs[i]; + let root = doc.contents; + if (Array.isArray(root)) + root = root[0]; + const [rootStart] = doc.range || [0]; + const error = doc.errors[0]; + if (error && (!error.pos || error.pos[0] < rootStart)) + throw new Error(); + let docStart = '+DOC'; + if (doc.directives.docStart) + docStart += ' ---'; + else if (doc.contents && + doc.contents.range[2] === doc.contents.range[0] && + !doc.contents.anchor && + !doc.contents.tag) + continue; + events.push(docStart); + addEvents(events, doc, error?.pos[0] ?? -1, root); + let docEnd = '-DOC'; + if (doc.directives.docEnd) + docEnd += ' ...'; + events.push(docEnd); + } + } + catch (e) { + return { events, error: error ?? e }; + } + events.push('-STR'); + return { events, error }; +} +function addEvents(events, doc, errPos, node) { + if (!node) { + events.push('=VAL :'); + return; + } + if (errPos !== -1 && identity.isNode(node) && node.range[0] >= errPos) + throw new Error(); + let props = ''; + let anchor = identity.isScalar(node) || identity.isCollection(node) ? node.anchor : undefined; + if (anchor) { + if (/\d$/.test(anchor)) { + const alt = anchor.replace(/\d$/, ''); + if (anchorExists(doc, alt)) + anchor = alt; + } + props = ` &${anchor}`; + } + if (identity.isNode(node) && node.tag) + props += ` <${node.tag}>`; + if (identity.isMap(node)) { + const ev = node.flow ? '+MAP {}' : '+MAP'; + events.push(`${ev}${props}`); + node.items.forEach(({ key, value }) => { + addEvents(events, doc, errPos, key); + addEvents(events, doc, errPos, value); + }); + events.push('-MAP'); + } + else if (identity.isSeq(node)) { + const ev = node.flow ? '+SEQ []' : '+SEQ'; + events.push(`${ev}${props}`); + node.items.forEach(item => { + addEvents(events, doc, errPos, item); + }); + events.push('-SEQ'); + } + else if (identity.isPair(node)) { + events.push(`+MAP${props}`); + addEvents(events, doc, errPos, node.key); + addEvents(events, doc, errPos, node.value); + events.push('-MAP'); + } + else if (identity.isAlias(node)) { + let alias = node.source; + if (alias && /\d$/.test(alias)) { + const alt = alias.replace(/\d$/, ''); + if (anchorExists(doc, alt)) + alias = alt; + } + events.push(`=ALI${props} *${alias}`); + } + else { + const scalar = scalarChar[String(node.type)]; + if (!scalar) + throw new Error(`Unexpected node type ${node.type}`); + const value = node.source + .replace(/\\/g, '\\\\') + .replace(/\0/g, '\\0') + .replace(/\x07/g, '\\a') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\v/g, '\\v') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/\x1b/g, '\\e'); + events.push(`=VAL${props} ${scalar}${value}`); + } +} + +exports.testEvents = testEvents; diff --git a/tools/yaml/dist/util.d.ts b/tools/yaml/dist/util.d.ts new file mode 100644 index 0000000..3d1b198 --- /dev/null +++ b/tools/yaml/dist/util.d.ts @@ -0,0 +1,12 @@ +export { createNode, CreateNodeContext } from './doc/createNode.js'; +export { debug, LogLevelId, warn } from './log.js'; +export { createPair } from './nodes/Pair.js'; +export { findPair } from './nodes/YAMLMap.js'; +export { toJS, ToJSContext } from './nodes/toJS.js'; +export { map as mapTag } from './schema/common/map.js'; +export { seq as seqTag } from './schema/common/seq.js'; +export { string as stringTag } from './schema/common/string.js'; +export { foldFlowLines, FoldOptions } from './stringify/foldFlowLines'; +export { StringifyContext } from './stringify/stringify.js'; +export { stringifyNumber } from './stringify/stringifyNumber.js'; +export { stringifyString } from './stringify/stringifyString.js'; diff --git a/tools/yaml/dist/util.js b/tools/yaml/dist/util.js new file mode 100644 index 0000000..2e0e5cd --- /dev/null +++ b/tools/yaml/dist/util.js @@ -0,0 +1,28 @@ +'use strict'; + +var createNode = require('./doc/createNode.js'); +var log = require('./log.js'); +var Pair = require('./nodes/Pair.js'); +var YAMLMap = require('./nodes/YAMLMap.js'); +var toJS = require('./nodes/toJS.js'); +var map = require('./schema/common/map.js'); +var seq = require('./schema/common/seq.js'); +var string = require('./schema/common/string.js'); +var foldFlowLines = require('./stringify/foldFlowLines.js'); +var stringifyNumber = require('./stringify/stringifyNumber.js'); +var stringifyString = require('./stringify/stringifyString.js'); + + + +exports.createNode = createNode.createNode; +exports.debug = log.debug; +exports.warn = log.warn; +exports.createPair = Pair.createPair; +exports.findPair = YAMLMap.findPair; +exports.toJS = toJS.toJS; +exports.mapTag = map.map; +exports.seqTag = seq.seq; +exports.stringTag = string.string; +exports.foldFlowLines = foldFlowLines.foldFlowLines; +exports.stringifyNumber = stringifyNumber.stringifyNumber; +exports.stringifyString = stringifyString.stringifyString; diff --git a/tools/yaml/dist/visit.d.ts b/tools/yaml/dist/visit.d.ts new file mode 100644 index 0000000..7a27bfc --- /dev/null +++ b/tools/yaml/dist/visit.d.ts @@ -0,0 +1,102 @@ +import type { Document } from './doc/Document.js'; +import type { Alias } from './nodes/Alias.js'; +import { Node } from './nodes/Node.js'; +import type { Pair } from './nodes/Pair.js'; +import type { Scalar } from './nodes/Scalar.js'; +import type { YAMLMap } from './nodes/YAMLMap.js'; +import type { YAMLSeq } from './nodes/YAMLSeq.js'; +export type visitorFn = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair; +export type visitor = visitorFn | { + Alias?: visitorFn; + Collection?: visitorFn; + Map?: visitorFn; + Node?: visitorFn; + Pair?: visitorFn; + Scalar?: visitorFn; + Seq?: visitorFn; + Value?: visitorFn; +}; +export type asyncVisitorFn = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair | Promise; +export type asyncVisitor = asyncVisitorFn | { + Alias?: asyncVisitorFn; + Collection?: asyncVisitorFn; + Map?: asyncVisitorFn; + Node?: asyncVisitorFn; + Pair?: asyncVisitorFn; + Scalar?: asyncVisitorFn; + Seq?: asyncVisitorFn; + Value?: asyncVisitorFn; +}; +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +export declare function visit(node: Node | Document | null, visitor: visitor): void; +export declare namespace visit { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +export declare function visitAsync(node: Node | Document | null, visitor: asyncVisitor): Promise; +export declare namespace visitAsync { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; +} diff --git a/tools/yaml/dist/visit.js b/tools/yaml/dist/visit.js new file mode 100644 index 0000000..f126e54 --- /dev/null +++ b/tools/yaml/dist/visit.js @@ -0,0 +1,236 @@ +'use strict'; + +var identity = require('./nodes/identity.js'); + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove node'); +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + visit_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current node */ +visit.SKIP = SKIP; +/** Remove the current node */ +visit.REMOVE = REMOVE; +function visit_(key, node, visitor, path) { + const ctrl = callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visit_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = visit_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + await visitAsync_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visitAsync.BREAK = BREAK; +/** Do not visit the children of the current node */ +visitAsync.SKIP = SKIP; +/** Remove the current node */ +visitAsync.REMOVE = REMOVE; +async function visitAsync_(key, node, visitor, path) { + const ctrl = await callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visitAsync_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = await visitAsync_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +function initVisitor(visitor) { + if (typeof visitor === 'object' && + (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; +} +function callVisitor(key, node, visitor, path) { + if (typeof visitor === 'function') + return visitor(key, node, path); + if (identity.isMap(node)) + return visitor.Map?.(key, node, path); + if (identity.isSeq(node)) + return visitor.Seq?.(key, node, path); + if (identity.isPair(node)) + return visitor.Pair?.(key, node, path); + if (identity.isScalar(node)) + return visitor.Scalar?.(key, node, path); + if (identity.isAlias(node)) + return visitor.Alias?.(key, node, path); + return undefined; +} +function replaceNode(key, path, node) { + const parent = path[path.length - 1]; + if (identity.isCollection(parent)) { + parent.items[key] = node; + } + else if (identity.isPair(parent)) { + if (key === 'key') + parent.key = node; + else + parent.value = node; + } + else if (identity.isDocument(parent)) { + parent.contents = node; + } + else { + const pt = identity.isAlias(parent) ? 'alias' : 'scalar'; + throw new Error(`Cannot replace node with ${pt} parent`); + } +} + +exports.visit = visit; +exports.visitAsync = visitAsync; diff --git a/tools/yaml/package.json b/tools/yaml/package.json new file mode 100644 index 0000000..ceb2f63 --- /dev/null +++ b/tools/yaml/package.json @@ -0,0 +1,95 @@ +{ + "name": "yaml", + "version": "2.3.2", + "license": "ISC", + "author": "Eemeli Aro ", + "repository": "github:eemeli/yaml", + "description": "JavaScript parser and stringifier for YAML", + "keywords": [ + "YAML", + "parser", + "stringifier" + ], + "homepage": "https://eemeli.org/yaml/", + "files": [ + "browser/", + "dist/", + "util.js" + ], + "type": "commonjs", + "main": "./dist/index.js", + "browser": { + "./dist/index.js": "./browser/index.js", + "./dist/util.js": "./browser/dist/util.js", + "./util.js": "./browser/dist/util.js" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "node": "./dist/index.js", + "default": "./browser/index.js" + }, + "./package.json": "./package.json", + "./util": { + "types": "./dist/util.d.ts", + "node": "./dist/util.js", + "default": "./browser/dist/util.js" + } + }, + "scripts": { + "build": "npm run build:node && npm run build:browser", + "build:browser": "rollup -c config/rollup.browser-config.mjs", + "build:node": "rollup -c config/rollup.node-config.mjs", + "clean": "git clean -fdxe node_modules", + "lint": "eslint src/", + "prettier": "prettier --write .", + "prestart": "npm run build:node", + "start": "node -i -e 'YAML=require(\"./dist/index.js\")'", + "test": "jest --config config/jest.config.js", + "test:all": "npm test && npm run test:types && npm run test:dist && npm run test:dist:types", + "test:browsers": "cd playground && npm test", + "test:dist": "npm run build:node && jest --config config/jest.config.js", + "test:dist:types": "tsc --allowJs --moduleResolution node --noEmit --target es5 dist/index.js", + "test:types": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json", + "docs:install": "cd docs-slate && bundle install", + "docs:deploy": "cd docs-slate && ./deploy.sh", + "docs": "cd docs-slate && bundle exec middleman server", + "preversion": "npm test && npm run build", + "prepublishOnly": "npm run clean && npm test && npm run build" + }, + "browserslist": "defaults, not ie 11", + "prettier": { + "arrowParens": "avoid", + "semi": false, + "singleQuote": true, + "trailingComma": "none" + }, + "devDependencies": { + "@babel/core": "^7.12.10", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-transform-typescript": "^7.12.17", + "@babel/preset-env": "^7.12.11", + "@rollup/plugin-babel": "^6.0.3", + "@rollup/plugin-replace": "^5.0.2", + "@rollup/plugin-typescript": "^11.0.0", + "@types/jest": "^29.2.4", + "@types/node": "^14.18.35", + "@typescript-eslint/eslint-plugin": "^6.4.1", + "@typescript-eslint/parser": "^6.4.1", + "babel-jest": "^29.0.1", + "cross-env": "^7.0.3", + "eslint": "^8.2.0", + "eslint-config-prettier": "^9.0.0", + "fast-check": "^2.12.0", + "jest": "^29.0.1", + "jest-ts-webcompat-resolver": "^1.0.0", + "prettier": "^3.0.2", + "rollup": "^3.7.5", + "tslib": "^2.1.0", + "typescript": "^5.0.3" + }, + "engines": { + "node": ">= 14" + } +} diff --git a/tools/yaml/util.js b/tools/yaml/util.js new file mode 100644 index 0000000..070103f --- /dev/null +++ b/tools/yaml/util.js @@ -0,0 +1,2 @@ +// Re-exporter for Node.js < 12.16.0 +module.exports = require('./dist/util.js') From 396f732bc58080430562ea60fd345bf2e51cfc0b Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Sun, 17 Sep 2023 23:55:59 -0600 Subject: [PATCH 2/4] Refactored to use a better file format --- .gitignore | 3 +- CMakeLists.txt | 13 + assets/sm64/eu/actors.yml | 3704 +++ assets/sm64/eu/assets.yml | 2327 ++ assets/sm64/eu/levels.yml | 2477 ++ assets/sm64/eu/sound.yml | 1000 + assets/sm64/eu/textures.yml | 4102 +++ assets/sm64/jp/actors.yml | 3704 +++ assets/sm64/jp/assets.yml | 2327 ++ assets/sm64/jp/levels.yml | 3045 ++ assets/sm64/jp/sound.yml | 931 + assets/sm64/jp/textures.yml | 4687 ++++ assets/sm64/us/actors.yml | 3704 +++ assets/sm64/us/assets.yml | 2331 ++ assets/sm64/us/levels.yml | 2389 ++ assets/sm64/us/sound.yml | 1000 + assets/sm64/us/textures.yml | 4023 +++ config.yml | 23 + lib/hj/sha1.h | 633 + lib/nlohmann/json.hpp | 24674 ----------------- src/Companion.cpp | 135 +- src/Companion.h | 12 +- src/audio/AudioManager.cpp | 20 +- src/audio/AudioManager.h | 3 +- src/factories/AnimFactory.cpp | 39 +- src/factories/AnimFactory.h | 2 +- src/factories/AudioFactory.cpp | 191 - src/factories/AudioFactory.h | 9 - src/factories/AudioHeaderFactory.cpp | 10 + src/factories/AudioHeaderFactory.h | 9 + src/factories/BankFactory.cpp | 94 + src/factories/BankFactory.h | 9 + src/factories/BlobFactory.cpp | 25 +- src/factories/BlobFactory.h | 8 +- src/factories/RawFactory.h | 4 +- src/factories/SampleFactory.cpp | 46 + src/factories/SampleFactory.h | 9 + src/factories/SequenceFactory.cpp | 21 + src/factories/SequenceFactory.h | 9 + src/factories/TextureFactory.cpp | 77 +- src/factories/TextureFactory.h | 15 +- src/main.cpp | 2 +- src/n64/Cartridge.cpp | 59 + src/n64/Cartridge.h | 30 + tools/asset_converter.js | 33 +- assets.json => tools/assets.json | 691 +- samples_table.h => tools/samples_table.h | 0 sequences.json => tools/sequences.json | 0 sequences_table.h => tools/sequences_table.h | 0 49 files changed, 43210 insertions(+), 25449 deletions(-) create mode 100644 assets/sm64/eu/actors.yml create mode 100644 assets/sm64/eu/assets.yml create mode 100644 assets/sm64/eu/levels.yml create mode 100644 assets/sm64/eu/sound.yml create mode 100644 assets/sm64/eu/textures.yml create mode 100644 assets/sm64/jp/actors.yml create mode 100644 assets/sm64/jp/assets.yml create mode 100644 assets/sm64/jp/levels.yml create mode 100644 assets/sm64/jp/sound.yml create mode 100644 assets/sm64/jp/textures.yml create mode 100644 assets/sm64/us/actors.yml create mode 100644 assets/sm64/us/assets.yml create mode 100644 assets/sm64/us/levels.yml create mode 100644 assets/sm64/us/sound.yml create mode 100644 assets/sm64/us/textures.yml create mode 100644 config.yml create mode 100644 lib/hj/sha1.h delete mode 100644 lib/nlohmann/json.hpp delete mode 100644 src/factories/AudioFactory.cpp delete mode 100644 src/factories/AudioFactory.h create mode 100644 src/factories/AudioHeaderFactory.cpp create mode 100644 src/factories/AudioHeaderFactory.h create mode 100644 src/factories/BankFactory.cpp create mode 100644 src/factories/BankFactory.h create mode 100644 src/factories/SampleFactory.cpp create mode 100644 src/factories/SampleFactory.h create mode 100644 src/factories/SequenceFactory.cpp create mode 100644 src/factories/SequenceFactory.h create mode 100644 src/n64/Cartridge.cpp create mode 100644 src/n64/Cartridge.h rename assets.json => tools/assets.json (79%) rename samples_table.h => tools/samples_table.h (100%) rename sequences.json => tools/sequences.json (100%) rename sequences_table.h => tools/sequences_table.h (100%) diff --git a/.gitignore b/.gitignore index e038c5e..3eaed48 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ cmake-build-*/ .DS_Store debug/ *.z64 -*.n64 -assets/ \ No newline at end of file +*.n64 \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 30d9f22..05a2f03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.12) project(CubeOS) +include(FetchContent) set(CMAKE_CXX_STANDARD 20) @@ -31,6 +32,18 @@ set(STORMLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/StormLib) add_subdirectory(${STORMLIB_DIR}) target_link_libraries(${PROJECT_NAME} PRIVATE storm) +# Link YamlCpp + +FetchContent_Declare( + yaml-cpp + GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git + GIT_TAG f7320141120f720aecc4c32be25586e7da9eb978 +) + +set(YAML_CPP_BUILD_TESTS OFF) +FetchContent_MakeAvailable(yaml-cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE yaml-cpp) + if((CMAKE_SYSTEM_NAME MATCHES "Windows") AND ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) include(../cmake/HandleCompilerRT.cmake) find_compiler_rt_library(builtins CLANG_RT_BUILTINS_LIBRARY) diff --git a/assets/sm64/eu/actors.yml b/assets/sm64/eu/actors.yml new file mode 100644 index 0000000..268048b --- /dev/null +++ b/assets/sm64/eu/actors.yml @@ -0,0 +1,3704 @@ +amp/amp_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 6936 + format: RGBA16 +amp/amp_electricity: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1912288 + mio0: 3864 + format: RGBA16 +amp/amp_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 4888 + format: RGBA16 +amp/amp_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 8984 + format: RGBA16 +blue_coin_switch/blue_coin_switch_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1912288 + mio0: 24 + format: RGBA16 +blue_coin_switch/blue_coin_switch_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 1048 + format: RGBA16 +blue_fish/blue_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 112096 + format: RGBA16 +bobomb/bob-omb_buddy_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 120 + format: RGBA16 +bobomb/bob-omb_buddy_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 4216 + format: RGBA16 +bobomb/bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 18552 + format: RGBA16 +bobomb/bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 20600 + format: RGBA16 +bobomb/bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 121440 + format: RGBA16 +bobomb/bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 125536 + format: RGBA16 +bomb/bomb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 359440 + format: RGBA16 +bomb/bomb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 363536 + format: RGBA16 +bomb/bomb_spike: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 367632 + format: RGBA16 +boo/boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1341504 + mio0: 39744 + format: RGBA16 +boo/boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 43840 + format: RGBA16 +boo_castle/bbh_boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1341504 + mio0: 39744 + format: RGBA16 +boo_castle/bbh_boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 43840 + format: RGBA16 +book/book_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 4192 + format: RGBA16 +bookend/bookend_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 4192 + format: RGBA16 +bookend/bookend_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 2144 + format: RGBA16 +bookend/bookend_pages: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 3168 + format: RGBA16 +bookend/bookend_spine: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 96 + format: RGBA16 +bookend/bookend_tooth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 1120 + format: RGBA16 +bowser/bowser_armband: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 146488 + format: RGBA16 +bowser/bowser_armband_spike: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 142392 + format: RGBA16 +bowser/bowser_blue_eye_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 156728 + format: RGBA16 +bowser/bowser_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 140344 + format: RGBA16 +bowser/bowser_chest: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 152632 + format: RGBA16 +bowser/bowser_claw_edge: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 171064 + format: RGBA16 +bowser/bowser_claw_horn_angle: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 179256 + format: RGBA16 +bowser/bowser_claw_horn_tooth: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 175160 + format: RGBA16 +bowser/bowser_eye_center_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_center_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_far_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_far_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_half_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_half_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_right_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 199736 + format: RGBA16 +bowser/bowser_eye_right_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 199736 + format: RGBA16 +bowser/bowser_eyebrow: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 130104 + format: RGBA16 +bowser/bowser_hair: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 166968 + format: RGBA16 +bowser/bowser_mouth_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 160824 + format: RGBA16 +bowser/bowser_muzzle: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 134200 + format: RGBA16 +bowser/bowser_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1478688 + mio0: 136248 + format: RGBA16 +bowser/bowser_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 128056 + format: RGBA16 +bowser/bowser_shell_edge: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 154680 + format: RGBA16 +bowser/bowser_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 148536 + format: RGBA16 +bowser/bowser_upper_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 164920 + format: RGBA16 +bowser_flame/bowser_flame_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 0 + format: RGBA16 +bowser_flame/bowser_flame_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 8192 + format: RGBA16 +bowser_flame/bowser_flame_10: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 81920 + format: RGBA16 +bowser_flame/bowser_flame_11: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 90112 + format: RGBA16 +bowser_flame/bowser_flame_12: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 98304 + format: RGBA16 +bowser_flame/bowser_flame_13: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 106496 + format: RGBA16 +bowser_flame/bowser_flame_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 16384 + format: RGBA16 +bowser_flame/bowser_flame_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 24576 + format: RGBA16 +bowser_flame/bowser_flame_4: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 32768 + format: RGBA16 +bowser_flame/bowser_flame_5: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 40960 + format: RGBA16 +bowser_flame/bowser_flame_6: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 49152 + format: RGBA16 +bowser_flame/bowser_flame_7: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 57344 + format: RGBA16 +bowser_flame/bowser_flame_8: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 65536 + format: RGBA16 +bowser_flame/bowser_flame_9: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 73728 + format: RGBA16 +breakable_box/cork_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 74384 + format: RGBA16 +breakable_box/crazy_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 72336 + format: RGBA16 +bub/bub_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 5128 + format: RGBA16 +bub/bub_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 1032 + format: RGBA16 +bub/bub_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 7176 + format: RGBA16 +bub/bub_scales: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 9224 + format: RGBA16 +bubba/bubba_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 5128 + format: RGBA16 +bubba/bubba_eyes_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 1032 + format: RGBA16 +bubba/bubba_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 7176 + format: RGBA16 +bubba/bubba_scales: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1447824 + mio0: 9224 + format: RGBA16 +bubba/bubba_sunglasses: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1447824 + mio0: 8 + format: RGBA16 +bubble/bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 118112 + format: RGBA16 +bubble/mr_i_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 120160 + format: RGBA16 +bullet_bill/bullet_bill_eye: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1094592 + mio0: 47784 + format: RGBA16 +bullet_bill/bullet_bill_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1094592 + mio0: 51880 + format: RGBA16 +bully/bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1128512 + mio0: 9320 + format: RGBA16 +bully/bully_horn: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1128512 + mio0: 224 + format: RGBA16 +bully/bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1128512 + mio0: 1128 + format: RGBA16 +bully/bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1128512 + mio0: 5224 + format: RGBA16 +burn_smoke/burn_smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 137216 + format: IA16 +butterfly/butterfly_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 17320 + format: RGBA16 +cannon_barrel/cannon_barrel: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 22696 + format: RGBA16 +cannon_base/cannon_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 18872 + format: RGBA16 +cannon_lid/cannon_lid: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 16472 + format: RGBA16 +capswitch/cap_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 1336880 + mio0: 11336 + format: RGBA16 +capswitch/cap_switch_head: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1336880 + mio0: 7240 + format: IA16 +chain_ball/chain_ball: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 133864 + format: RGBA16 +chain_chomp/chain_chomp_bright_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 136144 + format: RGBA16 +chain_chomp/chain_chomp_dull_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 138192 + format: RGBA16 +chain_chomp/chain_chomp_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 144336 + format: RGBA16 +chain_chomp/chain_chomp_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 140240 + format: RGBA16 +chain_chomp/chain_chomp_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 27376 + format: RGBA16 +chair/chair_bottom: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 16480 + format: RGBA16 +chair/chair_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 12384 + format: RGBA16 +chair/chair_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 14432 + format: RGBA16 +chair/chair_surface_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 17504 + format: RGBA16 +checkerboard_platform/checkerboard_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 52288 + format: RGBA16 +checkerboard_platform/checkerboard_platform_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1912288 + mio0: 51264 + format: RGBA16 +chillychief/chill_bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1128512 + mio0: 9320 + format: RGBA16 +chillychief/chill_bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1859024 + mio0: 96 + format: RGBA16 +chillychief/chill_bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1859024 + mio0: 4192 + format: RGBA16 +chuckya/chuckya_body_arm_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 32632 + format: RGBA16 +chuckya/chuckya_body_arm_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 36728 + format: RGBA16 +chuckya/chuckya_eyes: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 26488 + format: RGBA16 +chuckya/chuckya_hand_antenna: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 30584 + format: RGBA16 +clam_shell/clam_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 48 + format: RGBA16 +clam_shell/clam_shell_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 2096 + format: RGBA16 +coin/coin_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 22400 + format: IA16 +coin/coin_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 26496 + format: IA16 +coin/coin_tilt_left: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 28544 + format: IA16 +coin/coin_tilt_right: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 24448 + format: IA16 +cyan_fish/cyan_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 54376 + format: RGBA16 +dirt/dirt_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1974256 + mio0: 179704 + format: RGBA16 +door/bbh_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 66832 + format: RGBA16 +door/bbh_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 70928 + format: RGBA16 +door/door_lock: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1974256 + mio0: 79120 + format: RGBA16 +door/hmc_mural_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 60688 + format: RGBA16 +door/hmc_mural_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 64784 + format: RGBA16 +door/metal_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 54544 + format: RGBA16 +door/metal_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 58640 + format: RGBA16 +door/one_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 75024 + format: RGBA16 +door/polished_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 40208 + format: RGBA16 +door/polished_wooden_door_overlay: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 44304 + format: RGBA16 +door/rough_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 48400 + format: RGBA16 +door/rough_wooden_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 52496 + format: RGBA16 +door/three_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 77072 + format: RGBA16 +door/zero_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 72976 + format: RGBA16 +dorrie/dorrie_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1870528 + mio0: 39840 + format: RGBA16 +dorrie/dorrie_skin: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1870528 + mio0: 40352 + format: RGBA16 +dorrie/dorrie_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 140240 + format: RGBA16 +exclamation_box/exclamation_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 95784 + format: RGBA16 +exclamation_box/exclamation_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1912288 + mio0: 97832 + format: RGBA16 +exclamation_box/metal_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 83496 + format: RGBA16 +exclamation_box/metal_cap_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1912288 + mio0: 85544 + format: RGBA16 +exclamation_box/vanish_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 77352 + format: RGBA16 +exclamation_box/vanish_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 79400 + format: RGBA16 +exclamation_box/wing_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 89640 + format: RGBA16 +exclamation_box/wing_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 91688 + format: RGBA16 +exclamation_box_outline/exclamation_box_outline: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 151912 + format: RGBA16 +exclamation_box_outline/exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1912288 + mio0: 154240 + format: RGBA16 +explosion/explosion_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 2568 + format: RGBA16 +explosion/explosion_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 4616 + format: RGBA16 +explosion/explosion_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 6664 + format: RGBA16 +explosion/explosion_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 8712 + format: RGBA16 +explosion/explosion_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 10760 + format: RGBA16 +explosion/explosion_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 12808 + format: RGBA16 +explosion/explosion_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 14856 + format: RGBA16 +eyerok/eyerok_bricks: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 36160 + format: RGBA16 +eyerok/eyerok_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 44352 + format: RGBA16 +eyerok/eyerok_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 42304 + format: RGBA16 +eyerok/eyerok_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 40256 + format: RGBA16 +eyerok/eyerok_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 38208 + format: RGBA16 +flame/flame_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 95008 + format: IA16 +flame/flame_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 97056 + format: IA16 +flame/flame_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 99104 + format: IA16 +flame/flame_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 101152 + format: IA16 +flame/flame_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 103200 + format: IA16 +flame/flame_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 105248 + format: IA16 +flame/flame_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 107296 + format: IA16 +flame/flame_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 109344 + format: IA16 +flyguy/flyguy_cloth_wrinkle: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1912288 + mio0: 57480 + format: RGBA16 +flyguy/flyguy_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 61576 + format: RGBA16 +flyguy/flyguy_propeller: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 63624 + format: IA16 +fwoosh/fwoosh_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 88072 + format: IA16 +goomba/goomba_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 103728 + format: RGBA16 +goomba/goomba_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 105776 + format: RGBA16 +goomba/goomba_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 107824 + format: RGBA16 +haunted_cage/bbh_cage_bars: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 55944 + format: RGBA16 +haunted_cage/bbh_cage_double_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 51848 + format: RGBA16 +haunted_cage/bbh_cage_floor: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 49800 + format: RGBA16 +haunted_cage/bbh_cage_garbage: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 57992 + format: RGBA16 +haunted_cage/bbh_cage_ornament: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 53896 + format: RGBA16 +haunted_cage/bbh_cage_wooden_base: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 54920 + format: RGBA16 +heart/spinning_heart: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1912288 + mio0: 55264 + format: RGBA16 +heave_ho/heave-ho_arm_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 68040 + format: RGBA16 +heave_ho/heave-ho_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 59848 + format: RGBA16 +heave_ho/heave-ho_logo: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1094592 + mio0: 63944 + format: RGBA16 +heave_ho/heave-ho_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 61896 + format: RGBA16 +heave_ho/heave-ho_roller: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1094592 + mio0: 70088 + format: RGBA16 +heave_ho/heave-ho_turnkey: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 70600 + format: RGBA16 +hoot/hoot_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 2592 + format: RGBA16 +hoot/hoot_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 7760 + format: RGBA16 +hoot/hoot_wing_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 9808 + format: RGBA16 +impact_ring/impact_ring_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 117328 + format: IA16 +impact_ring/impact_ring_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 121424 + format: IA16 +impact_smoke/impact_smoke_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 371576 + format: IA16 +impact_smoke/impact_smoke_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 379768 + format: IA16 +impact_smoke/impact_smoke_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 387960 + format: IA16 +impact_smoke/impact_smoke_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1478688 + mio0: 396152 + format: IA16 +king_bobomb/bob-omb_buddy_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1136896 + mio0: 25720 + format: RGBA16 +king_bobomb/bob-omb_buddy_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 120 + format: RGBA16 +king_bobomb/bob-omb_buddy_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 4216 + format: RGBA16 +king_bobomb/king_bob-omb_arm: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 8312 + format: RGBA16 +king_bobomb/king_bob-omb_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1136896 + mio0: 10360 + format: RGBA16 +king_bobomb/king_bob-omb_crown_rim: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1136896 + mio0: 24696 + format: RGBA16 +king_bobomb/king_bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 18552 + format: RGBA16 +king_bobomb/king_bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 20600 + format: RGBA16 +king_bobomb/king_bob-omb_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 22648 + format: RGBA16 +king_bobomb/king_bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 33912 + format: RGBA16 +king_bobomb/king_bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1136896 + mio0: 38008 + format: RGBA16 +klepto/klepto_beak: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1206896 + mio0: 4104 + format: RGBA16 +klepto/klepto_chest_tuft: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 8 + format: RGBA16 +klepto/klepto_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 2056 + format: RGBA16 +klepto/klepto_wing: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1206896 + mio0: 8200 + format: RGBA16 +klepto/klepto_wing_flap: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 12296 + format: RGBA16 +koopa/koopa_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 22088 + format: RGBA16 +koopa/koopa_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 20040 + format: RGBA16 +koopa/koopa_eyes_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 17992 + format: RGBA16 +koopa/koopa_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1723920 + mio0: 24136 + format: RGBA16 +koopa/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 11848 + format: RGBA16 +koopa/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 9800 + format: RGBA16 +koopa/koopa_shell_front_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 15944 + format: RGBA16 +koopa/koopa_shoe: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 13896 + format: RGBA16 +koopa_flag/koopa_flag_banner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 72 + format: RGBA16 +koopa_shell/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 11848 + format: RGBA16 +koopa_shell/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 9800 + format: RGBA16 +lakitu_cameraman/lakitu_camera_lens: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1806064 + mio0: 14336 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 60640 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 66784 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 62688 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 72928 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 70880 + format: RGBA16 +lakitu_enemy/lakitu_enemy_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 60640 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 66784 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1447824 + mio0: 62688 + format: RGBA16 +lakitu_enemy/lakitu_enemy_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 72928 + format: RGBA16 +lakitu_enemy/lakitu_enemy_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 70880 + format: RGBA16 +leaves/leaf: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1974256 + mio0: 117728 + format: RGBA16 +mad_piano/mad_piano_body: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 29424 + format: RGBA16 +mad_piano/mad_piano_keys: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 32496 + format: RGBA16 +mad_piano/mad_piano_keys_corner: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 30448 + format: RGBA16 +mad_piano/mad_piano_keys_edge: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1341504 + mio0: 33520 + format: RGBA16 +mad_piano/mad_piano_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1341504 + mio0: 31472 + format: RGBA16 +mad_piano/mad_piano_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 27376 + format: RGBA16 +manta/manta_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 12192 + format: RGBA16 +manta/manta_fin_corner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 6048 + format: RGBA16 +manta/manta_fin_edge: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1164528 + mio0: 14240 + format: RGBA16 +manta/manta_gills: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1164528 + mio0: 8096 + format: RGBA16 +mario/mario_eyes_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 12432 + format: RGBA16 +mario/mario_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_dead: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 30864 + format: RGBA16 +mario/mario_eyes_down_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 28816 + format: RGBA16 +mario/mario_eyes_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 14480 + format: RGBA16 +mario/mario_eyes_left_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 22672 + format: RGBA16 +mario/mario_eyes_right_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 24720 + format: RGBA16 +mario/mario_eyes_up_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 26768 + format: RGBA16 +mario/mario_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 6288 + format: RGBA16 +mario/mario_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1004336 + mio0: 144 + format: RGBA16 +mario/mario_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 45200 + format: RGBA16 +mario/mario_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 41104 + format: RGBA16 +mario/mario_mustache: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 10384 + format: RGBA16 +mario/mario_overalls_button: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 4240 + format: RGBA16 +mario/mario_sideburn: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 8336 + format: RGBA16 +mario/mario_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 32912 + format: RGBA16 +mario/mario_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 37008 + format: RGBA16 +mario_cap/mario_cap_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 6288 + format: RGBA16 +mario_cap/mario_cap_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1004336 + mio0: 144 + format: RGBA16 +mario_cap/mario_cap_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 45200 + format: RGBA16 +mario_cap/mario_cap_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 41104 + format: RGBA16 +mario_cap/mario_cap_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 32912 + format: RGBA16 +mario_cap/mario_cap_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 37008 + format: RGBA16 +metal_box/metal_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1912288 + mio0: 145816 + format: RGBA16 +mips/mips_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1806064 + mio0: 64624 + format: RGBA16 +mist/mist: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 128 + format: IA16 +moneybag/moneybag_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1859024 + mio0: 18864 + format: RGBA16 +moneybag/moneybag_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1859024 + mio0: 14768 + format: RGBA16 +monty_mole/monty_mole_cheek: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 2416 + format: RGBA16 +monty_mole/monty_mole_claw: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 10608 + format: RGBA16 +monty_mole/monty_mole_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 4464 + format: RGBA16 +monty_mole/monty_mole_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 6512 + format: RGBA16 +monty_mole/monty_mole_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 8560 + format: RGBA16 +monty_mole_hole/monty_mole_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 64 + format: IA16 +mr_i_eyeball/mr_i_eyeball_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1870528 + mio0: 128 + format: RGBA16 +mr_i_eyeball/mr_i_eyeball_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1870528 + mio0: 4224 + format: RGBA16 +mr_i_iris/mr_i_iris_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 14704 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 12656 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 10608 + format: RGBA16 +mr_i_iris/mr_i_iris_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 8560 + format: RGBA16 +mushroom_1up/1-up_mushroom: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 169512 + format: RGBA16 +peach/peach_chest_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 11304 + format: RGBA16 +peach/peach_crown_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 10792 + format: RGBA16 +peach/peach_dress: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 16424 + format: RGBA16 +peach/peach_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 8744 + format: RGBA16 +peach/peach_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 6696 + format: RGBA16 +peach/peach_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 4648 + format: RGBA16 +peach/peach_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 2600 + format: RGBA16 +peach/peach_lips: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 13864 + format: RGBA16 +peach/peach_lips_scrunched: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1369168 + mio0: 11816 + format: RGBA16 +peach/peach_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 15912 + format: RGBA16 +pebble/pebble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 115456 + format: RGBA16 +penguin/penguin_beak: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 21984 + format: RGBA16 +penguin/penguin_eye_angry: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 17888 + format: RGBA16 +penguin/penguin_eye_angry_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 19936 + format: RGBA16 +penguin/penguin_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 15840 + format: RGBA16 +penguin/penguin_eye_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 13792 + format: RGBA16 +penguin/penguin_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 11744 + format: RGBA16 +piranha_plant/piranha_plant_bottom_lip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 78840 + format: RGBA16 +piranha_plant/piranha_plant_leaf: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1723920 + mio0: 82936 + format: RGBA16 +piranha_plant/piranha_plant_skin: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 74744 + format: RGBA16 +piranha_plant/piranha_plant_stem: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 76792 + format: RGBA16 +piranha_plant/piranha_plant_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 148536 + format: RGBA16 +piranha_plant/piranha_plant_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 80888 + format: RGBA16 +pokey/pokey_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 75896 + format: RGBA16 +pokey/pokey_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 71504 + format: RGBA16 +pokey/pokey_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 73552 + format: RGBA16 +poundable_pole/poundable_pole_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 6224 + format: RGBA16 +poundable_pole/poundable_pole_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 4176 + format: RGBA16 +power_meter/power_meter_five_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 158688 + format: RGBA16 +power_meter/power_meter_four_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 160736 + format: RGBA16 +power_meter/power_meter_full: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 152544 + format: RGBA16 +power_meter/power_meter_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 144352 + format: RGBA16 +power_meter/power_meter_one_segment: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 166880 + format: RGBA16 +power_meter/power_meter_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 148448 + format: RGBA16 +power_meter/power_meter_seven_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 154592 + format: RGBA16 +power_meter/power_meter_six_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 156640 + format: RGBA16 +power_meter/power_meter_three_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 162784 + format: RGBA16 +power_meter/power_meter_two_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 164832 + format: RGBA16 +purple_switch/purple_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 1912288 + mio0: 49320 + format: RGBA16 +purple_switch/purple_switch_exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1912288 + mio0: 49448 + format: RGBA16 +sand/sand_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1974256 + mio0: 178896 + format: RGBA16 +scuttlebug/scuttlebug_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 65800 + format: RGBA16 +scuttlebug/scuttlebug_iris: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 76040 + format: RGBA16 +scuttlebug/scuttlebug_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1870528 + mio0: 67848 + format: RGBA16 +scuttlebug/scuttlebug_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 78088 + format: RGBA16 +scuttlebug/scuttlebug_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1870528 + mio0: 71944 + format: RGBA16 +seaweed/seaweed_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 38416 + format: RGBA16 +seaweed/seaweed_lower_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 36368 + format: RGBA16 +seaweed/seaweed_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 32272 + format: RGBA16 +seaweed/seaweed_upper_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 34320 + format: RGBA16 +skeeter/skeeter_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 144 + format: RGBA16 +skeeter/skeeter_iris: + type: TEXTURE + size: 256 + width: 16 + height: 8 + offset: 1681568 + mio0: 2192 + format: RGBA16 +smoke/smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 29376 + format: IA16 +snowman/mr_blizzard_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 46192 + format: RGBA16 +snowman/mr_blizzard_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1315408 + mio0: 38000 + format: RGBA16 +snowman/mr_blizzard_mitten: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 35952 + format: RGBA16 +snowman/mr_blizzard_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 48240 + format: RGBA16 +snowman/mr_blizzard_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1315408 + mio0: 42096 + format: RGBA16 +snufit/snufit_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 28896 + format: RGBA16 +snufit/snufit_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 30944 + format: RGBA16 +snufit/snufit_mask_strap: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1870528 + mio0: 32992 + format: RGBA16 +snufit/snufit_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 34016 + format: RGBA16 +sparkle/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 160912 + format: RGBA16 +sparkle/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 162960 + format: RGBA16 +sparkle/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 165008 + format: RGBA16 +sparkle/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 167056 + format: RGBA16 +sparkle/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 169104 + format: RGBA16 +sparkle/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 171152 + format: RGBA16 +sparkle_animation/sparkle_animation_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 207496 + format: IA16 +sparkle_animation/sparkle_animation_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 209544 + format: IA16 +sparkle_animation/sparkle_animation_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 211592 + format: IA16 +sparkle_animation/sparkle_animation_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 213640 + format: IA16 +sparkle_animation/sparkle_animation_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 215688 + format: IA16 +spindrift/spindrift_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 1744 + format: RGBA16 +spindrift/spindrift_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 7888 + format: RGBA16 +spindrift/spindrift_leaf: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 5840 + format: RGBA16 +spindrift/spindrift_petal: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 3792 + format: RGBA16 +springboard/springboard_base_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1336880 + mio0: 2072 + format: RGBA16 +springboard/springboard_top_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1336880 + mio0: 24 + format: RGBA16 +star/star_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 31280 + format: RGBA16 +star/star_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 173808 + format: RGBA16 +stomp_smoke/stomp_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 139592 + format: IA16 +stomp_smoke/stomp_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 141640 + format: IA16 +stomp_smoke/stomp_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 143688 + format: IA16 +stomp_smoke/stomp_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 145736 + format: IA16 +stomp_smoke/stomp_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 147784 + format: IA16 +stomp_smoke/stomp_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 149832 + format: IA16 +sushi/sushi_eye: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1164528 + mio0: 38608 + format: RGBA16 +sushi/sushi_snout: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 36560 + format: RGBA16 +sushi/sushi_tooth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1164528 + mio0: 39632 + format: RGBA16 +swoop/swoop_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 17008 + format: RGBA16 +swoop/swoop_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 19056 + format: RGBA16 +swoop/swoop_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 21104 + format: RGBA16 +swoop/swoop_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1870528 + mio0: 23152 + format: RGBA16 +thwomp/thwomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1094592 + mio0: 39168 + format: RGBA16 +thwomp/thwomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 43264 + format: RGBA16 +toad/toad_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1806064 + mio0: 22816 + format: RGBA16 +toad/toad_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1806064 + mio0: 24864 + format: RGBA16 +tornado/tornado: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1164528 + mio0: 75848 + format: IA16 +treasure_chest/treasure_chest_front: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1681568 + mio0: 87976 + format: RGBA16 +treasure_chest/treasure_chest_lock: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 81832 + format: RGBA16 +treasure_chest/treasure_chest_lock_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 85928 + format: RGBA16 +treasure_chest/treasure_chest_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1681568 + mio0: 83880 + format: RGBA16 +tree/palm_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 205336 + format: RGBA16 +tree/pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 196448 + format: RGBA16 +tree/snowy_pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 200776 + format: RGBA16 +tree/tree_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 187944 + format: RGBA16 +tree/tree_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 192040 + format: RGBA16 +ukiki/ukiki_butt: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 39872 + format: RGBA16 +ukiki/ukiki_face: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1256880 + mio0: 31680 + format: RGBA16 +ukiki/ukiki_face_blink: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1256880 + mio0: 35776 + format: RGBA16 +ukiki/ukiki_fur: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256880 + mio0: 41920 + format: RGBA16 +unagi/unagi_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 44832 + format: RGBA16 +unagi/unagi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1164528 + mio0: 46880 + format: RGBA16 +unagi/unagi_head_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 47392 + format: RGBA16 +unagi/unagi_mouth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1164528 + mio0: 49952 + format: RGBA16 +unagi/unagi_tail: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1164528 + mio0: 50080 + format: RGBA16 +unagi/unagi_tooth: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1164528 + mio0: 49440 + format: RGBA16 +walk_smoke/walk_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 122528 + format: IA16 +walk_smoke/walk_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 124576 + format: IA16 +walk_smoke/walk_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 126624 + format: IA16 +walk_smoke/walk_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 128672 + format: IA16 +walk_smoke/walk_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 130720 + format: IA16 +walk_smoke/walk_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 132768 + format: IA16 +walk_smoke/walk_smoke_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 134816 + format: IA16 +warp_pipe/warp_pipe_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1974256 + mio0: 32320 + format: RGBA16 +warp_pipe/warp_pipe_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 37224 + format: RGBA16 +water_bubble/water_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1136896 + mio0: 65152 + format: RGBA16 +water_mine/water_mine_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 359440 + format: RGBA16 +water_mine/water_mine_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1478688 + mio0: 363536 + format: RGBA16 +water_mine/water_mine_spike_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1478688 + mio0: 367632 + format: RGBA16 +water_ring/water_ring: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1681568 + mio0: 74624 + format: RGBA16 +water_splash/water_splash_0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 173512 + format: RGBA16 +water_splash/water_splash_1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 177608 + format: RGBA16 +water_splash/water_splash_2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 181704 + format: RGBA16 +water_splash/water_splash_3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 185800 + format: RGBA16 +water_splash/water_splash_4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 189896 + format: RGBA16 +water_splash/water_splash_5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 193992 + format: RGBA16 +water_splash/water_splash_6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 198088 + format: RGBA16 +water_splash/water_splash_7: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1004336 + mio0: 202184 + format: RGBA16 +water_wave/water_wave_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 152408 + format: IA16 +water_wave/water_wave_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 154456 + format: IA16 +water_wave/water_wave_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 156504 + format: IA16 +water_wave/water_wave_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1004336 + mio0: 158552 + format: IA16 +whirlpool/whirlpool: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1164528 + mio0: 75848 + format: IA16 +white_particle/snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1974256 + mio0: 181920 + format: RGBA16 +white_particle_small/small_snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1004336 + mio0: 206720 + format: RGBA16 +whomp/whomp_back: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1723920 + mio0: 115552 + format: RGBA16 +whomp/whomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1723920 + mio0: 119648 + format: RGBA16 +whomp/whomp_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 123744 + format: RGBA16 +whomp/whomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1723920 + mio0: 125792 + format: RGBA16 +wiggler/wiggler_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 31280 + format: RGBA16 +wiggler/wiggler_flower: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 33328 + format: RGBA16 +wiggler/wiggler_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1447824 + mio0: 35376 + format: RGBA16 +wiggler/wiggler_nose_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1447824 + mio0: 37424 + format: RGBA16 +wiggler/wiggler_nose_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1447824 + mio0: 41520 + format: RGBA16 +wiggler/wiggler_segment_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1447824 + mio0: 23088 + format: RGBA16 +wiggler/wiggler_segment_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1447824 + mio0: 27184 + format: RGBA16 +wooden_signpost/wooden_signpost_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 182728 + format: RGBA16 +wooden_signpost/wooden_signpost_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1974256 + mio0: 184776 + format: RGBA16 +yellow_sphere/yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 64 + format: RGBA16 +yellow_sphere_small/small_yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 64 + format: RGBA16 +yoshi/yoshi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 116104 + format: RGBA16 +yoshi/yoshi_eye_blink: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 116616 + format: RGBA16 +yoshi/yoshi_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1369168 + mio0: 117128 + format: RGBA16 +yoshi_egg/yoshi_egg_0_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 22456 + format: RGBA16 +yoshi_egg/yoshi_egg_1_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 24504 + format: RGBA16 +yoshi_egg/yoshi_egg_2_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 26552 + format: RGBA16 +yoshi_egg/yoshi_egg_3_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 28600 + format: RGBA16 +yoshi_egg/yoshi_egg_4_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 30648 + format: RGBA16 +yoshi_egg/yoshi_egg_5_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 32696 + format: RGBA16 +yoshi_egg/yoshi_egg_6_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 34744 + format: RGBA16 +yoshi_egg/yoshi_egg_7_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1094592 + mio0: 36792 + format: RGBA16 diff --git a/assets/sm64/eu/assets.yml b/assets/sm64/eu/assets.yml new file mode 100644 index 0000000..b8e13fd --- /dev/null +++ b/assets/sm64/eu/assets.yml @@ -0,0 +1,2327 @@ +anims/anim_00: + type: SM64:ANIM + header: + offset: 5041568 + size: 24 + values: + offset: 5041844 + size: 2604 + indices: + offset: 5041592 + size: 252 +anims/anim_01: + type: SM64:ANIM + header: + offset: 5044448 + size: 24 + values: + offset: 5044748 + size: 6576 + indices: + offset: 5044496 + size: 252 +anims/anim_02: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5044748 + size: 6576 + indices: + offset: 5044496 + size: 252 +anims/anim_03: + type: SM64:ANIM + header: + offset: 5051324 + size: 24 + values: + offset: 5051600 + size: 4372 + indices: + offset: 5051348 + size: 252 +anims/anim_04: + type: SM64:ANIM + header: + offset: 5055972 + size: 24 + values: + offset: 5056248 + size: 2264 + indices: + offset: 5055996 + size: 252 +anims/anim_05: + type: SM64:ANIM + header: + offset: 5058512 + size: 24 + values: + offset: 5058788 + size: 5796 + indices: + offset: 5058536 + size: 252 +anims/anim_06: + type: SM64:ANIM + header: + offset: 5064584 + size: 24 + values: + offset: 5064860 + size: 892 + indices: + offset: 5064608 + size: 252 +anims/anim_07: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5066052 + size: 1468 + indices: + offset: 5065800 + size: 252 +anims/anim_08: + type: SM64:ANIM + header: + offset: 5065776 + size: 24 + values: + offset: 5066052 + size: 1468 + indices: + offset: 5065800 + size: 252 +anims/anim_09: + type: SM64:ANIM + header: + offset: 5067520 + size: 24 + values: + offset: 5067796 + size: 3052 + indices: + offset: 5067544 + size: 252 +anims/anim_0A: + type: SM64:ANIM + header: + offset: 5070848 + size: 24 + values: + offset: 5071124 + size: 2544 + indices: + offset: 5070872 + size: 252 +anims/anim_0B: + type: SM64:ANIM + header: + offset: 5073668 + size: 24 + values: + offset: 5073968 + size: 1348 + indices: + offset: 5073716 + size: 252 +anims/anim_0C: + type: SM64:ANIM + header: + offset: 5073692 + size: 24 + values: + offset: 5073968 + size: 1348 + indices: + offset: 5073716 + size: 252 +anims/anim_0D: + type: SM64:ANIM + header: + offset: 5075316 + size: 24 + values: + offset: 5075592 + size: 770 + indices: + offset: 5075340 + size: 252 +anims/anim_0E: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5076640 + size: 80 + indices: + offset: 5076388 + size: 252 +anims/anim_0F: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5077020 + size: 1502 + indices: + offset: 5076768 + size: 252 +anims/anim_10: + type: SM64:ANIM + header: + offset: 5076744 + size: 24 + values: + offset: 5077020 + size: 1502 + indices: + offset: 5076768 + size: 252 +anims/anim_11: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5078800 + size: 1174 + indices: + offset: 5078548 + size: 252 +anims/anim_12: + type: SM64:ANIM + header: + offset: 5079976 + size: 24 + values: + offset: 5080252 + size: 1318 + indices: + offset: 5080000 + size: 252 +anims/anim_13: + type: SM64:ANIM + header: + offset: 5081572 + size: 24 + values: + offset: 5081848 + size: 1678 + indices: + offset: 5081596 + size: 252 +anims/anim_14: + type: SM64:ANIM + header: + offset: 5083528 + size: 24 + values: + offset: 5083804 + size: 1102 + indices: + offset: 5083552 + size: 252 +anims/anim_15: + type: SM64:ANIM + header: + offset: 5084908 + size: 24 + values: + offset: 5085184 + size: 930 + indices: + offset: 5084932 + size: 252 +anims/anim_16: + type: SM64:ANIM + header: + offset: 5086116 + size: 24 + values: + offset: 5086392 + size: 4452 + indices: + offset: 5086140 + size: 252 +anims/anim_17: + type: SM64:ANIM + header: + offset: 5090844 + size: 24 + values: + offset: 5091120 + size: 2942 + indices: + offset: 5090868 + size: 252 +anims/anim_18: + type: SM64:ANIM + header: + offset: 5094064 + size: 24 + values: + offset: 5094340 + size: 4452 + indices: + offset: 5086140 + size: 252 +anims/anim_19: + type: SM64:ANIM + header: + offset: 5098792 + size: 24 + values: + offset: 5099068 + size: 5354 + indices: + offset: 5098816 + size: 252 +anims/anim_1A: + type: SM64:ANIM + header: + offset: 5104424 + size: 24 + values: + offset: 5104700 + size: 1146 + indices: + offset: 5104448 + size: 252 +anims/anim_1B: + type: SM64:ANIM + header: + offset: 5105848 + size: 24 + values: + offset: 5106124 + size: 2858 + indices: + offset: 5105872 + size: 252 +anims/anim_1C: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5109260 + size: 780 + indices: + offset: 5109008 + size: 252 +anims/anim_1D: + type: SM64:ANIM + header: + offset: 5110040 + size: 24 + values: + offset: 5110316 + size: 1380 + indices: + offset: 5110064 + size: 252 +anims/anim_1E: + type: SM64:ANIM + header: + offset: 5111696 + size: 24 + values: + offset: 5111972 + size: 1530 + indices: + offset: 5111720 + size: 252 +anims/anim_1F: + type: SM64:ANIM + header: + offset: 5113504 + size: 24 + values: + offset: 5113780 + size: 846 + indices: + offset: 5113528 + size: 252 +anims/anim_20: + type: SM64:ANIM + header: + offset: 5114628 + size: 24 + values: + offset: 5114904 + size: 7124 + indices: + offset: 5114652 + size: 252 +anims/anim_21: + type: SM64:ANIM + header: + offset: 5122028 + size: 24 + values: + offset: 5122304 + size: 2610 + indices: + offset: 5122052 + size: 252 +anims/anim_22: + type: SM64:ANIM + header: + offset: 5124916 + size: 24 + values: + offset: 5125192 + size: 1750 + indices: + offset: 5124940 + size: 252 +anims/anim_23: + type: SM64:ANIM + header: + offset: 5126944 + size: 24 + values: + offset: 5127220 + size: 8216 + indices: + offset: 5126968 + size: 252 +anims/anim_24: + type: SM64:ANIM + header: + offset: 5135436 + size: 24 + values: + offset: 5135712 + size: 9376 + indices: + offset: 5135460 + size: 252 +anims/anim_25: + type: SM64:ANIM + header: + offset: 5145088 + size: 24 + values: + offset: 5145364 + size: 8018 + indices: + offset: 5145112 + size: 252 +anims/anim_26: + type: SM64:ANIM + header: + offset: 5153384 + size: 24 + values: + offset: 5153660 + size: 7352 + indices: + offset: 5153408 + size: 252 +anims/anim_27: + type: SM64:ANIM + header: + offset: 5161012 + size: 24 + values: + offset: 5161288 + size: 8980 + indices: + offset: 5161036 + size: 252 +anims/anim_28: + type: SM64:ANIM + header: + offset: 5083528 + size: 24 + values: + offset: 5170544 + size: 1010 + indices: + offset: 5170292 + size: 252 +anims/anim_29: + type: SM64:ANIM + header: + offset: 5171556 + size: 24 + values: + offset: 5171832 + size: 582 + indices: + offset: 5171580 + size: 252 +anims/anim_2A: + type: SM64:ANIM + header: + offset: 5172416 + size: 24 + values: + offset: 5172692 + size: 1252 + indices: + offset: 5172440 + size: 252 +anims/anim_2B: + type: SM64:ANIM + header: + offset: 5172416 + size: 24 + values: + offset: 5174220 + size: 1582 + indices: + offset: 5173968 + size: 252 +anims/anim_2C: + type: SM64:ANIM + header: + offset: 5044448 + size: 24 + values: + offset: 5176104 + size: 5620 + indices: + offset: 5175852 + size: 252 +anims/anim_2D: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5176104 + size: 5620 + indices: + offset: 5175852 + size: 252 +anims/anim_2E: + type: SM64:ANIM + header: + offset: 5181724 + size: 24 + values: + offset: 5182000 + size: 3028 + indices: + offset: 5181748 + size: 252 +anims/anim_2F: + type: SM64:ANIM + header: + offset: 5126944 + size: 24 + values: + offset: 5185304 + size: 7420 + indices: + offset: 5185052 + size: 252 +anims/anim_30: + type: SM64:ANIM + header: + offset: 5058512 + size: 24 + values: + offset: 5193000 + size: 5428 + indices: + offset: 5192748 + size: 252 +anims/anim_31: + type: SM64:ANIM + header: + offset: 5198428 + size: 24 + values: + offset: 5198704 + size: 10660 + indices: + offset: 5198452 + size: 252 +anims/anim_32: + type: SM64:ANIM + header: + offset: 5114628 + size: 24 + values: + offset: 5209640 + size: 7890 + indices: + offset: 5209388 + size: 252 +anims/anim_33: + type: SM64:ANIM + header: + offset: 5217532 + size: 24 + values: + offset: 5217808 + size: 2840 + indices: + offset: 5217556 + size: 252 +anims/anim_34: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5220924 + size: 1300 + indices: + offset: 5220672 + size: 252 +anims/anim_35: + type: SM64:ANIM + header: + offset: 5222224 + size: 24 + values: + offset: 5222500 + size: 3704 + indices: + offset: 5222248 + size: 252 +anims/anim_36: + type: SM64:ANIM + header: + offset: 5226204 + size: 24 + values: + offset: 5226480 + size: 3700 + indices: + offset: 5226228 + size: 252 +anims/anim_37: + type: SM64:ANIM + header: + offset: 5126944 + size: 24 + values: + offset: 5230456 + size: 6828 + indices: + offset: 5230204 + size: 252 +anims/anim_38: + type: SM64:ANIM + header: + offset: 5064584 + size: 24 + values: + offset: 5237560 + size: 844 + indices: + offset: 5237308 + size: 252 +anims/anim_39: + type: SM64:ANIM + header: + offset: 5238404 + size: 24 + values: + offset: 5238680 + size: 12418 + indices: + offset: 5238428 + size: 252 +anims/anim_3A: + type: SM64:ANIM + header: + offset: 5251100 + size: 24 + values: + offset: 5251376 + size: 374 + indices: + offset: 5251124 + size: 252 +anims/anim_3B: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5252028 + size: 1204 + indices: + offset: 5251776 + size: 252 +anims/anim_3C: + type: SM64:ANIM + header: + offset: 5253232 + size: 24 + values: + offset: 5253532 + size: 774 + indices: + offset: 5253280 + size: 252 +anims/anim_3D: + type: SM64:ANIM + header: + offset: 5253256 + size: 24 + values: + offset: 5253532 + size: 774 + indices: + offset: 5253280 + size: 252 +anims/anim_3E: + type: SM64:ANIM + header: + offset: 5238404 + size: 24 + values: + offset: 5254584 + size: 11490 + indices: + offset: 5254332 + size: 252 +anims/anim_3F: + type: SM64:ANIM + header: + offset: 5266076 + size: 24 + values: + offset: 5266352 + size: 3094 + indices: + offset: 5266100 + size: 252 +anims/anim_40: + type: SM64:ANIM + header: + offset: 5269448 + size: 24 + values: + offset: 5269724 + size: 1094 + indices: + offset: 5269472 + size: 252 +anims/anim_41: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5271096 + size: 536 + indices: + offset: 5270844 + size: 252 +anims/anim_42: + type: SM64:ANIM + header: + offset: 5271632 + size: 24 + values: + offset: 5271908 + size: 956 + indices: + offset: 5271656 + size: 252 +anims/anim_43: + type: SM64:ANIM + header: + offset: 5272864 + size: 24 + values: + offset: 5273140 + size: 84 + indices: + offset: 5272888 + size: 252 +anims/anim_44: + type: SM64:ANIM + header: + offset: 5083528 + size: 24 + values: + offset: 5273500 + size: 650 + indices: + offset: 5273248 + size: 252 +anims/anim_45: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5274452 + size: 1190 + indices: + offset: 5274200 + size: 252 +anims/anim_46: + type: SM64:ANIM + header: + offset: 5274176 + size: 24 + values: + offset: 5274452 + size: 1190 + indices: + offset: 5274200 + size: 252 +anims/anim_47: + type: SM64:ANIM + header: + offset: 5253232 + size: 24 + values: + offset: 5275920 + size: 838 + indices: + offset: 5275668 + size: 252 +anims/anim_48: + type: SM64:ANIM + header: + offset: 5276760 + size: 24 + values: + offset: 5277036 + size: 5098 + indices: + offset: 5276784 + size: 252 +anims/anim_49: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5282412 + size: 1298 + indices: + offset: 5282160 + size: 252 +anims/anim_4A: + type: SM64:ANIM + header: + offset: 5283712 + size: 24 + values: + offset: 5283988 + size: 616 + indices: + offset: 5283736 + size: 252 +anims/anim_4B: + type: SM64:ANIM + header: + offset: 5079976 + size: 24 + values: + offset: 5284880 + size: 1386 + indices: + offset: 5284628 + size: 252 +anims/anim_4C: + type: SM64:ANIM + header: + offset: 5286268 + size: 24 + values: + offset: 5286544 + size: 670 + indices: + offset: 5286292 + size: 252 +anims/anim_4D: + type: SM64:ANIM + header: + offset: 5064584 + size: 24 + values: + offset: 5287516 + size: 2456 + indices: + offset: 5287264 + size: 252 +anims/anim_4E: + type: SM64:ANIM + header: + offset: 5287240 + size: 24 + values: + offset: 5287516 + size: 2456 + indices: + offset: 5287264 + size: 252 +anims/anim_4F: + type: SM64:ANIM + header: + offset: 5113504 + size: 24 + values: + offset: 5290248 + size: 1578 + indices: + offset: 5289996 + size: 252 +anims/anim_50: + type: SM64:ANIM + header: + offset: 5251100 + size: 24 + values: + offset: 5292104 + size: 420 + indices: + offset: 5291852 + size: 252 +anims/anim_51: + type: SM64:ANIM + header: + offset: 5292524 + size: 24 + values: + offset: 5292800 + size: 1002 + indices: + offset: 5292548 + size: 252 +anims/anim_52: + type: SM64:ANIM + header: + offset: 5253232 + size: 24 + values: + offset: 5294080 + size: 878 + indices: + offset: 5293828 + size: 252 +anims/anim_53: + type: SM64:ANIM + header: + offset: 5294960 + size: 24 + values: + offset: 5295236 + size: 1970 + indices: + offset: 5294984 + size: 252 +anims/anim_54: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5297484 + size: 1314 + indices: + offset: 5297232 + size: 252 +anims/anim_55: + type: SM64:ANIM + header: + offset: 5298800 + size: 24 + values: + offset: 5299076 + size: 11268 + indices: + offset: 5298824 + size: 252 +anims/anim_56: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5310644 + size: 1560 + indices: + offset: 5310392 + size: 252 +anims/anim_57: + type: SM64:ANIM + header: + offset: 5310368 + size: 24 + values: + offset: 5310644 + size: 1560 + indices: + offset: 5310392 + size: 252 +anims/anim_58: + type: SM64:ANIM + header: + offset: 5312204 + size: 24 + values: + offset: 5312480 + size: 1082 + indices: + offset: 5312228 + size: 252 +anims/anim_59: + type: SM64:ANIM + header: + offset: 5313564 + size: 24 + values: + offset: 5313840 + size: 3052 + indices: + offset: 5313588 + size: 252 +anims/anim_5A: + type: SM64:ANIM + header: + offset: 5316892 + size: 24 + values: + offset: 5317168 + size: 3278 + indices: + offset: 5316916 + size: 252 +anims/anim_5B: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5320724 + size: 720 + indices: + offset: 5320472 + size: 252 +anims/anim_5C: + type: SM64:ANIM + header: + offset: 5321444 + size: 24 + values: + offset: 5321720 + size: 1258 + indices: + offset: 5321468 + size: 252 +anims/anim_5D: + type: SM64:ANIM + header: + offset: 5269448 + size: 24 + values: + offset: 5323256 + size: 1142 + indices: + offset: 5323004 + size: 252 +anims/anim_5E: + type: SM64:ANIM + header: + offset: 5238404 + size: 24 + values: + offset: 5324676 + size: 12110 + indices: + offset: 5324424 + size: 252 +anims/anim_5F: + type: SM64:ANIM + header: + offset: 5336788 + size: 24 + values: + offset: 5337064 + size: 5058 + indices: + offset: 5336812 + size: 252 +anims/anim_60: + type: SM64:ANIM + header: + offset: 5342124 + size: 24 + values: + offset: 5342400 + size: 4020 + indices: + offset: 5342148 + size: 252 +anims/anim_61: + type: SM64:ANIM + header: + offset: 5346420 + size: 24 + values: + offset: 5346696 + size: 12660 + indices: + offset: 5346444 + size: 252 +anims/anim_62: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5359632 + size: 742 + indices: + offset: 5359380 + size: 252 +anims/anim_63: + type: SM64:ANIM + header: + offset: 5360376 + size: 24 + values: + offset: 5360652 + size: 1626 + indices: + offset: 5360400 + size: 252 +anims/anim_64: + type: SM64:ANIM + header: + offset: 5362280 + size: 24 + values: + offset: 5362556 + size: 1246 + indices: + offset: 5362304 + size: 252 +anims/anim_65: + type: SM64:ANIM + header: + offset: 5113504 + size: 24 + values: + offset: 5364080 + size: 1700 + indices: + offset: 5363828 + size: 252 +anims/anim_66: + type: SM64:ANIM + header: + offset: 5365780 + size: 24 + values: + offset: 5366056 + size: 1948 + indices: + offset: 5365804 + size: 252 +anims/anim_67: + type: SM64:ANIM + header: + offset: 5368004 + size: 24 + values: + offset: 5368280 + size: 386 + indices: + offset: 5368028 + size: 252 +anims/anim_68: + type: SM64:ANIM + header: + offset: 5368668 + size: 24 + values: + offset: 5368944 + size: 340 + indices: + offset: 5368692 + size: 252 +anims/anim_69: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5369560 + size: 764 + indices: + offset: 5369308 + size: 252 +anims/anim_6A: + type: SM64:ANIM + header: + offset: 5370324 + size: 24 + values: + offset: 5370600 + size: 1060 + indices: + offset: 5370348 + size: 252 +anims/anim_6B: + type: SM64:ANIM + header: + offset: 5253232 + size: 24 + values: + offset: 5371936 + size: 940 + indices: + offset: 5371684 + size: 252 +anims/anim_6C: + type: SM64:ANIM + header: + offset: 5372876 + size: 24 + values: + offset: 5373152 + size: 1284 + indices: + offset: 5372900 + size: 252 +anims/anim_6D: + type: SM64:ANIM + header: + offset: 5079976 + size: 24 + values: + offset: 5374712 + size: 1286 + indices: + offset: 5374460 + size: 252 +anims/anim_6E: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5376276 + size: 1136 + indices: + offset: 5376024 + size: 252 +anims/anim_6F: + type: SM64:ANIM + header: + offset: 5171556 + size: 24 + values: + offset: 5377712 + size: 98 + indices: + offset: 5377460 + size: 252 +anims/anim_70: + type: SM64:ANIM + header: + offset: 5377436 + size: 24 + values: + offset: 5377712 + size: 98 + indices: + offset: 5377460 + size: 252 +anims/anim_71: + type: SM64:ANIM + header: + offset: 5377812 + size: 24 + values: + offset: 5378088 + size: 2078 + indices: + offset: 5377836 + size: 252 +anims/anim_72: + type: SM64:ANIM + header: + offset: 5380168 + size: 24 + values: + offset: 5380468 + size: 4342 + indices: + offset: 5380216 + size: 252 +anims/anim_73: + type: SM64:ANIM + header: + offset: 5380168 + size: 24 + values: + offset: 5380468 + size: 4342 + indices: + offset: 5380216 + size: 252 +anims/anim_74: + type: SM64:ANIM + header: + offset: 5377812 + size: 24 + values: + offset: 5385088 + size: 1844 + indices: + offset: 5384836 + size: 252 +anims/anim_75: + type: SM64:ANIM + header: + offset: 5377812 + size: 24 + values: + offset: 5387208 + size: 1892 + indices: + offset: 5386956 + size: 252 +anims/anim_76: + type: SM64:ANIM + header: + offset: 5126944 + size: 24 + values: + offset: 5389376 + size: 4648 + indices: + offset: 5389124 + size: 252 +anims/anim_77: + type: SM64:ANIM + header: + offset: 5086116 + size: 24 + values: + offset: 5394300 + size: 2464 + indices: + offset: 5394048 + size: 252 +anims/anim_78: + type: SM64:ANIM + header: + offset: 5396764 + size: 24 + values: + offset: 5397040 + size: 10454 + indices: + offset: 5396788 + size: 252 +anims/anim_79: + type: SM64:ANIM + header: + offset: 5407496 + size: 24 + values: + offset: 5407772 + size: 3634 + indices: + offset: 5407520 + size: 252 +anims/anim_7A: + type: SM64:ANIM + header: + offset: 5411408 + size: 24 + values: + offset: 5411684 + size: 402 + indices: + offset: 5411432 + size: 252 +anims/anim_7B: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5412364 + size: 2360 + indices: + offset: 5412112 + size: 252 +anims/anim_7C: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5415000 + size: 2300 + indices: + offset: 5414748 + size: 252 +anims/anim_7D: + type: SM64:ANIM + header: + offset: 5172416 + size: 24 + values: + offset: 5417576 + size: 1114 + indices: + offset: 5417324 + size: 252 +anims/anim_7E: + type: SM64:ANIM + header: + offset: 5058512 + size: 24 + values: + offset: 5418968 + size: 4538 + indices: + offset: 5418716 + size: 252 +anims/anim_7F: + type: SM64:ANIM + header: + offset: 5105848 + size: 24 + values: + offset: 5423784 + size: 3622 + indices: + offset: 5423532 + size: 252 +anims/anim_80: + type: SM64:ANIM + header: + offset: 5105848 + size: 24 + values: + offset: 5427684 + size: 4248 + indices: + offset: 5427432 + size: 252 +anims/anim_81: + type: SM64:ANIM + header: + offset: 5431932 + size: 24 + values: + offset: 5432208 + size: 4308 + indices: + offset: 5431956 + size: 252 +anims/anim_82: + type: SM64:ANIM + header: + offset: 5436516 + size: 24 + values: + offset: 5436792 + size: 5770 + indices: + offset: 5436540 + size: 252 +anims/anim_83: + type: SM64:ANIM + header: + offset: 5442564 + size: 24 + values: + offset: 5442840 + size: 4734 + indices: + offset: 5442588 + size: 252 +anims/anim_84: + type: SM64:ANIM + header: + offset: 5051324 + size: 24 + values: + offset: 5447852 + size: 4756 + indices: + offset: 5447600 + size: 252 +anims/anim_85: + type: SM64:ANIM + header: + offset: 5172416 + size: 24 + values: + offset: 5452884 + size: 324 + indices: + offset: 5452632 + size: 252 +anims/anim_86: + type: SM64:ANIM + header: + offset: 5453208 + size: 24 + values: + offset: 5453484 + size: 2902 + indices: + offset: 5453232 + size: 252 +anims/anim_87: + type: SM64:ANIM + header: + offset: 5217532 + size: 24 + values: + offset: 5456664 + size: 1564 + indices: + offset: 5456412 + size: 252 +anims/anim_88: + type: SM64:ANIM + header: + offset: 5321444 + size: 24 + values: + offset: 5458528 + size: 1260 + indices: + offset: 5458276 + size: 252 +anims/anim_89: + type: SM64:ANIM + header: + offset: 5458252 + size: 24 + values: + offset: 5458528 + size: 1260 + indices: + offset: 5458276 + size: 252 +anims/anim_8A: + type: SM64:ANIM + header: + offset: 5453208 + size: 24 + values: + offset: 5460064 + size: 2980 + indices: + offset: 5459812 + size: 252 +anims/anim_8B: + type: SM64:ANIM + header: + offset: 5313564 + size: 24 + values: + offset: 5463320 + size: 2970 + indices: + offset: 5463068 + size: 252 +anims/anim_8C: + type: SM64:ANIM + header: + offset: 5283712 + size: 24 + values: + offset: 5466568 + size: 646 + indices: + offset: 5466316 + size: 252 +anims/anim_8D: + type: SM64:ANIM + header: + offset: 5292524 + size: 24 + values: + offset: 5467492 + size: 1086 + indices: + offset: 5467240 + size: 252 +anims/anim_8E: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5468880 + size: 1618 + indices: + offset: 5468628 + size: 252 +anims/anim_8F: + type: SM64:ANIM + header: + offset: 5065776 + size: 24 + values: + offset: 5468880 + size: 1618 + indices: + offset: 5468628 + size: 252 +anims/anim_90: + type: SM64:ANIM + header: + offset: 5083528 + size: 24 + values: + offset: 5470776 + size: 1012 + indices: + offset: 5470524 + size: 252 +anims/anim_91: + type: SM64:ANIM + header: + offset: 5471788 + size: 24 + values: + offset: 5472064 + size: 266 + indices: + offset: 5471812 + size: 252 +anims/anim_92: + type: SM64:ANIM + header: + offset: 5472332 + size: 24 + values: + offset: 5472608 + size: 5600 + indices: + offset: 5472356 + size: 252 +anims/anim_93: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5478484 + size: 602 + indices: + offset: 5478232 + size: 252 +anims/anim_94: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5479364 + size: 80 + indices: + offset: 5076388 + size: 252 +anims/anim_95: + type: SM64:ANIM + header: + offset: 5368004 + size: 24 + values: + offset: 5479720 + size: 280 + indices: + offset: 5479468 + size: 252 +anims/anim_96: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5480276 + size: 680 + indices: + offset: 5480024 + size: 252 +anims/anim_97: + type: SM64:ANIM + header: + offset: 5251100 + size: 24 + values: + offset: 5481232 + size: 416 + indices: + offset: 5480980 + size: 252 +anims/anim_98: + type: SM64:ANIM + header: + offset: 5058512 + size: 24 + values: + offset: 5481924 + size: 2758 + indices: + offset: 5481672 + size: 252 +anims/anim_99: + type: SM64:ANIM + header: + offset: 5484684 + size: 24 + values: + offset: 5484960 + size: 7014 + indices: + offset: 5484708 + size: 252 +anims/anim_9A: + type: SM64:ANIM + header: + offset: 5283712 + size: 24 + values: + offset: 5492252 + size: 644 + indices: + offset: 5492000 + size: 252 +anims/anim_9B: + type: SM64:ANIM + header: + offset: 5283712 + size: 24 + values: + offset: 5493172 + size: 630 + indices: + offset: 5492920 + size: 252 +anims/anim_9C: + type: SM64:ANIM + header: + offset: 5493804 + size: 24 + values: + offset: 5494080 + size: 4884 + indices: + offset: 5493828 + size: 252 +anims/anim_9D: + type: SM64:ANIM + header: + offset: 5498964 + size: 24 + values: + offset: 5499240 + size: 1944 + indices: + offset: 5498988 + size: 252 +anims/anim_9E: + type: SM64:ANIM + header: + offset: 5431932 + size: 24 + values: + offset: 5501460 + size: 4008 + indices: + offset: 5501208 + size: 252 +anims/anim_9F: + type: SM64:ANIM + header: + offset: 5078524 + size: 24 + values: + offset: 5505744 + size: 774 + indices: + offset: 5505492 + size: 252 +anims/anim_A0: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5506796 + size: 390 + indices: + offset: 5506544 + size: 252 +anims/anim_A1: + type: SM64:ANIM + header: + offset: 5507188 + size: 24 + values: + offset: 5507464 + size: 920 + indices: + offset: 5507212 + size: 252 +anims/anim_A2: + type: SM64:ANIM + header: + offset: 5081572 + size: 24 + values: + offset: 5508660 + size: 1448 + indices: + offset: 5508408 + size: 252 +anims/anim_A3: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5510384 + size: 2590 + indices: + offset: 5510132 + size: 252 +anims/anim_A4: + type: SM64:ANIM + header: + offset: 5111696 + size: 24 + values: + offset: 5513252 + size: 1650 + indices: + offset: 5513000 + size: 252 +anims/anim_A5: + type: SM64:ANIM + header: + offset: 5044448 + size: 24 + values: + offset: 5515180 + size: 5148 + indices: + offset: 5514928 + size: 252 +anims/anim_A6: + type: SM64:ANIM + header: + offset: 5520328 + size: 24 + values: + offset: 5520604 + size: 4646 + indices: + offset: 5520352 + size: 252 +anims/anim_A7: + type: SM64:ANIM + header: + offset: 5453208 + size: 24 + values: + offset: 5525528 + size: 3060 + indices: + offset: 5525276 + size: 252 +anims/anim_A8: + type: SM64:ANIM + header: + offset: 5431932 + size: 24 + values: + offset: 5528864 + size: 3910 + indices: + offset: 5528612 + size: 252 +anims/anim_A9: + type: SM64:ANIM + header: + offset: 5321444 + size: 24 + values: + offset: 5533052 + size: 1728 + indices: + offset: 5532800 + size: 252 +anims/anim_AA: + type: SM64:ANIM + header: + offset: 5370324 + size: 24 + values: + offset: 5535056 + size: 972 + indices: + offset: 5534804 + size: 252 +anims/anim_AB: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5536304 + size: 750 + indices: + offset: 5536052 + size: 252 +anims/anim_AC: + type: SM64:ANIM + header: + offset: 5537056 + size: 24 + values: + offset: 5537332 + size: 1706 + indices: + offset: 5537080 + size: 252 +anims/anim_AD: + type: SM64:ANIM + header: + offset: 5294960 + size: 24 + values: + offset: 5539316 + size: 1860 + indices: + offset: 5539064 + size: 252 +anims/anim_AE: + type: SM64:ANIM + header: + offset: 5253232 + size: 24 + values: + offset: 5541452 + size: 956 + indices: + offset: 5541200 + size: 252 +anims/anim_AF: + type: SM64:ANIM + header: + offset: 5294960 + size: 24 + values: + offset: 5542684 + size: 2160 + indices: + offset: 5542432 + size: 252 +anims/anim_B0: + type: SM64:ANIM + header: + offset: 5368004 + size: 24 + values: + offset: 5545120 + size: 440 + indices: + offset: 5544868 + size: 252 +anims/anim_B1: + type: SM64:ANIM + header: + offset: 5545560 + size: 24 + values: + offset: 5545836 + size: 2418 + indices: + offset: 5545584 + size: 252 +anims/anim_B2: + type: SM64:ANIM + header: + offset: 5111696 + size: 24 + values: + offset: 5548532 + size: 1824 + indices: + offset: 5548280 + size: 252 +anims/anim_B3: + type: SM64:ANIM + header: + offset: 5550356 + size: 24 + values: + offset: 5550632 + size: 6494 + indices: + offset: 5550380 + size: 252 +anims/anim_B4: + type: SM64:ANIM + header: + offset: 5377812 + size: 24 + values: + offset: 5557404 + size: 1846 + indices: + offset: 5557152 + size: 252 +anims/anim_B5: + type: SM64:ANIM + header: + offset: 5321444 + size: 24 + values: + offset: 5559552 + size: 1382 + indices: + offset: 5559300 + size: 252 +anims/anim_B6: + type: SM64:ANIM + header: + offset: 5559276 + size: 24 + values: + offset: 5559552 + size: 1382 + indices: + offset: 5559300 + size: 252 +anims/anim_B7: + type: SM64:ANIM + header: + offset: 5453208 + size: 24 + values: + offset: 5561212 + size: 2980 + indices: + offset: 5560960 + size: 252 +anims/anim_B8: + type: SM64:ANIM + header: + offset: 5217532 + size: 24 + values: + offset: 5564468 + size: 776 + indices: + offset: 5564216 + size: 252 +anims/anim_B9: + type: SM64:ANIM + header: + offset: 5294960 + size: 24 + values: + offset: 5565520 + size: 2068 + indices: + offset: 5565268 + size: 252 +anims/anim_BA: + type: SM64:ANIM + header: + offset: 5312204 + size: 24 + values: + offset: 5567864 + size: 986 + indices: + offset: 5567612 + size: 252 +anims/anim_BB: + type: SM64:ANIM + header: + offset: 5568852 + size: 24 + values: + offset: 5569128 + size: 4132 + indices: + offset: 5568876 + size: 252 +anims/anim_BC: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5573560 + size: 1528 + indices: + offset: 5573308 + size: 252 +anims/anim_BD: + type: SM64:ANIM + header: + offset: 5076744 + size: 24 + values: + offset: 5573560 + size: 1528 + indices: + offset: 5573308 + size: 252 +anims/anim_BE: + type: SM64:ANIM + header: + offset: 5108984 + size: 24 + values: + offset: 5575364 + size: 760 + indices: + offset: 5575112 + size: 252 +anims/anim_BF: + type: SM64:ANIM + header: + offset: 5377812 + size: 24 + values: + offset: 5576400 + size: 1936 + indices: + offset: 5576148 + size: 252 +anims/anim_C0: + type: SM64:ANIM + header: + offset: 5578336 + size: 24 + values: + offset: 5578612 + size: 2452 + indices: + offset: 5578360 + size: 252 +anims/anim_C1: + type: SM64:ANIM + header: + offset: 5070848 + size: 24 + values: + offset: 5581340 + size: 2468 + indices: + offset: 5581088 + size: 252 +anims/anim_C2: + type: SM64:ANIM + header: + offset: 5058512 + size: 24 + values: + offset: 5584084 + size: 5422 + indices: + offset: 5583832 + size: 252 +anims/anim_C3: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5589784 + size: 1942 + indices: + offset: 5589532 + size: 252 +anims/anim_C4: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5592004 + size: 1942 + indices: + offset: 5589532 + size: 252 +anims/anim_C5: + type: SM64:ANIM + header: + offset: 5297208 + size: 24 + values: + offset: 5594224 + size: 1942 + indices: + offset: 5589532 + size: 252 +anims/anim_C6: + type: SM64:ANIM + header: + offset: 5217532 + size: 24 + values: + offset: 5596444 + size: 1666 + indices: + offset: 5596192 + size: 252 +anims/anim_C7: + type: SM64:ANIM + header: + offset: 5217532 + size: 24 + values: + offset: 5598388 + size: 2844 + indices: + offset: 5598136 + size: 252 +anims/anim_C8: + type: SM64:ANIM + header: + offset: 5601232 + size: 24 + values: + offset: 5601508 + size: 1648 + indices: + offset: 5601256 + size: 252 +anims/anim_C9: + type: SM64:ANIM + header: + offset: 5113504 + size: 24 + values: + offset: 5603432 + size: 1940 + indices: + offset: 5603180 + size: 252 +anims/anim_CA: + type: SM64:ANIM + header: + offset: 5605372 + size: 24 + values: + offset: 5605648 + size: 1998 + indices: + offset: 5605396 + size: 252 +anims/anim_CB: + type: SM64:ANIM + header: + offset: 5104424 + size: 24 + values: + offset: 5607948 + size: 1382 + indices: + offset: 5607696 + size: 252 +anims/anim_CC: + type: SM64:ANIM + header: + offset: 5044472 + size: 24 + values: + offset: 5607948 + size: 1382 + indices: + offset: 5607696 + size: 252 +anims/anim_CD: + type: SM64:ANIM + header: + offset: 5609332 + size: 24 + values: + offset: 5609608 + size: 5184 + indices: + offset: 5609356 + size: 252 +anims/anim_CE: + type: SM64:ANIM + header: + offset: 5079976 + size: 24 + values: + offset: 5615068 + size: 1460 + indices: + offset: 5614816 + size: 252 +anims/anim_CF: + type: SM64:ANIM + header: + offset: 5616528 + size: 24 + values: + offset: 5616804 + size: 2708 + indices: + offset: 5616552 + size: 252 +anims/anim_D0: + type: SM64:ANIM + header: + offset: 5292524 + size: 24 + values: + offset: 5619788 + size: 730 + indices: + offset: 5619536 + size: 252 +demos/bbh: + type: BLOB + size: 988 + offset: 5620584 +demos/ccm: + type: BLOB + size: 1320 + offset: 5621572 +demos/hmc: + type: BLOB + size: 980 + offset: 5622892 +demos/jrb: + type: BLOB + size: 620 + offset: 5623872 +demos/pss: + type: BLOB + size: 748 + offset: 5625164 +demos/unused: + type: BLOB + size: 108 + offset: 5625912 +demos/wf: + type: BLOB + size: 672 + offset: 5624492 diff --git a/assets/sm64/eu/levels.yml b/assets/sm64/eu/levels.yml new file mode 100644 index 0000000..9dbdd40 --- /dev/null +++ b/assets/sm64/eu/levels.yml @@ -0,0 +1,2477 @@ +bbh/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3485312 + mio0: 0 + format: RGBA16 +bbh/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3485312 + mio0: 4096 + format: RGBA16 +bbh/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3485312 + mio0: 6144 + format: RGBA16 +bbh/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3485312 + mio0: 8192 + format: RGBA16 +bbh/4: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3485312 + mio0: 12288 + format: RGBA16 +bbh/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3485312 + mio0: 13312 + format: RGBA16 +bbh/6: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3485312 + mio0: 17408 + format: RGBA16 +bitdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4415552 + mio0: 0 + format: RGBA16 +bitdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4415552 + mio0: 2048 + format: RGBA16 +bitdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4415552 + mio0: 4096 + format: RGBA16 +bitdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4415552 + mio0: 6144 + format: RGBA16 +bitfs/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4466448 + mio0: 0 + format: RGBA16 +bitfs/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4466448 + mio0: 4096 + format: RGBA16 +bitfs/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4466448 + mio0: 6144 + format: RGBA16 +bits/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4511200 + mio0: 0 + format: RGBA16 +bits/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4511200 + mio0: 4096 + format: RGBA16 +bits/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4511200 + mio0: 8192 + format: RGBA16 +bob/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4052208 + mio0: 0 + format: RGBA16 +bob/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4052208 + mio0: 2048 + format: RGBA16 +bob/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4052208 + mio0: 4096 + format: RGBA16 +bob/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4052208 + mio0: 6144 + format: RGBA16 +bob/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4052208 + mio0: 8192 + format: RGBA16 +bowser_1/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4870192 + mio0: 0 + format: RGBA16 +bowser_1/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4870192 + mio0: 4096 + format: RGBA16 +bowser_1/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4870192 + mio0: 6144 + format: RGBA16 +bowser_2/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4915936 + mio0: 0 + format: RGBA16 +bowser_3/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4920080 + mio0: 0 + format: RGBA16 +bowser_3/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4920080 + mio0: 2048 + format: RGBA16 +bowser_3/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4920080 + mio0: 4096 + format: RGBA16 +castle_grounds/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4374016 + mio0: 0 + format: RGBA16 +castle_grounds/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4374016 + mio0: 4096 + format: RGBA16 +castle_grounds/2: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4374016 + mio0: 8192 + format: RGBA16 +castle_grounds/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4374016 + mio0: 51688 + format: RGBA16 +castle_grounds/4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4374016 + mio0: 55784 + format: RGBA16 +castle_grounds/5: + type: TEXTURE + size: 2048 + width: 64 + height: 32 + offset: 4374016 + mio0: 60136 + format: IA8 +castle_inside/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 2048 + format: RGBA16 +castle_inside/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 28672 + format: RGBA16 +castle_inside/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 30720 + format: RGBA16 +castle_inside/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 32768 + format: RGBA16 +castle_inside/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 34816 + format: RGBA16 +castle_inside/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 36864 + format: RGBA16 +castle_inside/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 38912 + format: RGBA16 +castle_inside/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 40960 + format: IA16 +castle_inside/17: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 43008 + format: RGBA16 +castle_inside/18: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 47104 + format: RGBA16 +castle_inside/19: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 51200 + format: RGBA16 +castle_inside/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 47104 + format: IA16 +castle_inside/20: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 55296 + format: RGBA16 +castle_inside/21: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 59392 + format: RGBA16 +castle_inside/22: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 63488 + format: RGBA16 +castle_inside/23_us: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 67584 + format: RGBA16 +castle_inside/24_us: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 71680 + format: RGBA16 +castle_inside/25: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 75776 + format: RGBA16 +castle_inside/26: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 79872 + format: RGBA16 +castle_inside/27: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 83968 + format: RGBA16 +castle_inside/28: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 88064 + format: RGBA16 +castle_inside/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 92160 + format: RGBA16 +castle_inside/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3634560 + mio0: 8192 + format: RGBA16 +castle_inside/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 94208 + format: RGBA16 +castle_inside/31: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 96256 + format: RGBA16 +castle_inside/32: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 100352 + format: RGBA16 +castle_inside/33: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 104448 + format: RGBA16 +castle_inside/34: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 108544 + format: RGBA16 +castle_inside/35: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 112640 + format: RGBA16 +castle_inside/36: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 116736 + format: RGBA16 +castle_inside/37: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 120832 + format: RGBA16 +castle_inside/38: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 124928 + format: RGBA16 +castle_inside/39: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 129024 + format: RGBA16 +castle_inside/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 12288 + format: RGBA16 +castle_inside/40: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3634560 + mio0: 133120 + format: RGBA16 +castle_inside/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3634560 + mio0: 14336 + format: RGBA16 +castle_inside/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3634560 + mio0: 18432 + format: RGBA16 +castle_inside/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 22528 + format: RGBA16 +castle_inside/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 24576 + format: RGBA16 +castle_inside/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 26624 + format: RGBA16 +castle_inside/castle_light: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 47104 + format: IA16 +ccm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 0 + format: RGBA16 +ccm/1: + type: TEXTURE + size: 256 + width: 32 + height: 4 + offset: 3558288 + mio0: 2048 + format: RGBA16 +ccm/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 17152 + format: RGBA16 +ccm/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 19200 + format: RGBA16 +ccm/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 72024 + format: RGBA16 +ccm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 2304 + format: RGBA16 +ccm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 4352 + format: RGBA16 +ccm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 6400 + format: RGBA16 +ccm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 48240 + format: RGBA16 +ccm/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1315408 + mio0: 46192 + format: RGBA16 +ccm/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 12544 + format: RGBA16 +ccm/8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3558288 + mio0: 14592 + format: IA16 +ccm/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3558288 + mio0: 15104 + format: IA16 +cotmc/0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4827104 + mio0: 0 + format: RGBA16 +cotmc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4827104 + mio0: 4096 + format: RGBA16 +cotmc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4827104 + mio0: 6144 + format: RGBA16 +cotmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4827104 + mio0: 8192 + format: RGBA16 +cotmc/4: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4827104 + mio0: 10240 + format: RGBA16 +ddd/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4647792 + mio0: 0 + format: RGBA16 +ddd/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 4096 + format: RGBA16 +ddd/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4647792 + mio0: 6144 + format: RGBA16 +ddd/3: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4647792 + mio0: 8192 + format: RGBA16 +ddd/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4647792 + mio0: 12288 + format: RGBA16 +ending/cake_eu: + type: BLOB + size: 143360 + offset: 4716880 + mio0: 0 +ending/eu_023000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 143360 + format: RGBA16 +ending/eu_024000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 147456 + format: RGBA16 +ending/eu_025000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 151552 + format: RGBA16 +ending/eu_026000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 155648 + format: RGBA16 +ending/eu_027000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 159744 + format: RGBA16 +ending/eu_028000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4716880 + mio0: 163840 + format: RGBA16 +hmc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3874816 + mio0: 0 + format: RGBA16 +hmc/1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3874816 + mio0: 4096 + format: RGBA16 +hmc/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3874816 + mio0: 8192 + format: RGBA16 +hmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3874816 + mio0: 12288 + format: RGBA16 +hmc/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3874816 + mio0: 14336 + format: RGBA16 +hmc/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3874816 + mio0: 16384 + format: RGBA16 +hmc/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3874816 + mio0: 18432 + format: RGBA16 +hmc/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3634560 + mio0: 92160 + format: RGBA16 +intro/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2401056 + mio0: 32416 + format: RGBA16 +intro/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2401056 + mio0: 34464 + format: RGBA16 +intro/2_eu_copyright: + type: TEXTURE + size: 4096 + width: 128 + height: 16 + offset: 2401056 + mio0: 46240 + format: RGBA16 +intro/3_eu_tm: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2401056 + mio0: 50336 + format: RGBA16 +jrb/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 4096 + format: RGBA16 +jrb/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4176288 + mio0: 2048 + format: RGBA16 +jrb/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4176288 + mio0: 6144 + format: RGBA16 +jrb/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4176288 + mio0: 8192 + format: RGBA16 +lll/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 0 + format: RGBA16 +lll/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 2048 + format: RGBA16 +lll/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 20480 + format: RGBA16 +lll/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 22528 + format: RGBA16 +lll/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 24576 + format: RGBA16 +lll/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 26624 + format: RGBA16 +lll/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 28672 + format: RGBA16 +lll/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 30720 + format: RGBA16 +lll/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 32768 + format: RGBA16 +lll/17: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 34816 + format: RGBA16 +lll/18: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 36864 + format: RGBA16 +lll/19: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 38912 + format: RGBA16 +lll/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 4096 + format: RGBA16 +lll/20: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 40960 + format: RGBA16 +lll/21: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 43008 + format: RGBA16 +lll/22: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 45056 + format: RGBA16 +lll/23: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 47104 + format: RGBA16 +lll/24: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 49152 + format: RGBA16 +lll/25: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 51200 + format: RGBA16 +lll/26: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 4560608 + mio0: 53248 + format: RGBA16 +lll/27: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3558288 + mio0: 14592 + format: IA16 +lll/28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 54272 + format: RGBA16 +lll/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 56320 + format: RGBA16 +lll/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 6144 + format: RGBA16 +lll/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 58368 + format: RGBA16 +lll/31: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 60416 + format: RGBA16 +lll/32: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4560608 + mio0: 62464 + format: RGBA16 +lll/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 8192 + format: RGBA16 +lll/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 10240 + format: RGBA16 +lll/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 12288 + format: RGBA16 +lll/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 6144 + format: RGBA16 +lll/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 16384 + format: RGBA16 +lll/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4560608 + mio0: 18432 + format: RGBA16 +menu/main_menu_seg7.00018: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 24 + format: RGBA16 +menu/main_menu_seg7.00818: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 2072 + format: RGBA16 +menu/main_menu_seg7.01018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 4120 + format: RGBA16 +menu/main_menu_seg7.02018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 8216 + format: RGBA16 +menu/main_menu_seg7.03468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 13416 + format: RGBA16 +menu/main_menu_seg7.03C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 15464 + format: RGBA16 +menu/main_menu_seg7.04468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 17512 + format: RGBA16 +menu/main_menu_seg7.04C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 19560 + format: RGBA16 +menu/main_menu_seg7.05468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 21608 + format: RGBA16 +menu/main_menu_seg7.06328: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 25384 + format: RGBA16 +menu/main_menu_seg7.06B28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2647072 + mio0: 27432 + format: RGBA16 +menu/main_menu_seg7.073D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 29648 + format: RGBA16 +menu/main_menu_seg7.075D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 30160 + format: RGBA16 +menu/main_menu_seg7.077D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 30672 + format: RGBA16 +menu/main_menu_seg7.079D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 31184 + format: RGBA16 +menu/main_menu_seg7.07BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 31696 + format: RGBA16 +menu/main_menu_seg7.07DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 32208 + format: RGBA16 +menu/main_menu_seg7.07FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 32720 + format: RGBA16 +menu/main_menu_seg7.081D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 33232 + format: RGBA16 +menu/main_menu_seg7.083D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 33744 + format: RGBA16 +menu/main_menu_seg7.085D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 34256 + format: RGBA16 +menu/main_menu_seg7.087D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 34768 + format: RGBA16 +menu/main_menu_seg7.089D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 35280 + format: RGBA16 +menu/main_menu_seg7.08BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 35792 + format: RGBA16 +menu/main_menu_seg7.08DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 36304 + format: RGBA16 +menu/main_menu_seg7.08FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 36816 + format: RGBA16 +menu/main_menu_seg7.091D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 37328 + format: RGBA16 +menu/main_menu_seg7.093D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 37840 + format: RGBA16 +menu/main_menu_seg7.095D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 38352 + format: RGBA16 +menu/main_menu_seg7.097D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 38864 + format: RGBA16 +menu/main_menu_seg7.099D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 39376 + format: RGBA16 +menu/main_menu_seg7.09BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 39888 + format: RGBA16 +menu/main_menu_seg7.09DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 40400 + format: RGBA16 +menu/main_menu_seg7.09FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 40912 + format: RGBA16 +menu/main_menu_seg7.0A1D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 41424 + format: RGBA16 +menu/main_menu_seg7.0A3D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 41936 + format: RGBA16 +menu/main_menu_seg7.0A5D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 42448 + format: RGBA16 +menu/main_menu_seg7.0A7D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 42960 + format: RGBA16 +menu/main_menu_seg7.0A9D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 43472 + format: RGBA16 +menu/main_menu_seg7_eu.0AF80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44928 + format: IA8 +menu/main_menu_seg7_eu.0B640: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46656 + format: IA8 +menu/main_menu_seg7_eu.0B680: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46720 + format: IA8 +menu/main_menu_seg7_eu.0B840: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 47168 + format: IA8 +menu/main_menu_seg7_eu.0B880: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 47232 + format: IA8 +menu/main_menu_seg7_eu.0B8C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 47296 + format: IA8 +menu/main_menu_seg7_eu.0BDA0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 48544 + format: RGBA16 +menu/main_menu_seg7_eu.0CDA0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 52640 + format: RGBA16 +menu/main_menu_seg7_eu.0DDA0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 56736 + format: RGBA16 +menu/main_menu_seg7_eu.0EDA0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2647072 + mio0: 60832 + format: RGBA16 +menu/main_menu_seg7_us.0AC40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44096 + format: IA8 +menu/main_menu_seg7_us.0AC80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44160 + format: IA8 +menu/main_menu_seg7_us.0ACC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44224 + format: IA8 +menu/main_menu_seg7_us.0AD00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44288 + format: IA8 +menu/main_menu_seg7_us.0AD40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44352 + format: IA8 +menu/main_menu_seg7_us.0AD80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44416 + format: IA8 +menu/main_menu_seg7_us.0ADC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44480 + format: IA8 +menu/main_menu_seg7_us.0AE00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44544 + format: IA8 +menu/main_menu_seg7_us.0AE40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44608 + format: IA8 +menu/main_menu_seg7_us.0AE80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44672 + format: IA8 +menu/main_menu_seg7_us.0AEC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44736 + format: IA8 +menu/main_menu_seg7_us.0AF00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44800 + format: IA8 +menu/main_menu_seg7_us.0AF40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44864 + format: IA8 +menu/main_menu_seg7_us.0AFC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 44992 + format: IA8 +menu/main_menu_seg7_us.0B000: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45056 + format: IA8 +menu/main_menu_seg7_us.0B040: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45120 + format: IA8 +menu/main_menu_seg7_us.0B080: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45184 + format: IA8 +menu/main_menu_seg7_us.0B0C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45248 + format: IA8 +menu/main_menu_seg7_us.0B100: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45312 + format: IA8 +menu/main_menu_seg7_us.0B140: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45376 + format: IA8 +menu/main_menu_seg7_us.0B180: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45440 + format: IA8 +menu/main_menu_seg7_us.0B1C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45504 + format: IA8 +menu/main_menu_seg7_us.0B200: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45568 + format: IA8 +menu/main_menu_seg7_us.0B240: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45632 + format: IA8 +menu/main_menu_seg7_us.0B280: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45696 + format: IA8 +menu/main_menu_seg7_us.0B2C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45760 + format: IA8 +menu/main_menu_seg7_us.0B300: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45824 + format: IA8 +menu/main_menu_seg7_us.0B340: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45888 + format: IA8 +menu/main_menu_seg7_us.0B380: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 45952 + format: IA8 +menu/main_menu_seg7_us.0B3C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46016 + format: IA8 +menu/main_menu_seg7_us.0B400: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46080 + format: IA8 +menu/main_menu_seg7_us.0B440: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46144 + format: IA8 +menu/main_menu_seg7_us.0B480: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46208 + format: IA8 +menu/main_menu_seg7_us.0B4C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46272 + format: IA8 +menu/main_menu_seg7_us.0B500: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46336 + format: IA8 +menu/main_menu_seg7_us.0B540: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46400 + format: IA8 +menu/main_menu_seg7_us.0B580: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46464 + format: IA8 +menu/main_menu_seg7_us.0B5C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46528 + format: IA8 +menu/main_menu_seg7_us.0B600: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46592 + format: IA8 +menu/main_menu_seg7_us.0B6C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46784 + format: IA8 +menu/main_menu_seg7_us.0B700: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46848 + format: IA8 +menu/main_menu_seg7_us.0B740: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46912 + format: IA8 +menu/main_menu_seg7_us.0B780: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 46976 + format: IA8 +menu/main_menu_seg7_us.0B7C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 47040 + format: IA8 +menu/main_menu_seg7_us.0B800: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2647072 + mio0: 47104 + format: IA8 +pss/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4792384 + mio0: 0 + format: RGBA16 +pss/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4792384 + mio0: 2048 + format: IA16 +pss/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4792384 + mio0: 4096 + format: RGBA16 +rr/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4295344 + mio0: 2048 + format: RGBA16 +rr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4295344 + mio0: 6144 + format: RGBA16 +rr/quarter_flying_carpet: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4295344 + mio0: 0 + format: RGBA16 +sl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4092400 + mio0: 0 + format: RGBA16 +sl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4092400 + mio0: 2048 + format: RGBA16 +sl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4092400 + mio0: 4096 + format: RGBA16 +sl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4092400 + mio0: 6144 + format: RGBA16 +sl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4092400 + mio0: 8192 + format: RGBA16 +ssl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 0 + format: RGBA16 +ssl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 2048 + format: IA16 +ssl/10: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3967216 + mio0: 55208 + format: RGBA16 +ssl/11: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3967216 + mio0: 59304 + format: RGBA16 +ssl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 4096 + format: RGBA16 +ssl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 6144 + format: RGBA16 +ssl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 8192 + format: RGBA16 +ssl/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3967216 + mio0: 10240 + format: RGBA16 +ssl/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 14336 + format: RGBA16 +ssl/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 32768 + format: RGBA16 +ssl/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3967216 + mio0: 49064 + format: RGBA16 +ssl/9: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3967216 + mio0: 51112 + format: RGBA16 +thi/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4217104 + mio0: 0 + format: RGBA16 +thi/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4217104 + mio0: 2048 + format: RGBA16 +totwc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4854592 + mio0: 0 + format: RGBA16 +totwc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4854592 + mio0: 4096 + format: RGBA16 +totwc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4854592 + mio0: 6144 + format: RGBA16 +totwc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4854592 + mio0: 8192 + format: IA16 +ttc/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4252000 + mio0: 0 + format: RGBA16 +ttc/1: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 4252000 + mio0: 2048 + format: RGBA16 +ttc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4252000 + mio0: 90000 + format: RGBA16 +ttm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 0 + format: IA16 +ttm/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 2048 + format: RGBA16 +ttm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 4096 + format: RGBA16 +ttm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 6144 + format: RGBA16 +ttm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 8192 + format: RGBA16 +ttm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4931616 + mio0: 10240 + format: RGBA16 +ttm/6: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4931616 + mio0: 12288 + format: RGBA16 +ttm/7: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4931616 + mio0: 16384 + format: RGBA16 +ttm/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 43008 + format: RGBA16 +vcutm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4446272 + mio0: 0 + format: RGBA16 +vcutm/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4446272 + mio0: 2048 + format: RGBA16 +vcutm/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4446272 + mio0: 6144 + format: RGBA16 +vcutm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4446272 + mio0: 10240 + format: RGBA16 +wdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4128688 + mio0: 0 + format: RGBA16 +wdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4128688 + mio0: 2048 + format: RGBA16 +wdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4128688 + mio0: 4096 + format: RGBA16 +wdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4128688 + mio0: 6144 + format: RGBA16 +wdw/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4128688 + mio0: 8192 + format: RGBA16 +wf/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4682448 + mio0: 0 + format: RGBA16 +wf/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4682448 + mio0: 2048 + format: RGBA16 +wf/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4682448 + mio0: 4096 + format: RGBA16 +wf/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4682448 + mio0: 6144 + format: RGBA16 +wf/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4682448 + mio0: 8192 + format: RGBA16 +wf/5: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 909712 + mio0: 30840 + format: IA8 +wmotr/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4876848 + mio0: 0 + format: RGBA16 +wmotr/1: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 4876848 + mio0: 2048 + format: RGBA16 +wmotr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4876848 + mio0: 3072 + format: RGBA16 +wmotr/3: + type: TEXTURE + size: 512 + width: 32 + height: 8 + offset: 4876848 + mio0: 5120 + format: RGBA16 +wmotr/4: + type: TEXTURE + size: 512 + width: 8 + height: 32 + offset: 4876848 + mio0: 5632 + format: RGBA16 diff --git a/assets/sm64/eu/sound.yml b/assets/sm64/eu/sound.yml new file mode 100644 index 0000000..fde0b5c --- /dev/null +++ b/assets/sm64/eu/sound.yml @@ -0,0 +1,1000 @@ +header: + type: AUDIO:HEADER + ctl: + offset: 5626032 + size: 97856 + tbl: + offset: 5723888 + size: 2216704 +banks/00_bank: + type: BANK + id: 0 +banks/01_bank: + type: BANK + id: 1 +banks/02_bank: + type: BANK + id: 2 +banks/03_bank: + type: BANK + id: 3 +banks/04_bank: + type: BANK + id: 4 +banks/05_bank: + type: BANK + id: 5 +banks/06_bank: + type: BANK + id: 6 +banks/07_bank: + type: BANK + id: 7 +banks/08_bank: + type: BANK + id: 8 +banks/09_bank: + type: BANK + id: 9 +banks/0A_bank: + type: BANK + id: 10 +banks/0B_bank: + type: BANK + id: 11 +banks/0C_bank: + type: BANK + id: 12 +banks/0D_bank: + type: BANK + id: 13 +banks/0E_bank: + type: BANK + id: 14 +banks/0F_bank: + type: BANK + id: 15 +banks/10_bank: + type: BANK + id: 16 +banks/11_bank: + type: BANK + id: 17 +banks/12_bank: + type: BANK + id: 18 +banks/13_bank: + type: BANK + id: 19 +banks/14_bank: + type: BANK + id: 20 +banks/15_bank: + type: BANK + id: 21 +banks/16_bank: + type: BANK + id: 22 +banks/17_bank: + type: BANK + id: 23 +banks/18_bank: + type: BANK + id: 24 +banks/19_bank: + type: BANK + id: 25 +banks/1A_bank: + type: BANK + id: 26 +banks/1B_bank: + type: BANK + id: 27 +banks/1C_bank: + type: BANK + id: 28 +banks/1D_bank: + type: BANK + id: 29 +banks/1E_bank: + type: BANK + id: 30 +banks/1F_bank: + type: BANK + id: 31 +banks/20_bank: + type: BANK + id: 32 +banks/21_bank: + type: BANK + id: 33 +banks/22_bank: + type: BANK + id: 34 +banks/23_bank: + type: BANK + id: 35 +banks/24_bank: + type: BANK + id: 36 +banks/25_bank: + type: BANK + id: 37 +samples/bowser_organ/00_organ_1: + type: SAMPLE + id: 216 +samples/bowser_organ/01_organ_1_lq: + type: SAMPLE + id: 217 +samples/bowser_organ/02_boys_choir: + type: SAMPLE + id: 218 +samples/course_start/00_la: + type: SAMPLE + id: 215 +samples/instruments/00: + type: SAMPLE + id: 141 +samples/instruments/01_banjo_1: + type: SAMPLE + id: 142 +samples/instruments/02: + type: SAMPLE + id: 143 +samples/instruments/03_human_whistle: + type: SAMPLE + id: 144 +samples/instruments/04_bright_piano: + type: SAMPLE + id: 145 +samples/instruments/05_acoustic_bass: + type: SAMPLE + id: 146 +samples/instruments/06_kick_drum_1: + type: SAMPLE + id: 147 +samples/instruments/07_rimshot: + type: SAMPLE + id: 148 +samples/instruments/08: + type: SAMPLE + id: 149 +samples/instruments/09: + type: SAMPLE + id: 150 +samples/instruments/0A_tambourine: + type: SAMPLE + id: 151 +samples/instruments/0B: + type: SAMPLE + id: 152 +samples/instruments/0C_conga_stick: + type: SAMPLE + id: 153 +samples/instruments/0D_clave: + type: SAMPLE + id: 154 +samples/instruments/0E_hihat_closed: + type: SAMPLE + id: 155 +samples/instruments/0F_hihat_open: + type: SAMPLE + id: 156 +samples/instruments/10_cymbal_bell: + type: SAMPLE + id: 157 +samples/instruments/11_splash_cymbal: + type: SAMPLE + id: 158 +samples/instruments/12_snare_drum_1: + type: SAMPLE + id: 159 +samples/instruments/13_snare_drum_2: + type: SAMPLE + id: 160 +samples/instruments/14_strings_5: + type: SAMPLE + id: 161 +samples/instruments/15_strings_4: + type: SAMPLE + id: 162 +samples/instruments/16_french_horns: + type: SAMPLE + id: 163 +samples/instruments/17_trumpet: + type: SAMPLE + id: 164 +samples/instruments/18_timpani: + type: SAMPLE + id: 165 +samples/instruments/19_brass: + type: SAMPLE + id: 166 +samples/instruments/1A_slap_bass: + type: SAMPLE + id: 167 +samples/instruments/1B_organ_2: + type: SAMPLE + id: 168 +samples/instruments/1C: + type: SAMPLE + id: 169 +samples/instruments/1D: + type: SAMPLE + id: 170 +samples/instruments/1E_closed_triangle: + type: SAMPLE + id: 171 +samples/instruments/1F_open_triangle: + type: SAMPLE + id: 172 +samples/instruments/20_cabasa: + type: SAMPLE + id: 173 +samples/instruments/21_sine_bass: + type: SAMPLE + id: 174 +samples/instruments/22_boys_choir: + type: SAMPLE + id: 175 +samples/instruments/23_strings_1: + type: SAMPLE + id: 176 +samples/instruments/24_strings_2: + type: SAMPLE + id: 177 +samples/instruments/25_strings_3: + type: SAMPLE + id: 178 +samples/instruments/26_crystal_rhodes: + type: SAMPLE + id: 179 +samples/instruments/27_harpsichord: + type: SAMPLE + id: 180 +samples/instruments/28_sitar_1: + type: SAMPLE + id: 181 +samples/instruments/29_orchestra_hit: + type: SAMPLE + id: 182 +samples/instruments/2A: + type: SAMPLE + id: 183 +samples/instruments/2B: + type: SAMPLE + id: 184 +samples/instruments/2C: + type: SAMPLE + id: 185 +samples/instruments/2D_trombone: + type: SAMPLE + id: 186 +samples/instruments/2E_accordion: + type: SAMPLE + id: 187 +samples/instruments/2F_sleigh_bells: + type: SAMPLE + id: 188 +samples/instruments/30_rarefaction-lahna: + type: SAMPLE + id: 189 +samples/instruments/31_rarefaction-convolution: + type: SAMPLE + id: 190 +samples/instruments/32_metal_rimshot: + type: SAMPLE + id: 191 +samples/instruments/33_kick_drum_2: + type: SAMPLE + id: 192 +samples/instruments/34_alto_flute: + type: SAMPLE + id: 193 +samples/instruments/35_gospel_organ: + type: SAMPLE + id: 194 +samples/instruments/36_sawtooth_synth: + type: SAMPLE + id: 195 +samples/instruments/37_square_synth: + type: SAMPLE + id: 196 +samples/instruments/38_electric_kick_drum: + type: SAMPLE + id: 197 +samples/instruments/39_sitar_2: + type: SAMPLE + id: 198 +samples/instruments/3A_music_box: + type: SAMPLE + id: 199 +samples/instruments/3B_banjo_2: + type: SAMPLE + id: 200 +samples/instruments/3C_acoustic_guitar: + type: SAMPLE + id: 201 +samples/instruments/3D: + type: SAMPLE + id: 202 +samples/instruments/3E_monk_choir: + type: SAMPLE + id: 203 +samples/instruments/3F: + type: SAMPLE + id: 204 +samples/instruments/40_bell: + type: SAMPLE + id: 205 +samples/instruments/41_pan_flute: + type: SAMPLE + id: 206 +samples/instruments/42_vibraphone: + type: SAMPLE + id: 207 +samples/instruments/43_harmonica: + type: SAMPLE + id: 208 +samples/instruments/44_grand_piano: + type: SAMPLE + id: 209 +samples/instruments/45_french_horns_lq: + type: SAMPLE + id: 210 +samples/instruments/46_pizzicato_strings_1: + type: SAMPLE + id: 211 +samples/instruments/47_pizzicato_strings_2: + type: SAMPLE + id: 212 +samples/instruments/48_steel_drum: + type: SAMPLE + id: 213 +samples/piranha_music_box/00_music_box: + type: SAMPLE + id: 214 +samples/sfx_1/00_twirl: + type: SAMPLE + id: 0 +samples/sfx_1/01_brushing: + type: SAMPLE + id: 1 +samples/sfx_1/02_hand_touch: + type: SAMPLE + id: 2 +samples/sfx_1/03_yoshi: + type: SAMPLE + id: 3 +samples/sfx_1/04_plop: + type: SAMPLE + id: 4 +samples/sfx_1/05_heavy_landing: + type: SAMPLE + id: 5 +samples/sfx_4/00: + type: SAMPLE + id: 17 +samples/sfx_4/01: + type: SAMPLE + id: 18 +samples/sfx_4/02: + type: SAMPLE + id: 19 +samples/sfx_4/03: + type: SAMPLE + id: 20 +samples/sfx_4/04: + type: SAMPLE + id: 21 +samples/sfx_4/05: + type: SAMPLE + id: 22 +samples/sfx_4/06: + type: SAMPLE + id: 23 +samples/sfx_4/07: + type: SAMPLE + id: 24 +samples/sfx_4/08: + type: SAMPLE + id: 25 +samples/sfx_4/09: + type: SAMPLE + id: 26 +samples/sfx_5/00: + type: SAMPLE + id: 27 +samples/sfx_5/01: + type: SAMPLE + id: 28 +samples/sfx_5/02: + type: SAMPLE + id: 29 +samples/sfx_5/03: + type: SAMPLE + id: 30 +samples/sfx_5/04: + type: SAMPLE + id: 31 +samples/sfx_5/05: + type: SAMPLE + id: 32 +samples/sfx_5/06: + type: SAMPLE + id: 33 +samples/sfx_5/07: + type: SAMPLE + id: 34 +samples/sfx_5/08: + type: SAMPLE + id: 35 +samples/sfx_5/09: + type: SAMPLE + id: 36 +samples/sfx_5/0A: + type: SAMPLE + id: 37 +samples/sfx_5/0B: + type: SAMPLE + id: 38 +samples/sfx_5/0C: + type: SAMPLE + id: 39 +samples/sfx_5/0D: + type: SAMPLE + id: 40 +samples/sfx_5/0E: + type: SAMPLE + id: 41 +samples/sfx_5/0F: + type: SAMPLE + id: 42 +samples/sfx_5/10: + type: SAMPLE + id: 43 +samples/sfx_5/11: + type: SAMPLE + id: 44 +samples/sfx_5/12: + type: SAMPLE + id: 45 +samples/sfx_5/13: + type: SAMPLE + id: 46 +samples/sfx_5/14: + type: SAMPLE + id: 47 +samples/sfx_5/15: + type: SAMPLE + id: 48 +samples/sfx_5/16: + type: SAMPLE + id: 49 +samples/sfx_5/17: + type: SAMPLE + id: 50 +samples/sfx_5/18: + type: SAMPLE + id: 51 +samples/sfx_5/19: + type: SAMPLE + id: 52 +samples/sfx_5/1A: + type: SAMPLE + id: 53 +samples/sfx_5/1B: + type: SAMPLE + id: 54 +samples/sfx_5/1C: + type: SAMPLE + id: 55 +samples/sfx_6/00: + type: SAMPLE + id: 56 +samples/sfx_6/01: + type: SAMPLE + id: 57 +samples/sfx_6/02: + type: SAMPLE + id: 58 +samples/sfx_6/03: + type: SAMPLE + id: 59 +samples/sfx_6/04: + type: SAMPLE + id: 60 +samples/sfx_6/05: + type: SAMPLE + id: 61 +samples/sfx_6/06: + type: SAMPLE + id: 62 +samples/sfx_6/07: + type: SAMPLE + id: 63 +samples/sfx_6/08: + type: SAMPLE + id: 64 +samples/sfx_6/09: + type: SAMPLE + id: 65 +samples/sfx_6/0A: + type: SAMPLE + id: 66 +samples/sfx_6/0B: + type: SAMPLE + id: 67 +samples/sfx_6/0C: + type: SAMPLE + id: 68 +samples/sfx_6/0D: + type: SAMPLE + id: 69 +samples/sfx_7/00: + type: SAMPLE + id: 70 +samples/sfx_7/01: + type: SAMPLE + id: 71 +samples/sfx_7/02: + type: SAMPLE + id: 72 +samples/sfx_7/03: + type: SAMPLE + id: 73 +samples/sfx_7/04: + type: SAMPLE + id: 74 +samples/sfx_7/05: + type: SAMPLE + id: 75 +samples/sfx_7/06: + type: SAMPLE + id: 76 +samples/sfx_7/07: + type: SAMPLE + id: 77 +samples/sfx_7/08: + type: SAMPLE + id: 78 +samples/sfx_7/09: + type: SAMPLE + id: 79 +samples/sfx_7/0A: + type: SAMPLE + id: 80 +samples/sfx_7/0B: + type: SAMPLE + id: 81 +samples/sfx_7/0C: + type: SAMPLE + id: 82 +samples/sfx_7/0D_chain_chomp_bark: + type: SAMPLE + id: 83 +samples/sfx_9/00: + type: SAMPLE + id: 111 +samples/sfx_9/01: + type: SAMPLE + id: 112 +samples/sfx_9/02: + type: SAMPLE + id: 113 +samples/sfx_9/03: + type: SAMPLE + id: 114 +samples/sfx_9/04_camera_buzz: + type: SAMPLE + id: 115 +samples/sfx_9/05_camera_shutter: + type: SAMPLE + id: 116 +samples/sfx_9/06: + type: SAMPLE + id: 117 +samples/sfx_mario/00_mario_jump_hoo: + type: SAMPLE + id: 84 +samples/sfx_mario/01_mario_jump_wah: + type: SAMPLE + id: 85 +samples/sfx_mario/02_mario_yah: + type: SAMPLE + id: 86 +samples/sfx_mario/03_mario_haha: + type: SAMPLE + id: 87 +samples/sfx_mario/04_mario_yahoo: + type: SAMPLE + id: 88 +samples/sfx_mario/05_mario_uh: + type: SAMPLE + id: 89 +samples/sfx_mario/06_mario_hrmm: + type: SAMPLE + id: 90 +samples/sfx_mario/07_mario_wah2: + type: SAMPLE + id: 91 +samples/sfx_mario/08_mario_whoa: + type: SAMPLE + id: 92 +samples/sfx_mario/09_mario_eeuh: + type: SAMPLE + id: 93 +samples/sfx_mario/0A_mario_attacked: + type: SAMPLE + id: 94 +samples/sfx_mario/0B_mario_ooof: + type: SAMPLE + id: 95 +samples/sfx_mario/0C_mario_here_we_go: + type: SAMPLE + id: 96 +samples/sfx_mario/0D_mario_yawning: + type: SAMPLE + id: 97 +samples/sfx_mario/0E_mario_snoring1: + type: SAMPLE + id: 98 +samples/sfx_mario/0F_mario_snoring2: + type: SAMPLE + id: 99 +samples/sfx_mario/10_mario_doh: + type: SAMPLE + id: 100 +samples/sfx_mario/11_mario_game_over: + type: SAMPLE + id: 101 +samples/sfx_mario/12_mario_hello: + type: SAMPLE + id: 102 +samples/sfx_mario/13_mario_press_start_to_play: + type: SAMPLE + id: 103 +samples/sfx_mario/14_mario_twirl_bounce: + type: SAMPLE + id: 104 +samples/sfx_mario/15_mario_snoring3: + type: SAMPLE + id: 105 +samples/sfx_mario/16_mario_so_longa_bowser: + type: SAMPLE + id: 106 +samples/sfx_mario/17_mario_ima_tired: + type: SAMPLE + id: 107 +samples/sfx_mario/18_mario_waha: + type: SAMPLE + id: 108 +samples/sfx_mario/19_mario_yippee: + type: SAMPLE + id: 109 +samples/sfx_mario/1A_mario_lets_a_go: + type: SAMPLE + id: 110 +samples/sfx_mario_peach/00_mario_waaaooow: + type: SAMPLE + id: 118 +samples/sfx_mario_peach/01_mario_hoohoo: + type: SAMPLE + id: 119 +samples/sfx_mario_peach/02_mario_panting: + type: SAMPLE + id: 120 +samples/sfx_mario_peach/03_mario_dying: + type: SAMPLE + id: 121 +samples/sfx_mario_peach/04_mario_on_fire: + type: SAMPLE + id: 122 +samples/sfx_mario_peach/05_mario_uh2: + type: SAMPLE + id: 123 +samples/sfx_mario_peach/06_mario_coughing: + type: SAMPLE + id: 124 +samples/sfx_mario_peach/07_mario_its_a_me_mario: + type: SAMPLE + id: 125 +samples/sfx_mario_peach/08_mario_punch_yah: + type: SAMPLE + id: 126 +samples/sfx_mario_peach/09_mario_punch_hoo: + type: SAMPLE + id: 127 +samples/sfx_mario_peach/0A_mario_mama_mia: + type: SAMPLE + id: 128 +samples/sfx_mario_peach/0B_mario_okey_dokey: + type: SAMPLE + id: 129 +samples/sfx_mario_peach/0C_mario_drowning: + type: SAMPLE + id: 130 +samples/sfx_mario_peach/0D_mario_thank_you_playing_my_game: + type: SAMPLE + id: 131 +samples/sfx_mario_peach/0E_peach_dear_mario: + type: SAMPLE + id: 132 +samples/sfx_mario_peach/0F_peach_mario: + type: SAMPLE + id: 133 +samples/sfx_mario_peach/10_peach_power_of_the_stars: + type: SAMPLE + id: 134 +samples/sfx_mario_peach/11_peach_thanks_to_you: + type: SAMPLE + id: 135 +samples/sfx_mario_peach/12_peach_thank_you_mario: + type: SAMPLE + id: 136 +samples/sfx_mario_peach/13_peach_something_special: + type: SAMPLE + id: 137 +samples/sfx_mario_peach/14_peach_bake_a_cake: + type: SAMPLE + id: 138 +samples/sfx_mario_peach/15_peach_for_mario: + type: SAMPLE + id: 139 +samples/sfx_mario_peach/16_peach_mario2: + type: SAMPLE + id: 140 +samples/sfx_terrain/00_step_default: + type: SAMPLE + id: 6 +samples/sfx_terrain/01_step_grass: + type: SAMPLE + id: 7 +samples/sfx_terrain/02_step_stone: + type: SAMPLE + id: 8 +samples/sfx_terrain/03_step_spooky: + type: SAMPLE + id: 9 +samples/sfx_terrain/04_step_snow: + type: SAMPLE + id: 10 +samples/sfx_terrain/05_step_ice: + type: SAMPLE + id: 11 +samples/sfx_terrain/06_step_metal: + type: SAMPLE + id: 12 +samples/sfx_terrain/07_step_sand: + type: SAMPLE + id: 13 +samples/sfx_water/00_plunge: + type: SAMPLE + id: 14 +samples/sfx_water/01_splash: + type: SAMPLE + id: 15 +samples/sfx_water/02_swim: + type: SAMPLE + id: 16 +sequences/00_sound_player: + type: SEQUENCE + offset: 7940880 + size: 13500 + banks: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 +sequences/01_cutscene_collect_star: + type: SEQUENCE + offset: 7954384 + size: 626 + banks: + - 34 +sequences/02_menu_title_screen: + type: SEQUENCE + offset: 7955024 + size: 8282 + banks: + - 17 +sequences/03_level_grass: + type: SEQUENCE + offset: 7963312 + size: 5131 + banks: + - 34 +sequences/04_level_inside_castle: + type: SEQUENCE + offset: 7968448 + size: 2505 + banks: + - 14 +sequences/05_level_water: + type: SEQUENCE + offset: 7970960 + size: 4788 + banks: + - 19 +sequences/06_level_hot: + type: SEQUENCE + offset: 7975760 + size: 2455 + banks: + - 15 +sequences/07_level_boss_koopa: + type: SEQUENCE + offset: 7978224 + size: 3424 + banks: + - 18 +sequences/08_level_snow: + type: SEQUENCE + offset: 7981648 + size: 8150 + banks: + - 11 +sequences/09_level_slide: + type: SEQUENCE + offset: 7989808 + size: 7445 + banks: + - 13 +sequences/0A_level_spooky: + type: SEQUENCE + offset: 7997264 + size: 5681 + banks: + - 33 + - 16 +sequences/0B_event_piranha_plant: + type: SEQUENCE + offset: 8002960 + size: 1400 + banks: + - 20 +sequences/0C_level_underground: + type: SEQUENCE + offset: 8004368 + size: 4899 + banks: + - 21 +sequences/0D_menu_star_select: + type: SEQUENCE + offset: 8009280 + size: 138 + banks: + - 22 +sequences/0E_event_powerup: + type: SEQUENCE + offset: 8009424 + size: 3137 + banks: + - 23 +sequences/0F_event_metal_cap: + type: SEQUENCE + offset: 8012576 + size: 2779 + banks: + - 24 +sequences/10_event_koopa_message: + type: SEQUENCE + offset: 8015360 + size: 558 + banks: + - 18 +sequences/11_level_koopa_road: + type: SEQUENCE + offset: 8015920 + size: 4753 + banks: + - 25 +sequences/12_event_high_score: + type: SEQUENCE + offset: 8020688 + size: 275 + banks: + - 31 +sequences/13_event_merry_go_round: + type: SEQUENCE + offset: 8020976 + size: 1660 + banks: + - 33 +sequences/14_event_race: + type: SEQUENCE + offset: 8022640 + size: 200 + banks: + - 26 +sequences/15_cutscene_star_spawn: + type: SEQUENCE + offset: 8022848 + size: 649 + banks: + - 14 +sequences/16_event_boss: + type: SEQUENCE + offset: 8023504 + size: 3444 + banks: + - 27 +sequences/17_cutscene_collect_key: + type: SEQUENCE + offset: 8026960 + size: 677 + banks: + - 26 +sequences/18_event_endless_stairs: + type: SEQUENCE + offset: 8027648 + size: 1783 + banks: + - 28 +sequences/19_level_boss_koopa_final: + type: SEQUENCE + offset: 8029440 + size: 3521 + banks: + - 29 +sequences/1A_cutscene_credits: + type: SEQUENCE + offset: 8032976 + size: 14328 + banks: + - 37 +sequences/1B_event_solve_puzzle: + type: SEQUENCE + offset: 8047312 + size: 219 + banks: + - 20 +sequences/1C_event_toad_message: + type: SEQUENCE + offset: 8047536 + size: 211 + banks: + - 32 +sequences/1D_event_peach_message: + type: SEQUENCE + offset: 8047760 + size: 436 + banks: + - 30 +sequences/1E_cutscene_intro: + type: SEQUENCE + offset: 8048208 + size: 1770 + banks: + - 27 +sequences/1F_cutscene_victory: + type: SEQUENCE + offset: 8049984 + size: 2066 + banks: + - 26 +sequences/20_cutscene_ending: + type: SEQUENCE + offset: 8052064 + size: 1887 + banks: + - 35 +sequences/21_menu_file_select: + type: SEQUENCE + offset: 8053952 + size: 786 + banks: + - 36 +sequences/22_cutscene_lakitu: + type: SEQUENCE + offset: 8054752 + size: 317 + banks: + - 27 diff --git a/assets/sm64/eu/textures.yml b/assets/sm64/eu/textures.yml new file mode 100644 index 0000000..4c01e6d --- /dev/null +++ b/assets/sm64/eu/textures.yml @@ -0,0 +1,4102 @@ +cave/hmc_textures.00000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 0 + format: RGBA16 +cave/hmc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 4096 + format: RGBA16 +cave/hmc_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 6144 + format: RGBA16 +cave/hmc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 10240 + format: RGBA16 +cave/hmc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 12288 + format: RGBA16 +cave/hmc_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 14336 + format: RGBA16 +cave/hmc_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3312784 + mio0: 18432 + format: RGBA16 +cave/hmc_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 22528 + format: RGBA16 +cave/hmc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 26624 + format: RGBA16 +cave/hmc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 28672 + format: RGBA16 +cave/hmc_textures.07800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 30720 + format: RGBA16 +cave/hmc_textures.08800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 34816 + format: RGBA16 +cave/hmc_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 38912 + format: RGBA16 +cave/hmc_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 40960 + format: RGBA16 +cave/hmc_textures.0A800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3312784 + mio0: 43008 + format: RGBA16 +cave/hmc_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3312784 + mio0: 47104 + format: IA16 +cave/hmc_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 43008 + format: IA16 +crash_screen/crash_screen_font: + type: TEXTURE + size: 252 + width: 32 + height: 63 + offset: 757168 + format: IA1 +effect/bubble.06048: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 24648 + format: RGBA16 +effect/flower.00008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 8 + format: RGBA16 +effect/flower.00808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 2056 + format: RGBA16 +effect/flower.01008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 4104 + format: RGBA16 +effect/flower.01808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 6152 + format: RGBA16 +effect/lava_bubble.02020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 8224 + format: RGBA16 +effect/lava_bubble.02820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 10272 + format: RGBA16 +effect/lava_bubble.03020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 12320 + format: RGBA16 +effect/lava_bubble.03820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 14368 + format: RGBA16 +effect/lava_bubble.04020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 16416 + format: RGBA16 +effect/lava_bubble.04820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 18464 + format: RGBA16 +effect/lava_bubble.05020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 20512 + format: RGBA16 +effect/lava_bubble.05820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3475312 + mio0: 22560 + format: RGBA16 +effect/tiny_bubble.0684C: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3475312 + mio0: 26700 + format: RGBA16 +effect/tiny_bubble.06AD8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3475312 + mio0: 27352 + format: RGBA16 +fire/lll_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 0 + format: RGBA16 +fire/lll_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 2048 + format: RGBA16 +fire/lll_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 4096 + format: RGBA16 +fire/lll_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 6144 + format: RGBA16 +fire/lll_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 8192 + format: RGBA16 +fire/lll_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 10240 + format: RGBA16 +fire/lll_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 12288 + format: RGBA16 +fire/lll_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 14336 + format: RGBA16 +fire/lll_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 16384 + format: RGBA16 +fire/lll_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 18432 + format: RGBA16 +fire/lll_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 20480 + format: RGBA16 +fire/lll_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 22528 + format: RGBA16 +fire/lll_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 24576 + format: RGBA16 +fire/lll_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 26624 + format: RGBA16 +fire/lll_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 28672 + format: RGBA16 +fire/lll_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 30720 + format: RGBA16 +fire/lll_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 32768 + format: RGBA16 +fire/lll_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 34816 + format: RGBA16 +fire/lll_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 49528 + format: RGBA16 +fire/lll_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 38912 + format: RGBA16 +fire/lll_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 40960 + format: RGBA16 +fire/lll_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 43008 + format: RGBA16 +fire/lll_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 45056 + format: RGBA16 +fire/lll_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3142672 + mio0: 47104 + format: RGBA16 +generic/bob_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 0 + format: RGBA16 +generic/bob_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1206896 + mio0: 36160 + format: RGBA16 +generic/bob_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 4096 + format: RGBA16 +generic/bob_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 6144 + format: RGBA16 +generic/bob_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 8192 + format: RGBA16 +generic/bob_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 10240 + format: RGBA16 +generic/bob_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 12288 + format: RGBA16 +generic/bob_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 14336 + format: RGBA16 +generic/bob_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 16384 + format: RGBA16 +generic/bob_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 18432 + format: RGBA16 +generic/bob_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 20480 + format: RGBA16 +generic/bob_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 22528 + format: RGBA16 +generic/bob_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3203760 + mio0: 24576 + format: RGBA16 +generic/bob_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 28672 + format: RGBA16 +generic/bob_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 30720 + format: RGBA16 +generic/bob_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 32768 + format: RGBA16 +generic/bob_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 34816 + format: RGBA16 +generic/bob_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 36864 + format: RGBA16 +generic/bob_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 38912 + format: RGBA16 +generic/bob_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 40960 + format: RGBA16 +generic/bob_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 43008 + format: RGBA16 +generic/bob_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 45056 + format: IA16 +grass/wf_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 0 + format: RGBA16 +grass/wf_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 2048 + format: RGBA16 +grass/wf_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 4096 + format: RGBA16 +grass/wf_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 6144 + format: RGBA16 +grass/wf_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 8192 + format: RGBA16 +grass/wf_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 10240 + format: RGBA16 +grass/wf_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 12288 + format: RGBA16 +grass/wf_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 14336 + format: RGBA16 +grass/wf_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 16384 + format: RGBA16 +grass/wf_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 18432 + format: RGBA16 +grass/wf_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 20480 + format: RGBA16 +grass/wf_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 22528 + format: RGBA16 +grass/wf_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 20480 + format: RGBA16 +grass/wf_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 26624 + format: RGBA16 +grass/wf_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 28672 + format: RGBA16 +grass/wf_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 30720 + format: RGBA16 +grass/wf_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 32768 + format: RGBA16 +grass/wf_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 34816 + format: RGBA16 +grass/wf_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 36864 + format: RGBA16 +grass/wf_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 38912 + format: RGBA16 +grass/wf_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 40960 + format: RGBA16 +grass/wf_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 43008 + format: RGBA16 +grass/wf_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 45056 + format: IA16 +grass/wf_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3376528 + mio0: 47104 + format: IA16 +inside/inside_castle_textures.00000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3435456 + mio0: 0 + format: RGBA16 +inside/inside_castle_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3435456 + mio0: 4096 + format: RGBA16 +inside/inside_castle_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3435456 + mio0: 8192 + format: RGBA16 +inside/inside_castle_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 12288 + format: RGBA16 +inside/inside_castle_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 14336 + format: RGBA16 +inside/inside_castle_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 16384 + format: RGBA16 +inside/inside_castle_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 2048 + format: RGBA16 +inside/inside_castle_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 20480 + format: RGBA16 +inside/inside_castle_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 22528 + format: RGBA16 +inside/inside_castle_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3435456 + mio0: 24576 + format: RGBA16 +inside/inside_castle_textures.07000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3435456 + mio0: 28672 + format: RGBA16 +inside/inside_castle_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 32768 + format: RGBA16 +inside/inside_castle_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 34816 + format: RGBA16 +inside/inside_castle_textures.09000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3435456 + mio0: 36864 + format: RGBA16 +inside/inside_castle_textures.0A000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3435456 + mio0: 40960 + format: RGBA16 +inside/inside_castle_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3435456 + mio0: 45056 + format: RGBA16 +inside/inside_castle_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3435456 + mio0: 47104 + format: RGBA16 +intro_raw/hand_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2331912 + format: RGBA16 +intro_raw/hand_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2329856 + format: RGBA16 +intro_raw/mario_face_shine: + type: TEXTURE + size: 1024 + width: 32 + height: 32 + offset: 2380496 + format: IA8 +intro_raw/red_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2333960 + format: RGBA16 +intro_raw/red_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2336008 + format: RGBA16 +intro_raw/red_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2338056 + format: RGBA16 +intro_raw/red_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2340104 + format: RGBA16 +intro_raw/red_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2342152 + format: RGBA16 +intro_raw/red_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2344200 + format: RGBA16 +intro_raw/red_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2346248 + format: RGBA16 +intro_raw/red_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2348296 + format: RGBA16 +intro_raw/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2367496 + format: RGBA16 +intro_raw/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2369544 + format: RGBA16 +intro_raw/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2371592 + format: RGBA16 +intro_raw/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2373640 + format: RGBA16 +intro_raw/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2375688 + format: RGBA16 +intro_raw/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2377736 + format: RGBA16 +intro_raw/white_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2350344 + format: RGBA16 +intro_raw/white_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2352392 + format: RGBA16 +intro_raw/white_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2354440 + format: RGBA16 +intro_raw/white_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2356488 + format: RGBA16 +intro_raw/white_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2358536 + format: RGBA16 +intro_raw/white_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2360584 + format: RGBA16 +intro_raw/white_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2362632 + format: RGBA16 +intro_raw/white_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2364680 + format: RGBA16 +ipl3_raw/ipl3_font_00: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2928 + format: IA1 +ipl3_raw/ipl3_font_01: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2951 + format: IA1 +ipl3_raw/ipl3_font_02: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2974 + format: IA1 +ipl3_raw/ipl3_font_03: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2997 + format: IA1 +ipl3_raw/ipl3_font_04: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3020 + format: IA1 +ipl3_raw/ipl3_font_05: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3043 + format: IA1 +ipl3_raw/ipl3_font_06: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3066 + format: IA1 +ipl3_raw/ipl3_font_07: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3089 + format: IA1 +ipl3_raw/ipl3_font_08: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3112 + format: IA1 +ipl3_raw/ipl3_font_09: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3135 + format: IA1 +ipl3_raw/ipl3_font_10: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3158 + format: IA1 +ipl3_raw/ipl3_font_11: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3181 + format: IA1 +ipl3_raw/ipl3_font_12: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3204 + format: IA1 +ipl3_raw/ipl3_font_13: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3227 + format: IA1 +ipl3_raw/ipl3_font_14: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3250 + format: IA1 +ipl3_raw/ipl3_font_15: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3273 + format: IA1 +ipl3_raw/ipl3_font_16: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3296 + format: IA1 +ipl3_raw/ipl3_font_17: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3319 + format: IA1 +ipl3_raw/ipl3_font_18: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3342 + format: IA1 +ipl3_raw/ipl3_font_19: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3365 + format: IA1 +ipl3_raw/ipl3_font_20: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3388 + format: IA1 +ipl3_raw/ipl3_font_21: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3411 + format: IA1 +ipl3_raw/ipl3_font_22: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3434 + format: IA1 +ipl3_raw/ipl3_font_23: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3457 + format: IA1 +ipl3_raw/ipl3_font_24: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3480 + format: IA1 +ipl3_raw/ipl3_font_25: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3503 + format: IA1 +ipl3_raw/ipl3_font_26: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3526 + format: IA1 +ipl3_raw/ipl3_font_27: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3549 + format: IA1 +ipl3_raw/ipl3_font_28: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3572 + format: IA1 +ipl3_raw/ipl3_font_29: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3595 + format: IA1 +ipl3_raw/ipl3_font_30: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3618 + format: IA1 +ipl3_raw/ipl3_font_31: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3641 + format: IA1 +ipl3_raw/ipl3_font_32: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3664 + format: IA1 +ipl3_raw/ipl3_font_33: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3687 + format: IA1 +ipl3_raw/ipl3_font_34: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3710 + format: IA1 +ipl3_raw/ipl3_font_35: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3733 + format: IA1 +ipl3_raw/ipl3_font_36: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3756 + format: IA1 +ipl3_raw/ipl3_font_37: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3779 + format: IA1 +ipl3_raw/ipl3_font_38: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3802 + format: IA1 +ipl3_raw/ipl3_font_39: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3825 + format: IA1 +ipl3_raw/ipl3_font_40: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3848 + format: IA1 +ipl3_raw/ipl3_font_41: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3871 + format: IA1 +ipl3_raw/ipl3_font_42: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3894 + format: IA1 +ipl3_raw/ipl3_font_43: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3917 + format: IA1 +ipl3_raw/ipl3_font_44: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3940 + format: IA1 +ipl3_raw/ipl3_font_45: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3963 + format: IA1 +ipl3_raw/ipl3_font_46: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3986 + format: IA1 +ipl3_raw/ipl3_font_47: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4009 + format: IA1 +ipl3_raw/ipl3_font_48: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4032 + format: IA1 +ipl3_raw/ipl3_font_49: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4055 + format: IA1 +machine/ttc_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 0 + format: RGBA16 +machine/ttc_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 2048 + format: RGBA16 +machine/ttc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 4096 + format: RGBA16 +machine/ttc_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 6144 + format: RGBA16 +machine/ttc_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 8192 + format: RGBA16 +machine/ttc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 10240 + format: RGBA16 +machine/ttc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 12288 + format: RGBA16 +machine/ttc_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 14336 + format: RGBA16 +machine/ttc_textures.04000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3340704 + mio0: 16384 + format: RGBA16 +machine/ttc_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 20480 + format: RGBA16 +machine/ttc_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 22528 + format: RGBA16 +machine/ttc_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 24576 + format: RGBA16 +machine/ttc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 26624 + format: RGBA16 +machine/ttc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 28672 + format: RGBA16 +machine/ttc_textures.07800: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 3340704 + mio0: 30720 + format: RGBA16 +machine/ttc_textures.08000: + type: TEXTURE + size: 1024 + width: 64 + height: 8 + offset: 3340704 + mio0: 32768 + format: RGBA16 +machine/ttc_textures.08400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3340704 + mio0: 33792 + format: RGBA16 +mountain/ttm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 0 + format: RGBA16 +mountain/ttm_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3353504 + mio0: 2048 + format: RGBA16 +mountain/ttm_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3353504 + mio0: 6144 + format: RGBA16 +mountain/ttm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 10240 + format: RGBA16 +mountain/ttm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 12288 + format: RGBA16 +mountain/ttm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 14336 + format: RGBA16 +mountain/ttm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 16384 + format: RGBA16 +mountain/ttm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 18432 + format: RGBA16 +mountain/ttm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 20480 + format: RGBA16 +mountain/ttm_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3353504 + mio0: 22528 + format: RGBA16 +mountain/ttm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 26624 + format: RGBA16 +mountain/ttm_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 28672 + format: RGBA16 +mountain/ttm_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 30720 + format: RGBA16 +mountain/ttm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 32768 + format: RGBA16 +mountain/ttm_textures.08800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3353504 + mio0: 34816 + format: RGBA16 +mountain/ttm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 38912 + format: RGBA16 +mountain/ttm_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 24576 + format: RGBA16 +mountain/ttm_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 43008 + format: RGBA16 +mountain/ttm_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 45056 + format: RGBA16 +mountain/ttm_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 47104 + format: RGBA16 +mountain/ttm_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3353504 + mio0: 49152 + format: RGBA16 +outside/castle_grounds_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 0 + format: RGBA16 +outside/castle_grounds_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 2048 + format: RGBA16 +outside/castle_grounds_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3407696 + mio0: 4096 + format: RGBA16 +outside/castle_grounds_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3407696 + mio0: 8192 + format: RGBA16 +outside/castle_grounds_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 12288 + format: RGBA16 +outside/castle_grounds_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 14336 + format: RGBA16 +outside/castle_grounds_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 16384 + format: RGBA16 +outside/castle_grounds_textures.04800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3407696 + mio0: 18432 + format: RGBA16 +outside/castle_grounds_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 22528 + format: RGBA16 +outside/castle_grounds_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 24576 + format: RGBA16 +outside/castle_grounds_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3407696 + mio0: 26624 + format: RGBA16 +outside/castle_grounds_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 30720 + format: RGBA16 +outside/castle_grounds_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 32768 + format: RGBA16 +outside/castle_grounds_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 34816 + format: RGBA16 +outside/castle_grounds_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 36864 + format: RGBA16 +outside/castle_grounds_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 38912 + format: RGBA16 +outside/castle_grounds_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 40960 + format: RGBA16 +outside/castle_grounds_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 43008 + format: RGBA16 +outside/castle_grounds_textures.0B000: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3407696 + mio0: 45056 + format: RGBA16 +outside/castle_grounds_textures.0B400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3407696 + mio0: 46080 + format: RGBA16 +outside/castle_grounds_textures.0BC00: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3203760 + mio0: 45056 + format: IA16 +segment2/font_graphics.05F00: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24320 + format: IA1 +segment2/font_graphics.05F10: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24336 + format: IA1 +segment2/font_graphics.05F20: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24352 + format: IA1 +segment2/font_graphics.05F30: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24368 + format: IA1 +segment2/font_graphics.05F40: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24384 + format: IA1 +segment2/font_graphics.05F50: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24400 + format: IA1 +segment2/font_graphics.05F60: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24416 + format: IA1 +segment2/font_graphics.05F70: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24432 + format: IA1 +segment2/font_graphics.05F80: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24448 + format: IA1 +segment2/font_graphics.05F90: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24464 + format: IA1 +segment2/font_graphics.05FA0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24480 + format: IA1 +segment2/font_graphics.05FB0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24496 + format: IA1 +segment2/font_graphics.05FC0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24512 + format: IA1 +segment2/font_graphics.05FD0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24528 + format: IA1 +segment2/font_graphics.05FE0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24544 + format: IA1 +segment2/font_graphics.05FF0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24560 + format: IA1 +segment2/font_graphics.06000: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24576 + format: IA1 +segment2/font_graphics.06010: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24592 + format: IA1 +segment2/font_graphics.06020: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24608 + format: IA1 +segment2/font_graphics.06030: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24624 + format: IA1 +segment2/font_graphics.06040: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24640 + format: IA1 +segment2/font_graphics.06050: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24656 + format: IA1 +segment2/font_graphics.06060: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24672 + format: IA1 +segment2/font_graphics.06070: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24688 + format: IA1 +segment2/font_graphics.06080: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24704 + format: IA1 +segment2/font_graphics.06090: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24720 + format: IA1 +segment2/font_graphics.060A0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24736 + format: IA1 +segment2/font_graphics.060B0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24752 + format: IA1 +segment2/font_graphics.060C0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24768 + format: IA1 +segment2/font_graphics.060D0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24784 + format: IA1 +segment2/font_graphics.060E0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24800 + format: IA1 +segment2/font_graphics.060F0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24816 + format: IA1 +segment2/font_graphics.06100: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24832 + format: IA1 +segment2/font_graphics.06110: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24848 + format: IA1 +segment2/font_graphics.06120: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24864 + format: IA1 +segment2/font_graphics.06130: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24880 + format: IA1 +segment2/font_graphics.06140: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24896 + format: IA1 +segment2/font_graphics.06150: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24912 + format: IA1 +segment2/font_graphics.06160: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24928 + format: IA1 +segment2/font_graphics.06170: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24944 + format: IA1 +segment2/font_graphics.06180: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24960 + format: IA1 +segment2/font_graphics.06190: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24976 + format: IA1 +segment2/font_graphics.061A0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 24992 + format: IA1 +segment2/font_graphics.061B0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25008 + format: IA1 +segment2/font_graphics.061C0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25024 + format: IA1 +segment2/font_graphics.061D0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25040 + format: IA1 +segment2/font_graphics.061E0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25056 + format: IA1 +segment2/font_graphics.061F0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25072 + format: IA1 +segment2/font_graphics.06200: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25088 + format: IA1 +segment2/font_graphics.06210: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25104 + format: IA1 +segment2/font_graphics.06220: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25120 + format: IA1 +segment2/font_graphics.06230: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25136 + format: IA1 +segment2/font_graphics.06240: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25152 + format: IA1 +segment2/font_graphics.06250: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25168 + format: IA1 +segment2/font_graphics.06260: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25184 + format: IA1 +segment2/font_graphics.06270: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25200 + format: IA1 +segment2/font_graphics.06280: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25216 + format: IA1 +segment2/font_graphics.06290: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25232 + format: IA1 +segment2/font_graphics.062A0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25248 + format: IA1 +segment2/font_graphics.062B0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25264 + format: IA1 +segment2/font_graphics.062C0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25280 + format: IA1 +segment2/font_graphics.062D0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25296 + format: IA1 +segment2/font_graphics.062E0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25312 + format: IA1 +segment2/font_graphics.062F0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25328 + format: IA1 +segment2/font_graphics.06300: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25344 + format: IA1 +segment2/font_graphics.06310: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25360 + format: IA1 +segment2/font_graphics.06320: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25376 + format: IA1 +segment2/font_graphics.06330: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25392 + format: IA1 +segment2/font_graphics.06340: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25408 + format: IA1 +segment2/font_graphics.06350: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25424 + format: IA1 +segment2/font_graphics.06360: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25440 + format: IA1 +segment2/font_graphics.06370: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25456 + format: IA1 +segment2/font_graphics.06380: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25472 + format: IA1 +segment2/font_graphics.06390: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25488 + format: IA1 +segment2/font_graphics.063A0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25504 + format: IA1 +segment2/font_graphics.063B0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25520 + format: IA1 +segment2/font_graphics.063C0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25536 + format: IA1 +segment2/font_graphics.063D0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25552 + format: IA1 +segment2/font_graphics.063E0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25568 + format: IA1 +segment2/font_graphics.063F0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25584 + format: IA1 +segment2/font_graphics.06400: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25600 + format: IA1 +segment2/font_graphics.06410: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25616 + format: IA1 +segment2/font_graphics.06420: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25632 + format: IA1 +segment2/font_graphics.06430: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25648 + format: IA1 +segment2/font_graphics.06440: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25664 + format: IA1 +segment2/font_graphics.06450: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25680 + format: IA1 +segment2/font_graphics.06460: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25696 + format: IA1 +segment2/font_graphics.06470: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25712 + format: IA1 +segment2/font_graphics.06480: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25728 + format: IA1 +segment2/font_graphics.06490: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25744 + format: IA1 +segment2/font_graphics.064A0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25760 + format: IA1 +segment2/font_graphics.064B0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25776 + format: IA1 +segment2/font_graphics.064C0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25792 + format: IA1 +segment2/font_graphics.064D0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25808 + format: IA1 +segment2/font_graphics.064E0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25824 + format: IA1 +segment2/font_graphics.064F0: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25840 + format: IA1 +segment2/font_graphics.06500: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25856 + format: IA1 +segment2/font_graphics.06510: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25872 + format: IA1 +segment2/font_graphics.06520: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25888 + format: IA1 +segment2/font_graphics.06530: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 909712 + mio0: 25904 + format: IA1 +segment2/segment2.00000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 0 + format: RGBA16 +segment2/segment2.00200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 512 + format: RGBA16 +segment2/segment2.00400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 1024 + format: RGBA16 +segment2/segment2.00600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 1536 + format: RGBA16 +segment2/segment2.00800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 2048 + format: RGBA16 +segment2/segment2.00A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 2560 + format: RGBA16 +segment2/segment2.00C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 3072 + format: RGBA16 +segment2/segment2.00E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 3584 + format: RGBA16 +segment2/segment2.01000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 4096 + format: RGBA16 +segment2/segment2.01200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 4608 + format: RGBA16 +segment2/segment2.01400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 5120 + format: RGBA16 +segment2/segment2.01600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 5632 + format: RGBA16 +segment2/segment2.01800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 6144 + format: RGBA16 +segment2/segment2.01A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 6656 + format: RGBA16 +segment2/segment2.01C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 7168 + format: RGBA16 +segment2/segment2.01E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 7680 + format: RGBA16 +segment2/segment2.02000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 8192 + format: RGBA16 +segment2/segment2.02200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 8704 + format: RGBA16 +segment2/segment2.02400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 9216 + format: RGBA16 +segment2/segment2.02800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 9728 + format: RGBA16 +segment2/segment2.02A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 10240 + format: RGBA16 +segment2/segment2.02C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 10752 + format: RGBA16 +segment2/segment2.02E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 11264 + format: RGBA16 +segment2/segment2.03000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 11776 + format: RGBA16 +segment2/segment2.03200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 12288 + format: RGBA16 +segment2/segment2.03600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 12800 + format: RGBA16 +segment2/segment2.03800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 13312 + format: RGBA16 +segment2/segment2.03A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 13824 + format: RGBA16 +segment2/segment2.03C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 14336 + format: RGBA16 +segment2/segment2.03E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 14848 + format: RGBA16 +segment2/segment2.04000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 15360 + format: RGBA16 +segment2/segment2.04400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 15872 + format: RGBA16 +segment2/segment2.04600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 16384 + format: RGBA16 +segment2/segment2.04800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 16896 + format: RGBA16 +segment2/segment2.04A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 17408 + format: RGBA16 +segment2/segment2.05000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2647072 + mio0: 41424 + format: RGBA16 +segment2/segment2.05600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 18432 + format: RGBA16 +segment2/segment2.05800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 18944 + format: RGBA16 +segment2/segment2.05A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 19456 + format: RGBA16 +segment2/segment2.05C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 19968 + format: RGBA16 +segment2/segment2.06200: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 20480 + format: RGBA16 +segment2/segment2.06280: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 20608 + format: RGBA16 +segment2/segment2.06300: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 20736 + format: RGBA16 +segment2/segment2.06380: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 20864 + format: RGBA16 +segment2/segment2.06400: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 20992 + format: RGBA16 +segment2/segment2.06480: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21120 + format: RGBA16 +segment2/segment2.06500: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21248 + format: RGBA16 +segment2/segment2.06580: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21376 + format: RGBA16 +segment2/segment2.06600: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21504 + format: RGBA16 +segment2/segment2.06680: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21632 + format: RGBA16 +segment2/segment2.06700: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21760 + format: RGBA16 +segment2/segment2.06780: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 21888 + format: RGBA16 +segment2/segment2.06800: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22016 + format: RGBA16 +segment2/segment2.06880: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22144 + format: RGBA16 +segment2/segment2.06900: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22272 + format: RGBA16 +segment2/segment2.06980: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22400 + format: RGBA16 +segment2/segment2.06A00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22528 + format: RGBA16 +segment2/segment2.06A80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22656 + format: RGBA16 +segment2/segment2.06B00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22784 + format: RGBA16 +segment2/segment2.06B80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 22912 + format: RGBA16 +segment2/segment2.06C00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23040 + format: RGBA16 +segment2/segment2.06C80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23168 + format: RGBA16 +segment2/segment2.06D00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23296 + format: RGBA16 +segment2/segment2.06D80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23424 + format: RGBA16 +segment2/segment2.06E00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23552 + format: RGBA16 +segment2/segment2.06E80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23680 + format: RGBA16 +segment2/segment2.06F00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23808 + format: RGBA16 +segment2/segment2.06F80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 23936 + format: RGBA16 +segment2/segment2.07000: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 24064 + format: RGBA16 +segment2/segment2.07080: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 24192 + format: RGBA16 +segment2/segment2.07340: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 2647072 + mio0: 44317 + format: IA1 +segment2/segment2.07B50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 25920 + format: RGBA16 +segment2/segment2.07D50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 26432 + format: RGBA16 +segment2/segment2.07F50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 26944 + format: RGBA16 +segment2/segment2.08150: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 27456 + format: RGBA16 +segment2/segment2.081D0: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 909712 + mio0: 27584 + format: RGBA16 +segment2/segment2.0F458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 909712 + mio0: 31096 + format: IA8 +segment2/segment2.0FC58: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 909712 + mio0: 33144 + format: IA8 +segment2/segment2.10458: + type: TEXTURE + size: 4096 + width: 64 + height: 64 + offset: 909712 + mio0: 35192 + format: IA8 +segment2/segment2.11458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 909712 + mio0: 39288 + format: IA8 +segment2/segment2.11C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 41336 + format: RGBA16 +segment2/segment2.12458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 43384 + format: RGBA16 +segment2/segment2.12C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 45432 + format: RGBA16 +segment2/segment2.13458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 47480 + format: IA16 +segment2/segment2.13C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 909712 + mio0: 49528 + format: RGBA16 +segment2/segment2.14838: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 909712 + mio0: 52568 + format: IA8 +segment2/segment2.umlaut: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 909712 + mio0: 17920 + format: RGBA16 +segment2/shadow_quarter_circle: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 909712 + mio0: 30584 + format: IA8 +segment2/shadow_quarter_square: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 909712 + mio0: 30840 + format: IA8 +sky/metal_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 26624 + format: RGBA16 +sky/rr_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 0 + format: RGBA16 +sky/rr_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 2048 + format: RGBA16 +sky/rr_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 4096 + format: RGBA16 +sky/rr_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 6144 + format: RGBA16 +sky/rr_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3270992 + mio0: 8192 + format: RGBA16 +sky/rr_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 12288 + format: RGBA16 +sky/rr_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3270992 + mio0: 14336 + format: RGBA16 +sky/rr_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 18432 + format: RGBA16 +sky/rr_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 20480 + format: RGBA16 +sky/rr_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 22528 + format: RGBA16 +sky/rr_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 24576 + format: RGBA16 +sky/rr_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 28672 + format: RGBA16 +sky/rr_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 30720 + format: RGBA16 +sky/rr_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3270992 + mio0: 32768 + format: RGBA16 +skyboxes/bbh: + type: BLOB + size: 84288 + offset: 2999280 + mio0: 0 +skyboxes/bidw: + type: BLOB + size: 131392 + offset: 3026704 + mio0: 0 +skyboxes/bitfs: + type: BLOB + size: 102720 + offset: 2822784 + mio0: 0 +skyboxes/bits: + type: BLOB + size: 131392 + offset: 3072256 + mio0: 0 +skyboxes/ccm: + type: BLOB + size: 131392 + offset: 2728272 + mio0: 0 +skyboxes/cloud_floor: + type: BLOB + size: 131392 + offset: 2919104 + mio0: 0 +skyboxes/clouds: + type: BLOB + size: 84288 + offset: 2786832 + mio0: 0 +skyboxes/ssl: + type: BLOB + size: 131392 + offset: 2959136 + mio0: 0 +skyboxes/water: + type: BLOB + size: 131392 + offset: 2676976 + mio0: 0 +skyboxes/wdw: + type: BLOB + size: 131392 + offset: 2848560 + mio0: 0 +snow/ccm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 0 + format: RGBA16 +snow/ccm_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 2048 + format: RGBA16 +snow/ccm_textures.01000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3285888 + mio0: 4096 + format: RGBA16 +snow/ccm_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 8192 + format: RGBA16 +snow/ccm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 10240 + format: RGBA16 +snow/ccm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 12288 + format: RGBA16 +snow/ccm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 14336 + format: RGBA16 +snow/ccm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 16384 + format: RGBA16 +snow/ccm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 18432 + format: RGBA16 +snow/ccm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 20480 + format: RGBA16 +snow/ccm_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 22528 + format: RGBA16 +snow/ccm_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 24576 + format: RGBA16 +snow/ccm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 26624 + format: RGBA16 +snow/ccm_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3285888 + mio0: 28672 + format: RGBA16 +snow/ccm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 32768 + format: RGBA16 +snow/ccm_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 34816 + format: RGBA16 +snow/ccm_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 36864 + format: IA16 +snow/ccm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3285888 + mio0: 38912 + format: IA16 +spooky/bbh_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 0 + format: RGBA16 +spooky/bbh_textures.00800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 2048 + format: RGBA16 +spooky/bbh_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 6144 + format: RGBA16 +spooky/bbh_textures.02800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 10240 + format: RGBA16 +spooky/bbh_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 14336 + format: RGBA16 +spooky/bbh_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 18432 + format: RGBA16 +spooky/bbh_textures.05000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 20480 + format: RGBA16 +spooky/bbh_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 24576 + format: RGBA16 +spooky/bbh_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 26624 + format: RGBA16 +spooky/bbh_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3178624 + mio0: 28672 + format: RGBA16 +spooky/bbh_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 32768 + format: RGBA16 +spooky/bbh_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 34816 + format: RGBA16 +spooky/bbh_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3178624 + mio0: 36864 + format: RGBA16 +spooky/bbh_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1341504 + mio0: 49800 + format: RGBA16 +spooky/bbh_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 43008 + format: IA16 +spooky/bbh_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3178624 + mio0: 45056 + format: IA16 +spooky/bbh_textures.0B800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3178624 + mio0: 47104 + format: IA16 +title_screen_bg/title_screen_bg.001C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 448 + format: RGBA16 +title_screen_bg/title_screen_bg.00E40: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 3648 + format: RGBA16 +title_screen_bg/title_screen_bg.01AC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 6848 + format: RGBA16 +title_screen_bg/title_screen_bg.02740: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 10048 + format: RGBA16 +title_screen_bg/title_screen_bg.033C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 13248 + format: RGBA16 +title_screen_bg/title_screen_bg.04040: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 16448 + format: RGBA16 +title_screen_bg/title_screen_bg.04CC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 19648 + format: RGBA16 +title_screen_bg/title_screen_bg.05940: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2426672 + mio0: 22848 + format: RGBA16 +water/jrb_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3235184 + mio0: 0 + format: RGBA16 +water/jrb_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 2048 + format: RGBA16 +water/jrb_textures.01800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 6144 + format: RGBA16 +water/jrb_textures.02800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 10240 + format: RGBA16 +water/jrb_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 14336 + format: RGBA16 +water/jrb_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 18432 + format: RGBA16 +water/jrb_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3235184 + mio0: 22528 + format: RGBA16 +water/jrb_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3235184 + mio0: 24576 + format: RGBA16 +water/jrb_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 26624 + format: RGBA16 +water/jrb_textures.07800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 30720 + format: RGBA16 +water/jrb_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3235184 + mio0: 34816 + format: RGBA16 +water/jrb_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 36864 + format: RGBA16 +water/jrb_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3235184 + mio0: 40960 + format: RGBA16 +water/jrb_textures.0A800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 43008 + format: RGBA16 +water/jrb_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3235184 + mio0: 47104 + format: RGBA16 diff --git a/assets/sm64/jp/actors.yml b/assets/sm64/jp/actors.yml new file mode 100644 index 0000000..68ae8d9 --- /dev/null +++ b/assets/sm64/jp/actors.yml @@ -0,0 +1,3704 @@ +amp/amp_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 6936 + format: RGBA16 +amp/amp_electricity: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2032944 + mio0: 3864 + format: RGBA16 +amp/amp_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 4888 + format: RGBA16 +amp/amp_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 8984 + format: RGBA16 +blue_coin_switch/blue_coin_switch_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 2032944 + mio0: 24 + format: RGBA16 +blue_coin_switch/blue_coin_switch_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 1048 + format: RGBA16 +blue_fish/blue_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 112096 + format: RGBA16 +bobomb/bob-omb_buddy_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 120 + format: RGBA16 +bobomb/bob-omb_buddy_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 4216 + format: RGBA16 +bobomb/bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 18552 + format: RGBA16 +bobomb/bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 20600 + format: RGBA16 +bobomb/bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 121440 + format: RGBA16 +bobomb/bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 125536 + format: RGBA16 +bomb/bomb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 359104 + format: RGBA16 +bomb/bomb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 363200 + format: RGBA16 +bomb/bomb_spike: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 367296 + format: RGBA16 +boo/boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1462368 + mio0: 39744 + format: RGBA16 +boo/boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 43840 + format: RGBA16 +boo_castle/bbh_boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1462368 + mio0: 39744 + format: RGBA16 +boo_castle/bbh_boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 43840 + format: RGBA16 +book/book_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 4192 + format: RGBA16 +bookend/bookend_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 4192 + format: RGBA16 +bookend/bookend_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 2144 + format: RGBA16 +bookend/bookend_pages: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 3168 + format: RGBA16 +bookend/bookend_spine: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 96 + format: RGBA16 +bookend/bookend_tooth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 1120 + format: RGBA16 +bowser/bowser_armband: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 146488 + format: RGBA16 +bowser/bowser_armband_spike: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 142392 + format: RGBA16 +bowser/bowser_blue_eye_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 156728 + format: RGBA16 +bowser/bowser_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 140344 + format: RGBA16 +bowser/bowser_chest: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 152632 + format: RGBA16 +bowser/bowser_claw_edge: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 171064 + format: RGBA16 +bowser/bowser_claw_horn_angle: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 179256 + format: RGBA16 +bowser/bowser_claw_horn_tooth: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 175160 + format: RGBA16 +bowser/bowser_eye_center_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_center_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_far_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_far_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_half_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_half_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_right_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 199736 + format: RGBA16 +bowser/bowser_eye_right_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 199736 + format: RGBA16 +bowser/bowser_eyebrow: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 130104 + format: RGBA16 +bowser/bowser_hair: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 166968 + format: RGBA16 +bowser/bowser_mouth_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 160824 + format: RGBA16 +bowser/bowser_muzzle: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 134200 + format: RGBA16 +bowser/bowser_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1599504 + mio0: 136248 + format: RGBA16 +bowser/bowser_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 128056 + format: RGBA16 +bowser/bowser_shell_edge: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 154680 + format: RGBA16 +bowser/bowser_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 148536 + format: RGBA16 +bowser/bowser_upper_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 164920 + format: RGBA16 +bowser_flame/bowser_flame_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 0 + format: RGBA16 +bowser_flame/bowser_flame_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 8192 + format: RGBA16 +bowser_flame/bowser_flame_10: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 81920 + format: RGBA16 +bowser_flame/bowser_flame_11: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 90112 + format: RGBA16 +bowser_flame/bowser_flame_12: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 98304 + format: RGBA16 +bowser_flame/bowser_flame_13: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 106496 + format: RGBA16 +bowser_flame/bowser_flame_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 16384 + format: RGBA16 +bowser_flame/bowser_flame_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 24576 + format: RGBA16 +bowser_flame/bowser_flame_4: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 32768 + format: RGBA16 +bowser_flame/bowser_flame_5: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 40960 + format: RGBA16 +bowser_flame/bowser_flame_6: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 49152 + format: RGBA16 +bowser_flame/bowser_flame_7: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 57344 + format: RGBA16 +bowser_flame/bowser_flame_8: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 65536 + format: RGBA16 +bowser_flame/bowser_flame_9: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 73728 + format: RGBA16 +breakable_box/cork_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 74384 + format: RGBA16 +breakable_box/crazy_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 72336 + format: RGBA16 +bub/bub_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 5128 + format: RGBA16 +bub/bub_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 1032 + format: RGBA16 +bub/bub_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 7176 + format: RGBA16 +bub/bub_scales: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 9224 + format: RGBA16 +bubba/bubba_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 5128 + format: RGBA16 +bubba/bubba_eyes_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 1032 + format: RGBA16 +bubba/bubba_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 7176 + format: RGBA16 +bubba/bubba_scales: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1568640 + mio0: 9224 + format: RGBA16 +bubba/bubba_sunglasses: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1568640 + mio0: 8 + format: RGBA16 +bubble/bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 118112 + format: RGBA16 +bubble/mr_i_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 120160 + format: RGBA16 +bullet_bill/bullet_bill_eye: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1215456 + mio0: 47784 + format: RGBA16 +bullet_bill/bullet_bill_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1215456 + mio0: 51880 + format: RGBA16 +bully/bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1249376 + mio0: 9320 + format: RGBA16 +bully/bully_horn: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1249376 + mio0: 224 + format: RGBA16 +bully/bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1249376 + mio0: 1128 + format: RGBA16 +bully/bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1249376 + mio0: 5224 + format: RGBA16 +burn_smoke/burn_smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 137216 + format: IA16 +butterfly/butterfly_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 17320 + format: RGBA16 +cannon_barrel/cannon_barrel: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 22696 + format: RGBA16 +cannon_base/cannon_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 18872 + format: RGBA16 +cannon_lid/cannon_lid: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 16472 + format: RGBA16 +capswitch/cap_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 1457744 + mio0: 11336 + format: RGBA16 +capswitch/cap_switch_head: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1457744 + mio0: 7240 + format: IA16 +chain_ball/chain_ball: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 133864 + format: RGBA16 +chain_chomp/chain_chomp_bright_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 136144 + format: RGBA16 +chain_chomp/chain_chomp_dull_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 138192 + format: RGBA16 +chain_chomp/chain_chomp_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 144336 + format: RGBA16 +chain_chomp/chain_chomp_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 140240 + format: RGBA16 +chain_chomp/chain_chomp_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 27376 + format: RGBA16 +chair/chair_bottom: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 16480 + format: RGBA16 +chair/chair_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 12384 + format: RGBA16 +chair/chair_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 14432 + format: RGBA16 +chair/chair_surface_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 17504 + format: RGBA16 +checkerboard_platform/checkerboard_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 52288 + format: RGBA16 +checkerboard_platform/checkerboard_platform_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 2032944 + mio0: 51264 + format: RGBA16 +chillychief/chill_bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1249376 + mio0: 9320 + format: RGBA16 +chillychief/chill_bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1979680 + mio0: 96 + format: RGBA16 +chillychief/chill_bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1979680 + mio0: 4192 + format: RGBA16 +chuckya/chuckya_body_arm_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 32632 + format: RGBA16 +chuckya/chuckya_body_arm_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 36728 + format: RGBA16 +chuckya/chuckya_eyes: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 26488 + format: RGBA16 +chuckya/chuckya_hand_antenna: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 30584 + format: RGBA16 +clam_shell/clam_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 48 + format: RGBA16 +clam_shell/clam_shell_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 2096 + format: RGBA16 +coin/coin_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 22400 + format: IA16 +coin/coin_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 26496 + format: IA16 +coin/coin_tilt_left: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 28544 + format: IA16 +coin/coin_tilt_right: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 24448 + format: IA16 +cyan_fish/cyan_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 54376 + format: RGBA16 +dirt/dirt_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2094912 + mio0: 179704 + format: RGBA16 +door/bbh_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 66832 + format: RGBA16 +door/bbh_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 70928 + format: RGBA16 +door/door_lock: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2094912 + mio0: 79120 + format: RGBA16 +door/hmc_mural_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 60688 + format: RGBA16 +door/hmc_mural_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 64784 + format: RGBA16 +door/metal_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 54544 + format: RGBA16 +door/metal_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 58640 + format: RGBA16 +door/one_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 75024 + format: RGBA16 +door/polished_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 40208 + format: RGBA16 +door/polished_wooden_door_overlay: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 44304 + format: RGBA16 +door/rough_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 48400 + format: RGBA16 +door/rough_wooden_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 52496 + format: RGBA16 +door/three_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 77072 + format: RGBA16 +door/zero_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 72976 + format: RGBA16 +dorrie/dorrie_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1991184 + mio0: 39840 + format: RGBA16 +dorrie/dorrie_skin: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1991184 + mio0: 40352 + format: RGBA16 +dorrie/dorrie_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 140240 + format: RGBA16 +exclamation_box/exclamation_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 95784 + format: RGBA16 +exclamation_box/exclamation_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2032944 + mio0: 97832 + format: RGBA16 +exclamation_box/metal_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 83496 + format: RGBA16 +exclamation_box/metal_cap_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2032944 + mio0: 85544 + format: RGBA16 +exclamation_box/vanish_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 77352 + format: RGBA16 +exclamation_box/vanish_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 79400 + format: RGBA16 +exclamation_box/wing_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 89640 + format: RGBA16 +exclamation_box/wing_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 91688 + format: RGBA16 +exclamation_box_outline/exclamation_box_outline: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 151912 + format: RGBA16 +exclamation_box_outline/exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2032944 + mio0: 154240 + format: RGBA16 +explosion/explosion_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 2568 + format: RGBA16 +explosion/explosion_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 4616 + format: RGBA16 +explosion/explosion_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 6664 + format: RGBA16 +explosion/explosion_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 8712 + format: RGBA16 +explosion/explosion_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 10760 + format: RGBA16 +explosion/explosion_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 12808 + format: RGBA16 +explosion/explosion_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 14856 + format: RGBA16 +eyerok/eyerok_bricks: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 36160 + format: RGBA16 +eyerok/eyerok_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 44352 + format: RGBA16 +eyerok/eyerok_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 42304 + format: RGBA16 +eyerok/eyerok_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 40256 + format: RGBA16 +eyerok/eyerok_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 38208 + format: RGBA16 +flame/flame_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 95008 + format: IA16 +flame/flame_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 97056 + format: IA16 +flame/flame_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 99104 + format: IA16 +flame/flame_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 101152 + format: IA16 +flame/flame_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 103200 + format: IA16 +flame/flame_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 105248 + format: IA16 +flame/flame_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 107296 + format: IA16 +flame/flame_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 109344 + format: IA16 +flyguy/flyguy_cloth_wrinkle: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2032944 + mio0: 57480 + format: RGBA16 +flyguy/flyguy_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 61576 + format: RGBA16 +flyguy/flyguy_propeller: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 63624 + format: IA16 +fwoosh/fwoosh_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 88072 + format: IA16 +goomba/goomba_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 103728 + format: RGBA16 +goomba/goomba_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 105776 + format: RGBA16 +goomba/goomba_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 107824 + format: RGBA16 +haunted_cage/bbh_cage_bars: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 55944 + format: RGBA16 +haunted_cage/bbh_cage_double_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 51848 + format: RGBA16 +haunted_cage/bbh_cage_floor: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 49800 + format: RGBA16 +haunted_cage/bbh_cage_garbage: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 57992 + format: RGBA16 +haunted_cage/bbh_cage_ornament: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 53896 + format: RGBA16 +haunted_cage/bbh_cage_wooden_base: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 54920 + format: RGBA16 +heart/spinning_heart: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2032944 + mio0: 55264 + format: RGBA16 +heave_ho/heave-ho_arm_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 68040 + format: RGBA16 +heave_ho/heave-ho_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 59848 + format: RGBA16 +heave_ho/heave-ho_logo: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1215456 + mio0: 63944 + format: RGBA16 +heave_ho/heave-ho_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 61896 + format: RGBA16 +heave_ho/heave-ho_roller: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1215456 + mio0: 70088 + format: RGBA16 +heave_ho/heave-ho_turnkey: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 70600 + format: RGBA16 +hoot/hoot_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 2592 + format: RGBA16 +hoot/hoot_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 7760 + format: RGBA16 +hoot/hoot_wing_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 9808 + format: RGBA16 +impact_ring/impact_ring_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 117328 + format: IA16 +impact_ring/impact_ring_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 121424 + format: IA16 +impact_smoke/impact_smoke_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 371240 + format: IA16 +impact_smoke/impact_smoke_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 379432 + format: IA16 +impact_smoke/impact_smoke_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 387624 + format: IA16 +impact_smoke/impact_smoke_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1599504 + mio0: 395816 + format: IA16 +king_bobomb/bob-omb_buddy_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1257760 + mio0: 25720 + format: RGBA16 +king_bobomb/bob-omb_buddy_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 120 + format: RGBA16 +king_bobomb/bob-omb_buddy_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 4216 + format: RGBA16 +king_bobomb/king_bob-omb_arm: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 8312 + format: RGBA16 +king_bobomb/king_bob-omb_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1257760 + mio0: 10360 + format: RGBA16 +king_bobomb/king_bob-omb_crown_rim: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1257760 + mio0: 24696 + format: RGBA16 +king_bobomb/king_bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 18552 + format: RGBA16 +king_bobomb/king_bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 20600 + format: RGBA16 +king_bobomb/king_bob-omb_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 22648 + format: RGBA16 +king_bobomb/king_bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 33912 + format: RGBA16 +king_bobomb/king_bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1257760 + mio0: 38008 + format: RGBA16 +klepto/klepto_beak: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1327760 + mio0: 4104 + format: RGBA16 +klepto/klepto_chest_tuft: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 8 + format: RGBA16 +klepto/klepto_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 2056 + format: RGBA16 +klepto/klepto_wing: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1327760 + mio0: 8200 + format: RGBA16 +klepto/klepto_wing_flap: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 12296 + format: RGBA16 +koopa/koopa_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 22088 + format: RGBA16 +koopa/koopa_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 20040 + format: RGBA16 +koopa/koopa_eyes_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 17992 + format: RGBA16 +koopa/koopa_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1844608 + mio0: 24136 + format: RGBA16 +koopa/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 11848 + format: RGBA16 +koopa/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 9800 + format: RGBA16 +koopa/koopa_shell_front_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 15944 + format: RGBA16 +koopa/koopa_shoe: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 13896 + format: RGBA16 +koopa_flag/koopa_flag_banner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 72 + format: RGBA16 +koopa_shell/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 11848 + format: RGBA16 +koopa_shell/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 9800 + format: RGBA16 +lakitu_cameraman/lakitu_camera_lens: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1926752 + mio0: 14336 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 60640 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 66784 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 62688 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 72928 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 70880 + format: RGBA16 +lakitu_enemy/lakitu_enemy_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 60640 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 66784 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1568640 + mio0: 62688 + format: RGBA16 +lakitu_enemy/lakitu_enemy_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 72928 + format: RGBA16 +lakitu_enemy/lakitu_enemy_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 70880 + format: RGBA16 +leaves/leaf: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2094912 + mio0: 117728 + format: RGBA16 +mad_piano/mad_piano_body: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 29424 + format: RGBA16 +mad_piano/mad_piano_keys: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 32496 + format: RGBA16 +mad_piano/mad_piano_keys_corner: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 30448 + format: RGBA16 +mad_piano/mad_piano_keys_edge: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1462368 + mio0: 33520 + format: RGBA16 +mad_piano/mad_piano_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1462368 + mio0: 31472 + format: RGBA16 +mad_piano/mad_piano_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 27376 + format: RGBA16 +manta/manta_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 12192 + format: RGBA16 +manta/manta_fin_corner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 6048 + format: RGBA16 +manta/manta_fin_edge: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1285392 + mio0: 14240 + format: RGBA16 +manta/manta_gills: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1285392 + mio0: 8096 + format: RGBA16 +mario/mario_eyes_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 12432 + format: RGBA16 +mario/mario_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_dead: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 30864 + format: RGBA16 +mario/mario_eyes_down_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 28816 + format: RGBA16 +mario/mario_eyes_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 14480 + format: RGBA16 +mario/mario_eyes_left_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 22672 + format: RGBA16 +mario/mario_eyes_right_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 24720 + format: RGBA16 +mario/mario_eyes_up_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 26768 + format: RGBA16 +mario/mario_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 6288 + format: RGBA16 +mario/mario_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1125200 + mio0: 144 + format: RGBA16 +mario/mario_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 45200 + format: RGBA16 +mario/mario_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 41104 + format: RGBA16 +mario/mario_mustache: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 10384 + format: RGBA16 +mario/mario_overalls_button: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 4240 + format: RGBA16 +mario/mario_sideburn: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 8336 + format: RGBA16 +mario/mario_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 32912 + format: RGBA16 +mario/mario_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 37008 + format: RGBA16 +mario_cap/mario_cap_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 6288 + format: RGBA16 +mario_cap/mario_cap_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1125200 + mio0: 144 + format: RGBA16 +mario_cap/mario_cap_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 45200 + format: RGBA16 +mario_cap/mario_cap_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 41104 + format: RGBA16 +mario_cap/mario_cap_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 32912 + format: RGBA16 +mario_cap/mario_cap_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 37008 + format: RGBA16 +metal_box/metal_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2032944 + mio0: 145816 + format: RGBA16 +mips/mips_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1926752 + mio0: 64384 + format: RGBA16 +mist/mist: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 128 + format: IA16 +moneybag/moneybag_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1979680 + mio0: 18864 + format: RGBA16 +moneybag/moneybag_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1979680 + mio0: 14768 + format: RGBA16 +monty_mole/monty_mole_cheek: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 2416 + format: RGBA16 +monty_mole/monty_mole_claw: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 10608 + format: RGBA16 +monty_mole/monty_mole_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 4464 + format: RGBA16 +monty_mole/monty_mole_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 6512 + format: RGBA16 +monty_mole/monty_mole_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 8560 + format: RGBA16 +monty_mole_hole/monty_mole_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 64 + format: IA16 +mr_i_eyeball/mr_i_eyeball_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1991184 + mio0: 128 + format: RGBA16 +mr_i_eyeball/mr_i_eyeball_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1991184 + mio0: 4224 + format: RGBA16 +mr_i_iris/mr_i_iris_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 14704 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 12656 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 10608 + format: RGBA16 +mr_i_iris/mr_i_iris_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 8560 + format: RGBA16 +mushroom_1up/1-up_mushroom: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 169512 + format: RGBA16 +peach/peach_chest_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 11304 + format: RGBA16 +peach/peach_crown_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 10792 + format: RGBA16 +peach/peach_dress: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 16424 + format: RGBA16 +peach/peach_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 8744 + format: RGBA16 +peach/peach_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 6696 + format: RGBA16 +peach/peach_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 4648 + format: RGBA16 +peach/peach_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 2600 + format: RGBA16 +peach/peach_lips: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 13864 + format: RGBA16 +peach/peach_lips_scrunched: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1490032 + mio0: 11816 + format: RGBA16 +peach/peach_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 15912 + format: RGBA16 +pebble/pebble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 115456 + format: RGBA16 +penguin/penguin_beak: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 21984 + format: RGBA16 +penguin/penguin_eye_angry: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 17888 + format: RGBA16 +penguin/penguin_eye_angry_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 19936 + format: RGBA16 +penguin/penguin_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 15840 + format: RGBA16 +penguin/penguin_eye_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 13792 + format: RGBA16 +penguin/penguin_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 11744 + format: RGBA16 +piranha_plant/piranha_plant_bottom_lip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 78840 + format: RGBA16 +piranha_plant/piranha_plant_leaf: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1844608 + mio0: 82936 + format: RGBA16 +piranha_plant/piranha_plant_skin: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 74744 + format: RGBA16 +piranha_plant/piranha_plant_stem: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 76792 + format: RGBA16 +piranha_plant/piranha_plant_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 148536 + format: RGBA16 +piranha_plant/piranha_plant_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 80888 + format: RGBA16 +pokey/pokey_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 75896 + format: RGBA16 +pokey/pokey_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 71504 + format: RGBA16 +pokey/pokey_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 73552 + format: RGBA16 +poundable_pole/poundable_pole_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 6224 + format: RGBA16 +poundable_pole/poundable_pole_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 4176 + format: RGBA16 +power_meter/power_meter_five_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 158688 + format: RGBA16 +power_meter/power_meter_four_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 160736 + format: RGBA16 +power_meter/power_meter_full: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 152544 + format: RGBA16 +power_meter/power_meter_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 144352 + format: RGBA16 +power_meter/power_meter_one_segment: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 166880 + format: RGBA16 +power_meter/power_meter_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 148448 + format: RGBA16 +power_meter/power_meter_seven_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 154592 + format: RGBA16 +power_meter/power_meter_six_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 156640 + format: RGBA16 +power_meter/power_meter_three_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 162784 + format: RGBA16 +power_meter/power_meter_two_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 164832 + format: RGBA16 +purple_switch/purple_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 2032944 + mio0: 49320 + format: RGBA16 +purple_switch/purple_switch_exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2032944 + mio0: 49448 + format: RGBA16 +sand/sand_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2094912 + mio0: 178896 + format: RGBA16 +scuttlebug/scuttlebug_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 65800 + format: RGBA16 +scuttlebug/scuttlebug_iris: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 76040 + format: RGBA16 +scuttlebug/scuttlebug_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1991184 + mio0: 67848 + format: RGBA16 +scuttlebug/scuttlebug_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 78088 + format: RGBA16 +scuttlebug/scuttlebug_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1991184 + mio0: 71944 + format: RGBA16 +seaweed/seaweed_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 38416 + format: RGBA16 +seaweed/seaweed_lower_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 36368 + format: RGBA16 +seaweed/seaweed_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 32272 + format: RGBA16 +seaweed/seaweed_upper_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 34320 + format: RGBA16 +skeeter/skeeter_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 144 + format: RGBA16 +skeeter/skeeter_iris: + type: TEXTURE + size: 256 + width: 16 + height: 8 + offset: 1802256 + mio0: 2192 + format: RGBA16 +smoke/smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 29376 + format: IA16 +snowman/mr_blizzard_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 46192 + format: RGBA16 +snowman/mr_blizzard_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1436272 + mio0: 38000 + format: RGBA16 +snowman/mr_blizzard_mitten: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 35952 + format: RGBA16 +snowman/mr_blizzard_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 48240 + format: RGBA16 +snowman/mr_blizzard_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1436272 + mio0: 42096 + format: RGBA16 +snufit/snufit_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 28896 + format: RGBA16 +snufit/snufit_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 30944 + format: RGBA16 +snufit/snufit_mask_strap: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1991184 + mio0: 32992 + format: RGBA16 +snufit/snufit_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 34016 + format: RGBA16 +sparkle/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 160912 + format: RGBA16 +sparkle/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 162960 + format: RGBA16 +sparkle/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 165008 + format: RGBA16 +sparkle/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 167056 + format: RGBA16 +sparkle/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 169104 + format: RGBA16 +sparkle/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 171152 + format: RGBA16 +sparkle_animation/sparkle_animation_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 207496 + format: IA16 +sparkle_animation/sparkle_animation_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 209544 + format: IA16 +sparkle_animation/sparkle_animation_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 211592 + format: IA16 +sparkle_animation/sparkle_animation_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 213640 + format: IA16 +sparkle_animation/sparkle_animation_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 215688 + format: IA16 +spindrift/spindrift_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 1744 + format: RGBA16 +spindrift/spindrift_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 7888 + format: RGBA16 +spindrift/spindrift_leaf: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 5840 + format: RGBA16 +spindrift/spindrift_petal: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 3792 + format: RGBA16 +springboard/springboard_base_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1457744 + mio0: 2072 + format: RGBA16 +springboard/springboard_top_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1457744 + mio0: 24 + format: RGBA16 +star/star_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 31280 + format: RGBA16 +star/star_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 173808 + format: RGBA16 +stomp_smoke/stomp_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 139592 + format: IA16 +stomp_smoke/stomp_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 141640 + format: IA16 +stomp_smoke/stomp_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 143688 + format: IA16 +stomp_smoke/stomp_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 145736 + format: IA16 +stomp_smoke/stomp_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 147784 + format: IA16 +stomp_smoke/stomp_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 149832 + format: IA16 +sushi/sushi_eye: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1285392 + mio0: 38608 + format: RGBA16 +sushi/sushi_snout: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 36560 + format: RGBA16 +sushi/sushi_tooth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1285392 + mio0: 39632 + format: RGBA16 +swoop/swoop_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 17008 + format: RGBA16 +swoop/swoop_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 19056 + format: RGBA16 +swoop/swoop_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 21104 + format: RGBA16 +swoop/swoop_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1991184 + mio0: 23152 + format: RGBA16 +thwomp/thwomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1215456 + mio0: 39168 + format: RGBA16 +thwomp/thwomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 43264 + format: RGBA16 +toad/toad_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1926752 + mio0: 22816 + format: RGBA16 +toad/toad_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1926752 + mio0: 24864 + format: RGBA16 +tornado/tornado: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1285392 + mio0: 75848 + format: IA16 +treasure_chest/treasure_chest_front: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1802256 + mio0: 87976 + format: RGBA16 +treasure_chest/treasure_chest_lock: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 81832 + format: RGBA16 +treasure_chest/treasure_chest_lock_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 85928 + format: RGBA16 +treasure_chest/treasure_chest_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1802256 + mio0: 83880 + format: RGBA16 +tree/palm_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 205336 + format: RGBA16 +tree/pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 196448 + format: RGBA16 +tree/snowy_pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 200776 + format: RGBA16 +tree/tree_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 187944 + format: RGBA16 +tree/tree_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 192040 + format: RGBA16 +ukiki/ukiki_butt: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 39872 + format: RGBA16 +ukiki/ukiki_face: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1377744 + mio0: 31680 + format: RGBA16 +ukiki/ukiki_face_blink: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1377744 + mio0: 35776 + format: RGBA16 +ukiki/ukiki_fur: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1377744 + mio0: 41920 + format: RGBA16 +unagi/unagi_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 44832 + format: RGBA16 +unagi/unagi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1285392 + mio0: 46880 + format: RGBA16 +unagi/unagi_head_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 47392 + format: RGBA16 +unagi/unagi_mouth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1285392 + mio0: 49952 + format: RGBA16 +unagi/unagi_tail: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1285392 + mio0: 50080 + format: RGBA16 +unagi/unagi_tooth: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1285392 + mio0: 49440 + format: RGBA16 +walk_smoke/walk_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 122528 + format: IA16 +walk_smoke/walk_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 124576 + format: IA16 +walk_smoke/walk_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 126624 + format: IA16 +walk_smoke/walk_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 128672 + format: IA16 +walk_smoke/walk_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 130720 + format: IA16 +walk_smoke/walk_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 132768 + format: IA16 +walk_smoke/walk_smoke_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 134816 + format: IA16 +warp_pipe/warp_pipe_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2094912 + mio0: 32320 + format: RGBA16 +warp_pipe/warp_pipe_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 37224 + format: RGBA16 +water_bubble/water_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1257760 + mio0: 65152 + format: RGBA16 +water_mine/water_mine_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 359104 + format: RGBA16 +water_mine/water_mine_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1599504 + mio0: 363200 + format: RGBA16 +water_mine/water_mine_spike_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1599504 + mio0: 367296 + format: RGBA16 +water_ring/water_ring: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1802256 + mio0: 74624 + format: RGBA16 +water_splash/water_splash_0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 173512 + format: RGBA16 +water_splash/water_splash_1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 177608 + format: RGBA16 +water_splash/water_splash_2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 181704 + format: RGBA16 +water_splash/water_splash_3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 185800 + format: RGBA16 +water_splash/water_splash_4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 189896 + format: RGBA16 +water_splash/water_splash_5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 193992 + format: RGBA16 +water_splash/water_splash_6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 198088 + format: RGBA16 +water_splash/water_splash_7: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1125200 + mio0: 202184 + format: RGBA16 +water_wave/water_wave_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 152408 + format: IA16 +water_wave/water_wave_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 154456 + format: IA16 +water_wave/water_wave_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 156504 + format: IA16 +water_wave/water_wave_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1125200 + mio0: 158552 + format: IA16 +whirlpool/whirlpool: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1285392 + mio0: 75848 + format: IA16 +white_particle/snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2094912 + mio0: 181920 + format: RGBA16 +white_particle_small/small_snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1125200 + mio0: 206720 + format: RGBA16 +whomp/whomp_back: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1844608 + mio0: 115552 + format: RGBA16 +whomp/whomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1844608 + mio0: 119648 + format: RGBA16 +whomp/whomp_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 123744 + format: RGBA16 +whomp/whomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1844608 + mio0: 125792 + format: RGBA16 +wiggler/wiggler_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 31280 + format: RGBA16 +wiggler/wiggler_flower: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 33328 + format: RGBA16 +wiggler/wiggler_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1568640 + mio0: 35376 + format: RGBA16 +wiggler/wiggler_nose_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1568640 + mio0: 37424 + format: RGBA16 +wiggler/wiggler_nose_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1568640 + mio0: 41520 + format: RGBA16 +wiggler/wiggler_segment_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1568640 + mio0: 23088 + format: RGBA16 +wiggler/wiggler_segment_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1568640 + mio0: 27184 + format: RGBA16 +wooden_signpost/wooden_signpost_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 182728 + format: RGBA16 +wooden_signpost/wooden_signpost_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2094912 + mio0: 184776 + format: RGBA16 +yellow_sphere/yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 64 + format: RGBA16 +yellow_sphere_small/small_yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 64 + format: RGBA16 +yoshi/yoshi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 115872 + format: RGBA16 +yoshi/yoshi_eye_blink: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 116384 + format: RGBA16 +yoshi/yoshi_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1490032 + mio0: 116896 + format: RGBA16 +yoshi_egg/yoshi_egg_0_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 22456 + format: RGBA16 +yoshi_egg/yoshi_egg_1_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 24504 + format: RGBA16 +yoshi_egg/yoshi_egg_2_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 26552 + format: RGBA16 +yoshi_egg/yoshi_egg_3_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 28600 + format: RGBA16 +yoshi_egg/yoshi_egg_4_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 30648 + format: RGBA16 +yoshi_egg/yoshi_egg_5_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 32696 + format: RGBA16 +yoshi_egg/yoshi_egg_6_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 34744 + format: RGBA16 +yoshi_egg/yoshi_egg_7_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1215456 + mio0: 36792 + format: RGBA16 diff --git a/assets/sm64/jp/assets.yml b/assets/sm64/jp/assets.yml new file mode 100644 index 0000000..6938fdc --- /dev/null +++ b/assets/sm64/jp/assets.yml @@ -0,0 +1,2327 @@ +anims/anim_00: + type: SM64:ANIM + header: + offset: 5154352 + size: 24 + values: + offset: 5154628 + size: 2604 + indices: + offset: 5154376 + size: 252 +anims/anim_01: + type: SM64:ANIM + header: + offset: 5157232 + size: 24 + values: + offset: 5157532 + size: 6576 + indices: + offset: 5157280 + size: 252 +anims/anim_02: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5157532 + size: 6576 + indices: + offset: 5157280 + size: 252 +anims/anim_03: + type: SM64:ANIM + header: + offset: 5164108 + size: 24 + values: + offset: 5164384 + size: 4372 + indices: + offset: 5164132 + size: 252 +anims/anim_04: + type: SM64:ANIM + header: + offset: 5168756 + size: 24 + values: + offset: 5169032 + size: 2264 + indices: + offset: 5168780 + size: 252 +anims/anim_05: + type: SM64:ANIM + header: + offset: 5171296 + size: 24 + values: + offset: 5171572 + size: 5796 + indices: + offset: 5171320 + size: 252 +anims/anim_06: + type: SM64:ANIM + header: + offset: 5177368 + size: 24 + values: + offset: 5177644 + size: 892 + indices: + offset: 5177392 + size: 252 +anims/anim_07: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5178836 + size: 1468 + indices: + offset: 5178584 + size: 252 +anims/anim_08: + type: SM64:ANIM + header: + offset: 5178560 + size: 24 + values: + offset: 5178836 + size: 1468 + indices: + offset: 5178584 + size: 252 +anims/anim_09: + type: SM64:ANIM + header: + offset: 5180304 + size: 24 + values: + offset: 5180580 + size: 3052 + indices: + offset: 5180328 + size: 252 +anims/anim_0A: + type: SM64:ANIM + header: + offset: 5183632 + size: 24 + values: + offset: 5183908 + size: 2544 + indices: + offset: 5183656 + size: 252 +anims/anim_0B: + type: SM64:ANIM + header: + offset: 5186452 + size: 24 + values: + offset: 5186752 + size: 1348 + indices: + offset: 5186500 + size: 252 +anims/anim_0C: + type: SM64:ANIM + header: + offset: 5186476 + size: 24 + values: + offset: 5186752 + size: 1348 + indices: + offset: 5186500 + size: 252 +anims/anim_0D: + type: SM64:ANIM + header: + offset: 5188100 + size: 24 + values: + offset: 5188376 + size: 770 + indices: + offset: 5188124 + size: 252 +anims/anim_0E: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5189424 + size: 80 + indices: + offset: 5189172 + size: 252 +anims/anim_0F: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5189804 + size: 1502 + indices: + offset: 5189552 + size: 252 +anims/anim_10: + type: SM64:ANIM + header: + offset: 5189528 + size: 24 + values: + offset: 5189804 + size: 1502 + indices: + offset: 5189552 + size: 252 +anims/anim_11: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5191584 + size: 1174 + indices: + offset: 5191332 + size: 252 +anims/anim_12: + type: SM64:ANIM + header: + offset: 5192760 + size: 24 + values: + offset: 5193036 + size: 1318 + indices: + offset: 5192784 + size: 252 +anims/anim_13: + type: SM64:ANIM + header: + offset: 5194356 + size: 24 + values: + offset: 5194632 + size: 1678 + indices: + offset: 5194380 + size: 252 +anims/anim_14: + type: SM64:ANIM + header: + offset: 5196312 + size: 24 + values: + offset: 5196588 + size: 1102 + indices: + offset: 5196336 + size: 252 +anims/anim_15: + type: SM64:ANIM + header: + offset: 5197692 + size: 24 + values: + offset: 5197968 + size: 930 + indices: + offset: 5197716 + size: 252 +anims/anim_16: + type: SM64:ANIM + header: + offset: 5198900 + size: 24 + values: + offset: 5199176 + size: 4452 + indices: + offset: 5198924 + size: 252 +anims/anim_17: + type: SM64:ANIM + header: + offset: 5203628 + size: 24 + values: + offset: 5203904 + size: 2942 + indices: + offset: 5203652 + size: 252 +anims/anim_18: + type: SM64:ANIM + header: + offset: 5206848 + size: 24 + values: + offset: 5207124 + size: 4452 + indices: + offset: 5198924 + size: 252 +anims/anim_19: + type: SM64:ANIM + header: + offset: 5211576 + size: 24 + values: + offset: 5211852 + size: 5354 + indices: + offset: 5211600 + size: 252 +anims/anim_1A: + type: SM64:ANIM + header: + offset: 5217208 + size: 24 + values: + offset: 5217484 + size: 1146 + indices: + offset: 5217232 + size: 252 +anims/anim_1B: + type: SM64:ANIM + header: + offset: 5218632 + size: 24 + values: + offset: 5218908 + size: 2858 + indices: + offset: 5218656 + size: 252 +anims/anim_1C: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5222044 + size: 780 + indices: + offset: 5221792 + size: 252 +anims/anim_1D: + type: SM64:ANIM + header: + offset: 5222824 + size: 24 + values: + offset: 5223100 + size: 1380 + indices: + offset: 5222848 + size: 252 +anims/anim_1E: + type: SM64:ANIM + header: + offset: 5224480 + size: 24 + values: + offset: 5224756 + size: 1530 + indices: + offset: 5224504 + size: 252 +anims/anim_1F: + type: SM64:ANIM + header: + offset: 5226288 + size: 24 + values: + offset: 5226564 + size: 846 + indices: + offset: 5226312 + size: 252 +anims/anim_20: + type: SM64:ANIM + header: + offset: 5227412 + size: 24 + values: + offset: 5227688 + size: 7124 + indices: + offset: 5227436 + size: 252 +anims/anim_21: + type: SM64:ANIM + header: + offset: 5234812 + size: 24 + values: + offset: 5235088 + size: 2610 + indices: + offset: 5234836 + size: 252 +anims/anim_22: + type: SM64:ANIM + header: + offset: 5237700 + size: 24 + values: + offset: 5237976 + size: 1750 + indices: + offset: 5237724 + size: 252 +anims/anim_23: + type: SM64:ANIM + header: + offset: 5239728 + size: 24 + values: + offset: 5240004 + size: 8216 + indices: + offset: 5239752 + size: 252 +anims/anim_24: + type: SM64:ANIM + header: + offset: 5248220 + size: 24 + values: + offset: 5248496 + size: 9376 + indices: + offset: 5248244 + size: 252 +anims/anim_25: + type: SM64:ANIM + header: + offset: 5257872 + size: 24 + values: + offset: 5258148 + size: 8018 + indices: + offset: 5257896 + size: 252 +anims/anim_26: + type: SM64:ANIM + header: + offset: 5266168 + size: 24 + values: + offset: 5266444 + size: 7352 + indices: + offset: 5266192 + size: 252 +anims/anim_27: + type: SM64:ANIM + header: + offset: 5273796 + size: 24 + values: + offset: 5274072 + size: 8980 + indices: + offset: 5273820 + size: 252 +anims/anim_28: + type: SM64:ANIM + header: + offset: 5196312 + size: 24 + values: + offset: 5283328 + size: 1010 + indices: + offset: 5283076 + size: 252 +anims/anim_29: + type: SM64:ANIM + header: + offset: 5284340 + size: 24 + values: + offset: 5284616 + size: 582 + indices: + offset: 5284364 + size: 252 +anims/anim_2A: + type: SM64:ANIM + header: + offset: 5285200 + size: 24 + values: + offset: 5285476 + size: 1252 + indices: + offset: 5285224 + size: 252 +anims/anim_2B: + type: SM64:ANIM + header: + offset: 5285200 + size: 24 + values: + offset: 5287004 + size: 1582 + indices: + offset: 5286752 + size: 252 +anims/anim_2C: + type: SM64:ANIM + header: + offset: 5157232 + size: 24 + values: + offset: 5288888 + size: 5620 + indices: + offset: 5288636 + size: 252 +anims/anim_2D: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5288888 + size: 5620 + indices: + offset: 5288636 + size: 252 +anims/anim_2E: + type: SM64:ANIM + header: + offset: 5294508 + size: 24 + values: + offset: 5294784 + size: 3028 + indices: + offset: 5294532 + size: 252 +anims/anim_2F: + type: SM64:ANIM + header: + offset: 5239728 + size: 24 + values: + offset: 5298088 + size: 7420 + indices: + offset: 5297836 + size: 252 +anims/anim_30: + type: SM64:ANIM + header: + offset: 5171296 + size: 24 + values: + offset: 5305784 + size: 5428 + indices: + offset: 5305532 + size: 252 +anims/anim_31: + type: SM64:ANIM + header: + offset: 5311212 + size: 24 + values: + offset: 5311488 + size: 10660 + indices: + offset: 5311236 + size: 252 +anims/anim_32: + type: SM64:ANIM + header: + offset: 5227412 + size: 24 + values: + offset: 5322424 + size: 7890 + indices: + offset: 5322172 + size: 252 +anims/anim_33: + type: SM64:ANIM + header: + offset: 5330316 + size: 24 + values: + offset: 5330592 + size: 2840 + indices: + offset: 5330340 + size: 252 +anims/anim_34: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5333708 + size: 1300 + indices: + offset: 5333456 + size: 252 +anims/anim_35: + type: SM64:ANIM + header: + offset: 5335008 + size: 24 + values: + offset: 5335284 + size: 3704 + indices: + offset: 5335032 + size: 252 +anims/anim_36: + type: SM64:ANIM + header: + offset: 5338988 + size: 24 + values: + offset: 5339264 + size: 3700 + indices: + offset: 5339012 + size: 252 +anims/anim_37: + type: SM64:ANIM + header: + offset: 5239728 + size: 24 + values: + offset: 5343240 + size: 6828 + indices: + offset: 5342988 + size: 252 +anims/anim_38: + type: SM64:ANIM + header: + offset: 5177368 + size: 24 + values: + offset: 5350344 + size: 844 + indices: + offset: 5350092 + size: 252 +anims/anim_39: + type: SM64:ANIM + header: + offset: 5351188 + size: 24 + values: + offset: 5351464 + size: 12418 + indices: + offset: 5351212 + size: 252 +anims/anim_3A: + type: SM64:ANIM + header: + offset: 5363884 + size: 24 + values: + offset: 5364160 + size: 374 + indices: + offset: 5363908 + size: 252 +anims/anim_3B: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5364812 + size: 1204 + indices: + offset: 5364560 + size: 252 +anims/anim_3C: + type: SM64:ANIM + header: + offset: 5366016 + size: 24 + values: + offset: 5366316 + size: 774 + indices: + offset: 5366064 + size: 252 +anims/anim_3D: + type: SM64:ANIM + header: + offset: 5366040 + size: 24 + values: + offset: 5366316 + size: 774 + indices: + offset: 5366064 + size: 252 +anims/anim_3E: + type: SM64:ANIM + header: + offset: 5351188 + size: 24 + values: + offset: 5367368 + size: 11490 + indices: + offset: 5367116 + size: 252 +anims/anim_3F: + type: SM64:ANIM + header: + offset: 5378860 + size: 24 + values: + offset: 5379136 + size: 3094 + indices: + offset: 5378884 + size: 252 +anims/anim_40: + type: SM64:ANIM + header: + offset: 5382232 + size: 24 + values: + offset: 5382508 + size: 1094 + indices: + offset: 5382256 + size: 252 +anims/anim_41: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5383880 + size: 536 + indices: + offset: 5383628 + size: 252 +anims/anim_42: + type: SM64:ANIM + header: + offset: 5384416 + size: 24 + values: + offset: 5384692 + size: 956 + indices: + offset: 5384440 + size: 252 +anims/anim_43: + type: SM64:ANIM + header: + offset: 5385648 + size: 24 + values: + offset: 5385924 + size: 84 + indices: + offset: 5385672 + size: 252 +anims/anim_44: + type: SM64:ANIM + header: + offset: 5196312 + size: 24 + values: + offset: 5386284 + size: 650 + indices: + offset: 5386032 + size: 252 +anims/anim_45: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5387236 + size: 1190 + indices: + offset: 5386984 + size: 252 +anims/anim_46: + type: SM64:ANIM + header: + offset: 5386960 + size: 24 + values: + offset: 5387236 + size: 1190 + indices: + offset: 5386984 + size: 252 +anims/anim_47: + type: SM64:ANIM + header: + offset: 5366016 + size: 24 + values: + offset: 5388704 + size: 838 + indices: + offset: 5388452 + size: 252 +anims/anim_48: + type: SM64:ANIM + header: + offset: 5389544 + size: 24 + values: + offset: 5389820 + size: 5098 + indices: + offset: 5389568 + size: 252 +anims/anim_49: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5395196 + size: 1298 + indices: + offset: 5394944 + size: 252 +anims/anim_4A: + type: SM64:ANIM + header: + offset: 5396496 + size: 24 + values: + offset: 5396772 + size: 616 + indices: + offset: 5396520 + size: 252 +anims/anim_4B: + type: SM64:ANIM + header: + offset: 5192760 + size: 24 + values: + offset: 5397664 + size: 1386 + indices: + offset: 5397412 + size: 252 +anims/anim_4C: + type: SM64:ANIM + header: + offset: 5399052 + size: 24 + values: + offset: 5399328 + size: 670 + indices: + offset: 5399076 + size: 252 +anims/anim_4D: + type: SM64:ANIM + header: + offset: 5177368 + size: 24 + values: + offset: 5400300 + size: 2456 + indices: + offset: 5400048 + size: 252 +anims/anim_4E: + type: SM64:ANIM + header: + offset: 5400024 + size: 24 + values: + offset: 5400300 + size: 2456 + indices: + offset: 5400048 + size: 252 +anims/anim_4F: + type: SM64:ANIM + header: + offset: 5226288 + size: 24 + values: + offset: 5403032 + size: 1578 + indices: + offset: 5402780 + size: 252 +anims/anim_50: + type: SM64:ANIM + header: + offset: 5363884 + size: 24 + values: + offset: 5404888 + size: 420 + indices: + offset: 5404636 + size: 252 +anims/anim_51: + type: SM64:ANIM + header: + offset: 5405308 + size: 24 + values: + offset: 5405584 + size: 1002 + indices: + offset: 5405332 + size: 252 +anims/anim_52: + type: SM64:ANIM + header: + offset: 5366016 + size: 24 + values: + offset: 5406864 + size: 878 + indices: + offset: 5406612 + size: 252 +anims/anim_53: + type: SM64:ANIM + header: + offset: 5407744 + size: 24 + values: + offset: 5408020 + size: 1970 + indices: + offset: 5407768 + size: 252 +anims/anim_54: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5410268 + size: 1314 + indices: + offset: 5410016 + size: 252 +anims/anim_55: + type: SM64:ANIM + header: + offset: 5411584 + size: 24 + values: + offset: 5411860 + size: 11268 + indices: + offset: 5411608 + size: 252 +anims/anim_56: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5423428 + size: 1560 + indices: + offset: 5423176 + size: 252 +anims/anim_57: + type: SM64:ANIM + header: + offset: 5423152 + size: 24 + values: + offset: 5423428 + size: 1560 + indices: + offset: 5423176 + size: 252 +anims/anim_58: + type: SM64:ANIM + header: + offset: 5424988 + size: 24 + values: + offset: 5425264 + size: 1082 + indices: + offset: 5425012 + size: 252 +anims/anim_59: + type: SM64:ANIM + header: + offset: 5426348 + size: 24 + values: + offset: 5426624 + size: 3052 + indices: + offset: 5426372 + size: 252 +anims/anim_5A: + type: SM64:ANIM + header: + offset: 5429676 + size: 24 + values: + offset: 5429952 + size: 3278 + indices: + offset: 5429700 + size: 252 +anims/anim_5B: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5433508 + size: 720 + indices: + offset: 5433256 + size: 252 +anims/anim_5C: + type: SM64:ANIM + header: + offset: 5434228 + size: 24 + values: + offset: 5434504 + size: 1258 + indices: + offset: 5434252 + size: 252 +anims/anim_5D: + type: SM64:ANIM + header: + offset: 5382232 + size: 24 + values: + offset: 5436040 + size: 1142 + indices: + offset: 5435788 + size: 252 +anims/anim_5E: + type: SM64:ANIM + header: + offset: 5351188 + size: 24 + values: + offset: 5437460 + size: 12110 + indices: + offset: 5437208 + size: 252 +anims/anim_5F: + type: SM64:ANIM + header: + offset: 5449572 + size: 24 + values: + offset: 5449848 + size: 5058 + indices: + offset: 5449596 + size: 252 +anims/anim_60: + type: SM64:ANIM + header: + offset: 5454908 + size: 24 + values: + offset: 5455184 + size: 4020 + indices: + offset: 5454932 + size: 252 +anims/anim_61: + type: SM64:ANIM + header: + offset: 5459204 + size: 24 + values: + offset: 5459480 + size: 12660 + indices: + offset: 5459228 + size: 252 +anims/anim_62: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5472416 + size: 742 + indices: + offset: 5472164 + size: 252 +anims/anim_63: + type: SM64:ANIM + header: + offset: 5473160 + size: 24 + values: + offset: 5473436 + size: 1626 + indices: + offset: 5473184 + size: 252 +anims/anim_64: + type: SM64:ANIM + header: + offset: 5475064 + size: 24 + values: + offset: 5475340 + size: 1246 + indices: + offset: 5475088 + size: 252 +anims/anim_65: + type: SM64:ANIM + header: + offset: 5226288 + size: 24 + values: + offset: 5476864 + size: 1700 + indices: + offset: 5476612 + size: 252 +anims/anim_66: + type: SM64:ANIM + header: + offset: 5478564 + size: 24 + values: + offset: 5478840 + size: 1948 + indices: + offset: 5478588 + size: 252 +anims/anim_67: + type: SM64:ANIM + header: + offset: 5480788 + size: 24 + values: + offset: 5481064 + size: 386 + indices: + offset: 5480812 + size: 252 +anims/anim_68: + type: SM64:ANIM + header: + offset: 5481452 + size: 24 + values: + offset: 5481728 + size: 340 + indices: + offset: 5481476 + size: 252 +anims/anim_69: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5482344 + size: 764 + indices: + offset: 5482092 + size: 252 +anims/anim_6A: + type: SM64:ANIM + header: + offset: 5483108 + size: 24 + values: + offset: 5483384 + size: 1060 + indices: + offset: 5483132 + size: 252 +anims/anim_6B: + type: SM64:ANIM + header: + offset: 5366016 + size: 24 + values: + offset: 5484720 + size: 940 + indices: + offset: 5484468 + size: 252 +anims/anim_6C: + type: SM64:ANIM + header: + offset: 5485660 + size: 24 + values: + offset: 5485936 + size: 1284 + indices: + offset: 5485684 + size: 252 +anims/anim_6D: + type: SM64:ANIM + header: + offset: 5192760 + size: 24 + values: + offset: 5487496 + size: 1286 + indices: + offset: 5487244 + size: 252 +anims/anim_6E: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5489060 + size: 1136 + indices: + offset: 5488808 + size: 252 +anims/anim_6F: + type: SM64:ANIM + header: + offset: 5284340 + size: 24 + values: + offset: 5490496 + size: 98 + indices: + offset: 5490244 + size: 252 +anims/anim_70: + type: SM64:ANIM + header: + offset: 5490220 + size: 24 + values: + offset: 5490496 + size: 98 + indices: + offset: 5490244 + size: 252 +anims/anim_71: + type: SM64:ANIM + header: + offset: 5490596 + size: 24 + values: + offset: 5490872 + size: 2078 + indices: + offset: 5490620 + size: 252 +anims/anim_72: + type: SM64:ANIM + header: + offset: 5492952 + size: 24 + values: + offset: 5493252 + size: 4342 + indices: + offset: 5493000 + size: 252 +anims/anim_73: + type: SM64:ANIM + header: + offset: 5492952 + size: 24 + values: + offset: 5493252 + size: 4342 + indices: + offset: 5493000 + size: 252 +anims/anim_74: + type: SM64:ANIM + header: + offset: 5490596 + size: 24 + values: + offset: 5497872 + size: 1844 + indices: + offset: 5497620 + size: 252 +anims/anim_75: + type: SM64:ANIM + header: + offset: 5490596 + size: 24 + values: + offset: 5499992 + size: 1892 + indices: + offset: 5499740 + size: 252 +anims/anim_76: + type: SM64:ANIM + header: + offset: 5239728 + size: 24 + values: + offset: 5502160 + size: 4648 + indices: + offset: 5501908 + size: 252 +anims/anim_77: + type: SM64:ANIM + header: + offset: 5198900 + size: 24 + values: + offset: 5507084 + size: 2464 + indices: + offset: 5506832 + size: 252 +anims/anim_78: + type: SM64:ANIM + header: + offset: 5509548 + size: 24 + values: + offset: 5509824 + size: 10454 + indices: + offset: 5509572 + size: 252 +anims/anim_79: + type: SM64:ANIM + header: + offset: 5520280 + size: 24 + values: + offset: 5520556 + size: 3634 + indices: + offset: 5520304 + size: 252 +anims/anim_7A: + type: SM64:ANIM + header: + offset: 5524192 + size: 24 + values: + offset: 5524468 + size: 402 + indices: + offset: 5524216 + size: 252 +anims/anim_7B: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5525148 + size: 2360 + indices: + offset: 5524896 + size: 252 +anims/anim_7C: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5527784 + size: 2300 + indices: + offset: 5527532 + size: 252 +anims/anim_7D: + type: SM64:ANIM + header: + offset: 5285200 + size: 24 + values: + offset: 5530360 + size: 1114 + indices: + offset: 5530108 + size: 252 +anims/anim_7E: + type: SM64:ANIM + header: + offset: 5171296 + size: 24 + values: + offset: 5531752 + size: 4538 + indices: + offset: 5531500 + size: 252 +anims/anim_7F: + type: SM64:ANIM + header: + offset: 5218632 + size: 24 + values: + offset: 5536568 + size: 3622 + indices: + offset: 5536316 + size: 252 +anims/anim_80: + type: SM64:ANIM + header: + offset: 5218632 + size: 24 + values: + offset: 5540468 + size: 4248 + indices: + offset: 5540216 + size: 252 +anims/anim_81: + type: SM64:ANIM + header: + offset: 5544716 + size: 24 + values: + offset: 5544992 + size: 4308 + indices: + offset: 5544740 + size: 252 +anims/anim_82: + type: SM64:ANIM + header: + offset: 5549300 + size: 24 + values: + offset: 5549576 + size: 5770 + indices: + offset: 5549324 + size: 252 +anims/anim_83: + type: SM64:ANIM + header: + offset: 5555348 + size: 24 + values: + offset: 5555624 + size: 4734 + indices: + offset: 5555372 + size: 252 +anims/anim_84: + type: SM64:ANIM + header: + offset: 5164108 + size: 24 + values: + offset: 5560636 + size: 4756 + indices: + offset: 5560384 + size: 252 +anims/anim_85: + type: SM64:ANIM + header: + offset: 5285200 + size: 24 + values: + offset: 5565668 + size: 324 + indices: + offset: 5565416 + size: 252 +anims/anim_86: + type: SM64:ANIM + header: + offset: 5565992 + size: 24 + values: + offset: 5566268 + size: 2902 + indices: + offset: 5566016 + size: 252 +anims/anim_87: + type: SM64:ANIM + header: + offset: 5330316 + size: 24 + values: + offset: 5569448 + size: 1564 + indices: + offset: 5569196 + size: 252 +anims/anim_88: + type: SM64:ANIM + header: + offset: 5434228 + size: 24 + values: + offset: 5571312 + size: 1260 + indices: + offset: 5571060 + size: 252 +anims/anim_89: + type: SM64:ANIM + header: + offset: 5571036 + size: 24 + values: + offset: 5571312 + size: 1260 + indices: + offset: 5571060 + size: 252 +anims/anim_8A: + type: SM64:ANIM + header: + offset: 5565992 + size: 24 + values: + offset: 5572848 + size: 2980 + indices: + offset: 5572596 + size: 252 +anims/anim_8B: + type: SM64:ANIM + header: + offset: 5426348 + size: 24 + values: + offset: 5576104 + size: 2970 + indices: + offset: 5575852 + size: 252 +anims/anim_8C: + type: SM64:ANIM + header: + offset: 5396496 + size: 24 + values: + offset: 5579352 + size: 646 + indices: + offset: 5579100 + size: 252 +anims/anim_8D: + type: SM64:ANIM + header: + offset: 5405308 + size: 24 + values: + offset: 5580276 + size: 1086 + indices: + offset: 5580024 + size: 252 +anims/anim_8E: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5581664 + size: 1618 + indices: + offset: 5581412 + size: 252 +anims/anim_8F: + type: SM64:ANIM + header: + offset: 5178560 + size: 24 + values: + offset: 5581664 + size: 1618 + indices: + offset: 5581412 + size: 252 +anims/anim_90: + type: SM64:ANIM + header: + offset: 5196312 + size: 24 + values: + offset: 5583560 + size: 1012 + indices: + offset: 5583308 + size: 252 +anims/anim_91: + type: SM64:ANIM + header: + offset: 5584572 + size: 24 + values: + offset: 5584848 + size: 266 + indices: + offset: 5584596 + size: 252 +anims/anim_92: + type: SM64:ANIM + header: + offset: 5585116 + size: 24 + values: + offset: 5585392 + size: 5600 + indices: + offset: 5585140 + size: 252 +anims/anim_93: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5591268 + size: 602 + indices: + offset: 5591016 + size: 252 +anims/anim_94: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5592148 + size: 80 + indices: + offset: 5189172 + size: 252 +anims/anim_95: + type: SM64:ANIM + header: + offset: 5480788 + size: 24 + values: + offset: 5592504 + size: 280 + indices: + offset: 5592252 + size: 252 +anims/anim_96: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5593060 + size: 680 + indices: + offset: 5592808 + size: 252 +anims/anim_97: + type: SM64:ANIM + header: + offset: 5363884 + size: 24 + values: + offset: 5594016 + size: 416 + indices: + offset: 5593764 + size: 252 +anims/anim_98: + type: SM64:ANIM + header: + offset: 5171296 + size: 24 + values: + offset: 5594708 + size: 2758 + indices: + offset: 5594456 + size: 252 +anims/anim_99: + type: SM64:ANIM + header: + offset: 5597468 + size: 24 + values: + offset: 5597744 + size: 7014 + indices: + offset: 5597492 + size: 252 +anims/anim_9A: + type: SM64:ANIM + header: + offset: 5396496 + size: 24 + values: + offset: 5605036 + size: 644 + indices: + offset: 5604784 + size: 252 +anims/anim_9B: + type: SM64:ANIM + header: + offset: 5396496 + size: 24 + values: + offset: 5605956 + size: 630 + indices: + offset: 5605704 + size: 252 +anims/anim_9C: + type: SM64:ANIM + header: + offset: 5606588 + size: 24 + values: + offset: 5606864 + size: 4884 + indices: + offset: 5606612 + size: 252 +anims/anim_9D: + type: SM64:ANIM + header: + offset: 5611748 + size: 24 + values: + offset: 5612024 + size: 1944 + indices: + offset: 5611772 + size: 252 +anims/anim_9E: + type: SM64:ANIM + header: + offset: 5544716 + size: 24 + values: + offset: 5614244 + size: 4008 + indices: + offset: 5613992 + size: 252 +anims/anim_9F: + type: SM64:ANIM + header: + offset: 5191308 + size: 24 + values: + offset: 5618528 + size: 774 + indices: + offset: 5618276 + size: 252 +anims/anim_A0: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5619580 + size: 390 + indices: + offset: 5619328 + size: 252 +anims/anim_A1: + type: SM64:ANIM + header: + offset: 5619972 + size: 24 + values: + offset: 5620248 + size: 920 + indices: + offset: 5619996 + size: 252 +anims/anim_A2: + type: SM64:ANIM + header: + offset: 5194356 + size: 24 + values: + offset: 5621444 + size: 1448 + indices: + offset: 5621192 + size: 252 +anims/anim_A3: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5623168 + size: 2590 + indices: + offset: 5622916 + size: 252 +anims/anim_A4: + type: SM64:ANIM + header: + offset: 5224480 + size: 24 + values: + offset: 5626036 + size: 1650 + indices: + offset: 5625784 + size: 252 +anims/anim_A5: + type: SM64:ANIM + header: + offset: 5157232 + size: 24 + values: + offset: 5627964 + size: 5148 + indices: + offset: 5627712 + size: 252 +anims/anim_A6: + type: SM64:ANIM + header: + offset: 5633112 + size: 24 + values: + offset: 5633388 + size: 4646 + indices: + offset: 5633136 + size: 252 +anims/anim_A7: + type: SM64:ANIM + header: + offset: 5565992 + size: 24 + values: + offset: 5638312 + size: 3060 + indices: + offset: 5638060 + size: 252 +anims/anim_A8: + type: SM64:ANIM + header: + offset: 5544716 + size: 24 + values: + offset: 5641648 + size: 3910 + indices: + offset: 5641396 + size: 252 +anims/anim_A9: + type: SM64:ANIM + header: + offset: 5434228 + size: 24 + values: + offset: 5645836 + size: 1728 + indices: + offset: 5645584 + size: 252 +anims/anim_AA: + type: SM64:ANIM + header: + offset: 5483108 + size: 24 + values: + offset: 5647840 + size: 972 + indices: + offset: 5647588 + size: 252 +anims/anim_AB: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5649088 + size: 750 + indices: + offset: 5648836 + size: 252 +anims/anim_AC: + type: SM64:ANIM + header: + offset: 5649840 + size: 24 + values: + offset: 5650116 + size: 1706 + indices: + offset: 5649864 + size: 252 +anims/anim_AD: + type: SM64:ANIM + header: + offset: 5407744 + size: 24 + values: + offset: 5652100 + size: 1860 + indices: + offset: 5651848 + size: 252 +anims/anim_AE: + type: SM64:ANIM + header: + offset: 5366016 + size: 24 + values: + offset: 5654236 + size: 956 + indices: + offset: 5653984 + size: 252 +anims/anim_AF: + type: SM64:ANIM + header: + offset: 5407744 + size: 24 + values: + offset: 5655468 + size: 2160 + indices: + offset: 5655216 + size: 252 +anims/anim_B0: + type: SM64:ANIM + header: + offset: 5480788 + size: 24 + values: + offset: 5657904 + size: 440 + indices: + offset: 5657652 + size: 252 +anims/anim_B1: + type: SM64:ANIM + header: + offset: 5658344 + size: 24 + values: + offset: 5658620 + size: 2418 + indices: + offset: 5658368 + size: 252 +anims/anim_B2: + type: SM64:ANIM + header: + offset: 5224480 + size: 24 + values: + offset: 5661316 + size: 1824 + indices: + offset: 5661064 + size: 252 +anims/anim_B3: + type: SM64:ANIM + header: + offset: 5663140 + size: 24 + values: + offset: 5663416 + size: 6494 + indices: + offset: 5663164 + size: 252 +anims/anim_B4: + type: SM64:ANIM + header: + offset: 5490596 + size: 24 + values: + offset: 5670188 + size: 1846 + indices: + offset: 5669936 + size: 252 +anims/anim_B5: + type: SM64:ANIM + header: + offset: 5434228 + size: 24 + values: + offset: 5672336 + size: 1382 + indices: + offset: 5672084 + size: 252 +anims/anim_B6: + type: SM64:ANIM + header: + offset: 5672060 + size: 24 + values: + offset: 5672336 + size: 1382 + indices: + offset: 5672084 + size: 252 +anims/anim_B7: + type: SM64:ANIM + header: + offset: 5565992 + size: 24 + values: + offset: 5673996 + size: 2980 + indices: + offset: 5673744 + size: 252 +anims/anim_B8: + type: SM64:ANIM + header: + offset: 5330316 + size: 24 + values: + offset: 5677252 + size: 776 + indices: + offset: 5677000 + size: 252 +anims/anim_B9: + type: SM64:ANIM + header: + offset: 5407744 + size: 24 + values: + offset: 5678304 + size: 2068 + indices: + offset: 5678052 + size: 252 +anims/anim_BA: + type: SM64:ANIM + header: + offset: 5424988 + size: 24 + values: + offset: 5680648 + size: 986 + indices: + offset: 5680396 + size: 252 +anims/anim_BB: + type: SM64:ANIM + header: + offset: 5681636 + size: 24 + values: + offset: 5681912 + size: 4132 + indices: + offset: 5681660 + size: 252 +anims/anim_BC: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5686344 + size: 1528 + indices: + offset: 5686092 + size: 252 +anims/anim_BD: + type: SM64:ANIM + header: + offset: 5189528 + size: 24 + values: + offset: 5686344 + size: 1528 + indices: + offset: 5686092 + size: 252 +anims/anim_BE: + type: SM64:ANIM + header: + offset: 5221768 + size: 24 + values: + offset: 5688148 + size: 760 + indices: + offset: 5687896 + size: 252 +anims/anim_BF: + type: SM64:ANIM + header: + offset: 5490596 + size: 24 + values: + offset: 5689184 + size: 1936 + indices: + offset: 5688932 + size: 252 +anims/anim_C0: + type: SM64:ANIM + header: + offset: 5691120 + size: 24 + values: + offset: 5691396 + size: 2452 + indices: + offset: 5691144 + size: 252 +anims/anim_C1: + type: SM64:ANIM + header: + offset: 5183632 + size: 24 + values: + offset: 5694124 + size: 2468 + indices: + offset: 5693872 + size: 252 +anims/anim_C2: + type: SM64:ANIM + header: + offset: 5171296 + size: 24 + values: + offset: 5696868 + size: 5422 + indices: + offset: 5696616 + size: 252 +anims/anim_C3: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5702568 + size: 1942 + indices: + offset: 5702316 + size: 252 +anims/anim_C4: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5704788 + size: 1942 + indices: + offset: 5702316 + size: 252 +anims/anim_C5: + type: SM64:ANIM + header: + offset: 5409992 + size: 24 + values: + offset: 5707008 + size: 1942 + indices: + offset: 5702316 + size: 252 +anims/anim_C6: + type: SM64:ANIM + header: + offset: 5330316 + size: 24 + values: + offset: 5709228 + size: 1666 + indices: + offset: 5708976 + size: 252 +anims/anim_C7: + type: SM64:ANIM + header: + offset: 5330316 + size: 24 + values: + offset: 5711172 + size: 2844 + indices: + offset: 5710920 + size: 252 +anims/anim_C8: + type: SM64:ANIM + header: + offset: 5714016 + size: 24 + values: + offset: 5714292 + size: 1648 + indices: + offset: 5714040 + size: 252 +anims/anim_C9: + type: SM64:ANIM + header: + offset: 5226288 + size: 24 + values: + offset: 5716216 + size: 1940 + indices: + offset: 5715964 + size: 252 +anims/anim_CA: + type: SM64:ANIM + header: + offset: 5718156 + size: 24 + values: + offset: 5718432 + size: 1998 + indices: + offset: 5718180 + size: 252 +anims/anim_CB: + type: SM64:ANIM + header: + offset: 5217208 + size: 24 + values: + offset: 5720732 + size: 1382 + indices: + offset: 5720480 + size: 252 +anims/anim_CC: + type: SM64:ANIM + header: + offset: 5157256 + size: 24 + values: + offset: 5720732 + size: 1382 + indices: + offset: 5720480 + size: 252 +anims/anim_CD: + type: SM64:ANIM + header: + offset: 5722116 + size: 24 + values: + offset: 5722392 + size: 5184 + indices: + offset: 5722140 + size: 252 +anims/anim_CE: + type: SM64:ANIM + header: + offset: 5192760 + size: 24 + values: + offset: 5727852 + size: 1460 + indices: + offset: 5727600 + size: 252 +anims/anim_CF: + type: SM64:ANIM + header: + offset: 5729312 + size: 24 + values: + offset: 5729588 + size: 2708 + indices: + offset: 5729336 + size: 252 +anims/anim_D0: + type: SM64:ANIM + header: + offset: 5405308 + size: 24 + values: + offset: 5732572 + size: 730 + indices: + offset: 5732320 + size: 252 +demos/bbh: + type: BLOB + size: 988 + offset: 5733368 +demos/ccm: + type: BLOB + size: 1320 + offset: 5734356 +demos/hmc: + type: BLOB + size: 980 + offset: 5735676 +demos/jrb: + type: BLOB + size: 620 + offset: 5736656 +demos/pss: + type: BLOB + size: 748 + offset: 5737948 +demos/unused: + type: BLOB + size: 108 + offset: 5738696 +demos/wf: + type: BLOB + size: 672 + offset: 5737276 diff --git a/assets/sm64/jp/levels.yml b/assets/sm64/jp/levels.yml new file mode 100644 index 0000000..8ba20f1 --- /dev/null +++ b/assets/sm64/jp/levels.yml @@ -0,0 +1,3045 @@ +bbh/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3604960 + mio0: 0 + format: RGBA16 +bbh/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3604960 + mio0: 4096 + format: RGBA16 +bbh/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3604960 + mio0: 6144 + format: RGBA16 +bbh/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3604960 + mio0: 8192 + format: RGBA16 +bbh/4: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3604960 + mio0: 12288 + format: RGBA16 +bbh/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3604960 + mio0: 13312 + format: RGBA16 +bbh/6: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3604960 + mio0: 17408 + format: RGBA16 +bitdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4533568 + mio0: 0 + format: RGBA16 +bitdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4533568 + mio0: 2048 + format: RGBA16 +bitdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4533568 + mio0: 4096 + format: RGBA16 +bitdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4533568 + mio0: 6144 + format: RGBA16 +bitfs/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4584464 + mio0: 0 + format: RGBA16 +bitfs/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4584464 + mio0: 4096 + format: RGBA16 +bitfs/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4584464 + mio0: 6144 + format: RGBA16 +bits/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4629216 + mio0: 0 + format: RGBA16 +bits/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4629216 + mio0: 4096 + format: RGBA16 +bits/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4629216 + mio0: 8192 + format: RGBA16 +bob/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4170512 + mio0: 0 + format: RGBA16 +bob/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4170512 + mio0: 2048 + format: RGBA16 +bob/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4170512 + mio0: 4096 + format: RGBA16 +bob/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4170512 + mio0: 6144 + format: RGBA16 +bob/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4170512 + mio0: 8192 + format: RGBA16 +bowser_1/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4982976 + mio0: 0 + format: RGBA16 +bowser_1/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4982976 + mio0: 4096 + format: RGBA16 +bowser_1/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4982976 + mio0: 6144 + format: RGBA16 +bowser_2/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5028720 + mio0: 0 + format: RGBA16 +bowser_3/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5032864 + mio0: 0 + format: RGBA16 +bowser_3/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5032864 + mio0: 2048 + format: RGBA16 +bowser_3/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 5032864 + mio0: 4096 + format: RGBA16 +castle_grounds/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4492416 + mio0: 0 + format: RGBA16 +castle_grounds/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4492416 + mio0: 4096 + format: RGBA16 +castle_grounds/2: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4492416 + mio0: 8192 + format: RGBA16 +castle_grounds/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4492416 + mio0: 51688 + format: RGBA16 +castle_grounds/4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4492416 + mio0: 55784 + format: RGBA16 +castle_inside/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 2048 + format: RGBA16 +castle_inside/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 28672 + format: RGBA16 +castle_inside/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 30720 + format: RGBA16 +castle_inside/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 32768 + format: RGBA16 +castle_inside/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 34816 + format: RGBA16 +castle_inside/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 36864 + format: RGBA16 +castle_inside/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 38912 + format: RGBA16 +castle_inside/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 40960 + format: IA16 +castle_inside/17: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 43008 + format: RGBA16 +castle_inside/18: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 47104 + format: RGBA16 +castle_inside/19: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 51200 + format: RGBA16 +castle_inside/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 47104 + format: IA16 +castle_inside/20: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 55296 + format: RGBA16 +castle_inside/21: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 59392 + format: RGBA16 +castle_inside/22: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 63488 + format: RGBA16 +castle_inside/23: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 67584 + format: RGBA16 +castle_inside/24: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 71680 + format: RGBA16 +castle_inside/25: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 75776 + format: RGBA16 +castle_inside/26: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 79872 + format: RGBA16 +castle_inside/27: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 83968 + format: RGBA16 +castle_inside/28: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 88064 + format: RGBA16 +castle_inside/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 92160 + format: RGBA16 +castle_inside/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3754192 + mio0: 8192 + format: RGBA16 +castle_inside/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 94208 + format: RGBA16 +castle_inside/31: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 96256 + format: RGBA16 +castle_inside/32: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 100352 + format: RGBA16 +castle_inside/33: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 104448 + format: RGBA16 +castle_inside/34: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 108544 + format: RGBA16 +castle_inside/35: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 112640 + format: RGBA16 +castle_inside/36: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 116736 + format: RGBA16 +castle_inside/37: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 120832 + format: RGBA16 +castle_inside/38: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 124928 + format: RGBA16 +castle_inside/39: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 129024 + format: RGBA16 +castle_inside/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 12288 + format: RGBA16 +castle_inside/40: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3754192 + mio0: 133120 + format: RGBA16 +castle_inside/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3754192 + mio0: 14336 + format: RGBA16 +castle_inside/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3754192 + mio0: 18432 + format: RGBA16 +castle_inside/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 22528 + format: RGBA16 +castle_inside/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 24576 + format: RGBA16 +castle_inside/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 26624 + format: RGBA16 +castle_inside/castle_light: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 47104 + format: IA16 +ccm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 0 + format: RGBA16 +ccm/1: + type: TEXTURE + size: 256 + width: 32 + height: 4 + offset: 3677936 + mio0: 2048 + format: RGBA16 +ccm/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 17152 + format: RGBA16 +ccm/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 19200 + format: RGBA16 +ccm/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 72024 + format: RGBA16 +ccm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 2304 + format: RGBA16 +ccm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 4352 + format: RGBA16 +ccm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 6400 + format: RGBA16 +ccm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 48240 + format: RGBA16 +ccm/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1436272 + mio0: 46192 + format: RGBA16 +ccm/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 12544 + format: RGBA16 +ccm/8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3677936 + mio0: 14592 + format: IA16 +ccm/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3677936 + mio0: 15104 + format: IA16 +cotmc/0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4939888 + mio0: 0 + format: RGBA16 +cotmc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4939888 + mio0: 4096 + format: RGBA16 +cotmc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4939888 + mio0: 6144 + format: RGBA16 +cotmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4939888 + mio0: 8192 + format: RGBA16 +cotmc/4: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4939888 + mio0: 10240 + format: RGBA16 +ddd/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4765904 + mio0: 0 + format: RGBA16 +ddd/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 4096 + format: RGBA16 +ddd/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4765904 + mio0: 6144 + format: RGBA16 +ddd/3: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4765904 + mio0: 8192 + format: RGBA16 +ddd/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4765904 + mio0: 12288 + format: RGBA16 +ending/cake: + type: BLOB + size: 153600 + offset: 4834992 + mio0: 0 +hmc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3993136 + mio0: 0 + format: RGBA16 +hmc/1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3993136 + mio0: 4096 + format: RGBA16 +hmc/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3993136 + mio0: 8192 + format: RGBA16 +hmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3993136 + mio0: 12288 + format: RGBA16 +hmc/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3993136 + mio0: 14336 + format: RGBA16 +hmc/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3993136 + mio0: 16384 + format: RGBA16 +hmc/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3993136 + mio0: 18432 + format: RGBA16 +hmc/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3754192 + mio0: 92160 + format: RGBA16 +intro/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2524448 + mio0: 32416 + format: RGBA16 +intro/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2524448 + mio0: 34464 + format: RGBA16 +intro/2_copyright: + type: TEXTURE + size: 4096 + width: 128 + height: 16 + offset: 2524448 + mio0: 46240 + format: RGBA16 +intro/3_tm: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2524448 + mio0: 50336 + format: RGBA16 +jrb/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 4096 + format: RGBA16 +jrb/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4294592 + mio0: 2048 + format: RGBA16 +jrb/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4294592 + mio0: 6144 + format: RGBA16 +jrb/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4294592 + mio0: 8192 + format: RGBA16 +lll/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 0 + format: RGBA16 +lll/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 2048 + format: RGBA16 +lll/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 20480 + format: RGBA16 +lll/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 22528 + format: RGBA16 +lll/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 24576 + format: RGBA16 +lll/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 26624 + format: RGBA16 +lll/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 28672 + format: RGBA16 +lll/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 30720 + format: RGBA16 +lll/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 32768 + format: RGBA16 +lll/17: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 34816 + format: RGBA16 +lll/18: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 36864 + format: RGBA16 +lll/19: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 38912 + format: RGBA16 +lll/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 4096 + format: RGBA16 +lll/20: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 40960 + format: RGBA16 +lll/21: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 43008 + format: RGBA16 +lll/22: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 45056 + format: RGBA16 +lll/23: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 47104 + format: RGBA16 +lll/24: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 49152 + format: RGBA16 +lll/25: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 51200 + format: RGBA16 +lll/26: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 4678592 + mio0: 53248 + format: RGBA16 +lll/27: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3677936 + mio0: 14592 + format: IA16 +lll/28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 54272 + format: RGBA16 +lll/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 56320 + format: RGBA16 +lll/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 6144 + format: RGBA16 +lll/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 58368 + format: RGBA16 +lll/31: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 60416 + format: RGBA16 +lll/32: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4678592 + mio0: 62464 + format: RGBA16 +lll/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 8192 + format: RGBA16 +lll/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 10240 + format: RGBA16 +lll/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 12288 + format: RGBA16 +lll/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 6144 + format: RGBA16 +lll/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 16384 + format: RGBA16 +lll/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4678592 + mio0: 18432 + format: RGBA16 +menu/main_menu_seg7.00018: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 24 + format: RGBA16 +menu/main_menu_seg7.00818: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 2072 + format: RGBA16 +menu/main_menu_seg7.01018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2770736 + mio0: 4120 + format: RGBA16 +menu/main_menu_seg7.02018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2770736 + mio0: 8216 + format: RGBA16 +menu/main_menu_seg7.03468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 13416 + format: RGBA16 +menu/main_menu_seg7.03C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 15464 + format: RGBA16 +menu/main_menu_seg7.04468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 17512 + format: RGBA16 +menu/main_menu_seg7.04C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 19560 + format: RGBA16 +menu/main_menu_seg7.05468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 21608 + format: RGBA16 +menu/main_menu_seg7.06328: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 25384 + format: RGBA16 +menu/main_menu_seg7.06B28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2770736 + mio0: 27432 + format: RGBA16 +menu/main_menu_seg7.073D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 29648 + format: RGBA16 +menu/main_menu_seg7.075D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 30160 + format: RGBA16 +menu/main_menu_seg7.077D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 30672 + format: RGBA16 +menu/main_menu_seg7.079D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 31184 + format: RGBA16 +menu/main_menu_seg7.07BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 31696 + format: RGBA16 +menu/main_menu_seg7.07DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 32208 + format: RGBA16 +menu/main_menu_seg7.07FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 32720 + format: RGBA16 +menu/main_menu_seg7.081D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 33232 + format: RGBA16 +menu/main_menu_seg7.083D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 33744 + format: RGBA16 +menu/main_menu_seg7.085D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 34256 + format: RGBA16 +menu/main_menu_seg7.087D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 34768 + format: RGBA16 +menu/main_menu_seg7.089D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 35280 + format: RGBA16 +menu/main_menu_seg7.08BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 35792 + format: RGBA16 +menu/main_menu_seg7.08DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 36304 + format: RGBA16 +menu/main_menu_seg7.08FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 36816 + format: RGBA16 +menu/main_menu_seg7.091D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 37328 + format: RGBA16 +menu/main_menu_seg7.093D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 37840 + format: RGBA16 +menu/main_menu_seg7.095D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 38352 + format: RGBA16 +menu/main_menu_seg7.097D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 38864 + format: RGBA16 +menu/main_menu_seg7.099D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 39376 + format: RGBA16 +menu/main_menu_seg7.09BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 39888 + format: RGBA16 +menu/main_menu_seg7.09DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 40400 + format: RGBA16 +menu/main_menu_seg7.09FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 40912 + format: RGBA16 +menu/main_menu_seg7.0A1D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 20480 + format: RGBA16 +menu/main_menu_seg7.0A3D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 41936 + format: RGBA16 +menu/main_menu_seg7.0A5D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 42448 + format: RGBA16 +menu/main_menu_seg7.0A7D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 42960 + format: RGBA16 +menu/main_menu_seg7.0A9D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2770736 + mio0: 43472 + format: RGBA16 +menu/main_menu_seg7.0AC48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44104 + format: IA8 +menu/main_menu_seg7.0AC88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44168 + format: IA8 +menu/main_menu_seg7.0ACC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44232 + format: IA8 +menu/main_menu_seg7.0AD08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44296 + format: IA8 +menu/main_menu_seg7.0AD48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44360 + format: IA8 +menu/main_menu_seg7.0AD88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44424 + format: IA8 +menu/main_menu_seg7.0ADC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44488 + format: IA8 +menu/main_menu_seg7.0AE08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44552 + format: IA8 +menu/main_menu_seg7.0AE48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44616 + format: IA8 +menu/main_menu_seg7.0AE88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44680 + format: IA8 +menu/main_menu_seg7.0AEC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44744 + format: IA8 +menu/main_menu_seg7.0AF08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44808 + format: IA8 +menu/main_menu_seg7.0AF48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44872 + format: IA8 +menu/main_menu_seg7.0AF88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 44936 + format: IA8 +menu/main_menu_seg7.0AFC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45000 + format: IA8 +menu/main_menu_seg7.0B008: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45064 + format: IA8 +menu/main_menu_seg7.0B048: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45128 + format: IA8 +menu/main_menu_seg7.0B088: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45192 + format: IA8 +menu/main_menu_seg7.0B0C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45256 + format: IA8 +menu/main_menu_seg7.0B108: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45320 + format: IA8 +menu/main_menu_seg7.0B148: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45384 + format: IA8 +menu/main_menu_seg7.0B188: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45448 + format: IA8 +menu/main_menu_seg7.0B1C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45512 + format: IA8 +menu/main_menu_seg7.0B208: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45576 + format: IA8 +menu/main_menu_seg7.0B248: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45640 + format: IA8 +menu/main_menu_seg7.0B288: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45704 + format: IA8 +menu/main_menu_seg7.0B2C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45768 + format: IA8 +menu/main_menu_seg7.0B308: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45832 + format: IA8 +menu/main_menu_seg7.0B348: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45896 + format: IA8 +menu/main_menu_seg7.0B388: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 45960 + format: IA8 +menu/main_menu_seg7.0B3C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46024 + format: IA8 +menu/main_menu_seg7.0B408: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46088 + format: IA8 +menu/main_menu_seg7.0B448: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46152 + format: IA8 +menu/main_menu_seg7.0B488: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46216 + format: IA8 +menu/main_menu_seg7.0B4C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46280 + format: IA8 +menu/main_menu_seg7.0B508: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46344 + format: IA8 +menu/main_menu_seg7.0B548: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46408 + format: IA8 +menu/main_menu_seg7.0B588: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46472 + format: IA8 +menu/main_menu_seg7.0B5C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46536 + format: IA8 +menu/main_menu_seg7.0B608: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46600 + format: IA8 +menu/main_menu_seg7.0B648: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46664 + format: IA8 +menu/main_menu_seg7.0B688: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46728 + format: IA8 +menu/main_menu_seg7.0B6C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46792 + format: IA8 +menu/main_menu_seg7.0B708: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46856 + format: IA8 +menu/main_menu_seg7.0B748: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46920 + format: IA8 +menu/main_menu_seg7.0B788: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46984 + format: IA8 +menu/main_menu_seg7.0B7C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47048 + format: IA8 +menu/main_menu_seg7.0B808: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47112 + format: IA8 +menu/main_menu_seg7.0B848: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47176 + format: IA8 +menu/main_menu_seg7.0B888: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47240 + format: IA8 +menu/main_menu_seg7.0B8C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47304 + format: IA8 +menu/main_menu_seg7.0B908: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47368 + format: IA8 +menu/main_menu_seg7.0B948: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47432 + format: IA8 +menu/main_menu_seg7.0B988: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47496 + format: IA8 +menu/main_menu_seg7.0B9C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47560 + format: IA8 +menu/main_menu_seg7.0BA08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47624 + format: IA8 +menu/main_menu_seg7.0BA48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47688 + format: IA8 +menu/main_menu_seg7.0BA88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47752 + format: IA8 +menu/main_menu_seg7.0BAC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47816 + format: IA8 +menu/main_menu_seg7.0BB08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47880 + format: IA8 +menu/main_menu_seg7.0BB48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 47944 + format: IA8 +menu/main_menu_seg7.0BB88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48008 + format: IA8 +menu/main_menu_seg7.0BBC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48072 + format: IA8 +menu/main_menu_seg7.0BC08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48136 + format: IA8 +menu/main_menu_seg7.0BC48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48200 + format: IA8 +menu/main_menu_seg7.0BC88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48264 + format: IA8 +menu/main_menu_seg7.0BCC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48328 + format: IA8 +menu/main_menu_seg7.0BD08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48392 + format: IA8 +menu/main_menu_seg7.0BD48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48456 + format: IA8 +menu/main_menu_seg7.0BD88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48520 + format: IA8 +menu/main_menu_seg7.0BDC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48584 + format: IA8 +menu/main_menu_seg7.0BE08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48648 + format: IA8 +menu/main_menu_seg7.0BE48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48712 + format: IA8 +menu/main_menu_seg7.0BE88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48776 + format: IA8 +menu/main_menu_seg7.0BEC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48840 + format: IA8 +menu/main_menu_seg7.0BF08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48904 + format: IA8 +menu/main_menu_seg7.0BF48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 48968 + format: IA8 +menu/main_menu_seg7.0BF88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49032 + format: IA8 +menu/main_menu_seg7.0BFC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49096 + format: IA8 +menu/main_menu_seg7.0C008: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49160 + format: IA8 +menu/main_menu_seg7.0C048: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49224 + format: IA8 +menu/main_menu_seg7.0C088: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49288 + format: IA8 +menu/main_menu_seg7.0C0C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49352 + format: IA8 +menu/main_menu_seg7.0C108: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49416 + format: IA8 +menu/main_menu_seg7.0C148: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49480 + format: IA8 +menu/main_menu_seg7.0C188: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49544 + format: IA8 +menu/main_menu_seg7.0C1C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49608 + format: IA8 +menu/main_menu_seg7.0C208: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49672 + format: IA8 +menu/main_menu_seg7.0C248: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49736 + format: IA8 +menu/main_menu_seg7.0C288: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49800 + format: IA8 +menu/main_menu_seg7.0C2C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49864 + format: IA8 +menu/main_menu_seg7.0C308: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49928 + format: IA8 +menu/main_menu_seg7.0C348: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 49992 + format: IA8 +menu/main_menu_seg7.0C388: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50056 + format: IA8 +menu/main_menu_seg7.0C3C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50120 + format: IA8 +menu/main_menu_seg7.0C408: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50184 + format: IA8 +menu/main_menu_seg7.0C448: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 46536 + format: IA8 +menu/main_menu_seg7.0C488: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50312 + format: IA8 +menu/main_menu_seg7.0C4C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50376 + format: IA8 +menu/main_menu_seg7.0C508: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50440 + format: IA8 +menu/main_menu_seg7.0C548: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50504 + format: IA8 +menu/main_menu_seg7.0C588: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50568 + format: IA8 +menu/main_menu_seg7.0C5C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50632 + format: IA8 +menu/main_menu_seg7.0C608: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50696 + format: IA8 +menu/main_menu_seg7.0C648: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50760 + format: IA8 +menu/main_menu_seg7.0C688: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50824 + format: IA8 +menu/main_menu_seg7.0C6C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50888 + format: IA8 +menu/main_menu_seg7.0C708: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 50952 + format: IA8 +menu/main_menu_seg7.0C748: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51016 + format: IA8 +menu/main_menu_seg7.0C788: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51080 + format: IA8 +menu/main_menu_seg7.0C7C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51144 + format: IA8 +menu/main_menu_seg7.0C808: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51208 + format: IA8 +menu/main_menu_seg7.0C848: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51272 + format: IA8 +menu/main_menu_seg7.0C888: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51336 + format: IA8 +menu/main_menu_seg7.0C8C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51400 + format: IA8 +menu/main_menu_seg7.0C908: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51464 + format: IA8 +menu/main_menu_seg7.0C948: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51528 + format: IA8 +menu/main_menu_seg7.0C988: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51592 + format: IA8 +menu/main_menu_seg7.0C9C8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51656 + format: IA8 +menu/main_menu_seg7.0CA08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51720 + format: IA8 +menu/main_menu_seg7.0CA48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51784 + format: IA8 +menu/main_menu_seg7.0CA88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51848 + format: IA8 +menu/main_menu_seg7.0CAC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51912 + format: IA8 +menu/main_menu_seg7.0CB08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 51976 + format: IA8 +menu/main_menu_seg7.0CB48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52040 + format: IA8 +menu/main_menu_seg7.0CB88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52104 + format: IA8 +menu/main_menu_seg7.0CBC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52168 + format: IA8 +menu/main_menu_seg7.0CC08: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52232 + format: IA8 +menu/main_menu_seg7.0CC48: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52296 + format: IA8 +menu/main_menu_seg7.0CC88: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52360 + format: IA8 +menu/main_menu_seg7.0CCC8: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2770736 + mio0: 52424 + format: IA8 +menu/main_menu_seg7.0D1A8: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2770736 + mio0: 53672 + format: RGBA16 +menu/main_menu_seg7.0E1A8: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2770736 + mio0: 57768 + format: RGBA16 +pss/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4905168 + mio0: 0 + format: RGBA16 +pss/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4905168 + mio0: 2048 + format: IA16 +pss/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4905168 + mio0: 4096 + format: RGBA16 +rr/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4413648 + mio0: 2048 + format: RGBA16 +rr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4413648 + mio0: 6144 + format: RGBA16 +rr/quarter_flying_carpet: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4413648 + mio0: 0 + format: RGBA16 +sl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4210704 + mio0: 0 + format: RGBA16 +sl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4210704 + mio0: 2048 + format: RGBA16 +sl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4210704 + mio0: 4096 + format: RGBA16 +sl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4210704 + mio0: 6144 + format: RGBA16 +sl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4210704 + mio0: 8192 + format: RGBA16 +ssl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 0 + format: RGBA16 +ssl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 2048 + format: IA16 +ssl/10: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4085520 + mio0: 55208 + format: RGBA16 +ssl/11: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4085520 + mio0: 59304 + format: RGBA16 +ssl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 4096 + format: RGBA16 +ssl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 6144 + format: RGBA16 +ssl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 8192 + format: RGBA16 +ssl/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4085520 + mio0: 10240 + format: RGBA16 +ssl/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 14336 + format: RGBA16 +ssl/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 32768 + format: RGBA16 +ssl/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4085520 + mio0: 49064 + format: RGBA16 +ssl/9: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4085520 + mio0: 51112 + format: RGBA16 +thi/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4335408 + mio0: 0 + format: RGBA16 +thi/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4335408 + mio0: 2048 + format: RGBA16 +totwc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4967376 + mio0: 0 + format: RGBA16 +totwc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4967376 + mio0: 4096 + format: RGBA16 +totwc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4967376 + mio0: 6144 + format: RGBA16 +totwc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4967376 + mio0: 8192 + format: IA16 +ttc/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4370304 + mio0: 0 + format: RGBA16 +ttc/1: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 4370304 + mio0: 2048 + format: RGBA16 +ttc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4370304 + mio0: 90000 + format: RGBA16 +ttm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 0 + format: IA16 +ttm/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 2048 + format: RGBA16 +ttm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 4096 + format: RGBA16 +ttm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 6144 + format: RGBA16 +ttm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 8192 + format: RGBA16 +ttm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5044400 + mio0: 10240 + format: RGBA16 +ttm/6: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 5044400 + mio0: 12288 + format: RGBA16 +ttm/7: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 5044400 + mio0: 16384 + format: RGBA16 +ttm/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 43008 + format: RGBA16 +vcutm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4564288 + mio0: 0 + format: RGBA16 +vcutm/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4564288 + mio0: 2048 + format: RGBA16 +vcutm/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4564288 + mio0: 6144 + format: RGBA16 +vcutm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4564288 + mio0: 10240 + format: RGBA16 +wdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4246992 + mio0: 0 + format: RGBA16 +wdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4246992 + mio0: 2048 + format: RGBA16 +wdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4246992 + mio0: 4096 + format: RGBA16 +wdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4246992 + mio0: 6144 + format: RGBA16 +wdw/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4246992 + mio0: 8192 + format: RGBA16 +wf/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4800560 + mio0: 0 + format: RGBA16 +wf/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4800560 + mio0: 2048 + format: RGBA16 +wf/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4800560 + mio0: 4096 + format: RGBA16 +wf/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4800560 + mio0: 6144 + format: RGBA16 +wf/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4800560 + mio0: 8192 + format: RGBA16 +wf/5: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1078992 + mio0: 62296 + format: IA8 +wmotr/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4989632 + mio0: 0 + format: RGBA16 +wmotr/1: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 4989632 + mio0: 2048 + format: RGBA16 +wmotr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4989632 + mio0: 3072 + format: RGBA16 +wmotr/3: + type: TEXTURE + size: 512 + width: 32 + height: 8 + offset: 4989632 + mio0: 5120 + format: RGBA16 +wmotr/4: + type: TEXTURE + size: 512 + width: 8 + height: 32 + offset: 4989632 + mio0: 5632 + format: RGBA16 diff --git a/assets/sm64/jp/sound.yml b/assets/sm64/jp/sound.yml new file mode 100644 index 0000000..5578e72 --- /dev/null +++ b/assets/sm64/jp/sound.yml @@ -0,0 +1,931 @@ +header: + type: AUDIO:HEADER + ctl: + offset: 5738816 + size: 94400 + tbl: + offset: 5833216 + size: 1793408 +banks/00_bank: + type: BANK + id: 0 +banks/01_bank: + type: BANK + id: 1 +banks/02_bank: + type: BANK + id: 2 +banks/03_bank: + type: BANK + id: 3 +banks/04_bank: + type: BANK + id: 4 +banks/05_bank: + type: BANK + id: 5 +banks/06_bank: + type: BANK + id: 6 +banks/07_bank: + type: BANK + id: 7 +banks/08_bank: + type: BANK + id: 8 +banks/09_bank: + type: BANK + id: 9 +banks/0A_bank: + type: BANK + id: 10 +banks/0B_bank: + type: BANK + id: 11 +banks/0C_bank: + type: BANK + id: 12 +banks/0D_bank: + type: BANK + id: 13 +banks/0E_bank: + type: BANK + id: 14 +banks/0F_bank: + type: BANK + id: 15 +banks/10_bank: + type: BANK + id: 16 +banks/11_bank: + type: BANK + id: 17 +banks/12_bank: + type: BANK + id: 18 +banks/13_bank: + type: BANK + id: 19 +banks/14_bank: + type: BANK + id: 20 +banks/15_bank: + type: BANK + id: 21 +banks/16_bank: + type: BANK + id: 22 +banks/17_bank: + type: BANK + id: 23 +banks/18_bank: + type: BANK + id: 24 +banks/19_bank: + type: BANK + id: 25 +banks/1A_bank: + type: BANK + id: 26 +banks/1B_bank: + type: BANK + id: 27 +banks/1C_bank: + type: BANK + id: 28 +banks/1D_bank: + type: BANK + id: 29 +banks/1E_bank: + type: BANK + id: 30 +banks/1F_bank: + type: BANK + id: 31 +banks/20_bank: + type: BANK + id: 32 +banks/21_bank: + type: BANK + id: 33 +banks/22_bank: + type: BANK + id: 34 +banks/23_bank: + type: BANK + id: 35 +banks/24_bank: + type: BANK + id: 36 +banks/25_bank: + type: BANK + id: 37 +samples/bowser_organ/00_organ_1: + type: SAMPLE + id: 195 +samples/bowser_organ/01_organ_1_lq: + type: SAMPLE + id: 196 +samples/bowser_organ/02_boys_choir: + type: SAMPLE + id: 197 +samples/course_start/00_la: + type: SAMPLE + id: 194 +samples/instruments/00: + type: SAMPLE + id: 120 +samples/instruments/01_banjo_1: + type: SAMPLE + id: 121 +samples/instruments/02: + type: SAMPLE + id: 122 +samples/instruments/03_human_whistle: + type: SAMPLE + id: 123 +samples/instruments/04_bright_piano: + type: SAMPLE + id: 124 +samples/instruments/05_acoustic_bass: + type: SAMPLE + id: 125 +samples/instruments/06_kick_drum_1: + type: SAMPLE + id: 126 +samples/instruments/07_rimshot: + type: SAMPLE + id: 127 +samples/instruments/08: + type: SAMPLE + id: 128 +samples/instruments/09: + type: SAMPLE + id: 129 +samples/instruments/0A_tambourine: + type: SAMPLE + id: 130 +samples/instruments/0B: + type: SAMPLE + id: 131 +samples/instruments/0C_conga_stick: + type: SAMPLE + id: 132 +samples/instruments/0D_clave: + type: SAMPLE + id: 133 +samples/instruments/0E_hihat_closed: + type: SAMPLE + id: 134 +samples/instruments/0F_hihat_open: + type: SAMPLE + id: 135 +samples/instruments/10_cymbal_bell: + type: SAMPLE + id: 136 +samples/instruments/11_splash_cymbal: + type: SAMPLE + id: 137 +samples/instruments/12_snare_drum_1: + type: SAMPLE + id: 138 +samples/instruments/13_snare_drum_2: + type: SAMPLE + id: 139 +samples/instruments/14_strings_5: + type: SAMPLE + id: 140 +samples/instruments/15_strings_4: + type: SAMPLE + id: 141 +samples/instruments/16_french_horns: + type: SAMPLE + id: 142 +samples/instruments/17_trumpet: + type: SAMPLE + id: 143 +samples/instruments/18_timpani: + type: SAMPLE + id: 144 +samples/instruments/19_brass: + type: SAMPLE + id: 145 +samples/instruments/1A_slap_bass: + type: SAMPLE + id: 146 +samples/instruments/1B_organ_2: + type: SAMPLE + id: 147 +samples/instruments/1C: + type: SAMPLE + id: 148 +samples/instruments/1D: + type: SAMPLE + id: 149 +samples/instruments/1E_closed_triangle: + type: SAMPLE + id: 150 +samples/instruments/1F_open_triangle: + type: SAMPLE + id: 151 +samples/instruments/20_cabasa: + type: SAMPLE + id: 152 +samples/instruments/21_sine_bass: + type: SAMPLE + id: 153 +samples/instruments/22_boys_choir: + type: SAMPLE + id: 154 +samples/instruments/23_strings_1: + type: SAMPLE + id: 155 +samples/instruments/24_strings_2: + type: SAMPLE + id: 156 +samples/instruments/25_strings_3: + type: SAMPLE + id: 157 +samples/instruments/26_crystal_rhodes: + type: SAMPLE + id: 158 +samples/instruments/27_harpsichord: + type: SAMPLE + id: 159 +samples/instruments/28_sitar_1: + type: SAMPLE + id: 160 +samples/instruments/29_orchestra_hit: + type: SAMPLE + id: 161 +samples/instruments/2A: + type: SAMPLE + id: 162 +samples/instruments/2B: + type: SAMPLE + id: 163 +samples/instruments/2C: + type: SAMPLE + id: 164 +samples/instruments/2D_trombone: + type: SAMPLE + id: 165 +samples/instruments/2E_accordion: + type: SAMPLE + id: 166 +samples/instruments/2F_sleigh_bells: + type: SAMPLE + id: 167 +samples/instruments/30_rarefaction-lahna: + type: SAMPLE + id: 168 +samples/instruments/31_rarefaction-convolution: + type: SAMPLE + id: 169 +samples/instruments/32_metal_rimshot: + type: SAMPLE + id: 170 +samples/instruments/33_kick_drum_2: + type: SAMPLE + id: 171 +samples/instruments/34_alto_flute: + type: SAMPLE + id: 172 +samples/instruments/35_gospel_organ: + type: SAMPLE + id: 173 +samples/instruments/36_sawtooth_synth: + type: SAMPLE + id: 174 +samples/instruments/37_square_synth: + type: SAMPLE + id: 175 +samples/instruments/38_electric_kick_drum: + type: SAMPLE + id: 176 +samples/instruments/39_sitar_2: + type: SAMPLE + id: 177 +samples/instruments/3A_music_box: + type: SAMPLE + id: 178 +samples/instruments/3B_banjo_2: + type: SAMPLE + id: 179 +samples/instruments/3C_acoustic_guitar: + type: SAMPLE + id: 180 +samples/instruments/3D: + type: SAMPLE + id: 181 +samples/instruments/3E_monk_choir: + type: SAMPLE + id: 182 +samples/instruments/3F: + type: SAMPLE + id: 183 +samples/instruments/40_bell: + type: SAMPLE + id: 184 +samples/instruments/41_pan_flute: + type: SAMPLE + id: 185 +samples/instruments/42_vibraphone: + type: SAMPLE + id: 186 +samples/instruments/43_harmonica: + type: SAMPLE + id: 187 +samples/instruments/44_grand_piano: + type: SAMPLE + id: 188 +samples/instruments/45_french_horns_lq: + type: SAMPLE + id: 189 +samples/instruments/46_pizzicato_strings_1: + type: SAMPLE + id: 190 +samples/instruments/47_pizzicato_strings_2: + type: SAMPLE + id: 191 +samples/instruments/48_steel_drum: + type: SAMPLE + id: 192 +samples/piranha_music_box/00_music_box: + type: SAMPLE + id: 193 +samples/sfx_1/00_twirl: + type: SAMPLE + id: 0 +samples/sfx_1/01_brushing: + type: SAMPLE + id: 1 +samples/sfx_1/02_hand_touch: + type: SAMPLE + id: 2 +samples/sfx_1/03_yoshi: + type: SAMPLE + id: 3 +samples/sfx_1/04_plop: + type: SAMPLE + id: 4 +samples/sfx_1/05_heavy_landing: + type: SAMPLE + id: 5 +samples/sfx_4/00: + type: SAMPLE + id: 17 +samples/sfx_4/01: + type: SAMPLE + id: 18 +samples/sfx_4/02: + type: SAMPLE + id: 19 +samples/sfx_4/03: + type: SAMPLE + id: 20 +samples/sfx_4/04: + type: SAMPLE + id: 21 +samples/sfx_4/05: + type: SAMPLE + id: 22 +samples/sfx_4/06: + type: SAMPLE + id: 23 +samples/sfx_4/07: + type: SAMPLE + id: 24 +samples/sfx_4/08: + type: SAMPLE + id: 25 +samples/sfx_4/09: + type: SAMPLE + id: 26 +samples/sfx_5/00: + type: SAMPLE + id: 27 +samples/sfx_5/01: + type: SAMPLE + id: 28 +samples/sfx_5/02: + type: SAMPLE + id: 29 +samples/sfx_5/03: + type: SAMPLE + id: 30 +samples/sfx_5/04: + type: SAMPLE + id: 31 +samples/sfx_5/05: + type: SAMPLE + id: 32 +samples/sfx_5/06: + type: SAMPLE + id: 33 +samples/sfx_5/07: + type: SAMPLE + id: 34 +samples/sfx_5/08: + type: SAMPLE + id: 35 +samples/sfx_5/09: + type: SAMPLE + id: 36 +samples/sfx_5/0A: + type: SAMPLE + id: 37 +samples/sfx_5/0B: + type: SAMPLE + id: 38 +samples/sfx_5/0C: + type: SAMPLE + id: 39 +samples/sfx_5/0D: + type: SAMPLE + id: 40 +samples/sfx_5/0E: + type: SAMPLE + id: 41 +samples/sfx_5/0F: + type: SAMPLE + id: 42 +samples/sfx_5/10: + type: SAMPLE + id: 43 +samples/sfx_5/11: + type: SAMPLE + id: 44 +samples/sfx_5/12: + type: SAMPLE + id: 45 +samples/sfx_5/13: + type: SAMPLE + id: 46 +samples/sfx_5/14: + type: SAMPLE + id: 47 +samples/sfx_5/15: + type: SAMPLE + id: 48 +samples/sfx_5/16: + type: SAMPLE + id: 49 +samples/sfx_5/17: + type: SAMPLE + id: 50 +samples/sfx_5/18: + type: SAMPLE + id: 51 +samples/sfx_5/19: + type: SAMPLE + id: 52 +samples/sfx_5/1A: + type: SAMPLE + id: 53 +samples/sfx_5/1B: + type: SAMPLE + id: 54 +samples/sfx_5/1C: + type: SAMPLE + id: 55 +samples/sfx_6/00: + type: SAMPLE + id: 56 +samples/sfx_6/01: + type: SAMPLE + id: 57 +samples/sfx_6/02: + type: SAMPLE + id: 58 +samples/sfx_6/03: + type: SAMPLE + id: 59 +samples/sfx_6/04: + type: SAMPLE + id: 60 +samples/sfx_6/05: + type: SAMPLE + id: 61 +samples/sfx_6/06: + type: SAMPLE + id: 62 +samples/sfx_6/07: + type: SAMPLE + id: 63 +samples/sfx_6/08: + type: SAMPLE + id: 64 +samples/sfx_6/09: + type: SAMPLE + id: 65 +samples/sfx_6/0A: + type: SAMPLE + id: 66 +samples/sfx_6/0B: + type: SAMPLE + id: 67 +samples/sfx_6/0C: + type: SAMPLE + id: 68 +samples/sfx_6/0D: + type: SAMPLE + id: 69 +samples/sfx_7/00: + type: SAMPLE + id: 70 +samples/sfx_7/01: + type: SAMPLE + id: 71 +samples/sfx_7/02: + type: SAMPLE + id: 72 +samples/sfx_7/03: + type: SAMPLE + id: 73 +samples/sfx_7/04: + type: SAMPLE + id: 74 +samples/sfx_7/05: + type: SAMPLE + id: 75 +samples/sfx_7/06: + type: SAMPLE + id: 76 +samples/sfx_7/07: + type: SAMPLE + id: 77 +samples/sfx_7/08: + type: SAMPLE + id: 78 +samples/sfx_7/09: + type: SAMPLE + id: 79 +samples/sfx_7/0A: + type: SAMPLE + id: 80 +samples/sfx_7/0B: + type: SAMPLE + id: 81 +samples/sfx_7/0C: + type: SAMPLE + id: 82 +samples/sfx_9/00: + type: SAMPLE + id: 99 +samples/sfx_9/01: + type: SAMPLE + id: 100 +samples/sfx_9/02: + type: SAMPLE + id: 101 +samples/sfx_9/03: + type: SAMPLE + id: 102 +samples/sfx_9/04_camera_buzz: + type: SAMPLE + id: 103 +samples/sfx_9/05_camera_shutter: + type: SAMPLE + id: 104 +samples/sfx_9/06: + type: SAMPLE + id: 105 +samples/sfx_mario/00_mario_jump_hoo: + type: SAMPLE + id: 83 +samples/sfx_mario/01_mario_jump_wah: + type: SAMPLE + id: 84 +samples/sfx_mario/02_mario_yah: + type: SAMPLE + id: 85 +samples/sfx_mario/03_mario_haha: + type: SAMPLE + id: 86 +samples/sfx_mario/04_mario_yahoo: + type: SAMPLE + id: 87 +samples/sfx_mario/05_mario_uh: + type: SAMPLE + id: 88 +samples/sfx_mario/06_mario_hrmm: + type: SAMPLE + id: 89 +samples/sfx_mario/07_mario_wah2: + type: SAMPLE + id: 90 +samples/sfx_mario/08_mario_whoa: + type: SAMPLE + id: 91 +samples/sfx_mario/09_mario_eeuh: + type: SAMPLE + id: 92 +samples/sfx_mario/0A_mario_attacked: + type: SAMPLE + id: 93 +samples/sfx_mario/0B_mario_ooof: + type: SAMPLE + id: 94 +samples/sfx_mario/0C_mario_here_we_go: + type: SAMPLE + id: 95 +samples/sfx_mario/0D_mario_yawning: + type: SAMPLE + id: 96 +samples/sfx_mario/0E_mario_snoring1: + type: SAMPLE + id: 97 +samples/sfx_mario/0F_mario_snoring2: + type: SAMPLE + id: 98 +samples/sfx_mario_peach/00_mario_waaaooow: + type: SAMPLE + id: 106 +samples/sfx_mario_peach/01_mario_hoohoo: + type: SAMPLE + id: 107 +samples/sfx_mario_peach/02_mario_panting: + type: SAMPLE + id: 108 +samples/sfx_mario_peach/03_mario_dying: + type: SAMPLE + id: 109 +samples/sfx_mario_peach/04_mario_on_fire: + type: SAMPLE + id: 110 +samples/sfx_mario_peach/05_mario_uh2: + type: SAMPLE + id: 111 +samples/sfx_mario_peach/06_mario_coughing: + type: SAMPLE + id: 112 +samples/sfx_mario_peach/07_mario_its_a_me_mario: + type: SAMPLE + id: 113 +samples/sfx_mario_peach/08_mario_punch_yah: + type: SAMPLE + id: 114 +samples/sfx_mario_peach/09_mario_punch_hoo: + type: SAMPLE + id: 115 +samples/sfx_mario_peach/0A_mario_mama_mia: + type: SAMPLE + id: 116 +samples/sfx_mario_peach/0B_mario_okey_dokey: + type: SAMPLE + id: 117 +samples/sfx_mario_peach/0C_mario_drowning: + type: SAMPLE + id: 118 +samples/sfx_mario_peach/0D_mario_thank_you_playing_my_game: + type: SAMPLE + id: 119 +samples/sfx_terrain/00_step_default: + type: SAMPLE + id: 6 +samples/sfx_terrain/01_step_grass: + type: SAMPLE + id: 7 +samples/sfx_terrain/02_step_stone: + type: SAMPLE + id: 8 +samples/sfx_terrain/03_step_spooky: + type: SAMPLE + id: 9 +samples/sfx_terrain/04_step_snow: + type: SAMPLE + id: 10 +samples/sfx_terrain/05_step_ice: + type: SAMPLE + id: 11 +samples/sfx_terrain/06_step_metal: + type: SAMPLE + id: 12 +samples/sfx_terrain/07_step_sand: + type: SAMPLE + id: 13 +samples/sfx_water/00_plunge: + type: SAMPLE + id: 14 +samples/sfx_water/01_splash: + type: SAMPLE + id: 15 +samples/sfx_water/02_swim: + type: SAMPLE + id: 16 +sequences/00_sound_player: + type: SEQUENCE + offset: 7626912 + size: 12800 + banks: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 +sequences/01_cutscene_collect_star: + type: SEQUENCE + offset: 7639712 + size: 633 + banks: + - 34 +sequences/02_menu_title_screen: + type: SEQUENCE + offset: 7640352 + size: 8276 + banks: + - 17 +sequences/03_level_grass: + type: SEQUENCE + offset: 7648640 + size: 5134 + banks: + - 34 +sequences/04_level_inside_castle: + type: SEQUENCE + offset: 7653776 + size: 2504 + banks: + - 14 +sequences/05_level_water: + type: SEQUENCE + offset: 7656288 + size: 4816 + banks: + - 19 +sequences/06_level_hot: + type: SEQUENCE + offset: 7661104 + size: 2459 + banks: + - 15 +sequences/07_level_boss_koopa: + type: SEQUENCE + offset: 7663568 + size: 3430 + banks: + - 18 +sequences/08_level_snow: + type: SEQUENCE + offset: 7667008 + size: 8157 + banks: + - 11 +sequences/09_level_slide: + type: SEQUENCE + offset: 7675168 + size: 7452 + banks: + - 13 +sequences/0A_level_spooky: + type: SEQUENCE + offset: 7682624 + size: 5686 + banks: + - 33 + - 16 +sequences/0B_event_piranha_plant: + type: SEQUENCE + offset: 7688320 + size: 1405 + banks: + - 20 +sequences/0C_level_underground: + type: SEQUENCE + offset: 7689728 + size: 4905 + banks: + - 21 +sequences/0D_menu_star_select: + type: SEQUENCE + offset: 7694640 + size: 138 + banks: + - 22 +sequences/0E_event_powerup: + type: SEQUENCE + offset: 7694784 + size: 3143 + banks: + - 23 +sequences/0F_event_metal_cap: + type: SEQUENCE + offset: 7697936 + size: 2786 + banks: + - 24 +sequences/10_event_koopa_message: + type: SEQUENCE + offset: 7700736 + size: 564 + banks: + - 18 +sequences/11_level_koopa_road: + type: SEQUENCE + offset: 7701312 + size: 4763 + banks: + - 25 +sequences/12_event_high_score: + type: SEQUENCE + offset: 7706080 + size: 279 + banks: + - 31 +sequences/13_event_merry_go_round: + type: SEQUENCE + offset: 7706368 + size: 1663 + banks: + - 33 +sequences/14_event_race: + type: SEQUENCE + offset: 7708032 + size: 203 + banks: + - 26 +sequences/15_cutscene_star_spawn: + type: SEQUENCE + offset: 7708240 + size: 654 + banks: + - 14 +sequences/16_event_boss: + type: SEQUENCE + offset: 7708896 + size: 3451 + banks: + - 27 +sequences/17_cutscene_collect_key: + type: SEQUENCE + offset: 7712352 + size: 683 + banks: + - 26 +sequences/18_event_endless_stairs: + type: SEQUENCE + offset: 7713040 + size: 1789 + banks: + - 28 +sequences/19_level_boss_koopa_final: + type: SEQUENCE + offset: 7714832 + size: 3527 + banks: + - 29 +sequences/1A_cutscene_credits: + type: SEQUENCE + offset: 7718368 + size: 14341 + banks: + - 37 +sequences/1B_event_solve_puzzle: + type: SEQUENCE + offset: 7732720 + size: 222 + banks: + - 20 +sequences/1C_event_toad_message: + type: SEQUENCE + offset: 7732944 + size: 214 + banks: + - 32 +sequences/1D_event_peach_message: + type: SEQUENCE + offset: 7733168 + size: 440 + banks: + - 30 +sequences/1E_cutscene_intro: + type: SEQUENCE + offset: 7733616 + size: 1774 + banks: + - 27 +sequences/1F_cutscene_victory: + type: SEQUENCE + offset: 7735392 + size: 2074 + banks: + - 26 +sequences/20_cutscene_ending: + type: SEQUENCE + offset: 7737472 + size: 1892 + banks: + - 35 +sequences/21_menu_file_select: + type: SEQUENCE + offset: 7739376 + size: 789 + banks: + - 36 \ No newline at end of file diff --git a/assets/sm64/jp/textures.yml b/assets/sm64/jp/textures.yml new file mode 100644 index 0000000..4b2e9b9 --- /dev/null +++ b/assets/sm64/jp/textures.yml @@ -0,0 +1,4687 @@ +cave/hmc_textures.00000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 0 + format: RGBA16 +cave/hmc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 4096 + format: RGBA16 +cave/hmc_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 6144 + format: RGBA16 +cave/hmc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 10240 + format: RGBA16 +cave/hmc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 12288 + format: RGBA16 +cave/hmc_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 14336 + format: RGBA16 +cave/hmc_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3432432 + mio0: 18432 + format: RGBA16 +cave/hmc_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 22528 + format: RGBA16 +cave/hmc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 26624 + format: RGBA16 +cave/hmc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 28672 + format: RGBA16 +cave/hmc_textures.07800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 30720 + format: RGBA16 +cave/hmc_textures.08800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 34816 + format: RGBA16 +cave/hmc_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 38912 + format: RGBA16 +cave/hmc_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 40960 + format: RGBA16 +cave/hmc_textures.0A800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3432432 + mio0: 43008 + format: RGBA16 +cave/hmc_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3432432 + mio0: 47104 + format: IA16 +cave/hmc_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 43008 + format: IA16 +effect/bubble.06048: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 24648 + format: RGBA16 +effect/flower.00008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 8 + format: RGBA16 +effect/flower.00808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 2056 + format: RGBA16 +effect/flower.01008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 4104 + format: RGBA16 +effect/flower.01808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 6152 + format: RGBA16 +effect/lava_bubble.02020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 8224 + format: RGBA16 +effect/lava_bubble.02820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 10272 + format: RGBA16 +effect/lava_bubble.03020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 12320 + format: RGBA16 +effect/lava_bubble.03820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 14368 + format: RGBA16 +effect/lava_bubble.04020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 16416 + format: RGBA16 +effect/lava_bubble.04820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 18464 + format: RGBA16 +effect/lava_bubble.05020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 20512 + format: RGBA16 +effect/lava_bubble.05820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3594960 + mio0: 22560 + format: RGBA16 +effect/tiny_bubble.0684C: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3594960 + mio0: 26700 + format: RGBA16 +effect/tiny_bubble.06AD8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3594960 + mio0: 27352 + format: RGBA16 +fire/lll_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 0 + format: RGBA16 +fire/lll_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 2048 + format: RGBA16 +fire/lll_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 4096 + format: RGBA16 +fire/lll_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 6144 + format: RGBA16 +fire/lll_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 8192 + format: RGBA16 +fire/lll_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 10240 + format: RGBA16 +fire/lll_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 12288 + format: RGBA16 +fire/lll_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 14336 + format: RGBA16 +fire/lll_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 16384 + format: RGBA16 +fire/lll_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 18432 + format: RGBA16 +fire/lll_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 20480 + format: RGBA16 +fire/lll_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 22528 + format: RGBA16 +fire/lll_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 24576 + format: RGBA16 +fire/lll_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 26624 + format: RGBA16 +fire/lll_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 28672 + format: RGBA16 +fire/lll_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 30720 + format: RGBA16 +fire/lll_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 32768 + format: RGBA16 +fire/lll_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 34816 + format: RGBA16 +fire/lll_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 80984 + format: RGBA16 +fire/lll_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 38912 + format: RGBA16 +fire/lll_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 40960 + format: RGBA16 +fire/lll_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 43008 + format: RGBA16 +fire/lll_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 45056 + format: RGBA16 +fire/lll_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3262320 + mio0: 47104 + format: RGBA16 +generic/bob_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 0 + format: RGBA16 +generic/bob_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1327760 + mio0: 36160 + format: RGBA16 +generic/bob_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 4096 + format: RGBA16 +generic/bob_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 6144 + format: RGBA16 +generic/bob_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 8192 + format: RGBA16 +generic/bob_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 10240 + format: RGBA16 +generic/bob_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 12288 + format: RGBA16 +generic/bob_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 14336 + format: RGBA16 +generic/bob_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 16384 + format: RGBA16 +generic/bob_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 18432 + format: RGBA16 +generic/bob_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 20480 + format: RGBA16 +generic/bob_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 22528 + format: RGBA16 +generic/bob_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3323408 + mio0: 24576 + format: RGBA16 +generic/bob_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 28672 + format: RGBA16 +generic/bob_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 30720 + format: RGBA16 +generic/bob_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 32768 + format: RGBA16 +generic/bob_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 34816 + format: RGBA16 +generic/bob_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 36864 + format: RGBA16 +generic/bob_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 38912 + format: RGBA16 +generic/bob_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 40960 + format: RGBA16 +generic/bob_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 43008 + format: RGBA16 +generic/bob_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 45056 + format: IA16 +grass/wf_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 0 + format: RGBA16 +grass/wf_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 2048 + format: RGBA16 +grass/wf_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 4096 + format: RGBA16 +grass/wf_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 6144 + format: RGBA16 +grass/wf_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 8192 + format: RGBA16 +grass/wf_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 10240 + format: RGBA16 +grass/wf_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 12288 + format: RGBA16 +grass/wf_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 14336 + format: RGBA16 +grass/wf_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 16384 + format: RGBA16 +grass/wf_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 18432 + format: RGBA16 +grass/wf_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 20480 + format: RGBA16 +grass/wf_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 22528 + format: RGBA16 +grass/wf_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 20480 + format: RGBA16 +grass/wf_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 26624 + format: RGBA16 +grass/wf_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 28672 + format: RGBA16 +grass/wf_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 30720 + format: RGBA16 +grass/wf_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 32768 + format: RGBA16 +grass/wf_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 34816 + format: RGBA16 +grass/wf_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 36864 + format: RGBA16 +grass/wf_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 38912 + format: RGBA16 +grass/wf_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 40960 + format: RGBA16 +grass/wf_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 43008 + format: RGBA16 +grass/wf_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 45056 + format: IA16 +grass/wf_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3496176 + mio0: 47104 + format: IA16 +inside/inside_castle_textures.00000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3555104 + mio0: 0 + format: RGBA16 +inside/inside_castle_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3555104 + mio0: 4096 + format: RGBA16 +inside/inside_castle_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3555104 + mio0: 8192 + format: RGBA16 +inside/inside_castle_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 12288 + format: RGBA16 +inside/inside_castle_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 14336 + format: RGBA16 +inside/inside_castle_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 16384 + format: RGBA16 +inside/inside_castle_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 2048 + format: RGBA16 +inside/inside_castle_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 20480 + format: RGBA16 +inside/inside_castle_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 22528 + format: RGBA16 +inside/inside_castle_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3555104 + mio0: 24576 + format: RGBA16 +inside/inside_castle_textures.07000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3555104 + mio0: 28672 + format: RGBA16 +inside/inside_castle_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 32768 + format: RGBA16 +inside/inside_castle_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 34816 + format: RGBA16 +inside/inside_castle_textures.09000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3555104 + mio0: 36864 + format: RGBA16 +inside/inside_castle_textures.0A000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3555104 + mio0: 40960 + format: RGBA16 +inside/inside_castle_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3555104 + mio0: 45056 + format: RGBA16 +inside/inside_castle_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3555104 + mio0: 47104 + format: RGBA16 +intro_raw/hand_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2455304 + format: RGBA16 +intro_raw/hand_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2453248 + format: RGBA16 +intro_raw/mario_face_shine: + type: TEXTURE + size: 1024 + width: 32 + height: 32 + offset: 2503888 + format: IA8 +intro_raw/red_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2457352 + format: RGBA16 +intro_raw/red_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2459400 + format: RGBA16 +intro_raw/red_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2461448 + format: RGBA16 +intro_raw/red_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2463496 + format: RGBA16 +intro_raw/red_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2465544 + format: RGBA16 +intro_raw/red_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2467592 + format: RGBA16 +intro_raw/red_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2469640 + format: RGBA16 +intro_raw/red_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2471688 + format: RGBA16 +intro_raw/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2490888 + format: RGBA16 +intro_raw/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2492936 + format: RGBA16 +intro_raw/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2494984 + format: RGBA16 +intro_raw/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2497032 + format: RGBA16 +intro_raw/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2499080 + format: RGBA16 +intro_raw/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2501128 + format: RGBA16 +intro_raw/white_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2473736 + format: RGBA16 +intro_raw/white_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2475784 + format: RGBA16 +intro_raw/white_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2477832 + format: RGBA16 +intro_raw/white_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2479880 + format: RGBA16 +intro_raw/white_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2481928 + format: RGBA16 +intro_raw/white_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2483976 + format: RGBA16 +intro_raw/white_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2486024 + format: RGBA16 +intro_raw/white_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2488072 + format: RGBA16 +ipl3_raw/ipl3_font_00: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2928 + format: IA1 +ipl3_raw/ipl3_font_01: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2951 + format: IA1 +ipl3_raw/ipl3_font_02: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2974 + format: IA1 +ipl3_raw/ipl3_font_03: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2997 + format: IA1 +ipl3_raw/ipl3_font_04: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3020 + format: IA1 +ipl3_raw/ipl3_font_05: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3043 + format: IA1 +ipl3_raw/ipl3_font_06: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3066 + format: IA1 +ipl3_raw/ipl3_font_07: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3089 + format: IA1 +ipl3_raw/ipl3_font_08: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3112 + format: IA1 +ipl3_raw/ipl3_font_09: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3135 + format: IA1 +ipl3_raw/ipl3_font_10: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3158 + format: IA1 +ipl3_raw/ipl3_font_11: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3181 + format: IA1 +ipl3_raw/ipl3_font_12: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3204 + format: IA1 +ipl3_raw/ipl3_font_13: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3227 + format: IA1 +ipl3_raw/ipl3_font_14: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3250 + format: IA1 +ipl3_raw/ipl3_font_15: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3273 + format: IA1 +ipl3_raw/ipl3_font_16: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3296 + format: IA1 +ipl3_raw/ipl3_font_17: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3319 + format: IA1 +ipl3_raw/ipl3_font_18: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3342 + format: IA1 +ipl3_raw/ipl3_font_19: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3365 + format: IA1 +ipl3_raw/ipl3_font_20: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3388 + format: IA1 +ipl3_raw/ipl3_font_21: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3411 + format: IA1 +ipl3_raw/ipl3_font_22: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3434 + format: IA1 +ipl3_raw/ipl3_font_23: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3457 + format: IA1 +ipl3_raw/ipl3_font_24: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3480 + format: IA1 +ipl3_raw/ipl3_font_25: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3503 + format: IA1 +ipl3_raw/ipl3_font_26: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3526 + format: IA1 +ipl3_raw/ipl3_font_27: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3549 + format: IA1 +ipl3_raw/ipl3_font_28: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3572 + format: IA1 +ipl3_raw/ipl3_font_29: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3595 + format: IA1 +ipl3_raw/ipl3_font_30: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3618 + format: IA1 +ipl3_raw/ipl3_font_31: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3641 + format: IA1 +ipl3_raw/ipl3_font_32: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3664 + format: IA1 +ipl3_raw/ipl3_font_33: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3687 + format: IA1 +ipl3_raw/ipl3_font_34: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3710 + format: IA1 +ipl3_raw/ipl3_font_35: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3733 + format: IA1 +ipl3_raw/ipl3_font_36: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3756 + format: IA1 +ipl3_raw/ipl3_font_37: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3779 + format: IA1 +ipl3_raw/ipl3_font_38: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3802 + format: IA1 +ipl3_raw/ipl3_font_39: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3825 + format: IA1 +ipl3_raw/ipl3_font_40: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3848 + format: IA1 +ipl3_raw/ipl3_font_41: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3871 + format: IA1 +ipl3_raw/ipl3_font_42: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3894 + format: IA1 +ipl3_raw/ipl3_font_43: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3917 + format: IA1 +ipl3_raw/ipl3_font_44: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3940 + format: IA1 +ipl3_raw/ipl3_font_45: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3963 + format: IA1 +ipl3_raw/ipl3_font_46: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3986 + format: IA1 +ipl3_raw/ipl3_font_47: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4009 + format: IA1 +ipl3_raw/ipl3_font_48: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4032 + format: IA1 +ipl3_raw/ipl3_font_49: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4055 + format: IA1 +machine/ttc_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 0 + format: RGBA16 +machine/ttc_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 2048 + format: RGBA16 +machine/ttc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 4096 + format: RGBA16 +machine/ttc_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 6144 + format: RGBA16 +machine/ttc_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 8192 + format: RGBA16 +machine/ttc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 10240 + format: RGBA16 +machine/ttc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 12288 + format: RGBA16 +machine/ttc_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 14336 + format: RGBA16 +machine/ttc_textures.04000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3460352 + mio0: 16384 + format: RGBA16 +machine/ttc_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 20480 + format: RGBA16 +machine/ttc_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 22528 + format: RGBA16 +machine/ttc_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 24576 + format: RGBA16 +machine/ttc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 26624 + format: RGBA16 +machine/ttc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 28672 + format: RGBA16 +machine/ttc_textures.07800: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 3460352 + mio0: 30720 + format: RGBA16 +machine/ttc_textures.08000: + type: TEXTURE + size: 1024 + width: 64 + height: 8 + offset: 3460352 + mio0: 32768 + format: RGBA16 +machine/ttc_textures.08400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3460352 + mio0: 33792 + format: RGBA16 +mountain/ttm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 0 + format: RGBA16 +mountain/ttm_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3473152 + mio0: 2048 + format: RGBA16 +mountain/ttm_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3473152 + mio0: 6144 + format: RGBA16 +mountain/ttm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 10240 + format: RGBA16 +mountain/ttm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 12288 + format: RGBA16 +mountain/ttm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 14336 + format: RGBA16 +mountain/ttm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 16384 + format: RGBA16 +mountain/ttm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 18432 + format: RGBA16 +mountain/ttm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 20480 + format: RGBA16 +mountain/ttm_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3473152 + mio0: 22528 + format: RGBA16 +mountain/ttm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 26624 + format: RGBA16 +mountain/ttm_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 28672 + format: RGBA16 +mountain/ttm_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 30720 + format: RGBA16 +mountain/ttm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 32768 + format: RGBA16 +mountain/ttm_textures.08800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3473152 + mio0: 34816 + format: RGBA16 +mountain/ttm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 38912 + format: RGBA16 +mountain/ttm_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 24576 + format: RGBA16 +mountain/ttm_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 43008 + format: RGBA16 +mountain/ttm_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 45056 + format: RGBA16 +mountain/ttm_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 47104 + format: RGBA16 +mountain/ttm_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3473152 + mio0: 49152 + format: RGBA16 +outside/castle_grounds_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 0 + format: RGBA16 +outside/castle_grounds_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 2048 + format: RGBA16 +outside/castle_grounds_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3527344 + mio0: 4096 + format: RGBA16 +outside/castle_grounds_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3527344 + mio0: 8192 + format: RGBA16 +outside/castle_grounds_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 12288 + format: RGBA16 +outside/castle_grounds_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 14336 + format: RGBA16 +outside/castle_grounds_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 16384 + format: RGBA16 +outside/castle_grounds_textures.04800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3527344 + mio0: 18432 + format: RGBA16 +outside/castle_grounds_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 22528 + format: RGBA16 +outside/castle_grounds_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 24576 + format: RGBA16 +outside/castle_grounds_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3527344 + mio0: 26624 + format: RGBA16 +outside/castle_grounds_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 30720 + format: RGBA16 +outside/castle_grounds_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 32768 + format: RGBA16 +outside/castle_grounds_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 34816 + format: RGBA16 +outside/castle_grounds_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 36864 + format: RGBA16 +outside/castle_grounds_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 38912 + format: RGBA16 +outside/castle_grounds_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 40960 + format: RGBA16 +outside/castle_grounds_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 43008 + format: RGBA16 +outside/castle_grounds_textures.0B000: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3527344 + mio0: 45056 + format: RGBA16 +outside/castle_grounds_textures.0B400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3527344 + mio0: 46080 + format: RGBA16 +outside/castle_grounds_textures.0BC00: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3323408 + mio0: 45056 + format: IA16 +segment2/font_graphics.06410: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 1599504 + mio0: 83574 + format: IA1 +segment2/font_graphics.06420: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 1844608 + mio0: 133979 + format: IA1 +segment2/segment2.00000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 0 + format: RGBA16 +segment2/segment2.00200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 512 + format: RGBA16 +segment2/segment2.00400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 1024 + format: RGBA16 +segment2/segment2.00600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 1536 + format: RGBA16 +segment2/segment2.00800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 2048 + format: RGBA16 +segment2/segment2.00A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 2560 + format: RGBA16 +segment2/segment2.00C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 3072 + format: RGBA16 +segment2/segment2.00E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 3584 + format: RGBA16 +segment2/segment2.01000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 4096 + format: RGBA16 +segment2/segment2.01200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 4608 + format: RGBA16 +segment2/segment2.01400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 5120 + format: RGBA16 +segment2/segment2.01600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 5632 + format: RGBA16 +segment2/segment2.01800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 6144 + format: RGBA16 +segment2/segment2.01A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 6656 + format: RGBA16 +segment2/segment2.01C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 7168 + format: RGBA16 +segment2/segment2.01E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 7680 + format: RGBA16 +segment2/segment2.02000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 8192 + format: RGBA16 +segment2/segment2.02200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 8704 + format: RGBA16 +segment2/segment2.02400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 9216 + format: RGBA16 +segment2/segment2.02600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 9728 + format: RGBA16 +segment2/segment2.02800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 10240 + format: RGBA16 +segment2/segment2.02A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 10752 + format: RGBA16 +segment2/segment2.02C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 11264 + format: RGBA16 +segment2/segment2.02E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 11776 + format: RGBA16 +segment2/segment2.03000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 12288 + format: RGBA16 +segment2/segment2.03200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 12800 + format: RGBA16 +segment2/segment2.03400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 13312 + format: RGBA16 +segment2/segment2.03600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 13824 + format: RGBA16 +segment2/segment2.03800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 14336 + format: RGBA16 +segment2/segment2.03A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 14848 + format: RGBA16 +segment2/segment2.03C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 15360 + format: RGBA16 +segment2/segment2.03E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 15872 + format: RGBA16 +segment2/segment2.04000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 16384 + format: RGBA16 +segment2/segment2.04200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 16896 + format: RGBA16 +segment2/segment2.04400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 17408 + format: RGBA16 +segment2/segment2.04600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 17920 + format: RGBA16 +segment2/segment2.04800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 18432 + format: RGBA16 +segment2/segment2.04A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 18944 + format: RGBA16 +segment2/segment2.04C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 19456 + format: RGBA16 +segment2/segment2.04E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 19968 + format: RGBA16 +segment2/segment2.05000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 20480 + format: RGBA16 +segment2/segment2.05200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 20992 + format: RGBA16 +segment2/segment2.05400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 21504 + format: RGBA16 +segment2/segment2.05600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 22016 + format: RGBA16 +segment2/segment2.05800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 22528 + format: RGBA16 +segment2/segment2.05A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 23040 + format: RGBA16 +segment2/segment2.05C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 23552 + format: RGBA16 +segment2/segment2.05E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 24064 + format: RGBA16 +segment2/segment2.06000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 24576 + format: RGBA16 +segment2/segment2.06200: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25088 + format: RGBA16 +segment2/segment2.06280: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25216 + format: RGBA16 +segment2/segment2.06300: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25344 + format: RGBA16 +segment2/segment2.06380: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25472 + format: RGBA16 +segment2/segment2.06400: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25600 + format: RGBA16 +segment2/segment2.06480: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25728 + format: RGBA16 +segment2/segment2.06500: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25856 + format: RGBA16 +segment2/segment2.06580: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 25984 + format: RGBA16 +segment2/segment2.06600: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26112 + format: RGBA16 +segment2/segment2.06680: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26240 + format: RGBA16 +segment2/segment2.06700: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26368 + format: RGBA16 +segment2/segment2.06780: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26496 + format: RGBA16 +segment2/segment2.06800: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26624 + format: RGBA16 +segment2/segment2.06880: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26752 + format: RGBA16 +segment2/segment2.06900: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 26880 + format: RGBA16 +segment2/segment2.06980: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27008 + format: RGBA16 +segment2/segment2.06A00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27136 + format: RGBA16 +segment2/segment2.06A80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27264 + format: RGBA16 +segment2/segment2.06B00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27392 + format: RGBA16 +segment2/segment2.06B80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27520 + format: RGBA16 +segment2/segment2.06C00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27648 + format: RGBA16 +segment2/segment2.06C80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27776 + format: RGBA16 +segment2/segment2.06D00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 27904 + format: RGBA16 +segment2/segment2.06D80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28032 + format: RGBA16 +segment2/segment2.06E00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28160 + format: RGBA16 +segment2/segment2.06E80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28288 + format: RGBA16 +segment2/segment2.06F00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28416 + format: RGBA16 +segment2/segment2.06F80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28544 + format: RGBA16 +segment2/segment2.07000: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28672 + format: RGBA16 +segment2/segment2.07080: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 28800 + format: RGBA16 +segment2/segment2.07100: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 28928 + format: IA1 +segment2/segment2.07110: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 28944 + format: IA1 +segment2/segment2.07120: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 28960 + format: IA1 +segment2/segment2.07130: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 28976 + format: IA1 +segment2/segment2.07140: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 28992 + format: IA1 +segment2/segment2.07150: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29008 + format: IA1 +segment2/segment2.07160: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29024 + format: IA1 +segment2/segment2.07170: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29040 + format: IA1 +segment2/segment2.07180: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29056 + format: IA1 +segment2/segment2.07190: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29072 + format: IA1 +segment2/segment2.071A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29088 + format: IA1 +segment2/segment2.071B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29104 + format: IA1 +segment2/segment2.071C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29120 + format: IA1 +segment2/segment2.071D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29136 + format: IA1 +segment2/segment2.071E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29152 + format: IA1 +segment2/segment2.071F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29168 + format: IA1 +segment2/segment2.07200: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29184 + format: IA1 +segment2/segment2.07210: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29200 + format: IA1 +segment2/segment2.07220: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29216 + format: IA1 +segment2/segment2.07230: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29232 + format: IA1 +segment2/segment2.07240: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29248 + format: IA1 +segment2/segment2.07250: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29264 + format: IA1 +segment2/segment2.07260: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29280 + format: IA1 +segment2/segment2.07270: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29296 + format: IA1 +segment2/segment2.07280: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29312 + format: IA1 +segment2/segment2.07290: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29328 + format: IA1 +segment2/segment2.072A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29344 + format: IA1 +segment2/segment2.072B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29360 + format: IA1 +segment2/segment2.072C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29376 + format: IA1 +segment2/segment2.072D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29392 + format: IA1 +segment2/segment2.072E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29408 + format: IA1 +segment2/segment2.072F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29424 + format: IA1 +segment2/segment2.07300: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29440 + format: IA1 +segment2/segment2.07310: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29456 + format: IA1 +segment2/segment2.07320: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29472 + format: IA1 +segment2/segment2.07330: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29488 + format: IA1 +segment2/segment2.07340: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29504 + format: IA1 +segment2/segment2.07350: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29520 + format: IA1 +segment2/segment2.07360: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29536 + format: IA1 +segment2/segment2.07370: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29552 + format: IA1 +segment2/segment2.07380: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29568 + format: IA1 +segment2/segment2.07390: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29584 + format: IA1 +segment2/segment2.073A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29600 + format: IA1 +segment2/segment2.073B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29616 + format: IA1 +segment2/segment2.073C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29632 + format: IA1 +segment2/segment2.073D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29648 + format: IA1 +segment2/segment2.073E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29664 + format: IA1 +segment2/segment2.073F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29680 + format: IA1 +segment2/segment2.07400: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29696 + format: IA1 +segment2/segment2.07410: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29712 + format: IA1 +segment2/segment2.07420: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29728 + format: IA1 +segment2/segment2.07430: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29744 + format: IA1 +segment2/segment2.07440: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29760 + format: IA1 +segment2/segment2.07450: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29776 + format: IA1 +segment2/segment2.07460: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29792 + format: IA1 +segment2/segment2.07470: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29808 + format: IA1 +segment2/segment2.07480: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29824 + format: IA1 +segment2/segment2.07490: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29840 + format: IA1 +segment2/segment2.074A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29856 + format: IA1 +segment2/segment2.074B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29872 + format: IA1 +segment2/segment2.074C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29888 + format: IA1 +segment2/segment2.074D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29904 + format: IA1 +segment2/segment2.074E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29920 + format: IA1 +segment2/segment2.074F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29936 + format: IA1 +segment2/segment2.07500: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29952 + format: IA1 +segment2/segment2.07510: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29968 + format: IA1 +segment2/segment2.07520: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 29984 + format: IA1 +segment2/segment2.07530: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30000 + format: IA1 +segment2/segment2.07540: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30016 + format: IA1 +segment2/segment2.07550: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30032 + format: IA1 +segment2/segment2.07560: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30048 + format: IA1 +segment2/segment2.07570: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30064 + format: IA1 +segment2/segment2.07580: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30080 + format: IA1 +segment2/segment2.07590: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30096 + format: IA1 +segment2/segment2.075A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30112 + format: IA1 +segment2/segment2.075B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30128 + format: IA1 +segment2/segment2.075C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30144 + format: IA1 +segment2/segment2.075D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30160 + format: IA1 +segment2/segment2.075E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30176 + format: IA1 +segment2/segment2.075F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30192 + format: IA1 +segment2/segment2.07600: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30208 + format: IA1 +segment2/segment2.07610: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30224 + format: IA1 +segment2/segment2.07620: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30240 + format: IA1 +segment2/segment2.07630: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30256 + format: IA1 +segment2/segment2.07640: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30272 + format: IA1 +segment2/segment2.07650: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30288 + format: IA1 +segment2/segment2.07660: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30304 + format: IA1 +segment2/segment2.07670: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30320 + format: IA1 +segment2/segment2.07680: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30336 + format: IA1 +segment2/segment2.07690: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30352 + format: IA1 +segment2/segment2.076A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30368 + format: IA1 +segment2/segment2.076B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30384 + format: IA1 +segment2/segment2.076C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30400 + format: IA1 +segment2/segment2.076D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30416 + format: IA1 +segment2/segment2.076E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30432 + format: IA1 +segment2/segment2.076F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30448 + format: IA1 +segment2/segment2.07700: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30464 + format: IA1 +segment2/segment2.07710: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30480 + format: IA1 +segment2/segment2.07720: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30496 + format: IA1 +segment2/segment2.07730: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30512 + format: IA1 +segment2/segment2.07740: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30528 + format: IA1 +segment2/segment2.07750: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30544 + format: IA1 +segment2/segment2.07760: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30560 + format: IA1 +segment2/segment2.07770: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30576 + format: IA1 +segment2/segment2.07780: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30592 + format: IA1 +segment2/segment2.07790: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30608 + format: IA1 +segment2/segment2.077A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30624 + format: IA1 +segment2/segment2.077B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30640 + format: IA1 +segment2/segment2.077C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30656 + format: IA1 +segment2/segment2.077D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30672 + format: IA1 +segment2/segment2.077E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30688 + format: IA1 +segment2/segment2.077F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30704 + format: IA1 +segment2/segment2.07800: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30720 + format: IA1 +segment2/segment2.07810: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30736 + format: IA1 +segment2/segment2.07820: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30752 + format: IA1 +segment2/segment2.07830: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30768 + format: IA1 +segment2/segment2.07840: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30784 + format: IA1 +segment2/segment2.07850: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30800 + format: IA1 +segment2/segment2.07860: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30816 + format: IA1 +segment2/segment2.07870: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30832 + format: IA1 +segment2/segment2.07880: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30848 + format: IA1 +segment2/segment2.07890: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30864 + format: IA1 +segment2/segment2.078A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30880 + format: IA1 +segment2/segment2.078B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30896 + format: IA1 +segment2/segment2.078C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30912 + format: IA1 +segment2/segment2.078D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30928 + format: IA1 +segment2/segment2.078E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30944 + format: IA1 +segment2/segment2.078F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30960 + format: IA1 +segment2/segment2.07900: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30976 + format: IA1 +segment2/segment2.07910: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 30992 + format: IA1 +segment2/segment2.07920: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31008 + format: IA1 +segment2/segment2.07930: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31024 + format: IA1 +segment2/segment2.07940: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31040 + format: IA1 +segment2/segment2.07950: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31056 + format: IA1 +segment2/segment2.07960: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31072 + format: IA1 +segment2/segment2.07970: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31088 + format: IA1 +segment2/segment2.07980: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31104 + format: IA1 +segment2/segment2.07990: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31120 + format: IA1 +segment2/segment2.079A0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31136 + format: IA1 +segment2/segment2.079B0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31152 + format: IA1 +segment2/segment2.079C0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31168 + format: IA1 +segment2/segment2.079D0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31184 + format: IA1 +segment2/segment2.079E0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31200 + format: IA1 +segment2/segment2.079F0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31216 + format: IA1 +segment2/segment2.07A00: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31232 + format: IA1 +segment2/segment2.07A10: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31248 + format: IA1 +segment2/segment2.07A20: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31264 + format: IA1 +segment2/segment2.07A30: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31280 + format: IA1 +segment2/segment2.07A40: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31296 + format: IA1 +segment2/segment2.07A50: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31312 + format: IA1 +segment2/segment2.07A60: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31328 + format: IA1 +segment2/segment2.07A70: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31344 + format: IA1 +segment2/segment2.07A80: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31360 + format: IA1 +segment2/segment2.07A90: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31376 + format: IA1 +segment2/segment2.07AA0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31392 + format: IA1 +segment2/segment2.07AB0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31408 + format: IA1 +segment2/segment2.07AC0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31424 + format: IA1 +segment2/segment2.07AD0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31440 + format: IA1 +segment2/segment2.07AE0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31456 + format: IA1 +segment2/segment2.07AF0: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31472 + format: IA1 +segment2/segment2.07B00: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31488 + format: IA1 +segment2/segment2.07B10: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31504 + format: IA1 +segment2/segment2.07B20: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31520 + format: IA1 +segment2/segment2.07B30: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31536 + format: IA1 +segment2/segment2.07B40: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1078992 + mio0: 31552 + format: IA1 +segment2/segment2.07B50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 31568 + format: RGBA16 +segment2/segment2.07D50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 32080 + format: RGBA16 +segment2/segment2.07F50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1078992 + mio0: 32592 + format: RGBA16 +segment2/segment2.08150: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 33104 + format: RGBA16 +segment2/segment2.081D0: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1078992 + mio0: 33232 + format: RGBA16 +segment2/segment2.0F458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1078992 + mio0: 62552 + format: IA8 +segment2/segment2.0FC58: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1078992 + mio0: 64600 + format: IA8 +segment2/segment2.10458: + type: TEXTURE + size: 4096 + width: 64 + height: 64 + offset: 1078992 + mio0: 66648 + format: IA8 +segment2/segment2.11458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1078992 + mio0: 70744 + format: IA8 +segment2/segment2.11C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 72792 + format: RGBA16 +segment2/segment2.12458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 74840 + format: RGBA16 +segment2/segment2.12C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 76888 + format: RGBA16 +segment2/segment2.13458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 78936 + format: IA16 +segment2/segment2.13C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1078992 + mio0: 80984 + format: RGBA16 +segment2/segment2.14838: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 1078992 + mio0: 84024 + format: IA8 +segment2/shadow_quarter_circle: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1078992 + mio0: 62040 + format: IA8 +segment2/shadow_quarter_square: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1078992 + mio0: 62296 + format: IA8 +sky/metal_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 26624 + format: RGBA16 +sky/rr_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 0 + format: RGBA16 +sky/rr_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 2048 + format: RGBA16 +sky/rr_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 4096 + format: RGBA16 +sky/rr_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 6144 + format: RGBA16 +sky/rr_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3390640 + mio0: 8192 + format: RGBA16 +sky/rr_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 12288 + format: RGBA16 +sky/rr_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3390640 + mio0: 14336 + format: RGBA16 +sky/rr_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 18432 + format: RGBA16 +sky/rr_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 20480 + format: RGBA16 +sky/rr_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 22528 + format: RGBA16 +sky/rr_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 24576 + format: RGBA16 +sky/rr_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 28672 + format: RGBA16 +sky/rr_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 30720 + format: RGBA16 +sky/rr_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3390640 + mio0: 32768 + format: RGBA16 +skyboxes/bbh: + type: BLOB + size: 84288 + offset: 3118928 + mio0: 0 +skyboxes/bidw: + type: BLOB + size: 131392 + offset: 3146352 + mio0: 0 +skyboxes/bitfs: + type: BLOB + size: 102720 + offset: 2942432 + mio0: 0 +skyboxes/bits: + type: BLOB + size: 131392 + offset: 3191904 + mio0: 0 +skyboxes/ccm: + type: BLOB + size: 131392 + offset: 2847920 + mio0: 0 +skyboxes/cloud_floor: + type: BLOB + size: 131392 + offset: 3038752 + mio0: 0 +skyboxes/clouds: + type: BLOB + size: 84288 + offset: 2906480 + mio0: 0 +skyboxes/ssl: + type: BLOB + size: 131392 + offset: 3078784 + mio0: 0 +skyboxes/water: + type: BLOB + size: 131392 + offset: 2796624 + mio0: 0 +skyboxes/wdw: + type: BLOB + size: 131392 + offset: 2968208 + mio0: 0 +snow/ccm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 0 + format: RGBA16 +snow/ccm_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 2048 + format: RGBA16 +snow/ccm_textures.01000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3405536 + mio0: 4096 + format: RGBA16 +snow/ccm_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 8192 + format: RGBA16 +snow/ccm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 10240 + format: RGBA16 +snow/ccm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 12288 + format: RGBA16 +snow/ccm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 14336 + format: RGBA16 +snow/ccm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 16384 + format: RGBA16 +snow/ccm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 18432 + format: RGBA16 +snow/ccm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 20480 + format: RGBA16 +snow/ccm_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 22528 + format: RGBA16 +snow/ccm_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 24576 + format: RGBA16 +snow/ccm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 26624 + format: RGBA16 +snow/ccm_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3405536 + mio0: 28672 + format: RGBA16 +snow/ccm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 32768 + format: RGBA16 +snow/ccm_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 34816 + format: RGBA16 +snow/ccm_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 36864 + format: IA16 +snow/ccm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3405536 + mio0: 38912 + format: IA16 +spooky/bbh_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 0 + format: RGBA16 +spooky/bbh_textures.00800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 2048 + format: RGBA16 +spooky/bbh_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 6144 + format: RGBA16 +spooky/bbh_textures.02800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 10240 + format: RGBA16 +spooky/bbh_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 14336 + format: RGBA16 +spooky/bbh_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 18432 + format: RGBA16 +spooky/bbh_textures.05000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 20480 + format: RGBA16 +spooky/bbh_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 24576 + format: RGBA16 +spooky/bbh_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 26624 + format: RGBA16 +spooky/bbh_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3298272 + mio0: 28672 + format: RGBA16 +spooky/bbh_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 32768 + format: RGBA16 +spooky/bbh_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 34816 + format: RGBA16 +spooky/bbh_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3298272 + mio0: 36864 + format: RGBA16 +spooky/bbh_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1462368 + mio0: 49800 + format: RGBA16 +spooky/bbh_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 43008 + format: IA16 +spooky/bbh_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3298272 + mio0: 45056 + format: IA16 +spooky/bbh_textures.0B800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3298272 + mio0: 47104 + format: IA16 +title_screen_bg/title_screen_bg.001C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 448 + format: RGBA16 +title_screen_bg/title_screen_bg.00E40: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 3648 + format: RGBA16 +title_screen_bg/title_screen_bg.01AC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 6848 + format: RGBA16 +title_screen_bg/title_screen_bg.02740: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 10048 + format: RGBA16 +title_screen_bg/title_screen_bg.033C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 13248 + format: RGBA16 +title_screen_bg/title_screen_bg.04040: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 16448 + format: RGBA16 +title_screen_bg/title_screen_bg.04CC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 19648 + format: RGBA16 +title_screen_bg/title_screen_bg.05940: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2550336 + mio0: 22848 + format: RGBA16 +water/jrb_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3354832 + mio0: 0 + format: RGBA16 +water/jrb_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 2048 + format: RGBA16 +water/jrb_textures.01800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 6144 + format: RGBA16 +water/jrb_textures.02800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 10240 + format: RGBA16 +water/jrb_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 14336 + format: RGBA16 +water/jrb_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 18432 + format: RGBA16 +water/jrb_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3354832 + mio0: 22528 + format: RGBA16 +water/jrb_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3354832 + mio0: 24576 + format: RGBA16 +water/jrb_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 26624 + format: RGBA16 +water/jrb_textures.07800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 30720 + format: RGBA16 +water/jrb_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3354832 + mio0: 34816 + format: RGBA16 +water/jrb_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 36864 + format: RGBA16 +water/jrb_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3354832 + mio0: 40960 + format: RGBA16 +water/jrb_textures.0A800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 43008 + format: RGBA16 +water/jrb_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3354832 + mio0: 47104 + format: RGBA16 diff --git a/assets/sm64/us/actors.yml b/assets/sm64/us/actors.yml new file mode 100644 index 0000000..3519fe0 --- /dev/null +++ b/assets/sm64/us/actors.yml @@ -0,0 +1,3704 @@ +amp/amp_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 6936 + format: RGBA16 +amp/amp_electricity: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2040320 + mio0: 3864 + format: RGBA16 +amp/amp_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 4888 + format: RGBA16 +amp/amp_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 8984 + format: RGBA16 +blue_coin_switch/blue_coin_switch_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 2040320 + mio0: 24 + format: RGBA16 +blue_coin_switch/blue_coin_switch_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 1048 + format: RGBA16 +blue_fish/blue_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 112096 + format: RGBA16 +bobomb/bob-omb_buddy_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 120 + format: RGBA16 +bobomb/bob-omb_buddy_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 4216 + format: RGBA16 +bobomb/bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 18552 + format: RGBA16 +bobomb/bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 20600 + format: RGBA16 +bobomb/bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 121440 + format: RGBA16 +bobomb/bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 125536 + format: RGBA16 +bomb/bomb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 359440 + format: RGBA16 +bomb/bomb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 363536 + format: RGBA16 +bomb/bomb_spike: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 367632 + format: RGBA16 +boo/boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1469536 + mio0: 39744 + format: RGBA16 +boo/boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 43840 + format: RGBA16 +boo_castle/bbh_boo_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1469536 + mio0: 39744 + format: RGBA16 +boo_castle/bbh_boo_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 43840 + format: RGBA16 +book/book_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 4192 + format: RGBA16 +bookend/bookend_cover: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 4192 + format: RGBA16 +bookend/bookend_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 2144 + format: RGBA16 +bookend/bookend_pages: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 3168 + format: RGBA16 +bookend/bookend_spine: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 96 + format: RGBA16 +bookend/bookend_tooth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 1120 + format: RGBA16 +bowser/bowser_armband: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 146488 + format: RGBA16 +bowser/bowser_armband_spike: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 142392 + format: RGBA16 +bowser/bowser_blue_eye_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 156728 + format: RGBA16 +bowser/bowser_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 140344 + format: RGBA16 +bowser/bowser_chest: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 152632 + format: RGBA16 +bowser/bowser_claw_edge: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 171064 + format: RGBA16 +bowser/bowser_claw_horn_angle: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 179256 + format: RGBA16 +bowser/bowser_claw_horn_tooth: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 175160 + format: RGBA16 +bowser/bowser_eye_center_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_center_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 195640 + format: RGBA16 +bowser/bowser_eye_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 191544 + format: RGBA16 +bowser/bowser_eye_far_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_far_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 203832 + format: RGBA16 +bowser/bowser_eye_half_closed_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_half_closed_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 187448 + format: RGBA16 +bowser/bowser_eye_left_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_left_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 183352 + format: RGBA16 +bowser/bowser_eye_right_0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 199736 + format: RGBA16 +bowser/bowser_eye_right_1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 199736 + format: RGBA16 +bowser/bowser_eyebrow: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 130104 + format: RGBA16 +bowser/bowser_hair: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 166968 + format: RGBA16 +bowser/bowser_mouth_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 160824 + format: RGBA16 +bowser/bowser_muzzle: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 134200 + format: RGBA16 +bowser/bowser_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1606720 + mio0: 136248 + format: RGBA16 +bowser/bowser_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 128056 + format: RGBA16 +bowser/bowser_shell_edge: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 154680 + format: RGBA16 +bowser/bowser_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 148536 + format: RGBA16 +bowser/bowser_upper_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 164920 + format: RGBA16 +bowser_flame/bowser_flame_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 0 + format: RGBA16 +bowser_flame/bowser_flame_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 8192 + format: RGBA16 +bowser_flame/bowser_flame_10: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 81920 + format: RGBA16 +bowser_flame/bowser_flame_11: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 90112 + format: RGBA16 +bowser_flame/bowser_flame_12: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 98304 + format: RGBA16 +bowser_flame/bowser_flame_13: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 106496 + format: RGBA16 +bowser_flame/bowser_flame_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 16384 + format: RGBA16 +bowser_flame/bowser_flame_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 24576 + format: RGBA16 +bowser_flame/bowser_flame_4: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 32768 + format: RGBA16 +bowser_flame/bowser_flame_5: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 40960 + format: RGBA16 +bowser_flame/bowser_flame_6: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 49152 + format: RGBA16 +bowser_flame/bowser_flame_7: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 57344 + format: RGBA16 +bowser_flame/bowser_flame_8: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 65536 + format: RGBA16 +bowser_flame/bowser_flame_9: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 73728 + format: RGBA16 +breakable_box/cork_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 74384 + format: RGBA16 +breakable_box/crazy_box_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 72336 + format: RGBA16 +bub/bub_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 5128 + format: RGBA16 +bub/bub_eyes: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 1032 + format: RGBA16 +bub/bub_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 7176 + format: RGBA16 +bub/bub_scales: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 9224 + format: RGBA16 +bubba/bubba_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 5128 + format: RGBA16 +bubba/bubba_eyes_unused: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 1032 + format: RGBA16 +bubba/bubba_fins: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 7176 + format: RGBA16 +bubba/bubba_scales: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1575856 + mio0: 9224 + format: RGBA16 +bubba/bubba_sunglasses: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1575856 + mio0: 8 + format: RGBA16 +bubble/bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 118112 + format: RGBA16 +bubble/mr_i_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 120160 + format: RGBA16 +bullet_bill/bullet_bill_eye: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1222624 + mio0: 47784 + format: RGBA16 +bullet_bill/bullet_bill_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1222624 + mio0: 51880 + format: RGBA16 +bully/bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256544 + mio0: 9320 + format: RGBA16 +bully/bully_horn: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1256544 + mio0: 224 + format: RGBA16 +bully/bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1256544 + mio0: 1128 + format: RGBA16 +bully/bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1256544 + mio0: 5224 + format: RGBA16 +burn_smoke/burn_smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 137216 + format: IA16 +butterfly/butterfly_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 17320 + format: RGBA16 +cannon_barrel/cannon_barrel: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 22696 + format: RGBA16 +cannon_base/cannon_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 18872 + format: RGBA16 +cannon_lid/cannon_lid: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 16472 + format: RGBA16 +capswitch/cap_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 1464912 + mio0: 11336 + format: RGBA16 +capswitch/cap_switch_head: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1464912 + mio0: 7240 + format: IA16 +chain_ball/chain_ball: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 133864 + format: RGBA16 +chain_chomp/chain_chomp_bright_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 136144 + format: RGBA16 +chain_chomp/chain_chomp_dull_shine: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 138192 + format: RGBA16 +chain_chomp/chain_chomp_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 144336 + format: RGBA16 +chain_chomp/chain_chomp_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 140240 + format: RGBA16 +chain_chomp/chain_chomp_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 27376 + format: RGBA16 +chair/chair_bottom: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 16480 + format: RGBA16 +chair/chair_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 12384 + format: RGBA16 +chair/chair_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 14432 + format: RGBA16 +chair/chair_surface_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 17504 + format: RGBA16 +checkerboard_platform/checkerboard_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 52288 + format: RGBA16 +checkerboard_platform/checkerboard_platform_side: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 2040320 + mio0: 51264 + format: RGBA16 +chillychief/chill_bully_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1256544 + mio0: 9320 + format: RGBA16 +chillychief/chill_bully_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1987056 + mio0: 96 + format: RGBA16 +chillychief/chill_bully_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1987056 + mio0: 4192 + format: RGBA16 +chuckya/chuckya_body_arm_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 32632 + format: RGBA16 +chuckya/chuckya_body_arm_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 36728 + format: RGBA16 +chuckya/chuckya_eyes: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 26488 + format: RGBA16 +chuckya/chuckya_hand_antenna: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 30584 + format: RGBA16 +clam_shell/clam_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 48 + format: RGBA16 +clam_shell/clam_shell_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 2096 + format: RGBA16 +coin/coin_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 22400 + format: IA16 +coin/coin_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 26496 + format: IA16 +coin/coin_tilt_left: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 28544 + format: IA16 +coin/coin_tilt_right: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 24448 + format: IA16 +cyan_fish/cyan_fish: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 54376 + format: RGBA16 +dirt/dirt_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2102288 + mio0: 179704 + format: RGBA16 +door/bbh_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 66832 + format: RGBA16 +door/bbh_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 70928 + format: RGBA16 +door/door_lock: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2102288 + mio0: 79120 + format: RGBA16 +door/hmc_mural_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 60688 + format: RGBA16 +door/hmc_mural_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 64784 + format: RGBA16 +door/metal_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 54544 + format: RGBA16 +door/metal_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 58640 + format: RGBA16 +door/one_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 75024 + format: RGBA16 +door/polished_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 40208 + format: RGBA16 +door/polished_wooden_door_overlay: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 44304 + format: RGBA16 +door/rough_wooden_door: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 48400 + format: RGBA16 +door/rough_wooden_door_overlay: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 52496 + format: RGBA16 +door/three_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 77072 + format: RGBA16 +door/zero_star_door_sign: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 72976 + format: RGBA16 +dorrie/dorrie_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1998560 + mio0: 39840 + format: RGBA16 +dorrie/dorrie_skin: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1998560 + mio0: 40352 + format: RGBA16 +dorrie/dorrie_tongue: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 140240 + format: RGBA16 +exclamation_box/exclamation_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 95784 + format: RGBA16 +exclamation_box/exclamation_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2040320 + mio0: 97832 + format: RGBA16 +exclamation_box/metal_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 83496 + format: RGBA16 +exclamation_box/metal_cap_box_side: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2040320 + mio0: 85544 + format: RGBA16 +exclamation_box/vanish_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 77352 + format: RGBA16 +exclamation_box/vanish_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 79400 + format: RGBA16 +exclamation_box/wing_cap_box_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 89640 + format: RGBA16 +exclamation_box/wing_cap_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 91688 + format: RGBA16 +exclamation_box_outline/exclamation_box_outline: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 151912 + format: RGBA16 +exclamation_box_outline/exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2040320 + mio0: 154240 + format: RGBA16 +explosion/explosion_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 2568 + format: RGBA16 +explosion/explosion_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 4616 + format: RGBA16 +explosion/explosion_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 6664 + format: RGBA16 +explosion/explosion_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 8712 + format: RGBA16 +explosion/explosion_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 10760 + format: RGBA16 +explosion/explosion_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 12808 + format: RGBA16 +explosion/explosion_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 14856 + format: RGBA16 +eyerok/eyerok_bricks: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 36160 + format: RGBA16 +eyerok/eyerok_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 44352 + format: RGBA16 +eyerok/eyerok_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 42304 + format: RGBA16 +eyerok/eyerok_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 40256 + format: RGBA16 +eyerok/eyerok_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 38208 + format: RGBA16 +flame/flame_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 95008 + format: IA16 +flame/flame_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 97056 + format: IA16 +flame/flame_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 99104 + format: IA16 +flame/flame_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 101152 + format: IA16 +flame/flame_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 103200 + format: IA16 +flame/flame_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 105248 + format: IA16 +flame/flame_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 107296 + format: IA16 +flame/flame_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 109344 + format: IA16 +flyguy/flyguy_cloth_wrinkle: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2040320 + mio0: 57480 + format: RGBA16 +flyguy/flyguy_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 61576 + format: RGBA16 +flyguy/flyguy_propeller: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 63624 + format: IA16 +fwoosh/fwoosh_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 88072 + format: IA16 +goomba/goomba_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 103728 + format: RGBA16 +goomba/goomba_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 105776 + format: RGBA16 +goomba/goomba_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 107824 + format: RGBA16 +haunted_cage/bbh_cage_bars: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 55944 + format: RGBA16 +haunted_cage/bbh_cage_double_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 51848 + format: RGBA16 +haunted_cage/bbh_cage_floor: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 49800 + format: RGBA16 +haunted_cage/bbh_cage_garbage: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 57992 + format: RGBA16 +haunted_cage/bbh_cage_ornament: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 53896 + format: RGBA16 +haunted_cage/bbh_cage_wooden_base: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 54920 + format: RGBA16 +heart/spinning_heart: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2040320 + mio0: 55264 + format: RGBA16 +heave_ho/heave-ho_arm_ornament: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 68040 + format: RGBA16 +heave_ho/heave-ho_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 59848 + format: RGBA16 +heave_ho/heave-ho_logo: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1222624 + mio0: 63944 + format: RGBA16 +heave_ho/heave-ho_platform: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 61896 + format: RGBA16 +heave_ho/heave-ho_roller: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1222624 + mio0: 70088 + format: RGBA16 +heave_ho/heave-ho_turnkey: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 70600 + format: RGBA16 +hoot/hoot_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 2592 + format: RGBA16 +hoot/hoot_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 7760 + format: RGBA16 +hoot/hoot_wing_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 9808 + format: RGBA16 +impact_ring/impact_ring_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 117328 + format: IA16 +impact_ring/impact_ring_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 121424 + format: IA16 +impact_smoke/impact_smoke_0: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 371576 + format: IA16 +impact_smoke/impact_smoke_1: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 379768 + format: IA16 +impact_smoke/impact_smoke_2: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 387960 + format: IA16 +impact_smoke/impact_smoke_3: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1606720 + mio0: 396152 + format: IA16 +king_bobomb/bob-omb_buddy_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1264928 + mio0: 25720 + format: RGBA16 +king_bobomb/bob-omb_buddy_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 120 + format: RGBA16 +king_bobomb/bob-omb_buddy_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 4216 + format: RGBA16 +king_bobomb/king_bob-omb_arm: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 8312 + format: RGBA16 +king_bobomb/king_bob-omb_body_unused: + type: TEXTURE + size: 8192 + width: 64 + height: 64 + offset: 1264928 + mio0: 10360 + format: RGBA16 +king_bobomb/king_bob-omb_crown_rim: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1264928 + mio0: 24696 + format: RGBA16 +king_bobomb/king_bob-omb_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 18552 + format: RGBA16 +king_bobomb/king_bob-omb_eyes_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 20600 + format: RGBA16 +king_bobomb/king_bob-omb_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 22648 + format: RGBA16 +king_bobomb/king_bob-omb_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 33912 + format: RGBA16 +king_bobomb/king_bob-omb_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1264928 + mio0: 38008 + format: RGBA16 +klepto/klepto_beak: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1334928 + mio0: 4104 + format: RGBA16 +klepto/klepto_chest_tuft: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 8 + format: RGBA16 +klepto/klepto_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 2056 + format: RGBA16 +klepto/klepto_wing: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1334928 + mio0: 8200 + format: RGBA16 +klepto/klepto_wing_flap: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 12296 + format: RGBA16 +koopa/koopa_eye_border: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 22088 + format: RGBA16 +koopa/koopa_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 20040 + format: RGBA16 +koopa/koopa_eyes_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 17992 + format: RGBA16 +koopa/koopa_nostrils: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1851952 + mio0: 24136 + format: RGBA16 +koopa/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 11848 + format: RGBA16 +koopa/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 9800 + format: RGBA16 +koopa/koopa_shell_front_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 15944 + format: RGBA16 +koopa/koopa_shoe: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 13896 + format: RGBA16 +koopa_flag/koopa_flag_banner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 72 + format: RGBA16 +koopa_shell/koopa_shell_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 11848 + format: RGBA16 +koopa_shell/koopa_shell_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 9800 + format: RGBA16 +lakitu_cameraman/lakitu_camera_lens: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1934096 + mio0: 14336 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 60640 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 66784 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 62688 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 72928 + format: RGBA16 +lakitu_cameraman/lakitu_cameraman_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 70880 + format: RGBA16 +lakitu_enemy/lakitu_enemy_cloud_face_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 60640 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_closed: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 66784 + format: RGBA16 +lakitu_enemy/lakitu_enemy_eyes_open: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1575856 + mio0: 62688 + format: RGBA16 +lakitu_enemy/lakitu_enemy_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 72928 + format: RGBA16 +lakitu_enemy/lakitu_enemy_shell: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 70880 + format: RGBA16 +leaves/leaf: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2102288 + mio0: 117728 + format: RGBA16 +mad_piano/mad_piano_body: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 29424 + format: RGBA16 +mad_piano/mad_piano_keys: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 32496 + format: RGBA16 +mad_piano/mad_piano_keys_corner: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 30448 + format: RGBA16 +mad_piano/mad_piano_keys_edge: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1469536 + mio0: 33520 + format: RGBA16 +mad_piano/mad_piano_mouth: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1469536 + mio0: 31472 + format: RGBA16 +mad_piano/mad_piano_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 27376 + format: RGBA16 +manta/manta_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 12192 + format: RGBA16 +manta/manta_fin_corner: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 6048 + format: RGBA16 +manta/manta_fin_edge: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1292560 + mio0: 14240 + format: RGBA16 +manta/manta_gills: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1292560 + mio0: 8096 + format: RGBA16 +mario/mario_eyes_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 12432 + format: RGBA16 +mario/mario_eyes_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_closed_unused_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 16528 + format: RGBA16 +mario/mario_eyes_dead: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 30864 + format: RGBA16 +mario/mario_eyes_down_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 28816 + format: RGBA16 +mario/mario_eyes_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 14480 + format: RGBA16 +mario/mario_eyes_left_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 22672 + format: RGBA16 +mario/mario_eyes_right_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 24720 + format: RGBA16 +mario/mario_eyes_up_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 26768 + format: RGBA16 +mario/mario_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 6288 + format: RGBA16 +mario/mario_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1132368 + mio0: 144 + format: RGBA16 +mario/mario_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 45200 + format: RGBA16 +mario/mario_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 41104 + format: RGBA16 +mario/mario_mustache: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 10384 + format: RGBA16 +mario/mario_overalls_button: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 4240 + format: RGBA16 +mario/mario_sideburn: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 8336 + format: RGBA16 +mario/mario_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 32912 + format: RGBA16 +mario/mario_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 37008 + format: RGBA16 +mario_cap/mario_cap_logo: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 6288 + format: RGBA16 +mario_cap/mario_cap_metal: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1132368 + mio0: 144 + format: RGBA16 +mario_cap/mario_cap_metal_wing_tip_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 45200 + format: RGBA16 +mario_cap/mario_cap_metal_wing_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 41104 + format: RGBA16 +mario_cap/mario_cap_wing: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 32912 + format: RGBA16 +mario_cap/mario_cap_wing_tip: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 37008 + format: RGBA16 +metal_box/metal_box_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2040320 + mio0: 145816 + format: RGBA16 +mips/mips_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1934096 + mio0: 64624 + format: RGBA16 +mist/mist: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 128 + format: IA16 +moneybag/moneybag_eyes: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1987056 + mio0: 18864 + format: RGBA16 +moneybag/moneybag_mouth: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1987056 + mio0: 14768 + format: RGBA16 +monty_mole/monty_mole_cheek: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 2416 + format: RGBA16 +monty_mole/monty_mole_claw: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 10608 + format: RGBA16 +monty_mole/monty_mole_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 4464 + format: RGBA16 +monty_mole/monty_mole_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 6512 + format: RGBA16 +monty_mole/monty_mole_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 8560 + format: RGBA16 +monty_mole_hole/monty_mole_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 64 + format: IA16 +mr_i_eyeball/mr_i_eyeball_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1998560 + mio0: 128 + format: RGBA16 +mr_i_eyeball/mr_i_eyeball_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1998560 + mio0: 4224 + format: RGBA16 +mr_i_iris/mr_i_iris_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 14704 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 12656 + format: RGBA16 +mr_i_iris/mr_i_iris_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 10608 + format: RGBA16 +mr_i_iris/mr_i_iris_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 8560 + format: RGBA16 +mushroom_1up/1-up_mushroom: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 169512 + format: RGBA16 +peach/peach_chest_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 11304 + format: RGBA16 +peach/peach_crown_jewel: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 10792 + format: RGBA16 +peach/peach_dress: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 16424 + format: RGBA16 +peach/peach_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 8744 + format: RGBA16 +peach/peach_eye_mostly_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 6696 + format: RGBA16 +peach/peach_eye_mostly_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 4648 + format: RGBA16 +peach/peach_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 2600 + format: RGBA16 +peach/peach_lips: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 13864 + format: RGBA16 +peach/peach_lips_scrunched: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1497200 + mio0: 11816 + format: RGBA16 +peach/peach_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 15912 + format: RGBA16 +pebble/pebble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 115456 + format: RGBA16 +penguin/penguin_beak: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 21984 + format: RGBA16 +penguin/penguin_eye_angry: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 17888 + format: RGBA16 +penguin/penguin_eye_angry_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 19936 + format: RGBA16 +penguin/penguin_eye_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 15840 + format: RGBA16 +penguin/penguin_eye_half_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 13792 + format: RGBA16 +penguin/penguin_eye_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 11744 + format: RGBA16 +piranha_plant/piranha_plant_bottom_lip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 78840 + format: RGBA16 +piranha_plant/piranha_plant_leaf: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1851952 + mio0: 82936 + format: RGBA16 +piranha_plant/piranha_plant_skin: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 74744 + format: RGBA16 +piranha_plant/piranha_plant_stem: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 76792 + format: RGBA16 +piranha_plant/piranha_plant_tongue: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 148536 + format: RGBA16 +piranha_plant/piranha_plant_tooth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 80888 + format: RGBA16 +pokey/pokey_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 75896 + format: RGBA16 +pokey/pokey_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 71504 + format: RGBA16 +pokey/pokey_face_blink: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 73552 + format: RGBA16 +poundable_pole/poundable_pole_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 6224 + format: RGBA16 +poundable_pole/poundable_pole_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 4176 + format: RGBA16 +power_meter/power_meter_five_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 158688 + format: RGBA16 +power_meter/power_meter_four_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 160736 + format: RGBA16 +power_meter/power_meter_full: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 152544 + format: RGBA16 +power_meter/power_meter_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 144352 + format: RGBA16 +power_meter/power_meter_one_segment: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 166880 + format: RGBA16 +power_meter/power_meter_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 148448 + format: RGBA16 +power_meter/power_meter_seven_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 154592 + format: RGBA16 +power_meter/power_meter_six_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 156640 + format: RGBA16 +power_meter/power_meter_three_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 162784 + format: RGBA16 +power_meter/power_meter_two_segments: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 164832 + format: RGBA16 +purple_switch/purple_switch_base: + type: TEXTURE + size: 128 + width: 16 + height: 4 + offset: 2040320 + mio0: 49320 + format: RGBA16 +purple_switch/purple_switch_exclamation_point: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 2040320 + mio0: 49448 + format: RGBA16 +sand/sand_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2102288 + mio0: 178896 + format: RGBA16 +scuttlebug/scuttlebug_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 65800 + format: RGBA16 +scuttlebug/scuttlebug_iris: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 76040 + format: RGBA16 +scuttlebug/scuttlebug_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1998560 + mio0: 67848 + format: RGBA16 +scuttlebug/scuttlebug_leg: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 78088 + format: RGBA16 +scuttlebug/scuttlebug_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1998560 + mio0: 71944 + format: RGBA16 +seaweed/seaweed_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 38416 + format: RGBA16 +seaweed/seaweed_lower_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 36368 + format: RGBA16 +seaweed/seaweed_tip: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 32272 + format: RGBA16 +seaweed/seaweed_upper_center: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 34320 + format: RGBA16 +skeeter/skeeter_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 144 + format: RGBA16 +skeeter/skeeter_iris: + type: TEXTURE + size: 256 + width: 16 + height: 8 + offset: 1809600 + mio0: 2192 + format: RGBA16 +smoke/smoke: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 29376 + format: IA16 +snowman/mr_blizzard_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 46192 + format: RGBA16 +snowman/mr_blizzard_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1443440 + mio0: 38000 + format: RGBA16 +snowman/mr_blizzard_mitten: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 35952 + format: RGBA16 +snowman/mr_blizzard_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 48240 + format: RGBA16 +snowman/mr_blizzard_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1443440 + mio0: 42096 + format: RGBA16 +snufit/snufit_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 28896 + format: RGBA16 +snufit/snufit_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 30944 + format: RGBA16 +snufit/snufit_mask_strap: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 1998560 + mio0: 32992 + format: RGBA16 +snufit/snufit_mouth: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 34016 + format: RGBA16 +sparkle/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 160912 + format: RGBA16 +sparkle/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 162960 + format: RGBA16 +sparkle/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 165008 + format: RGBA16 +sparkle/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 167056 + format: RGBA16 +sparkle/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 169104 + format: RGBA16 +sparkle/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 171152 + format: RGBA16 +sparkle_animation/sparkle_animation_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 207496 + format: IA16 +sparkle_animation/sparkle_animation_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 209544 + format: IA16 +sparkle_animation/sparkle_animation_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 211592 + format: IA16 +sparkle_animation/sparkle_animation_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 213640 + format: IA16 +sparkle_animation/sparkle_animation_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 215688 + format: IA16 +spindrift/spindrift_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 1744 + format: RGBA16 +spindrift/spindrift_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 7888 + format: RGBA16 +spindrift/spindrift_leaf: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 5840 + format: RGBA16 +spindrift/spindrift_petal: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 3792 + format: RGBA16 +springboard/springboard_base_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1464912 + mio0: 2072 + format: RGBA16 +springboard/springboard_top_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1464912 + mio0: 24 + format: RGBA16 +star/star_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 31280 + format: RGBA16 +star/star_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 173808 + format: RGBA16 +stomp_smoke/stomp_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 139592 + format: IA16 +stomp_smoke/stomp_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 141640 + format: IA16 +stomp_smoke/stomp_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 143688 + format: IA16 +stomp_smoke/stomp_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 145736 + format: IA16 +stomp_smoke/stomp_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 147784 + format: IA16 +stomp_smoke/stomp_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 149832 + format: IA16 +sushi/sushi_eye: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 1292560 + mio0: 38608 + format: RGBA16 +sushi/sushi_snout: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 36560 + format: RGBA16 +sushi/sushi_tooth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1292560 + mio0: 39632 + format: RGBA16 +swoop/swoop_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 17008 + format: RGBA16 +swoop/swoop_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 19056 + format: RGBA16 +swoop/swoop_nose: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 21104 + format: RGBA16 +swoop/swoop_wing: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1998560 + mio0: 23152 + format: RGBA16 +thwomp/thwomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1222624 + mio0: 39168 + format: RGBA16 +thwomp/thwomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 43264 + format: RGBA16 +toad/toad_face: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1934096 + mio0: 22816 + format: RGBA16 +toad/toad_head: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1934096 + mio0: 24864 + format: RGBA16 +tornado/tornado: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1292560 + mio0: 75848 + format: IA16 +treasure_chest/treasure_chest_front: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1809600 + mio0: 87976 + format: RGBA16 +treasure_chest/treasure_chest_lock: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 81832 + format: RGBA16 +treasure_chest/treasure_chest_lock_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 85928 + format: RGBA16 +treasure_chest/treasure_chest_side: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1809600 + mio0: 83880 + format: RGBA16 +tree/palm_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 205336 + format: RGBA16 +tree/pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 196448 + format: RGBA16 +tree/snowy_pine_tree: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 200776 + format: RGBA16 +tree/tree_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 187944 + format: RGBA16 +tree/tree_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 192040 + format: RGBA16 +ukiki/ukiki_butt: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 39872 + format: RGBA16 +ukiki/ukiki_face: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1384912 + mio0: 31680 + format: RGBA16 +ukiki/ukiki_face_blink: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1384912 + mio0: 35776 + format: RGBA16 +ukiki/ukiki_fur: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1384912 + mio0: 41920 + format: RGBA16 +unagi/unagi_body: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 44832 + format: RGBA16 +unagi/unagi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1292560 + mio0: 46880 + format: RGBA16 +unagi/unagi_head_base: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 47392 + format: RGBA16 +unagi/unagi_mouth: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1292560 + mio0: 49952 + format: RGBA16 +unagi/unagi_tail: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1292560 + mio0: 50080 + format: RGBA16 +unagi/unagi_tooth: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1292560 + mio0: 49440 + format: RGBA16 +walk_smoke/walk_smoke_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 122528 + format: IA16 +walk_smoke/walk_smoke_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 124576 + format: IA16 +walk_smoke/walk_smoke_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 126624 + format: IA16 +walk_smoke/walk_smoke_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 128672 + format: IA16 +walk_smoke/walk_smoke_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 130720 + format: IA16 +walk_smoke/walk_smoke_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 132768 + format: IA16 +walk_smoke/walk_smoke_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 134816 + format: IA16 +warp_pipe/warp_pipe_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 2102288 + mio0: 32320 + format: RGBA16 +warp_pipe/warp_pipe_top: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 37224 + format: RGBA16 +water_bubble/water_bubble: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1264928 + mio0: 65152 + format: RGBA16 +water_mine/water_mine_left_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 359440 + format: RGBA16 +water_mine/water_mine_right_side_unused: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1606720 + mio0: 363536 + format: RGBA16 +water_mine/water_mine_spike_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1606720 + mio0: 367632 + format: RGBA16 +water_ring/water_ring: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 1809600 + mio0: 74624 + format: RGBA16 +water_splash/water_splash_0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 173512 + format: RGBA16 +water_splash/water_splash_1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 177608 + format: RGBA16 +water_splash/water_splash_2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 181704 + format: RGBA16 +water_splash/water_splash_3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 185800 + format: RGBA16 +water_splash/water_splash_4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 189896 + format: RGBA16 +water_splash/water_splash_5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 193992 + format: RGBA16 +water_splash/water_splash_6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 198088 + format: RGBA16 +water_splash/water_splash_7: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1132368 + mio0: 202184 + format: RGBA16 +water_wave/water_wave_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 152408 + format: IA16 +water_wave/water_wave_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 154456 + format: IA16 +water_wave/water_wave_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 156504 + format: IA16 +water_wave/water_wave_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1132368 + mio0: 158552 + format: IA16 +whirlpool/whirlpool: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1292560 + mio0: 75848 + format: IA16 +white_particle/snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2102288 + mio0: 181920 + format: RGBA16 +white_particle_small/small_snow_particle: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1132368 + mio0: 206720 + format: RGBA16 +whomp/whomp_back: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1851952 + mio0: 115552 + format: RGBA16 +whomp/whomp_face: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1851952 + mio0: 119648 + format: RGBA16 +whomp/whomp_hand: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 123744 + format: RGBA16 +whomp/whomp_surface: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1851952 + mio0: 125792 + format: RGBA16 +wiggler/wiggler_eye: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 31280 + format: RGBA16 +wiggler/wiggler_flower: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 33328 + format: RGBA16 +wiggler/wiggler_frown: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1575856 + mio0: 35376 + format: RGBA16 +wiggler/wiggler_nose_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1575856 + mio0: 37424 + format: RGBA16 +wiggler/wiggler_nose_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1575856 + mio0: 41520 + format: RGBA16 +wiggler/wiggler_segment_left_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1575856 + mio0: 23088 + format: RGBA16 +wiggler/wiggler_segment_right_side: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 1575856 + mio0: 27184 + format: RGBA16 +wooden_signpost/wooden_signpost_back: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 182728 + format: RGBA16 +wooden_signpost/wooden_signpost_front: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2102288 + mio0: 184776 + format: RGBA16 +yellow_sphere/yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 64 + format: RGBA16 +yellow_sphere_small/small_yellow_sphere: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 64 + format: RGBA16 +yoshi/yoshi_eye: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 116104 + format: RGBA16 +yoshi/yoshi_eye_blink: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 116616 + format: RGBA16 +yoshi/yoshi_nostril: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1497200 + mio0: 117128 + format: RGBA16 +yoshi_egg/yoshi_egg_0_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 22456 + format: RGBA16 +yoshi_egg/yoshi_egg_1_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 24504 + format: RGBA16 +yoshi_egg/yoshi_egg_2_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 26552 + format: RGBA16 +yoshi_egg/yoshi_egg_3_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 28600 + format: RGBA16 +yoshi_egg/yoshi_egg_4_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 30648 + format: RGBA16 +yoshi_egg/yoshi_egg_5_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 32696 + format: RGBA16 +yoshi_egg/yoshi_egg_6_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 34744 + format: RGBA16 +yoshi_egg/yoshi_egg_7_unused: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1222624 + mio0: 36792 + format: RGBA16 diff --git a/assets/sm64/us/assets.yml b/assets/sm64/us/assets.yml new file mode 100644 index 0000000..3f64748 --- /dev/null +++ b/assets/sm64/us/assets.yml @@ -0,0 +1,2331 @@ +anims/anim_00: + type: SM64:ANIM + header: + offset: 5162640 + size: 24 + values: + offset: 5162916 + size: 2604 + indices: + offset: 5162664 + size: 252 +anims/anim_01: + type: SM64:ANIM + header: + offset: 5165520 + size: 24 + values: + offset: 5165820 + size: 6576 + indices: + offset: 5165568 + size: 252 +anims/anim_02: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5165820 + size: 6576 + indices: + offset: 5165568 + size: 252 +anims/anim_03: + type: SM64:ANIM + header: + offset: 5172396 + size: 24 + values: + offset: 5172672 + size: 4372 + indices: + offset: 5172420 + size: 252 +anims/anim_04: + type: SM64:ANIM + header: + offset: 5177044 + size: 24 + values: + offset: 5177320 + size: 2264 + indices: + offset: 5177068 + size: 252 +anims/anim_05: + type: SM64:ANIM + header: + offset: 5179584 + size: 24 + values: + offset: 5179860 + size: 5796 + indices: + offset: 5179608 + size: 252 +anims/anim_06: + type: SM64:ANIM + header: + offset: 5185656 + size: 24 + values: + offset: 5185932 + size: 892 + indices: + offset: 5185680 + size: 252 +anims/anim_07: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5187124 + size: 1468 + indices: + offset: 5186872 + size: 252 +anims/anim_08: + type: SM64:ANIM + header: + offset: 5186848 + size: 24 + values: + offset: 5187124 + size: 1468 + indices: + offset: 5186872 + size: 252 +anims/anim_09: + type: SM64:ANIM + header: + offset: 5188592 + size: 24 + values: + offset: 5188868 + size: 3052 + indices: + offset: 5188616 + size: 252 +anims/anim_0A: + type: SM64:ANIM + header: + offset: 5191920 + size: 24 + values: + offset: 5192196 + size: 2544 + indices: + offset: 5191944 + size: 252 +anims/anim_0B: + type: SM64:ANIM + header: + offset: 5194740 + size: 24 + values: + offset: 5195040 + size: 1348 + indices: + offset: 5194788 + size: 252 +anims/anim_0C: + type: SM64:ANIM + header: + offset: 5194764 + size: 24 + values: + offset: 5195040 + size: 1348 + indices: + offset: 5194788 + size: 252 +anims/anim_0D: + type: SM64:ANIM + header: + offset: 5196388 + size: 24 + values: + offset: 5196664 + size: 770 + indices: + offset: 5196412 + size: 252 +anims/anim_0E: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5197712 + size: 80 + indices: + offset: 5197460 + size: 252 +anims/anim_0F: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5198092 + size: 1502 + indices: + offset: 5197840 + size: 252 +anims/anim_10: + type: SM64:ANIM + header: + offset: 5197816 + size: 24 + values: + offset: 5198092 + size: 1502 + indices: + offset: 5197840 + size: 252 +anims/anim_11: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5199872 + size: 1174 + indices: + offset: 5199620 + size: 252 +anims/anim_12: + type: SM64:ANIM + header: + offset: 5201048 + size: 24 + values: + offset: 5201324 + size: 1318 + indices: + offset: 5201072 + size: 252 +anims/anim_13: + type: SM64:ANIM + header: + offset: 5202644 + size: 24 + values: + offset: 5202920 + size: 1678 + indices: + offset: 5202668 + size: 252 +anims/anim_14: + type: SM64:ANIM + header: + offset: 5204600 + size: 24 + values: + offset: 5204876 + size: 1102 + indices: + offset: 5204624 + size: 252 +anims/anim_15: + type: SM64:ANIM + header: + offset: 5205980 + size: 24 + values: + offset: 5206256 + size: 930 + indices: + offset: 5206004 + size: 252 +anims/anim_16: + type: SM64:ANIM + header: + offset: 5207188 + size: 24 + values: + offset: 5207464 + size: 4452 + indices: + offset: 5207212 + size: 252 +anims/anim_17: + type: SM64:ANIM + header: + offset: 5211916 + size: 24 + values: + offset: 5212192 + size: 2942 + indices: + offset: 5211940 + size: 252 +anims/anim_18: + type: SM64:ANIM + header: + offset: 5215136 + size: 24 + values: + offset: 5215412 + size: 4452 + indices: + offset: 5207212 + size: 252 +anims/anim_19: + type: SM64:ANIM + header: + offset: 5219864 + size: 24 + values: + offset: 5220140 + size: 5354 + indices: + offset: 5219888 + size: 252 +anims/anim_1A: + type: SM64:ANIM + header: + offset: 5225496 + size: 24 + values: + offset: 5225772 + size: 1146 + indices: + offset: 5225520 + size: 252 +anims/anim_1B: + type: SM64:ANIM + header: + offset: 5226920 + size: 24 + values: + offset: 5227196 + size: 2858 + indices: + offset: 5226944 + size: 252 +anims/anim_1C: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5230332 + size: 780 + indices: + offset: 5230080 + size: 252 +anims/anim_1D: + type: SM64:ANIM + header: + offset: 5231112 + size: 24 + values: + offset: 5231388 + size: 1380 + indices: + offset: 5231136 + size: 252 +anims/anim_1E: + type: SM64:ANIM + header: + offset: 5232768 + size: 24 + values: + offset: 5233044 + size: 1530 + indices: + offset: 5232792 + size: 252 +anims/anim_1F: + type: SM64:ANIM + header: + offset: 5234576 + size: 24 + values: + offset: 5234852 + size: 846 + indices: + offset: 5234600 + size: 252 +anims/anim_20: + type: SM64:ANIM + header: + offset: 5235700 + size: 24 + values: + offset: 5235976 + size: 7124 + indices: + offset: 5235724 + size: 252 +anims/anim_21: + type: SM64:ANIM + header: + offset: 5243100 + size: 24 + values: + offset: 5243376 + size: 2610 + indices: + offset: 5243124 + size: 252 +anims/anim_22: + type: SM64:ANIM + header: + offset: 5245988 + size: 24 + values: + offset: 5246264 + size: 1750 + indices: + offset: 5246012 + size: 252 +anims/anim_23: + type: SM64:ANIM + header: + offset: 5248016 + size: 24 + values: + offset: 5248292 + size: 8216 + indices: + offset: 5248040 + size: 252 +anims/anim_24: + type: SM64:ANIM + header: + offset: 5256508 + size: 24 + values: + offset: 5256784 + size: 9376 + indices: + offset: 5256532 + size: 252 +anims/anim_25: + type: SM64:ANIM + header: + offset: 5266160 + size: 24 + values: + offset: 5266436 + size: 8018 + indices: + offset: 5266184 + size: 252 +anims/anim_26: + type: SM64:ANIM + header: + offset: 5274456 + size: 24 + values: + offset: 5274732 + size: 7352 + indices: + offset: 5274480 + size: 252 +anims/anim_27: + type: SM64:ANIM + header: + offset: 5282084 + size: 24 + values: + offset: 5282360 + size: 8980 + indices: + offset: 5282108 + size: 252 +anims/anim_28: + type: SM64:ANIM + header: + offset: 5204600 + size: 24 + values: + offset: 5291616 + size: 1010 + indices: + offset: 5291364 + size: 252 +anims/anim_29: + type: SM64:ANIM + header: + offset: 5292628 + size: 24 + values: + offset: 5292904 + size: 582 + indices: + offset: 5292652 + size: 252 +anims/anim_2A: + type: SM64:ANIM + header: + offset: 5293488 + size: 24 + values: + offset: 5293764 + size: 1252 + indices: + offset: 5293512 + size: 252 +anims/anim_2B: + type: SM64:ANIM + header: + offset: 5293488 + size: 24 + values: + offset: 5295292 + size: 1582 + indices: + offset: 5295040 + size: 252 +anims/anim_2C: + type: SM64:ANIM + header: + offset: 5165520 + size: 24 + values: + offset: 5297176 + size: 5620 + indices: + offset: 5296924 + size: 252 +anims/anim_2D: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5297176 + size: 5620 + indices: + offset: 5296924 + size: 252 +anims/anim_2E: + type: SM64:ANIM + header: + offset: 5302796 + size: 24 + values: + offset: 5303072 + size: 3028 + indices: + offset: 5302820 + size: 252 +anims/anim_2F: + type: SM64:ANIM + header: + offset: 5248016 + size: 24 + values: + offset: 5306376 + size: 7420 + indices: + offset: 5306124 + size: 252 +anims/anim_30: + type: SM64:ANIM + header: + offset: 5179584 + size: 24 + values: + offset: 5314072 + size: 5428 + indices: + offset: 5313820 + size: 252 +anims/anim_31: + type: SM64:ANIM + header: + offset: 5319500 + size: 24 + values: + offset: 5319776 + size: 10660 + indices: + offset: 5319524 + size: 252 +anims/anim_32: + type: SM64:ANIM + header: + offset: 5235700 + size: 24 + values: + offset: 5330712 + size: 7890 + indices: + offset: 5330460 + size: 252 +anims/anim_33: + type: SM64:ANIM + header: + offset: 5338604 + size: 24 + values: + offset: 5338880 + size: 2840 + indices: + offset: 5338628 + size: 252 +anims/anim_34: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5341996 + size: 1300 + indices: + offset: 5341744 + size: 252 +anims/anim_35: + type: SM64:ANIM + header: + offset: 5343296 + size: 24 + values: + offset: 5343572 + size: 3704 + indices: + offset: 5343320 + size: 252 +anims/anim_36: + type: SM64:ANIM + header: + offset: 5347276 + size: 24 + values: + offset: 5347552 + size: 3700 + indices: + offset: 5347300 + size: 252 +anims/anim_37: + type: SM64:ANIM + header: + offset: 5248016 + size: 24 + values: + offset: 5351528 + size: 6828 + indices: + offset: 5351276 + size: 252 +anims/anim_38: + type: SM64:ANIM + header: + offset: 5185656 + size: 24 + values: + offset: 5358632 + size: 844 + indices: + offset: 5358380 + size: 252 +anims/anim_39: + type: SM64:ANIM + header: + offset: 5359476 + size: 24 + values: + offset: 5359752 + size: 12418 + indices: + offset: 5359500 + size: 252 +anims/anim_3A: + type: SM64:ANIM + header: + offset: 5372172 + size: 24 + values: + offset: 5372448 + size: 374 + indices: + offset: 5372196 + size: 252 +anims/anim_3B: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5373100 + size: 1204 + indices: + offset: 5372848 + size: 252 +anims/anim_3C: + type: SM64:ANIM + header: + offset: 5374304 + size: 24 + values: + offset: 5374604 + size: 774 + indices: + offset: 5374352 + size: 252 +anims/anim_3D: + type: SM64:ANIM + header: + offset: 5374328 + size: 24 + values: + offset: 5374604 + size: 774 + indices: + offset: 5374352 + size: 252 +anims/anim_3E: + type: SM64:ANIM + header: + offset: 5359476 + size: 24 + values: + offset: 5375656 + size: 11490 + indices: + offset: 5375404 + size: 252 +anims/anim_3F: + type: SM64:ANIM + header: + offset: 5387148 + size: 24 + values: + offset: 5387424 + size: 3094 + indices: + offset: 5387172 + size: 252 +anims/anim_40: + type: SM64:ANIM + header: + offset: 5390520 + size: 24 + values: + offset: 5390796 + size: 1094 + indices: + offset: 5390544 + size: 252 +anims/anim_41: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5392168 + size: 536 + indices: + offset: 5391916 + size: 252 +anims/anim_42: + type: SM64:ANIM + header: + offset: 5392704 + size: 24 + values: + offset: 5392980 + size: 956 + indices: + offset: 5392728 + size: 252 +anims/anim_43: + type: SM64:ANIM + header: + offset: 5393936 + size: 24 + values: + offset: 5394212 + size: 84 + indices: + offset: 5393960 + size: 252 +anims/anim_44: + type: SM64:ANIM + header: + offset: 5204600 + size: 24 + values: + offset: 5394572 + size: 650 + indices: + offset: 5394320 + size: 252 +anims/anim_45: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5395524 + size: 1190 + indices: + offset: 5395272 + size: 252 +anims/anim_46: + type: SM64:ANIM + header: + offset: 5395248 + size: 24 + values: + offset: 5395524 + size: 1190 + indices: + offset: 5395272 + size: 252 +anims/anim_47: + type: SM64:ANIM + header: + offset: 5374304 + size: 24 + values: + offset: 5396992 + size: 838 + indices: + offset: 5396740 + size: 252 +anims/anim_48: + type: SM64:ANIM + header: + offset: 5397832 + size: 24 + values: + offset: 5398108 + size: 5098 + indices: + offset: 5397856 + size: 252 +anims/anim_49: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5403484 + size: 1298 + indices: + offset: 5403232 + size: 252 +anims/anim_4A: + type: SM64:ANIM + header: + offset: 5404784 + size: 24 + values: + offset: 5405060 + size: 616 + indices: + offset: 5404808 + size: 252 +anims/anim_4B: + type: SM64:ANIM + header: + offset: 5201048 + size: 24 + values: + offset: 5405952 + size: 1386 + indices: + offset: 5405700 + size: 252 +anims/anim_4C: + type: SM64:ANIM + header: + offset: 5407340 + size: 24 + values: + offset: 5407616 + size: 670 + indices: + offset: 5407364 + size: 252 +anims/anim_4D: + type: SM64:ANIM + header: + offset: 5185656 + size: 24 + values: + offset: 5408588 + size: 2456 + indices: + offset: 5408336 + size: 252 +anims/anim_4E: + type: SM64:ANIM + header: + offset: 5408312 + size: 24 + values: + offset: 5408588 + size: 2456 + indices: + offset: 5408336 + size: 252 +anims/anim_4F: + type: SM64:ANIM + header: + offset: 5234576 + size: 24 + values: + offset: 5411320 + size: 1578 + indices: + offset: 5411068 + size: 252 +anims/anim_50: + type: SM64:ANIM + header: + offset: 5372172 + size: 24 + values: + offset: 5413176 + size: 420 + indices: + offset: 5412924 + size: 252 +anims/anim_51: + type: SM64:ANIM + header: + offset: 5413596 + size: 24 + values: + offset: 5413872 + size: 1002 + indices: + offset: 5413620 + size: 252 +anims/anim_52: + type: SM64:ANIM + header: + offset: 5374304 + size: 24 + values: + offset: 5415152 + size: 878 + indices: + offset: 5414900 + size: 252 +anims/anim_53: + type: SM64:ANIM + header: + offset: 5416032 + size: 24 + values: + offset: 5416308 + size: 1970 + indices: + offset: 5416056 + size: 252 +anims/anim_54: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5418556 + size: 1314 + indices: + offset: 5418304 + size: 252 +anims/anim_55: + type: SM64:ANIM + header: + offset: 5419872 + size: 24 + values: + offset: 5420148 + size: 11268 + indices: + offset: 5419896 + size: 252 +anims/anim_56: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5431716 + size: 1560 + indices: + offset: 5431464 + size: 252 +anims/anim_57: + type: SM64:ANIM + header: + offset: 5431440 + size: 24 + values: + offset: 5431716 + size: 1560 + indices: + offset: 5431464 + size: 252 +anims/anim_58: + type: SM64:ANIM + header: + offset: 5433276 + size: 24 + values: + offset: 5433552 + size: 1082 + indices: + offset: 5433300 + size: 252 +anims/anim_59: + type: SM64:ANIM + header: + offset: 5434636 + size: 24 + values: + offset: 5434912 + size: 3052 + indices: + offset: 5434660 + size: 252 +anims/anim_5A: + type: SM64:ANIM + header: + offset: 5437964 + size: 24 + values: + offset: 5438240 + size: 3278 + indices: + offset: 5437988 + size: 252 +anims/anim_5B: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5441796 + size: 720 + indices: + offset: 5441544 + size: 252 +anims/anim_5C: + type: SM64:ANIM + header: + offset: 5442516 + size: 24 + values: + offset: 5442792 + size: 1258 + indices: + offset: 5442540 + size: 252 +anims/anim_5D: + type: SM64:ANIM + header: + offset: 5390520 + size: 24 + values: + offset: 5444328 + size: 1142 + indices: + offset: 5444076 + size: 252 +anims/anim_5E: + type: SM64:ANIM + header: + offset: 5359476 + size: 24 + values: + offset: 5445748 + size: 12110 + indices: + offset: 5445496 + size: 252 +anims/anim_5F: + type: SM64:ANIM + header: + offset: 5457860 + size: 24 + values: + offset: 5458136 + size: 5058 + indices: + offset: 5457884 + size: 252 +anims/anim_60: + type: SM64:ANIM + header: + offset: 5463196 + size: 24 + values: + offset: 5463472 + size: 4020 + indices: + offset: 5463220 + size: 252 +anims/anim_61: + type: SM64:ANIM + header: + offset: 5467492 + size: 24 + values: + offset: 5467768 + size: 12660 + indices: + offset: 5467516 + size: 252 +anims/anim_62: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5480704 + size: 742 + indices: + offset: 5480452 + size: 252 +anims/anim_63: + type: SM64:ANIM + header: + offset: 5481448 + size: 24 + values: + offset: 5481724 + size: 1626 + indices: + offset: 5481472 + size: 252 +anims/anim_64: + type: SM64:ANIM + header: + offset: 5483352 + size: 24 + values: + offset: 5483628 + size: 1246 + indices: + offset: 5483376 + size: 252 +anims/anim_65: + type: SM64:ANIM + header: + offset: 5234576 + size: 24 + values: + offset: 5485152 + size: 1700 + indices: + offset: 5484900 + size: 252 +anims/anim_66: + type: SM64:ANIM + header: + offset: 5486852 + size: 24 + values: + offset: 5487128 + size: 1948 + indices: + offset: 5486876 + size: 252 +anims/anim_67: + type: SM64:ANIM + header: + offset: 5489076 + size: 24 + values: + offset: 5489352 + size: 386 + indices: + offset: 5489100 + size: 252 +anims/anim_68: + type: SM64:ANIM + header: + offset: 5489740 + size: 24 + values: + offset: 5490016 + size: 340 + indices: + offset: 5489764 + size: 252 +anims/anim_69: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5490632 + size: 764 + indices: + offset: 5490380 + size: 252 +anims/anim_6A: + type: SM64:ANIM + header: + offset: 5491396 + size: 24 + values: + offset: 5491672 + size: 1060 + indices: + offset: 5491420 + size: 252 +anims/anim_6B: + type: SM64:ANIM + header: + offset: 5374304 + size: 24 + values: + offset: 5493008 + size: 940 + indices: + offset: 5492756 + size: 252 +anims/anim_6C: + type: SM64:ANIM + header: + offset: 5493948 + size: 24 + values: + offset: 5494224 + size: 1284 + indices: + offset: 5493972 + size: 252 +anims/anim_6D: + type: SM64:ANIM + header: + offset: 5201048 + size: 24 + values: + offset: 5495784 + size: 1286 + indices: + offset: 5495532 + size: 252 +anims/anim_6E: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5497348 + size: 1136 + indices: + offset: 5497096 + size: 252 +anims/anim_6F: + type: SM64:ANIM + header: + offset: 5292628 + size: 24 + values: + offset: 5498784 + size: 98 + indices: + offset: 5498532 + size: 252 +anims/anim_70: + type: SM64:ANIM + header: + offset: 5498508 + size: 24 + values: + offset: 5498784 + size: 98 + indices: + offset: 5498532 + size: 252 +anims/anim_71: + type: SM64:ANIM + header: + offset: 5498884 + size: 24 + values: + offset: 5499160 + size: 2078 + indices: + offset: 5498908 + size: 252 +anims/anim_72: + type: SM64:ANIM + header: + offset: 5501240 + size: 24 + values: + offset: 5501540 + size: 4342 + indices: + offset: 5501288 + size: 252 +anims/anim_73: + type: SM64:ANIM + header: + offset: 5501240 + size: 24 + values: + offset: 5501540 + size: 4342 + indices: + offset: 5501288 + size: 252 +anims/anim_74: + type: SM64:ANIM + header: + offset: 5498884 + size: 24 + values: + offset: 5506160 + size: 1844 + indices: + offset: 5505908 + size: 252 +anims/anim_75: + type: SM64:ANIM + header: + offset: 5498884 + size: 24 + values: + offset: 5508280 + size: 1892 + indices: + offset: 5508028 + size: 252 +anims/anim_76: + type: SM64:ANIM + header: + offset: 5248016 + size: 24 + values: + offset: 5510448 + size: 4648 + indices: + offset: 5510196 + size: 252 +anims/anim_77: + type: SM64:ANIM + header: + offset: 5207188 + size: 24 + values: + offset: 5515372 + size: 2464 + indices: + offset: 5515120 + size: 252 +anims/anim_78: + type: SM64:ANIM + header: + offset: 5517836 + size: 24 + values: + offset: 5518112 + size: 10454 + indices: + offset: 5517860 + size: 252 +anims/anim_79: + type: SM64:ANIM + header: + offset: 5528568 + size: 24 + values: + offset: 5528844 + size: 3634 + indices: + offset: 5528592 + size: 252 +anims/anim_7A: + type: SM64:ANIM + header: + offset: 5532480 + size: 24 + values: + offset: 5532756 + size: 402 + indices: + offset: 5532504 + size: 252 +anims/anim_7B: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5533436 + size: 2360 + indices: + offset: 5533184 + size: 252 +anims/anim_7C: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5536072 + size: 2300 + indices: + offset: 5535820 + size: 252 +anims/anim_7D: + type: SM64:ANIM + header: + offset: 5293488 + size: 24 + values: + offset: 5538648 + size: 1114 + indices: + offset: 5538396 + size: 252 +anims/anim_7E: + type: SM64:ANIM + header: + offset: 5179584 + size: 24 + values: + offset: 5540040 + size: 4538 + indices: + offset: 5539788 + size: 252 +anims/anim_7F: + type: SM64:ANIM + header: + offset: 5226920 + size: 24 + values: + offset: 5544856 + size: 3622 + indices: + offset: 5544604 + size: 252 +anims/anim_80: + type: SM64:ANIM + header: + offset: 5226920 + size: 24 + values: + offset: 5548756 + size: 4248 + indices: + offset: 5548504 + size: 252 +anims/anim_81: + type: SM64:ANIM + header: + offset: 5553004 + size: 24 + values: + offset: 5553280 + size: 4308 + indices: + offset: 5553028 + size: 252 +anims/anim_82: + type: SM64:ANIM + header: + offset: 5557588 + size: 24 + values: + offset: 5557864 + size: 5770 + indices: + offset: 5557612 + size: 252 +anims/anim_83: + type: SM64:ANIM + header: + offset: 5563636 + size: 24 + values: + offset: 5563912 + size: 4734 + indices: + offset: 5563660 + size: 252 +anims/anim_84: + type: SM64:ANIM + header: + offset: 5172396 + size: 24 + values: + offset: 5568924 + size: 4756 + indices: + offset: 5568672 + size: 252 +anims/anim_85: + type: SM64:ANIM + header: + offset: 5293488 + size: 24 + values: + offset: 5573956 + size: 324 + indices: + offset: 5573704 + size: 252 +anims/anim_86: + type: SM64:ANIM + header: + offset: 5574280 + size: 24 + values: + offset: 5574556 + size: 2902 + indices: + offset: 5574304 + size: 252 +anims/anim_87: + type: SM64:ANIM + header: + offset: 5338604 + size: 24 + values: + offset: 5577736 + size: 1564 + indices: + offset: 5577484 + size: 252 +anims/anim_88: + type: SM64:ANIM + header: + offset: 5442516 + size: 24 + values: + offset: 5579600 + size: 1260 + indices: + offset: 5579348 + size: 252 +anims/anim_89: + type: SM64:ANIM + header: + offset: 5579324 + size: 24 + values: + offset: 5579600 + size: 1260 + indices: + offset: 5579348 + size: 252 +anims/anim_8A: + type: SM64:ANIM + header: + offset: 5574280 + size: 24 + values: + offset: 5581136 + size: 2980 + indices: + offset: 5580884 + size: 252 +anims/anim_8B: + type: SM64:ANIM + header: + offset: 5434636 + size: 24 + values: + offset: 5584392 + size: 2970 + indices: + offset: 5584140 + size: 252 +anims/anim_8C: + type: SM64:ANIM + header: + offset: 5404784 + size: 24 + values: + offset: 5587640 + size: 646 + indices: + offset: 5587388 + size: 252 +anims/anim_8D: + type: SM64:ANIM + header: + offset: 5413596 + size: 24 + values: + offset: 5588564 + size: 1086 + indices: + offset: 5588312 + size: 252 +anims/anim_8E: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5589952 + size: 1618 + indices: + offset: 5589700 + size: 252 +anims/anim_8F: + type: SM64:ANIM + header: + offset: 5186848 + size: 24 + values: + offset: 5589952 + size: 1618 + indices: + offset: 5589700 + size: 252 +anims/anim_90: + type: SM64:ANIM + header: + offset: 5204600 + size: 24 + values: + offset: 5591848 + size: 1012 + indices: + offset: 5591596 + size: 252 +anims/anim_91: + type: SM64:ANIM + header: + offset: 5592860 + size: 24 + values: + offset: 5593136 + size: 266 + indices: + offset: 5592884 + size: 252 +anims/anim_92: + type: SM64:ANIM + header: + offset: 5593404 + size: 24 + values: + offset: 5593680 + size: 5600 + indices: + offset: 5593428 + size: 252 +anims/anim_93: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5599556 + size: 602 + indices: + offset: 5599304 + size: 252 +anims/anim_94: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5600436 + size: 80 + indices: + offset: 5197460 + size: 252 +anims/anim_95: + type: SM64:ANIM + header: + offset: 5489076 + size: 24 + values: + offset: 5600792 + size: 280 + indices: + offset: 5600540 + size: 252 +anims/anim_96: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5601348 + size: 680 + indices: + offset: 5601096 + size: 252 +anims/anim_97: + type: SM64:ANIM + header: + offset: 5372172 + size: 24 + values: + offset: 5602304 + size: 416 + indices: + offset: 5602052 + size: 252 +anims/anim_98: + type: SM64:ANIM + header: + offset: 5179584 + size: 24 + values: + offset: 5602996 + size: 2758 + indices: + offset: 5602744 + size: 252 +anims/anim_99: + type: SM64:ANIM + header: + offset: 5605756 + size: 24 + values: + offset: 5606032 + size: 7014 + indices: + offset: 5605780 + size: 252 +anims/anim_9A: + type: SM64:ANIM + header: + offset: 5404784 + size: 24 + values: + offset: 5613324 + size: 644 + indices: + offset: 5613072 + size: 252 +anims/anim_9B: + type: SM64:ANIM + header: + offset: 5404784 + size: 24 + values: + offset: 5614244 + size: 630 + indices: + offset: 5613992 + size: 252 +anims/anim_9C: + type: SM64:ANIM + header: + offset: 5614876 + size: 24 + values: + offset: 5615152 + size: 4884 + indices: + offset: 5614900 + size: 252 +anims/anim_9D: + type: SM64:ANIM + header: + offset: 5620036 + size: 24 + values: + offset: 5620312 + size: 1944 + indices: + offset: 5620060 + size: 252 +anims/anim_9E: + type: SM64:ANIM + header: + offset: 5553004 + size: 24 + values: + offset: 5622532 + size: 4008 + indices: + offset: 5622280 + size: 252 +anims/anim_9F: + type: SM64:ANIM + header: + offset: 5199596 + size: 24 + values: + offset: 5626816 + size: 774 + indices: + offset: 5626564 + size: 252 +anims/anim_A0: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5627868 + size: 390 + indices: + offset: 5627616 + size: 252 +anims/anim_A1: + type: SM64:ANIM + header: + offset: 5628260 + size: 24 + values: + offset: 5628536 + size: 920 + indices: + offset: 5628284 + size: 252 +anims/anim_A2: + type: SM64:ANIM + header: + offset: 5202644 + size: 24 + values: + offset: 5629732 + size: 1448 + indices: + offset: 5629480 + size: 252 +anims/anim_A3: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5631456 + size: 2590 + indices: + offset: 5631204 + size: 252 +anims/anim_A4: + type: SM64:ANIM + header: + offset: 5232768 + size: 24 + values: + offset: 5634324 + size: 1650 + indices: + offset: 5634072 + size: 252 +anims/anim_A5: + type: SM64:ANIM + header: + offset: 5165520 + size: 24 + values: + offset: 5636252 + size: 5148 + indices: + offset: 5636000 + size: 252 +anims/anim_A6: + type: SM64:ANIM + header: + offset: 5641400 + size: 24 + values: + offset: 5641676 + size: 4646 + indices: + offset: 5641424 + size: 252 +anims/anim_A7: + type: SM64:ANIM + header: + offset: 5574280 + size: 24 + values: + offset: 5646600 + size: 3060 + indices: + offset: 5646348 + size: 252 +anims/anim_A8: + type: SM64:ANIM + header: + offset: 5553004 + size: 24 + values: + offset: 5649936 + size: 3910 + indices: + offset: 5649684 + size: 252 +anims/anim_A9: + type: SM64:ANIM + header: + offset: 5442516 + size: 24 + values: + offset: 5654124 + size: 1728 + indices: + offset: 5653872 + size: 252 +anims/anim_AA: + type: SM64:ANIM + header: + offset: 5491396 + size: 24 + values: + offset: 5656128 + size: 972 + indices: + offset: 5655876 + size: 252 +anims/anim_AB: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5657376 + size: 750 + indices: + offset: 5657124 + size: 252 +anims/anim_AC: + type: SM64:ANIM + header: + offset: 5658128 + size: 24 + values: + offset: 5658404 + size: 1706 + indices: + offset: 5658152 + size: 252 +anims/anim_AD: + type: SM64:ANIM + header: + offset: 5416032 + size: 24 + values: + offset: 5660388 + size: 1860 + indices: + offset: 5660136 + size: 252 +anims/anim_AE: + type: SM64:ANIM + header: + offset: 5374304 + size: 24 + values: + offset: 5662524 + size: 956 + indices: + offset: 5662272 + size: 252 +anims/anim_AF: + type: SM64:ANIM + header: + offset: 5416032 + size: 24 + values: + offset: 5663756 + size: 2160 + indices: + offset: 5663504 + size: 252 +anims/anim_B0: + type: SM64:ANIM + header: + offset: 5489076 + size: 24 + values: + offset: 5666192 + size: 440 + indices: + offset: 5665940 + size: 252 +anims/anim_B1: + type: SM64:ANIM + header: + offset: 5666632 + size: 24 + values: + offset: 5666908 + size: 2418 + indices: + offset: 5666656 + size: 252 +anims/anim_B2: + type: SM64:ANIM + header: + offset: 5232768 + size: 24 + values: + offset: 5669604 + size: 1824 + indices: + offset: 5669352 + size: 252 +anims/anim_B3: + type: SM64:ANIM + header: + offset: 5671428 + size: 24 + values: + offset: 5671704 + size: 6494 + indices: + offset: 5671452 + size: 252 +anims/anim_B4: + type: SM64:ANIM + header: + offset: 5498884 + size: 24 + values: + offset: 5678476 + size: 1846 + indices: + offset: 5678224 + size: 252 +anims/anim_B5: + type: SM64:ANIM + header: + offset: 5442516 + size: 24 + values: + offset: 5680624 + size: 1382 + indices: + offset: 5680372 + size: 252 +anims/anim_B6: + type: SM64:ANIM + header: + offset: 5680348 + size: 24 + values: + offset: 5680624 + size: 1382 + indices: + offset: 5680372 + size: 252 +anims/anim_B7: + type: SM64:ANIM + header: + offset: 5574280 + size: 24 + values: + offset: 5682284 + size: 2980 + indices: + offset: 5682032 + size: 252 +anims/anim_B8: + type: SM64:ANIM + header: + offset: 5338604 + size: 24 + values: + offset: 5685540 + size: 776 + indices: + offset: 5685288 + size: 252 +anims/anim_B9: + type: SM64:ANIM + header: + offset: 5416032 + size: 24 + values: + offset: 5686592 + size: 2068 + indices: + offset: 5686340 + size: 252 +anims/anim_BA: + type: SM64:ANIM + header: + offset: 5433276 + size: 24 + values: + offset: 5688936 + size: 986 + indices: + offset: 5688684 + size: 252 +anims/anim_BB: + type: SM64:ANIM + header: + offset: 5689924 + size: 24 + values: + offset: 5690200 + size: 4132 + indices: + offset: 5689948 + size: 252 +anims/anim_BC: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5694632 + size: 1528 + indices: + offset: 5694380 + size: 252 +anims/anim_BD: + type: SM64:ANIM + header: + offset: 5197816 + size: 24 + values: + offset: 5694632 + size: 1528 + indices: + offset: 5694380 + size: 252 +anims/anim_BE: + type: SM64:ANIM + header: + offset: 5230056 + size: 24 + values: + offset: 5696436 + size: 760 + indices: + offset: 5696184 + size: 252 +anims/anim_BF: + type: SM64:ANIM + header: + offset: 5498884 + size: 24 + values: + offset: 5697472 + size: 1936 + indices: + offset: 5697220 + size: 252 +anims/anim_C0: + type: SM64:ANIM + header: + offset: 5699408 + size: 24 + values: + offset: 5699684 + size: 2452 + indices: + offset: 5699432 + size: 252 +anims/anim_C1: + type: SM64:ANIM + header: + offset: 5191920 + size: 24 + values: + offset: 5702412 + size: 2468 + indices: + offset: 5702160 + size: 252 +anims/anim_C2: + type: SM64:ANIM + header: + offset: 5179584 + size: 24 + values: + offset: 5705156 + size: 5422 + indices: + offset: 5704904 + size: 252 +anims/anim_C3: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5710856 + size: 1942 + indices: + offset: 5710604 + size: 252 +anims/anim_C4: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5713076 + size: 1942 + indices: + offset: 5710604 + size: 252 +anims/anim_C5: + type: SM64:ANIM + header: + offset: 5418280 + size: 24 + values: + offset: 5715296 + size: 1942 + indices: + offset: 5710604 + size: 252 +anims/anim_C6: + type: SM64:ANIM + header: + offset: 5338604 + size: 24 + values: + offset: 5717516 + size: 1666 + indices: + offset: 5717264 + size: 252 +anims/anim_C7: + type: SM64:ANIM + header: + offset: 5338604 + size: 24 + values: + offset: 5719460 + size: 2844 + indices: + offset: 5719208 + size: 252 +anims/anim_C8: + type: SM64:ANIM + header: + offset: 5722304 + size: 24 + values: + offset: 5722580 + size: 1648 + indices: + offset: 5722328 + size: 252 +anims/anim_C9: + type: SM64:ANIM + header: + offset: 5234576 + size: 24 + values: + offset: 5724504 + size: 1940 + indices: + offset: 5724252 + size: 252 +anims/anim_CA: + type: SM64:ANIM + header: + offset: 5726444 + size: 24 + values: + offset: 5726720 + size: 1998 + indices: + offset: 5726468 + size: 252 +anims/anim_CB: + type: SM64:ANIM + header: + offset: 5225496 + size: 24 + values: + offset: 5729020 + size: 1382 + indices: + offset: 5728768 + size: 252 +anims/anim_CC: + type: SM64:ANIM + header: + offset: 5165544 + size: 24 + values: + offset: 5729020 + size: 1382 + indices: + offset: 5728768 + size: 252 +anims/anim_CD: + type: SM64:ANIM + header: + offset: 5730404 + size: 24 + values: + offset: 5730680 + size: 5184 + indices: + offset: 5730428 + size: 252 +anims/anim_CE: + type: SM64:ANIM + header: + offset: 5201048 + size: 24 + values: + offset: 5736140 + size: 1460 + indices: + offset: 5735888 + size: 252 +anims/anim_CF: + type: SM64:ANIM + header: + offset: 5737600 + size: 24 + values: + offset: 5737876 + size: 2708 + indices: + offset: 5737624 + size: 252 +anims/anim_D0: + type: SM64:ANIM + header: + offset: 5413596 + size: 24 + values: + offset: 5740860 + size: 730 + indices: + offset: 5740608 + size: 252 +demos/bbh: + type: BLOB + size: 988 + offset: 5741664 +demos/bitdw: + type: BLOB + size: 1412 + offset: 5747100 +demos/ccm: + type: BLOB + size: 1320 + offset: 5742652 +demos/hmc: + type: BLOB + size: 980 + offset: 5743972 +demos/jrb: + type: BLOB + size: 620 + offset: 5744952 +demos/pss: + type: BLOB + size: 748 + offset: 5746244 +demos/unused: + type: BLOB + size: 108 + offset: 5746992 +demos/wf: + type: BLOB + size: 672 + offset: 5745572 diff --git a/assets/sm64/us/levels.yml b/assets/sm64/us/levels.yml new file mode 100644 index 0000000..699a609 --- /dev/null +++ b/assets/sm64/us/levels.yml @@ -0,0 +1,2389 @@ +bbh/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3611712 + mio0: 0 + format: RGBA16 +bbh/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3611712 + mio0: 4096 + format: RGBA16 +bbh/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3611712 + mio0: 6144 + format: RGBA16 +bbh/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3611712 + mio0: 8192 + format: RGBA16 +bbh/4: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3611712 + mio0: 12288 + format: RGBA16 +bbh/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3611712 + mio0: 13312 + format: RGBA16 +bbh/6: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3611712 + mio0: 17408 + format: RGBA16 +bitdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4541952 + mio0: 0 + format: RGBA16 +bitdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4541952 + mio0: 2048 + format: RGBA16 +bitdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4541952 + mio0: 4096 + format: RGBA16 +bitdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4541952 + mio0: 6144 + format: RGBA16 +bitfs/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4592848 + mio0: 0 + format: RGBA16 +bitfs/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4592848 + mio0: 4096 + format: RGBA16 +bitfs/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4592848 + mio0: 6144 + format: RGBA16 +bits/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4637600 + mio0: 0 + format: RGBA16 +bits/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4637600 + mio0: 4096 + format: RGBA16 +bits/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4637600 + mio0: 8192 + format: RGBA16 +bob/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4178608 + mio0: 0 + format: RGBA16 +bob/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4178608 + mio0: 2048 + format: RGBA16 +bob/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4178608 + mio0: 4096 + format: RGBA16 +bob/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4178608 + mio0: 6144 + format: RGBA16 +bob/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4178608 + mio0: 8192 + format: RGBA16 +bowser_1/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4991264 + mio0: 0 + format: RGBA16 +bowser_1/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4991264 + mio0: 4096 + format: RGBA16 +bowser_1/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4991264 + mio0: 6144 + format: RGBA16 +bowser_2/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5037008 + mio0: 0 + format: RGBA16 +bowser_3/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5041152 + mio0: 0 + format: RGBA16 +bowser_3/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5041152 + mio0: 2048 + format: RGBA16 +bowser_3/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 5041152 + mio0: 4096 + format: RGBA16 +castle_grounds/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4500416 + mio0: 0 + format: RGBA16 +castle_grounds/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4500416 + mio0: 4096 + format: RGBA16 +castle_grounds/2: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4500416 + mio0: 8192 + format: RGBA16 +castle_grounds/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4500416 + mio0: 51688 + format: RGBA16 +castle_grounds/4: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4500416 + mio0: 55784 + format: RGBA16 +castle_grounds/5: + type: TEXTURE + size: 2048 + width: 64 + height: 32 + offset: 4500416 + mio0: 60136 + format: IA8 +castle_inside/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 2048 + format: RGBA16 +castle_inside/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 28672 + format: RGBA16 +castle_inside/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 30720 + format: RGBA16 +castle_inside/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 32768 + format: RGBA16 +castle_inside/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 34816 + format: RGBA16 +castle_inside/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 36864 + format: RGBA16 +castle_inside/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 38912 + format: RGBA16 +castle_inside/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 40960 + format: IA16 +castle_inside/17: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 43008 + format: RGBA16 +castle_inside/18: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 47104 + format: RGBA16 +castle_inside/19: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 51200 + format: RGBA16 +castle_inside/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 47104 + format: IA16 +castle_inside/20: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 55296 + format: RGBA16 +castle_inside/21: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 59392 + format: RGBA16 +castle_inside/22: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 63488 + format: RGBA16 +castle_inside/23_us: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 67584 + format: RGBA16 +castle_inside/24_us: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 71680 + format: RGBA16 +castle_inside/25: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 75776 + format: RGBA16 +castle_inside/26: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 79872 + format: RGBA16 +castle_inside/27: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 83968 + format: RGBA16 +castle_inside/28: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 88064 + format: RGBA16 +castle_inside/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 92160 + format: RGBA16 +castle_inside/3: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3760960 + mio0: 8192 + format: RGBA16 +castle_inside/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 94208 + format: RGBA16 +castle_inside/31: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 96256 + format: RGBA16 +castle_inside/32: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 100352 + format: RGBA16 +castle_inside/33: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 104448 + format: RGBA16 +castle_inside/34: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 108544 + format: RGBA16 +castle_inside/35: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 112640 + format: RGBA16 +castle_inside/36: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 116736 + format: RGBA16 +castle_inside/37: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 120832 + format: RGBA16 +castle_inside/38: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 124928 + format: RGBA16 +castle_inside/39: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 129024 + format: RGBA16 +castle_inside/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 12288 + format: RGBA16 +castle_inside/40: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3760960 + mio0: 133120 + format: RGBA16 +castle_inside/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3760960 + mio0: 14336 + format: RGBA16 +castle_inside/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3760960 + mio0: 18432 + format: RGBA16 +castle_inside/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 22528 + format: RGBA16 +castle_inside/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 24576 + format: RGBA16 +castle_inside/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 26624 + format: RGBA16 +castle_inside/castle_light: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 47104 + format: IA16 +ccm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 0 + format: RGBA16 +ccm/1: + type: TEXTURE + size: 256 + width: 32 + height: 4 + offset: 3684688 + mio0: 2048 + format: RGBA16 +ccm/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 17152 + format: RGBA16 +ccm/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 19200 + format: RGBA16 +ccm/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 72024 + format: RGBA16 +ccm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 2304 + format: RGBA16 +ccm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 4352 + format: RGBA16 +ccm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 6400 + format: RGBA16 +ccm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 48240 + format: RGBA16 +ccm/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1443440 + mio0: 46192 + format: RGBA16 +ccm/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 12544 + format: RGBA16 +ccm/8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3684688 + mio0: 14592 + format: IA16 +ccm/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3684688 + mio0: 15104 + format: IA16 +cotmc/0: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4948176 + mio0: 0 + format: RGBA16 +cotmc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4948176 + mio0: 4096 + format: RGBA16 +cotmc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4948176 + mio0: 6144 + format: RGBA16 +cotmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4948176 + mio0: 8192 + format: RGBA16 +cotmc/4: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4948176 + mio0: 10240 + format: RGBA16 +ddd/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4774192 + mio0: 0 + format: RGBA16 +ddd/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 4096 + format: RGBA16 +ddd/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4774192 + mio0: 6144 + format: RGBA16 +ddd/3: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4774192 + mio0: 8192 + format: RGBA16 +ddd/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4774192 + mio0: 12288 + format: RGBA16 +ending/cake: + type: BLOB + size: 153600 + offset: 4843280 + mio0: 0 +hmc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4001216 + mio0: 0 + format: RGBA16 +hmc/1: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4001216 + mio0: 4096 + format: RGBA16 +hmc/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4001216 + mio0: 8192 + format: RGBA16 +hmc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4001216 + mio0: 12288 + format: RGBA16 +hmc/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4001216 + mio0: 14336 + format: RGBA16 +hmc/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4001216 + mio0: 16384 + format: RGBA16 +hmc/6: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4001216 + mio0: 18432 + format: RGBA16 +hmc/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3760960 + mio0: 92160 + format: RGBA16 +intro/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2532256 + mio0: 32416 + format: RGBA16 +intro/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2532256 + mio0: 34464 + format: RGBA16 +intro/2_copyright: + type: TEXTURE + size: 4096 + width: 128 + height: 16 + offset: 2532256 + mio0: 46240 + format: RGBA16 +intro/3_tm: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2532256 + mio0: 50336 + format: RGBA16 +jrb/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 4096 + format: RGBA16 +jrb/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4302688 + mio0: 2048 + format: RGBA16 +jrb/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4302688 + mio0: 6144 + format: RGBA16 +jrb/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4302688 + mio0: 8192 + format: RGBA16 +lll/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 0 + format: RGBA16 +lll/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 2048 + format: RGBA16 +lll/10: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 20480 + format: RGBA16 +lll/11: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 22528 + format: RGBA16 +lll/12: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 24576 + format: RGBA16 +lll/13: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 26624 + format: RGBA16 +lll/14: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 28672 + format: RGBA16 +lll/15: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 30720 + format: RGBA16 +lll/16: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 32768 + format: RGBA16 +lll/17: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 34816 + format: RGBA16 +lll/18: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 36864 + format: RGBA16 +lll/19: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 38912 + format: RGBA16 +lll/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 4096 + format: RGBA16 +lll/20: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 40960 + format: RGBA16 +lll/21: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 43008 + format: RGBA16 +lll/22: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 45056 + format: RGBA16 +lll/23: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 47104 + format: RGBA16 +lll/24: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 49152 + format: RGBA16 +lll/25: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 51200 + format: RGBA16 +lll/26: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 4687008 + mio0: 53248 + format: RGBA16 +lll/27: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3684688 + mio0: 14592 + format: IA16 +lll/28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 54272 + format: RGBA16 +lll/29: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 56320 + format: RGBA16 +lll/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 6144 + format: RGBA16 +lll/30: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 58368 + format: RGBA16 +lll/31: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 60416 + format: RGBA16 +lll/32: + type: TEXTURE + size: 2048 + width: 64 + height: 16 + offset: 4687008 + mio0: 62464 + format: RGBA16 +lll/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 8192 + format: RGBA16 +lll/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 10240 + format: RGBA16 +lll/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 12288 + format: RGBA16 +lll/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 6144 + format: RGBA16 +lll/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 16384 + format: RGBA16 +lll/9: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4687008 + mio0: 18432 + format: RGBA16 +menu/main_menu_seg7.00018: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 24 + format: RGBA16 +menu/main_menu_seg7.00818: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 2072 + format: RGBA16 +menu/main_menu_seg7.01018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2778544 + mio0: 4120 + format: RGBA16 +menu/main_menu_seg7.02018: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2778544 + mio0: 8216 + format: RGBA16 +menu/main_menu_seg7.03468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 13416 + format: RGBA16 +menu/main_menu_seg7.03C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 15464 + format: RGBA16 +menu/main_menu_seg7.04468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 17512 + format: RGBA16 +menu/main_menu_seg7.04C68: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 19560 + format: RGBA16 +menu/main_menu_seg7.05468: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 21608 + format: RGBA16 +menu/main_menu_seg7.06328: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 25384 + format: RGBA16 +menu/main_menu_seg7.06B28: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2778544 + mio0: 27432 + format: RGBA16 +menu/main_menu_seg7.073D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 29648 + format: RGBA16 +menu/main_menu_seg7.075D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 30160 + format: RGBA16 +menu/main_menu_seg7.077D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 30672 + format: RGBA16 +menu/main_menu_seg7.079D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 31184 + format: RGBA16 +menu/main_menu_seg7.07BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 31696 + format: RGBA16 +menu/main_menu_seg7.07DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 32208 + format: RGBA16 +menu/main_menu_seg7.07FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 32720 + format: RGBA16 +menu/main_menu_seg7.081D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 33232 + format: RGBA16 +menu/main_menu_seg7.083D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 33744 + format: RGBA16 +menu/main_menu_seg7.085D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 34256 + format: RGBA16 +menu/main_menu_seg7.087D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 34768 + format: RGBA16 +menu/main_menu_seg7.089D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 35280 + format: RGBA16 +menu/main_menu_seg7.08BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 35792 + format: RGBA16 +menu/main_menu_seg7.08DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 36304 + format: RGBA16 +menu/main_menu_seg7.08FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 36816 + format: RGBA16 +menu/main_menu_seg7.091D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 37328 + format: RGBA16 +menu/main_menu_seg7.093D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 37840 + format: RGBA16 +menu/main_menu_seg7.095D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 38352 + format: RGBA16 +menu/main_menu_seg7.097D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 38864 + format: RGBA16 +menu/main_menu_seg7.099D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 39376 + format: RGBA16 +menu/main_menu_seg7.09BD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 39888 + format: RGBA16 +menu/main_menu_seg7.09DD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 40400 + format: RGBA16 +menu/main_menu_seg7.09FD0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 40912 + format: RGBA16 +menu/main_menu_seg7.0A1D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 41424 + format: RGBA16 +menu/main_menu_seg7.0A3D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 41936 + format: RGBA16 +menu/main_menu_seg7.0A5D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 42448 + format: RGBA16 +menu/main_menu_seg7.0A7D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 42960 + format: RGBA16 +menu/main_menu_seg7.0A9D0: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 43472 + format: RGBA16 +menu/main_menu_seg7.0D1A8: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2778544 + mio0: 48352 + format: RGBA16 +menu/main_menu_seg7.0E1A8: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 2778544 + mio0: 52448 + format: RGBA16 +menu/main_menu_seg7_us.0AC40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44096 + format: IA8 +menu/main_menu_seg7_us.0AC80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44160 + format: IA8 +menu/main_menu_seg7_us.0ACC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44224 + format: IA8 +menu/main_menu_seg7_us.0AD00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44288 + format: IA8 +menu/main_menu_seg7_us.0AD40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44352 + format: IA8 +menu/main_menu_seg7_us.0AD80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44416 + format: IA8 +menu/main_menu_seg7_us.0ADC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44480 + format: IA8 +menu/main_menu_seg7_us.0AE00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44544 + format: IA8 +menu/main_menu_seg7_us.0AE40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44608 + format: IA8 +menu/main_menu_seg7_us.0AE80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44672 + format: IA8 +menu/main_menu_seg7_us.0AEC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44736 + format: IA8 +menu/main_menu_seg7_us.0AF00: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44800 + format: IA8 +menu/main_menu_seg7_us.0AF40: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44864 + format: IA8 +menu/main_menu_seg7_us.0AF80: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44928 + format: IA8 +menu/main_menu_seg7_us.0AFC0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 44992 + format: IA8 +menu/main_menu_seg7_us.0B000: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45056 + format: IA8 +menu/main_menu_seg7_us.0B040: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45120 + format: IA8 +menu/main_menu_seg7_us.0B080: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45184 + format: IA8 +menu/main_menu_seg7_us.0B0C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45248 + format: IA8 +menu/main_menu_seg7_us.0B100: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45312 + format: IA8 +menu/main_menu_seg7_us.0B140: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45376 + format: IA8 +menu/main_menu_seg7_us.0B180: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45440 + format: IA8 +menu/main_menu_seg7_us.0B1C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45504 + format: IA8 +menu/main_menu_seg7_us.0B200: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45568 + format: IA8 +menu/main_menu_seg7_us.0B240: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45632 + format: IA8 +menu/main_menu_seg7_us.0B280: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45696 + format: IA8 +menu/main_menu_seg7_us.0B2C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45760 + format: IA8 +menu/main_menu_seg7_us.0B300: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45824 + format: IA8 +menu/main_menu_seg7_us.0B340: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45888 + format: IA8 +menu/main_menu_seg7_us.0B380: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 45952 + format: IA8 +menu/main_menu_seg7_us.0B3C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46016 + format: IA8 +menu/main_menu_seg7_us.0B400: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46080 + format: IA8 +menu/main_menu_seg7_us.0B440: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46144 + format: IA8 +menu/main_menu_seg7_us.0B480: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46208 + format: IA8 +menu/main_menu_seg7_us.0B4C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46272 + format: IA8 +menu/main_menu_seg7_us.0B500: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46336 + format: IA8 +menu/main_menu_seg7_us.0B540: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46400 + format: IA8 +menu/main_menu_seg7_us.0B580: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46464 + format: IA8 +menu/main_menu_seg7_us.0B5C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46528 + format: IA8 +menu/main_menu_seg7_us.0B600: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46592 + format: IA8 +menu/main_menu_seg7_us.0B640: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46656 + format: IA8 +menu/main_menu_seg7_us.0B680: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46720 + format: IA8 +menu/main_menu_seg7_us.0B6C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46784 + format: IA8 +menu/main_menu_seg7_us.0B700: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46848 + format: IA8 +menu/main_menu_seg7_us.0B740: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46912 + format: IA8 +menu/main_menu_seg7_us.0B780: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46976 + format: IA8 +menu/main_menu_seg7_us.0B7C0: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 46648 + format: IA8 +menu/main_menu_seg7_us.0B800: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 2778544 + mio0: 47104 + format: IA8 +pss/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4913456 + mio0: 0 + format: RGBA16 +pss/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4913456 + mio0: 2048 + format: IA16 +pss/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4913456 + mio0: 4096 + format: RGBA16 +rr/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4421744 + mio0: 2048 + format: RGBA16 +rr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4421744 + mio0: 6144 + format: RGBA16 +rr/quarter_flying_carpet: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4421744 + mio0: 0 + format: RGBA16 +sl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4218800 + mio0: 0 + format: RGBA16 +sl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4218800 + mio0: 2048 + format: RGBA16 +sl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4218800 + mio0: 4096 + format: RGBA16 +sl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4218800 + mio0: 6144 + format: RGBA16 +sl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4218800 + mio0: 8192 + format: RGBA16 +ssl/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 0 + format: RGBA16 +ssl/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 2048 + format: IA16 +ssl/10: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4093616 + mio0: 55208 + format: RGBA16 +ssl/11: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4093616 + mio0: 59304 + format: RGBA16 +ssl/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 4096 + format: RGBA16 +ssl/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 6144 + format: RGBA16 +ssl/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 8192 + format: RGBA16 +ssl/5: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4093616 + mio0: 10240 + format: RGBA16 +ssl/6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 14336 + format: RGBA16 +ssl/7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 32768 + format: RGBA16 +ssl/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4093616 + mio0: 49064 + format: RGBA16 +ssl/9: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4093616 + mio0: 51112 + format: RGBA16 +thi/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4343504 + mio0: 0 + format: RGBA16 +thi/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4343504 + mio0: 2048 + format: RGBA16 +totwc/0: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4975664 + mio0: 0 + format: RGBA16 +totwc/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4975664 + mio0: 4096 + format: RGBA16 +totwc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4975664 + mio0: 6144 + format: RGBA16 +totwc/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4975664 + mio0: 8192 + format: IA16 +ttc/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4378400 + mio0: 0 + format: RGBA16 +ttc/1: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 4378400 + mio0: 2048 + format: RGBA16 +ttc/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4378400 + mio0: 90000 + format: RGBA16 +ttm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 0 + format: IA16 +ttm/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 2048 + format: RGBA16 +ttm/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 4096 + format: RGBA16 +ttm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 6144 + format: RGBA16 +ttm/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 8192 + format: RGBA16 +ttm/5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 5052688 + mio0: 10240 + format: RGBA16 +ttm/6: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 5052688 + mio0: 12288 + format: RGBA16 +ttm/7: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 5052688 + mio0: 16384 + format: RGBA16 +ttm/8: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 43008 + format: RGBA16 +vcutm/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4572672 + mio0: 0 + format: RGBA16 +vcutm/1: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 4572672 + mio0: 2048 + format: RGBA16 +vcutm/2: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 4572672 + mio0: 6144 + format: RGBA16 +vcutm/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4572672 + mio0: 10240 + format: RGBA16 +wdw/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4255088 + mio0: 0 + format: RGBA16 +wdw/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4255088 + mio0: 2048 + format: RGBA16 +wdw/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4255088 + mio0: 4096 + format: RGBA16 +wdw/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4255088 + mio0: 6144 + format: RGBA16 +wdw/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4255088 + mio0: 8192 + format: RGBA16 +wf/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4808848 + mio0: 0 + format: RGBA16 +wf/1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4808848 + mio0: 2048 + format: RGBA16 +wf/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4808848 + mio0: 4096 + format: RGBA16 +wf/3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4808848 + mio0: 6144 + format: RGBA16 +wf/4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4808848 + mio0: 8192 + format: RGBA16 +wf/5: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1083968 + mio0: 74168 + format: IA8 +wmotr/0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4997920 + mio0: 0 + format: RGBA16 +wmotr/1: + type: TEXTURE + size: 1024 + width: 32 + height: 16 + offset: 4997920 + mio0: 2048 + format: RGBA16 +wmotr/2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 4997920 + mio0: 3072 + format: RGBA16 +wmotr/3: + type: TEXTURE + size: 512 + width: 32 + height: 8 + offset: 4997920 + mio0: 5120 + format: RGBA16 +wmotr/4: + type: TEXTURE + size: 512 + width: 8 + height: 32 + offset: 4997920 + mio0: 5632 + format: RGBA16 diff --git a/assets/sm64/us/sound.yml b/assets/sm64/us/sound.yml new file mode 100644 index 0000000..641a08d --- /dev/null +++ b/assets/sm64/us/sound.yml @@ -0,0 +1,1000 @@ +header: + type: AUDIO:HEADER + ctl: + offset: 5748512 + size: 97856 + tbl: + offset: 5846368 + size: 2216704 +banks/00_bank: + type: BANK + id: 0 +banks/01_bank: + type: BANK + id: 1 +banks/02_bank: + type: BANK + id: 2 +banks/03_bank: + type: BANK + id: 3 +banks/04_bank: + type: BANK + id: 4 +banks/05_bank: + type: BANK + id: 5 +banks/06_bank: + type: BANK + id: 6 +banks/07_bank: + type: BANK + id: 7 +banks/08_bank: + type: BANK + id: 8 +banks/09_bank: + type: BANK + id: 9 +banks/0A_bank: + type: BANK + id: 10 +banks/0B_bank: + type: BANK + id: 11 +banks/0C_bank: + type: BANK + id: 12 +banks/0D_bank: + type: BANK + id: 13 +banks/0E_bank: + type: BANK + id: 14 +banks/0F_bank: + type: BANK + id: 15 +banks/10_bank: + type: BANK + id: 16 +banks/11_bank: + type: BANK + id: 17 +banks/12_bank: + type: BANK + id: 18 +banks/13_bank: + type: BANK + id: 19 +banks/14_bank: + type: BANK + id: 20 +banks/15_bank: + type: BANK + id: 21 +banks/16_bank: + type: BANK + id: 22 +banks/17_bank: + type: BANK + id: 23 +banks/18_bank: + type: BANK + id: 24 +banks/19_bank: + type: BANK + id: 25 +banks/1A_bank: + type: BANK + id: 26 +banks/1B_bank: + type: BANK + id: 27 +banks/1C_bank: + type: BANK + id: 28 +banks/1D_bank: + type: BANK + id: 29 +banks/1E_bank: + type: BANK + id: 30 +banks/1F_bank: + type: BANK + id: 31 +banks/20_bank: + type: BANK + id: 32 +banks/21_bank: + type: BANK + id: 33 +banks/22_bank: + type: BANK + id: 34 +banks/23_bank: + type: BANK + id: 35 +banks/24_bank: + type: BANK + id: 36 +banks/25_bank: + type: BANK + id: 37 +samples/bowser_organ/00_organ_1: + type: SAMPLE + id: 216 +samples/bowser_organ/01_organ_1_lq: + type: SAMPLE + id: 217 +samples/bowser_organ/02_boys_choir: + type: SAMPLE + id: 218 +samples/course_start/00_la: + type: SAMPLE + id: 215 +samples/instruments/00: + type: SAMPLE + id: 141 +samples/instruments/01_banjo_1: + type: SAMPLE + id: 142 +samples/instruments/02: + type: SAMPLE + id: 143 +samples/instruments/03_human_whistle: + type: SAMPLE + id: 144 +samples/instruments/04_bright_piano: + type: SAMPLE + id: 145 +samples/instruments/05_acoustic_bass: + type: SAMPLE + id: 146 +samples/instruments/06_kick_drum_1: + type: SAMPLE + id: 147 +samples/instruments/07_rimshot: + type: SAMPLE + id: 148 +samples/instruments/08: + type: SAMPLE + id: 149 +samples/instruments/09: + type: SAMPLE + id: 150 +samples/instruments/0A_tambourine: + type: SAMPLE + id: 151 +samples/instruments/0B: + type: SAMPLE + id: 152 +samples/instruments/0C_conga_stick: + type: SAMPLE + id: 153 +samples/instruments/0D_clave: + type: SAMPLE + id: 154 +samples/instruments/0E_hihat_closed: + type: SAMPLE + id: 155 +samples/instruments/0F_hihat_open: + type: SAMPLE + id: 156 +samples/instruments/10_cymbal_bell: + type: SAMPLE + id: 157 +samples/instruments/11_splash_cymbal: + type: SAMPLE + id: 158 +samples/instruments/12_snare_drum_1: + type: SAMPLE + id: 159 +samples/instruments/13_snare_drum_2: + type: SAMPLE + id: 160 +samples/instruments/14_strings_5: + type: SAMPLE + id: 161 +samples/instruments/15_strings_4: + type: SAMPLE + id: 162 +samples/instruments/16_french_horns: + type: SAMPLE + id: 163 +samples/instruments/17_trumpet: + type: SAMPLE + id: 164 +samples/instruments/18_timpani: + type: SAMPLE + id: 165 +samples/instruments/19_brass: + type: SAMPLE + id: 166 +samples/instruments/1A_slap_bass: + type: SAMPLE + id: 167 +samples/instruments/1B_organ_2: + type: SAMPLE + id: 168 +samples/instruments/1C: + type: SAMPLE + id: 169 +samples/instruments/1D: + type: SAMPLE + id: 170 +samples/instruments/1E_closed_triangle: + type: SAMPLE + id: 171 +samples/instruments/1F_open_triangle: + type: SAMPLE + id: 172 +samples/instruments/20_cabasa: + type: SAMPLE + id: 173 +samples/instruments/21_sine_bass: + type: SAMPLE + id: 174 +samples/instruments/22_boys_choir: + type: SAMPLE + id: 175 +samples/instruments/23_strings_1: + type: SAMPLE + id: 176 +samples/instruments/24_strings_2: + type: SAMPLE + id: 177 +samples/instruments/25_strings_3: + type: SAMPLE + id: 178 +samples/instruments/26_crystal_rhodes: + type: SAMPLE + id: 179 +samples/instruments/27_harpsichord: + type: SAMPLE + id: 180 +samples/instruments/28_sitar_1: + type: SAMPLE + id: 181 +samples/instruments/29_orchestra_hit: + type: SAMPLE + id: 182 +samples/instruments/2A: + type: SAMPLE + id: 183 +samples/instruments/2B: + type: SAMPLE + id: 184 +samples/instruments/2C: + type: SAMPLE + id: 185 +samples/instruments/2D_trombone: + type: SAMPLE + id: 186 +samples/instruments/2E_accordion: + type: SAMPLE + id: 187 +samples/instruments/2F_sleigh_bells: + type: SAMPLE + id: 188 +samples/instruments/30_rarefaction-lahna: + type: SAMPLE + id: 189 +samples/instruments/31_rarefaction-convolution: + type: SAMPLE + id: 190 +samples/instruments/32_metal_rimshot: + type: SAMPLE + id: 191 +samples/instruments/33_kick_drum_2: + type: SAMPLE + id: 192 +samples/instruments/34_alto_flute: + type: SAMPLE + id: 193 +samples/instruments/35_gospel_organ: + type: SAMPLE + id: 194 +samples/instruments/36_sawtooth_synth: + type: SAMPLE + id: 195 +samples/instruments/37_square_synth: + type: SAMPLE + id: 196 +samples/instruments/38_electric_kick_drum: + type: SAMPLE + id: 197 +samples/instruments/39_sitar_2: + type: SAMPLE + id: 198 +samples/instruments/3A_music_box: + type: SAMPLE + id: 199 +samples/instruments/3B_banjo_2: + type: SAMPLE + id: 200 +samples/instruments/3C_acoustic_guitar: + type: SAMPLE + id: 201 +samples/instruments/3D: + type: SAMPLE + id: 202 +samples/instruments/3E_monk_choir: + type: SAMPLE + id: 203 +samples/instruments/3F: + type: SAMPLE + id: 204 +samples/instruments/40_bell: + type: SAMPLE + id: 205 +samples/instruments/41_pan_flute: + type: SAMPLE + id: 206 +samples/instruments/42_vibraphone: + type: SAMPLE + id: 207 +samples/instruments/43_harmonica: + type: SAMPLE + id: 208 +samples/instruments/44_grand_piano: + type: SAMPLE + id: 209 +samples/instruments/45_french_horns_lq: + type: SAMPLE + id: 210 +samples/instruments/46_pizzicato_strings_1: + type: SAMPLE + id: 211 +samples/instruments/47_pizzicato_strings_2: + type: SAMPLE + id: 212 +samples/instruments/48_steel_drum: + type: SAMPLE + id: 213 +samples/piranha_music_box/00_music_box: + type: SAMPLE + id: 214 +samples/sfx_1/00_twirl: + type: SAMPLE + id: 0 +samples/sfx_1/01_brushing: + type: SAMPLE + id: 1 +samples/sfx_1/02_hand_touch: + type: SAMPLE + id: 2 +samples/sfx_1/03_yoshi: + type: SAMPLE + id: 3 +samples/sfx_1/04_plop: + type: SAMPLE + id: 4 +samples/sfx_1/05_heavy_landing: + type: SAMPLE + id: 5 +samples/sfx_4/00: + type: SAMPLE + id: 17 +samples/sfx_4/01: + type: SAMPLE + id: 18 +samples/sfx_4/02: + type: SAMPLE + id: 19 +samples/sfx_4/03: + type: SAMPLE + id: 20 +samples/sfx_4/04: + type: SAMPLE + id: 21 +samples/sfx_4/05: + type: SAMPLE + id: 22 +samples/sfx_4/06: + type: SAMPLE + id: 23 +samples/sfx_4/07: + type: SAMPLE + id: 24 +samples/sfx_4/08: + type: SAMPLE + id: 25 +samples/sfx_4/09: + type: SAMPLE + id: 26 +samples/sfx_5/00: + type: SAMPLE + id: 27 +samples/sfx_5/01: + type: SAMPLE + id: 28 +samples/sfx_5/02: + type: SAMPLE + id: 29 +samples/sfx_5/03: + type: SAMPLE + id: 30 +samples/sfx_5/04: + type: SAMPLE + id: 31 +samples/sfx_5/05: + type: SAMPLE + id: 32 +samples/sfx_5/06: + type: SAMPLE + id: 33 +samples/sfx_5/07: + type: SAMPLE + id: 34 +samples/sfx_5/08: + type: SAMPLE + id: 35 +samples/sfx_5/09: + type: SAMPLE + id: 36 +samples/sfx_5/0A: + type: SAMPLE + id: 37 +samples/sfx_5/0B: + type: SAMPLE + id: 38 +samples/sfx_5/0C: + type: SAMPLE + id: 39 +samples/sfx_5/0D: + type: SAMPLE + id: 40 +samples/sfx_5/0E: + type: SAMPLE + id: 41 +samples/sfx_5/0F: + type: SAMPLE + id: 42 +samples/sfx_5/10: + type: SAMPLE + id: 43 +samples/sfx_5/11: + type: SAMPLE + id: 44 +samples/sfx_5/12: + type: SAMPLE + id: 45 +samples/sfx_5/13: + type: SAMPLE + id: 46 +samples/sfx_5/14: + type: SAMPLE + id: 47 +samples/sfx_5/15: + type: SAMPLE + id: 48 +samples/sfx_5/16: + type: SAMPLE + id: 49 +samples/sfx_5/17: + type: SAMPLE + id: 50 +samples/sfx_5/18: + type: SAMPLE + id: 51 +samples/sfx_5/19: + type: SAMPLE + id: 52 +samples/sfx_5/1A: + type: SAMPLE + id: 53 +samples/sfx_5/1B: + type: SAMPLE + id: 54 +samples/sfx_5/1C: + type: SAMPLE + id: 55 +samples/sfx_6/00: + type: SAMPLE + id: 56 +samples/sfx_6/01: + type: SAMPLE + id: 57 +samples/sfx_6/02: + type: SAMPLE + id: 58 +samples/sfx_6/03: + type: SAMPLE + id: 59 +samples/sfx_6/04: + type: SAMPLE + id: 60 +samples/sfx_6/05: + type: SAMPLE + id: 61 +samples/sfx_6/06: + type: SAMPLE + id: 62 +samples/sfx_6/07: + type: SAMPLE + id: 63 +samples/sfx_6/08: + type: SAMPLE + id: 64 +samples/sfx_6/09: + type: SAMPLE + id: 65 +samples/sfx_6/0A: + type: SAMPLE + id: 66 +samples/sfx_6/0B: + type: SAMPLE + id: 67 +samples/sfx_6/0C: + type: SAMPLE + id: 68 +samples/sfx_6/0D: + type: SAMPLE + id: 69 +samples/sfx_7/00: + type: SAMPLE + id: 70 +samples/sfx_7/01: + type: SAMPLE + id: 71 +samples/sfx_7/02: + type: SAMPLE + id: 72 +samples/sfx_7/03: + type: SAMPLE + id: 73 +samples/sfx_7/04: + type: SAMPLE + id: 74 +samples/sfx_7/05: + type: SAMPLE + id: 75 +samples/sfx_7/06: + type: SAMPLE + id: 76 +samples/sfx_7/07: + type: SAMPLE + id: 77 +samples/sfx_7/08: + type: SAMPLE + id: 78 +samples/sfx_7/09: + type: SAMPLE + id: 79 +samples/sfx_7/0A: + type: SAMPLE + id: 80 +samples/sfx_7/0B: + type: SAMPLE + id: 81 +samples/sfx_7/0C: + type: SAMPLE + id: 82 +samples/sfx_7/0D_chain_chomp_bark: + type: SAMPLE + id: 83 +samples/sfx_9/00: + type: SAMPLE + id: 111 +samples/sfx_9/01: + type: SAMPLE + id: 112 +samples/sfx_9/02: + type: SAMPLE + id: 113 +samples/sfx_9/03: + type: SAMPLE + id: 114 +samples/sfx_9/04_camera_buzz: + type: SAMPLE + id: 115 +samples/sfx_9/05_camera_shutter: + type: SAMPLE + id: 116 +samples/sfx_9/06: + type: SAMPLE + id: 117 +samples/sfx_mario/00_mario_jump_hoo: + type: SAMPLE + id: 84 +samples/sfx_mario/01_mario_jump_wah: + type: SAMPLE + id: 85 +samples/sfx_mario/02_mario_yah: + type: SAMPLE + id: 86 +samples/sfx_mario/03_mario_haha: + type: SAMPLE + id: 87 +samples/sfx_mario/04_mario_yahoo: + type: SAMPLE + id: 88 +samples/sfx_mario/05_mario_uh: + type: SAMPLE + id: 89 +samples/sfx_mario/06_mario_hrmm: + type: SAMPLE + id: 90 +samples/sfx_mario/07_mario_wah2: + type: SAMPLE + id: 91 +samples/sfx_mario/08_mario_whoa: + type: SAMPLE + id: 92 +samples/sfx_mario/09_mario_eeuh: + type: SAMPLE + id: 93 +samples/sfx_mario/0A_mario_attacked: + type: SAMPLE + id: 94 +samples/sfx_mario/0B_mario_ooof: + type: SAMPLE + id: 95 +samples/sfx_mario/0C_mario_here_we_go: + type: SAMPLE + id: 96 +samples/sfx_mario/0D_mario_yawning: + type: SAMPLE + id: 97 +samples/sfx_mario/0E_mario_snoring1: + type: SAMPLE + id: 98 +samples/sfx_mario/0F_mario_snoring2: + type: SAMPLE + id: 99 +samples/sfx_mario/10_mario_doh: + type: SAMPLE + id: 100 +samples/sfx_mario/11_mario_game_over: + type: SAMPLE + id: 101 +samples/sfx_mario/12_mario_hello: + type: SAMPLE + id: 102 +samples/sfx_mario/13_mario_press_start_to_play: + type: SAMPLE + id: 103 +samples/sfx_mario/14_mario_twirl_bounce: + type: SAMPLE + id: 104 +samples/sfx_mario/15_mario_snoring3: + type: SAMPLE + id: 105 +samples/sfx_mario/16_mario_so_longa_bowser: + type: SAMPLE + id: 106 +samples/sfx_mario/17_mario_ima_tired: + type: SAMPLE + id: 107 +samples/sfx_mario/18_mario_waha: + type: SAMPLE + id: 108 +samples/sfx_mario/19_mario_yippee: + type: SAMPLE + id: 109 +samples/sfx_mario/1A_mario_lets_a_go: + type: SAMPLE + id: 110 +samples/sfx_mario_peach/00_mario_waaaooow: + type: SAMPLE + id: 118 +samples/sfx_mario_peach/01_mario_hoohoo: + type: SAMPLE + id: 119 +samples/sfx_mario_peach/02_mario_panting: + type: SAMPLE + id: 120 +samples/sfx_mario_peach/03_mario_dying: + type: SAMPLE + id: 121 +samples/sfx_mario_peach/04_mario_on_fire: + type: SAMPLE + id: 122 +samples/sfx_mario_peach/05_mario_uh2: + type: SAMPLE + id: 123 +samples/sfx_mario_peach/06_mario_coughing: + type: SAMPLE + id: 124 +samples/sfx_mario_peach/07_mario_its_a_me_mario: + type: SAMPLE + id: 125 +samples/sfx_mario_peach/08_mario_punch_yah: + type: SAMPLE + id: 126 +samples/sfx_mario_peach/09_mario_punch_hoo: + type: SAMPLE + id: 127 +samples/sfx_mario_peach/0A_mario_mama_mia: + type: SAMPLE + id: 128 +samples/sfx_mario_peach/0B_mario_okey_dokey: + type: SAMPLE + id: 129 +samples/sfx_mario_peach/0C_mario_drowning: + type: SAMPLE + id: 130 +samples/sfx_mario_peach/0D_mario_thank_you_playing_my_game: + type: SAMPLE + id: 131 +samples/sfx_mario_peach/0E_peach_dear_mario: + type: SAMPLE + id: 132 +samples/sfx_mario_peach/0F_peach_mario: + type: SAMPLE + id: 133 +samples/sfx_mario_peach/10_peach_power_of_the_stars: + type: SAMPLE + id: 134 +samples/sfx_mario_peach/11_peach_thanks_to_you: + type: SAMPLE + id: 135 +samples/sfx_mario_peach/12_peach_thank_you_mario: + type: SAMPLE + id: 136 +samples/sfx_mario_peach/13_peach_something_special: + type: SAMPLE + id: 137 +samples/sfx_mario_peach/14_peach_bake_a_cake: + type: SAMPLE + id: 138 +samples/sfx_mario_peach/15_peach_for_mario: + type: SAMPLE + id: 139 +samples/sfx_mario_peach/16_peach_mario2: + type: SAMPLE + id: 140 +samples/sfx_terrain/00_step_default: + type: SAMPLE + id: 6 +samples/sfx_terrain/01_step_grass: + type: SAMPLE + id: 7 +samples/sfx_terrain/02_step_stone: + type: SAMPLE + id: 8 +samples/sfx_terrain/03_step_spooky: + type: SAMPLE + id: 9 +samples/sfx_terrain/04_step_snow: + type: SAMPLE + id: 10 +samples/sfx_terrain/05_step_ice: + type: SAMPLE + id: 11 +samples/sfx_terrain/06_step_metal: + type: SAMPLE + id: 12 +samples/sfx_terrain/07_step_sand: + type: SAMPLE + id: 13 +samples/sfx_water/00_plunge: + type: SAMPLE + id: 14 +samples/sfx_water/01_splash: + type: SAMPLE + id: 15 +samples/sfx_water/02_swim: + type: SAMPLE + id: 16 +sequences/00_sound_player: + type: SEQUENCE + offset: 8063360 + size: 13452 + banks: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 +sequences/01_cutscene_collect_star: + type: SEQUENCE + offset: 8076816 + size: 619 + banks: + - 34 +sequences/02_menu_title_screen: + type: SEQUENCE + offset: 8077440 + size: 8254 + banks: + - 17 +sequences/03_level_grass: + type: SEQUENCE + offset: 8085696 + size: 5122 + banks: + - 34 +sequences/04_level_inside_castle: + type: SEQUENCE + offset: 8090832 + size: 2494 + banks: + - 14 +sequences/05_level_water: + type: SEQUENCE + offset: 8093328 + size: 4780 + banks: + - 19 +sequences/06_level_hot: + type: SEQUENCE + offset: 8098112 + size: 2451 + banks: + - 15 +sequences/07_level_boss_koopa: + type: SEQUENCE + offset: 8100576 + size: 3418 + banks: + - 18 +sequences/08_level_snow: + type: SEQUENCE + offset: 8104000 + size: 8143 + banks: + - 11 +sequences/09_level_slide: + type: SEQUENCE + offset: 8112144 + size: 7432 + banks: + - 13 +sequences/0A_level_spooky: + type: SEQUENCE + offset: 8119584 + size: 5674 + banks: + - 33 + - 16 +sequences/0B_event_piranha_plant: + type: SEQUENCE + offset: 8125264 + size: 1395 + banks: + - 20 +sequences/0C_level_underground: + type: SEQUENCE + offset: 8126672 + size: 4887 + banks: + - 21 +sequences/0D_menu_star_select: + type: SEQUENCE + offset: 8131568 + size: 134 + banks: + - 22 +sequences/0E_event_powerup: + type: SEQUENCE + offset: 8131712 + size: 3129 + banks: + - 23 +sequences/0F_event_metal_cap: + type: SEQUENCE + offset: 8134848 + size: 2770 + banks: + - 24 +sequences/10_event_koopa_message: + type: SEQUENCE + offset: 8137632 + size: 552 + banks: + - 18 +sequences/11_level_koopa_road: + type: SEQUENCE + offset: 8138192 + size: 4741 + banks: + - 25 +sequences/12_event_high_score: + type: SEQUENCE + offset: 8142944 + size: 271 + banks: + - 31 +sequences/13_event_merry_go_round: + type: SEQUENCE + offset: 8143216 + size: 1657 + banks: + - 33 +sequences/14_event_race: + type: SEQUENCE + offset: 8144880 + size: 197 + banks: + - 26 +sequences/15_cutscene_star_spawn: + type: SEQUENCE + offset: 8145088 + size: 644 + banks: + - 14 +sequences/16_event_boss: + type: SEQUENCE + offset: 8145744 + size: 3435 + banks: + - 27 +sequences/17_cutscene_collect_key: + type: SEQUENCE + offset: 8149184 + size: 671 + banks: + - 26 +sequences/18_event_endless_stairs: + type: SEQUENCE + offset: 8149856 + size: 1777 + banks: + - 28 +sequences/19_level_boss_koopa_final: + type: SEQUENCE + offset: 8151648 + size: 3515 + banks: + - 29 +sequences/1A_cutscene_credits: + type: SEQUENCE + offset: 8155168 + size: 14313 + banks: + - 37 +sequences/1B_event_solve_puzzle: + type: SEQUENCE + offset: 8169488 + size: 216 + banks: + - 20 +sequences/1C_event_toad_message: + type: SEQUENCE + offset: 8169712 + size: 208 + banks: + - 32 +sequences/1D_event_peach_message: + type: SEQUENCE + offset: 8169920 + size: 432 + banks: + - 30 +sequences/1E_cutscene_intro: + type: SEQUENCE + offset: 8170352 + size: 1764 + banks: + - 27 +sequences/1F_cutscene_victory: + type: SEQUENCE + offset: 8172128 + size: 2058 + banks: + - 26 +sequences/20_cutscene_ending: + type: SEQUENCE + offset: 8174192 + size: 1882 + banks: + - 35 +sequences/21_menu_file_select: + type: SEQUENCE + offset: 8176080 + size: 781 + banks: + - 36 +sequences/22_cutscene_lakitu: + type: SEQUENCE + offset: 8176864 + size: 313 + banks: + - 27 \ No newline at end of file diff --git a/assets/sm64/us/textures.yml b/assets/sm64/us/textures.yml new file mode 100644 index 0000000..15c9a90 --- /dev/null +++ b/assets/sm64/us/textures.yml @@ -0,0 +1,4023 @@ +cave/hmc_textures.00000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 0 + format: RGBA16 +cave/hmc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 4096 + format: RGBA16 +cave/hmc_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 6144 + format: RGBA16 +cave/hmc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 10240 + format: RGBA16 +cave/hmc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 12288 + format: RGBA16 +cave/hmc_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 14336 + format: RGBA16 +cave/hmc_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3439184 + mio0: 18432 + format: RGBA16 +cave/hmc_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 22528 + format: RGBA16 +cave/hmc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 26624 + format: RGBA16 +cave/hmc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 28672 + format: RGBA16 +cave/hmc_textures.07800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 30720 + format: RGBA16 +cave/hmc_textures.08800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 34816 + format: RGBA16 +cave/hmc_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 38912 + format: RGBA16 +cave/hmc_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 40960 + format: RGBA16 +cave/hmc_textures.0A800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3439184 + mio0: 43008 + format: RGBA16 +cave/hmc_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3439184 + mio0: 47104 + format: IA16 +cave/hmc_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 43008 + format: IA16 +effect/bubble.06048: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 24648 + format: RGBA16 +effect/flower.00008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 8 + format: RGBA16 +effect/flower.00808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 2056 + format: RGBA16 +effect/flower.01008: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 4104 + format: RGBA16 +effect/flower.01808: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 6152 + format: RGBA16 +effect/lava_bubble.02020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 8224 + format: RGBA16 +effect/lava_bubble.02820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 10272 + format: RGBA16 +effect/lava_bubble.03020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 12320 + format: RGBA16 +effect/lava_bubble.03820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 14368 + format: RGBA16 +effect/lava_bubble.04020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 16416 + format: RGBA16 +effect/lava_bubble.04820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 18464 + format: RGBA16 +effect/lava_bubble.05020: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 20512 + format: RGBA16 +effect/lava_bubble.05820: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3601712 + mio0: 22560 + format: RGBA16 +effect/tiny_bubble.0684C: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3601712 + mio0: 26700 + format: RGBA16 +effect/tiny_bubble.06AD8: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 3601712 + mio0: 27352 + format: RGBA16 +fire/lll_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 0 + format: RGBA16 +fire/lll_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 2048 + format: RGBA16 +fire/lll_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 4096 + format: RGBA16 +fire/lll_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 6144 + format: RGBA16 +fire/lll_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 8192 + format: RGBA16 +fire/lll_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 10240 + format: RGBA16 +fire/lll_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 12288 + format: RGBA16 +fire/lll_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 14336 + format: RGBA16 +fire/lll_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 16384 + format: RGBA16 +fire/lll_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 18432 + format: RGBA16 +fire/lll_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 20480 + format: RGBA16 +fire/lll_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 22528 + format: RGBA16 +fire/lll_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 24576 + format: RGBA16 +fire/lll_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 26624 + format: RGBA16 +fire/lll_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 28672 + format: RGBA16 +fire/lll_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 30720 + format: RGBA16 +fire/lll_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 32768 + format: RGBA16 +fire/lll_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 34816 + format: RGBA16 +fire/lll_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 92856 + format: RGBA16 +fire/lll_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 38912 + format: RGBA16 +fire/lll_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 40960 + format: RGBA16 +fire/lll_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 43008 + format: RGBA16 +fire/lll_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 45056 + format: RGBA16 +fire/lll_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3269072 + mio0: 47104 + format: RGBA16 +generic/bob_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 0 + format: RGBA16 +generic/bob_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1334928 + mio0: 36160 + format: RGBA16 +generic/bob_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 4096 + format: RGBA16 +generic/bob_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 6144 + format: RGBA16 +generic/bob_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 8192 + format: RGBA16 +generic/bob_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 10240 + format: RGBA16 +generic/bob_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 12288 + format: RGBA16 +generic/bob_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 14336 + format: RGBA16 +generic/bob_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 16384 + format: RGBA16 +generic/bob_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 18432 + format: RGBA16 +generic/bob_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 20480 + format: RGBA16 +generic/bob_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 22528 + format: RGBA16 +generic/bob_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3330160 + mio0: 24576 + format: RGBA16 +generic/bob_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 28672 + format: RGBA16 +generic/bob_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 30720 + format: RGBA16 +generic/bob_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 32768 + format: RGBA16 +generic/bob_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 34816 + format: RGBA16 +generic/bob_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 36864 + format: RGBA16 +generic/bob_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 38912 + format: RGBA16 +generic/bob_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 40960 + format: RGBA16 +generic/bob_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 43008 + format: RGBA16 +generic/bob_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 45056 + format: IA16 +grass/wf_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 0 + format: RGBA16 +grass/wf_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 2048 + format: RGBA16 +grass/wf_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 4096 + format: RGBA16 +grass/wf_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 6144 + format: RGBA16 +grass/wf_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 8192 + format: RGBA16 +grass/wf_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 10240 + format: RGBA16 +grass/wf_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 12288 + format: RGBA16 +grass/wf_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 14336 + format: RGBA16 +grass/wf_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 16384 + format: RGBA16 +grass/wf_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 18432 + format: RGBA16 +grass/wf_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 20480 + format: RGBA16 +grass/wf_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 22528 + format: RGBA16 +grass/wf_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 20480 + format: RGBA16 +grass/wf_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 26624 + format: RGBA16 +grass/wf_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 28672 + format: RGBA16 +grass/wf_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 30720 + format: RGBA16 +grass/wf_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 32768 + format: RGBA16 +grass/wf_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 34816 + format: RGBA16 +grass/wf_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 36864 + format: RGBA16 +grass/wf_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 38912 + format: RGBA16 +grass/wf_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 40960 + format: RGBA16 +grass/wf_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 43008 + format: RGBA16 +grass/wf_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 45056 + format: IA16 +grass/wf_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3502928 + mio0: 47104 + format: IA16 +inside/inside_castle_textures.00000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3561856 + mio0: 0 + format: RGBA16 +inside/inside_castle_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3561856 + mio0: 4096 + format: RGBA16 +inside/inside_castle_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3561856 + mio0: 8192 + format: RGBA16 +inside/inside_castle_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 12288 + format: RGBA16 +inside/inside_castle_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 14336 + format: RGBA16 +inside/inside_castle_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 16384 + format: RGBA16 +inside/inside_castle_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 2048 + format: RGBA16 +inside/inside_castle_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 20480 + format: RGBA16 +inside/inside_castle_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 22528 + format: RGBA16 +inside/inside_castle_textures.06000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3561856 + mio0: 24576 + format: RGBA16 +inside/inside_castle_textures.07000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3561856 + mio0: 28672 + format: RGBA16 +inside/inside_castle_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 32768 + format: RGBA16 +inside/inside_castle_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 34816 + format: RGBA16 +inside/inside_castle_textures.09000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3561856 + mio0: 36864 + format: RGBA16 +inside/inside_castle_textures.0A000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3561856 + mio0: 40960 + format: RGBA16 +inside/inside_castle_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3561856 + mio0: 45056 + format: RGBA16 +inside/inside_castle_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3561856 + mio0: 47104 + format: RGBA16 +intro_raw/hand_closed: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2463112 + format: RGBA16 +intro_raw/hand_open: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2461056 + format: RGBA16 +intro_raw/mario_face_shine: + type: TEXTURE + size: 1024 + width: 32 + height: 32 + offset: 2511696 + format: IA8 +intro_raw/red_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2465160 + format: RGBA16 +intro_raw/red_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2467208 + format: RGBA16 +intro_raw/red_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2469256 + format: RGBA16 +intro_raw/red_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2471304 + format: RGBA16 +intro_raw/red_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2473352 + format: RGBA16 +intro_raw/red_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2475400 + format: RGBA16 +intro_raw/red_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2477448 + format: RGBA16 +intro_raw/red_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2479496 + format: RGBA16 +intro_raw/sparkle_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2498696 + format: RGBA16 +intro_raw/sparkle_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2500744 + format: RGBA16 +intro_raw/sparkle_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2502792 + format: RGBA16 +intro_raw/sparkle_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2504840 + format: RGBA16 +intro_raw/sparkle_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2506888 + format: RGBA16 +intro_raw/sparkle_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2508936 + format: RGBA16 +intro_raw/white_star_0: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2481544 + format: RGBA16 +intro_raw/white_star_1: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2483592 + format: RGBA16 +intro_raw/white_star_2: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2485640 + format: RGBA16 +intro_raw/white_star_3: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2487688 + format: RGBA16 +intro_raw/white_star_4: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2489736 + format: RGBA16 +intro_raw/white_star_5: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2491784 + format: RGBA16 +intro_raw/white_star_6: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2493832 + format: RGBA16 +intro_raw/white_star_7: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 2495880 + format: RGBA16 +ipl3_raw/ipl3_font_00: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2928 + format: IA1 +ipl3_raw/ipl3_font_01: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2951 + format: IA1 +ipl3_raw/ipl3_font_02: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2974 + format: IA1 +ipl3_raw/ipl3_font_03: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 2997 + format: IA1 +ipl3_raw/ipl3_font_04: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3020 + format: IA1 +ipl3_raw/ipl3_font_05: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3043 + format: IA1 +ipl3_raw/ipl3_font_06: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3066 + format: IA1 +ipl3_raw/ipl3_font_07: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3089 + format: IA1 +ipl3_raw/ipl3_font_08: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3112 + format: IA1 +ipl3_raw/ipl3_font_09: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3135 + format: IA1 +ipl3_raw/ipl3_font_10: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3158 + format: IA1 +ipl3_raw/ipl3_font_11: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3181 + format: IA1 +ipl3_raw/ipl3_font_12: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3204 + format: IA1 +ipl3_raw/ipl3_font_13: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3227 + format: IA1 +ipl3_raw/ipl3_font_14: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3250 + format: IA1 +ipl3_raw/ipl3_font_15: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3273 + format: IA1 +ipl3_raw/ipl3_font_16: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3296 + format: IA1 +ipl3_raw/ipl3_font_17: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3319 + format: IA1 +ipl3_raw/ipl3_font_18: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3342 + format: IA1 +ipl3_raw/ipl3_font_19: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3365 + format: IA1 +ipl3_raw/ipl3_font_20: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3388 + format: IA1 +ipl3_raw/ipl3_font_21: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3411 + format: IA1 +ipl3_raw/ipl3_font_22: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3434 + format: IA1 +ipl3_raw/ipl3_font_23: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3457 + format: IA1 +ipl3_raw/ipl3_font_24: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3480 + format: IA1 +ipl3_raw/ipl3_font_25: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3503 + format: IA1 +ipl3_raw/ipl3_font_26: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3526 + format: IA1 +ipl3_raw/ipl3_font_27: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3549 + format: IA1 +ipl3_raw/ipl3_font_28: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3572 + format: IA1 +ipl3_raw/ipl3_font_29: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3595 + format: IA1 +ipl3_raw/ipl3_font_30: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3618 + format: IA1 +ipl3_raw/ipl3_font_31: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3641 + format: IA1 +ipl3_raw/ipl3_font_32: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3664 + format: IA1 +ipl3_raw/ipl3_font_33: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3687 + format: IA1 +ipl3_raw/ipl3_font_34: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3710 + format: IA1 +ipl3_raw/ipl3_font_35: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3733 + format: IA1 +ipl3_raw/ipl3_font_36: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3756 + format: IA1 +ipl3_raw/ipl3_font_37: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3779 + format: IA1 +ipl3_raw/ipl3_font_38: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3802 + format: IA1 +ipl3_raw/ipl3_font_39: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3825 + format: IA1 +ipl3_raw/ipl3_font_40: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3848 + format: IA1 +ipl3_raw/ipl3_font_41: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3871 + format: IA1 +ipl3_raw/ipl3_font_42: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3894 + format: IA1 +ipl3_raw/ipl3_font_43: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3917 + format: IA1 +ipl3_raw/ipl3_font_44: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3940 + format: IA1 +ipl3_raw/ipl3_font_45: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3963 + format: IA1 +ipl3_raw/ipl3_font_46: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 3986 + format: IA1 +ipl3_raw/ipl3_font_47: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4009 + format: IA1 +ipl3_raw/ipl3_font_48: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4032 + format: IA1 +ipl3_raw/ipl3_font_49: + type: TEXTURE + size: 23 + width: 13 + height: 14 + offset: 4055 + format: IA1 +machine/ttc_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 0 + format: RGBA16 +machine/ttc_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 2048 + format: RGBA16 +machine/ttc_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 4096 + format: RGBA16 +machine/ttc_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 6144 + format: RGBA16 +machine/ttc_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 8192 + format: RGBA16 +machine/ttc_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 10240 + format: RGBA16 +machine/ttc_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 12288 + format: RGBA16 +machine/ttc_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 14336 + format: RGBA16 +machine/ttc_textures.04000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3467104 + mio0: 16384 + format: RGBA16 +machine/ttc_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 20480 + format: RGBA16 +machine/ttc_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 22528 + format: RGBA16 +machine/ttc_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 24576 + format: RGBA16 +machine/ttc_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 26624 + format: RGBA16 +machine/ttc_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 28672 + format: RGBA16 +machine/ttc_textures.07800: + type: TEXTURE + size: 2048 + width: 16 + height: 64 + offset: 3467104 + mio0: 30720 + format: RGBA16 +machine/ttc_textures.08000: + type: TEXTURE + size: 1024 + width: 64 + height: 8 + offset: 3467104 + mio0: 32768 + format: RGBA16 +machine/ttc_textures.08400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3467104 + mio0: 33792 + format: RGBA16 +mountain/ttm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 0 + format: RGBA16 +mountain/ttm_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3479904 + mio0: 2048 + format: RGBA16 +mountain/ttm_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3479904 + mio0: 6144 + format: RGBA16 +mountain/ttm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 10240 + format: RGBA16 +mountain/ttm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 12288 + format: RGBA16 +mountain/ttm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 14336 + format: RGBA16 +mountain/ttm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 16384 + format: RGBA16 +mountain/ttm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 18432 + format: RGBA16 +mountain/ttm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 20480 + format: RGBA16 +mountain/ttm_textures.05800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3479904 + mio0: 22528 + format: RGBA16 +mountain/ttm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 26624 + format: RGBA16 +mountain/ttm_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 28672 + format: RGBA16 +mountain/ttm_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 30720 + format: RGBA16 +mountain/ttm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 32768 + format: RGBA16 +mountain/ttm_textures.08800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3479904 + mio0: 34816 + format: RGBA16 +mountain/ttm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 38912 + format: RGBA16 +mountain/ttm_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 24576 + format: RGBA16 +mountain/ttm_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 43008 + format: RGBA16 +mountain/ttm_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 45056 + format: RGBA16 +mountain/ttm_textures.0B800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 47104 + format: RGBA16 +mountain/ttm_textures.0C000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3479904 + mio0: 49152 + format: RGBA16 +outside/castle_grounds_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 0 + format: RGBA16 +outside/castle_grounds_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 2048 + format: RGBA16 +outside/castle_grounds_textures.01000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3534096 + mio0: 4096 + format: RGBA16 +outside/castle_grounds_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3534096 + mio0: 8192 + format: RGBA16 +outside/castle_grounds_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 12288 + format: RGBA16 +outside/castle_grounds_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 14336 + format: RGBA16 +outside/castle_grounds_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 16384 + format: RGBA16 +outside/castle_grounds_textures.04800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3534096 + mio0: 18432 + format: RGBA16 +outside/castle_grounds_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 22528 + format: RGBA16 +outside/castle_grounds_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 24576 + format: RGBA16 +outside/castle_grounds_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3534096 + mio0: 26624 + format: RGBA16 +outside/castle_grounds_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 30720 + format: RGBA16 +outside/castle_grounds_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 32768 + format: RGBA16 +outside/castle_grounds_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 34816 + format: RGBA16 +outside/castle_grounds_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 36864 + format: RGBA16 +outside/castle_grounds_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 38912 + format: RGBA16 +outside/castle_grounds_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 40960 + format: RGBA16 +outside/castle_grounds_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 43008 + format: RGBA16 +outside/castle_grounds_textures.0B000: + type: TEXTURE + size: 1024 + width: 16 + height: 32 + offset: 3534096 + mio0: 45056 + format: RGBA16 +outside/castle_grounds_textures.0B400: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3534096 + mio0: 46080 + format: RGBA16 +outside/castle_grounds_textures.0BC00: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3330160 + mio0: 45056 + format: IA16 +segment2/font_graphics.05900: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 22784 + format: IA4 +segment2/font_graphics.05940: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 22848 + format: IA4 +segment2/font_graphics.05980: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 22912 + format: IA4 +segment2/font_graphics.059C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 22976 + format: IA4 +segment2/font_graphics.05A00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23040 + format: IA4 +segment2/font_graphics.05A40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23104 + format: IA4 +segment2/font_graphics.05A80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23168 + format: IA4 +segment2/font_graphics.05AC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23232 + format: IA4 +segment2/font_graphics.05B00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23296 + format: IA4 +segment2/font_graphics.05B40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23360 + format: IA4 +segment2/font_graphics.05B80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23424 + format: IA4 +segment2/font_graphics.05BC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23488 + format: IA4 +segment2/font_graphics.05C00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23552 + format: IA4 +segment2/font_graphics.05C40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23616 + format: IA4 +segment2/font_graphics.05C80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23680 + format: IA4 +segment2/font_graphics.05CC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23744 + format: IA4 +segment2/font_graphics.05D00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23808 + format: IA4 +segment2/font_graphics.05D40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23872 + format: IA4 +segment2/font_graphics.05D80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 23936 + format: IA4 +segment2/font_graphics.05DC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24000 + format: IA4 +segment2/font_graphics.05E00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24064 + format: IA4 +segment2/font_graphics.05E40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24128 + format: IA4 +segment2/font_graphics.05E80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24192 + format: IA4 +segment2/font_graphics.05EC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24256 + format: IA4 +segment2/font_graphics.05F00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24320 + format: IA4 +segment2/font_graphics.05F40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24384 + format: IA4 +segment2/font_graphics.05F80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24448 + format: IA4 +segment2/font_graphics.05FC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24512 + format: IA4 +segment2/font_graphics.06000: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24576 + format: IA4 +segment2/font_graphics.06040: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24640 + format: IA4 +segment2/font_graphics.06080: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24704 + format: IA4 +segment2/font_graphics.060C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24768 + format: IA4 +segment2/font_graphics.06100: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24832 + format: IA4 +segment2/font_graphics.06140: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24896 + format: IA4 +segment2/font_graphics.06180: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 24960 + format: IA4 +segment2/font_graphics.061C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25024 + format: IA4 +segment2/font_graphics.06200: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25088 + format: IA4 +segment2/font_graphics.06240: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25152 + format: IA4 +segment2/font_graphics.06280: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25216 + format: IA4 +segment2/font_graphics.062C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25280 + format: IA4 +segment2/font_graphics.06300: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25344 + format: IA4 +segment2/font_graphics.06340: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25408 + format: IA4 +segment2/font_graphics.06380: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25472 + format: IA4 +segment2/font_graphics.063C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25536 + format: IA4 +segment2/font_graphics.06400: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25600 + format: IA4 +segment2/font_graphics.06410: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 1606720 + mio0: 83574 + format: IA1 +segment2/font_graphics.06420: + type: TEXTURE + size: 16 + width: 16 + height: 8 + offset: 1851952 + mio0: 133979 + format: IA1 +segment2/font_graphics.06440: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25664 + format: IA4 +segment2/font_graphics.06480: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25728 + format: IA4 +segment2/font_graphics.064C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25792 + format: IA4 +segment2/font_graphics.06500: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25856 + format: IA4 +segment2/font_graphics.06540: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25920 + format: IA4 +segment2/font_graphics.06580: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 25984 + format: IA4 +segment2/font_graphics.065C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26048 + format: IA4 +segment2/font_graphics.06600: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26112 + format: IA4 +segment2/font_graphics.06640: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26176 + format: IA4 +segment2/font_graphics.06680: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26240 + format: IA4 +segment2/font_graphics.066C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26304 + format: IA4 +segment2/font_graphics.06700: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26368 + format: IA4 +segment2/font_graphics.06740: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26432 + format: IA4 +segment2/font_graphics.06780: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26496 + format: IA4 +segment2/font_graphics.067C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26560 + format: IA4 +segment2/font_graphics.06800: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26624 + format: IA4 +segment2/font_graphics.06840: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26688 + format: IA4 +segment2/font_graphics.06880: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26752 + format: IA4 +segment2/font_graphics.068C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26816 + format: IA4 +segment2/font_graphics.06900: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26880 + format: IA4 +segment2/font_graphics.06940: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 26944 + format: IA4 +segment2/font_graphics.06980: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27008 + format: IA4 +segment2/font_graphics.069C0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27072 + format: IA4 +segment2/font_graphics.06A00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27136 + format: IA4 +segment2/font_graphics.06A40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27200 + format: IA4 +segment2/font_graphics.06A80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27264 + format: IA4 +segment2/font_graphics.06AC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27328 + format: IA4 +segment2/font_graphics.06B00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27392 + format: IA4 +segment2/font_graphics.06B40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27456 + format: IA4 +segment2/font_graphics.06B80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27520 + format: IA4 +segment2/font_graphics.06BC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27584 + format: IA4 +segment2/font_graphics.06C00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27648 + format: IA4 +segment2/font_graphics.06C40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27712 + format: IA4 +segment2/font_graphics.06C80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27776 + format: IA4 +segment2/font_graphics.06CC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27840 + format: IA4 +segment2/font_graphics.06D00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27904 + format: IA4 +segment2/font_graphics.06D40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 27968 + format: IA4 +segment2/font_graphics.06D80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28032 + format: IA4 +segment2/font_graphics.06DC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28096 + format: IA4 +segment2/font_graphics.06E00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28160 + format: IA4 +segment2/font_graphics.06E40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28224 + format: IA4 +segment2/font_graphics.06E80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28288 + format: IA4 +segment2/font_graphics.06EC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28352 + format: IA4 +segment2/font_graphics.06F00: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28416 + format: IA4 +segment2/font_graphics.06F40: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28480 + format: IA4 +segment2/font_graphics.06F80: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28544 + format: IA4 +segment2/font_graphics.06FC0: + type: TEXTURE + size: 64 + width: 16 + height: 8 + offset: 1083968 + mio0: 28608 + format: IA4 +segment2/segment2.00000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 0 + format: RGBA16 +segment2/segment2.00200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 512 + format: RGBA16 +segment2/segment2.00400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 1024 + format: RGBA16 +segment2/segment2.00600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 1536 + format: RGBA16 +segment2/segment2.00800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 2048 + format: RGBA16 +segment2/segment2.00A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 2560 + format: RGBA16 +segment2/segment2.00C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 3072 + format: RGBA16 +segment2/segment2.00E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 3584 + format: RGBA16 +segment2/segment2.01000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 4096 + format: RGBA16 +segment2/segment2.01200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 4608 + format: RGBA16 +segment2/segment2.01400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 5120 + format: RGBA16 +segment2/segment2.01600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 5632 + format: RGBA16 +segment2/segment2.01800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 6144 + format: RGBA16 +segment2/segment2.01A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 6656 + format: RGBA16 +segment2/segment2.01C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 7168 + format: RGBA16 +segment2/segment2.01E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 7680 + format: RGBA16 +segment2/segment2.02000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 8192 + format: RGBA16 +segment2/segment2.02200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 8704 + format: RGBA16 +segment2/segment2.02400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 9216 + format: RGBA16 +segment2/segment2.02800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 9728 + format: RGBA16 +segment2/segment2.02A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 10240 + format: RGBA16 +segment2/segment2.02C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 10752 + format: RGBA16 +segment2/segment2.02E00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 11264 + format: RGBA16 +segment2/segment2.03000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 11776 + format: RGBA16 +segment2/segment2.03200: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 12288 + format: RGBA16 +segment2/segment2.03600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 12800 + format: RGBA16 +segment2/segment2.03800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 13312 + format: RGBA16 +segment2/segment2.03A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 13824 + format: RGBA16 +segment2/segment2.03C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 14336 + format: RGBA16 +segment2/segment2.04000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 14848 + format: RGBA16 +segment2/segment2.04400: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 15360 + format: RGBA16 +segment2/segment2.04800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 15872 + format: RGBA16 +segment2/segment2.04A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 16384 + format: RGBA16 +segment2/segment2.05000: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 2778544 + mio0: 41424 + format: RGBA16 +segment2/segment2.05600: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 16896 + format: RGBA16 +segment2/segment2.05800: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 17408 + format: RGBA16 +segment2/segment2.05A00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 17920 + format: RGBA16 +segment2/segment2.05C00: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 18432 + format: RGBA16 +segment2/segment2.06200: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 18944 + format: RGBA16 +segment2/segment2.06280: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19072 + format: RGBA16 +segment2/segment2.06300: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19200 + format: RGBA16 +segment2/segment2.06380: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19328 + format: RGBA16 +segment2/segment2.06400: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19456 + format: RGBA16 +segment2/segment2.06480: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19584 + format: RGBA16 +segment2/segment2.06500: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19712 + format: RGBA16 +segment2/segment2.06580: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19840 + format: RGBA16 +segment2/segment2.06600: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 19968 + format: RGBA16 +segment2/segment2.06680: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20096 + format: RGBA16 +segment2/segment2.06700: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20224 + format: RGBA16 +segment2/segment2.06780: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20352 + format: RGBA16 +segment2/segment2.06800: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20480 + format: RGBA16 +segment2/segment2.06880: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20608 + format: RGBA16 +segment2/segment2.06900: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20736 + format: RGBA16 +segment2/segment2.06980: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20864 + format: RGBA16 +segment2/segment2.06A00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 20992 + format: RGBA16 +segment2/segment2.06A80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21120 + format: RGBA16 +segment2/segment2.06B00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21248 + format: RGBA16 +segment2/segment2.06B80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21376 + format: RGBA16 +segment2/segment2.06C00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21504 + format: RGBA16 +segment2/segment2.06C80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21632 + format: RGBA16 +segment2/segment2.06D00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21760 + format: RGBA16 +segment2/segment2.06D80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 21888 + format: RGBA16 +segment2/segment2.06E00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22016 + format: RGBA16 +segment2/segment2.06E80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22144 + format: RGBA16 +segment2/segment2.06F00: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22272 + format: RGBA16 +segment2/segment2.06F80: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22400 + format: RGBA16 +segment2/segment2.07000: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22528 + format: RGBA16 +segment2/segment2.07080: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 22656 + format: RGBA16 +segment2/segment2.07340: + type: TEXTURE + size: 16 + width: 8 + height: 16 + offset: 1083968 + mio0: 24050 + format: IA1 +segment2/segment2.07B50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 28672 + format: RGBA16 +segment2/segment2.07D50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 29184 + format: RGBA16 +segment2/segment2.07F50: + type: TEXTURE + size: 512 + width: 16 + height: 16 + offset: 1083968 + mio0: 29696 + format: RGBA16 +segment2/segment2.08150: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 30208 + format: RGBA16 +segment2/segment2.081D0: + type: TEXTURE + size: 128 + width: 8 + height: 8 + offset: 1083968 + mio0: 30336 + format: RGBA16 +segment2/segment2.0F458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1083968 + mio0: 74424 + format: IA8 +segment2/segment2.0FC58: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1083968 + mio0: 76472 + format: IA8 +segment2/segment2.10458: + type: TEXTURE + size: 4096 + width: 64 + height: 64 + offset: 1083968 + mio0: 78520 + format: IA8 +segment2/segment2.11458: + type: TEXTURE + size: 2048 + width: 32 + height: 64 + offset: 1083968 + mio0: 82616 + format: IA8 +segment2/segment2.11C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 84664 + format: RGBA16 +segment2/segment2.12458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 86712 + format: RGBA16 +segment2/segment2.12C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 88760 + format: RGBA16 +segment2/segment2.13458: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 90808 + format: IA16 +segment2/segment2.13C58: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1083968 + mio0: 92856 + format: RGBA16 +segment2/segment2.14838: + type: TEXTURE + size: 64 + width: 8 + height: 8 + offset: 1083968 + mio0: 95896 + format: IA8 +segment2/shadow_quarter_circle: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1083968 + mio0: 73912 + format: IA8 +segment2/shadow_quarter_square: + type: TEXTURE + size: 256 + width: 16 + height: 16 + offset: 1083968 + mio0: 74168 + format: IA8 +sky/metal_hole: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 26624 + format: RGBA16 +sky/rr_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 0 + format: RGBA16 +sky/rr_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 2048 + format: RGBA16 +sky/rr_textures.01000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 4096 + format: RGBA16 +sky/rr_textures.01800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 6144 + format: RGBA16 +sky/rr_textures.02000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3397392 + mio0: 8192 + format: RGBA16 +sky/rr_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 12288 + format: RGBA16 +sky/rr_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3397392 + mio0: 14336 + format: RGBA16 +sky/rr_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 18432 + format: RGBA16 +sky/rr_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 20480 + format: RGBA16 +sky/rr_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 22528 + format: RGBA16 +sky/rr_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 24576 + format: RGBA16 +sky/rr_textures.07000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 28672 + format: RGBA16 +sky/rr_textures.07800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 30720 + format: RGBA16 +sky/rr_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3397392 + mio0: 32768 + format: RGBA16 +skyboxes/bbh: + type: BLOB + size: 84288 + offset: 3125680 + mio0: 0 +skyboxes/bidw: + type: BLOB + size: 131392 + offset: 3153104 + mio0: 0 +skyboxes/bitfs: + type: BLOB + size: 102720 + offset: 2949184 + mio0: 0 +skyboxes/bits: + type: BLOB + size: 131392 + offset: 3198656 + mio0: 0 +skyboxes/ccm: + type: BLOB + size: 131392 + offset: 2854672 + mio0: 0 +skyboxes/cloud_floor: + type: BLOB + size: 131392 + offset: 3045504 + mio0: 0 +skyboxes/clouds: + type: BLOB + size: 84288 + offset: 2913232 + mio0: 0 +skyboxes/ssl: + type: BLOB + size: 131392 + offset: 3085536 + mio0: 0 +skyboxes/water: + type: BLOB + size: 131392 + offset: 2803376 + mio0: 0 +skyboxes/wdw: + type: BLOB + size: 131392 + offset: 2974960 + mio0: 0 +snow/ccm_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 0 + format: RGBA16 +snow/ccm_textures.00800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 2048 + format: RGBA16 +snow/ccm_textures.01000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3412288 + mio0: 4096 + format: RGBA16 +snow/ccm_textures.02000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 8192 + format: RGBA16 +snow/ccm_textures.02800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 10240 + format: RGBA16 +snow/ccm_textures.03000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 12288 + format: RGBA16 +snow/ccm_textures.03800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 14336 + format: RGBA16 +snow/ccm_textures.04000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 16384 + format: RGBA16 +snow/ccm_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 18432 + format: RGBA16 +snow/ccm_textures.05000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 20480 + format: RGBA16 +snow/ccm_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 22528 + format: RGBA16 +snow/ccm_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 24576 + format: RGBA16 +snow/ccm_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 26624 + format: RGBA16 +snow/ccm_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3412288 + mio0: 28672 + format: RGBA16 +snow/ccm_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 32768 + format: RGBA16 +snow/ccm_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 34816 + format: RGBA16 +snow/ccm_textures.09000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 36864 + format: IA16 +snow/ccm_textures.09800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3412288 + mio0: 38912 + format: IA16 +spooky/bbh_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 0 + format: RGBA16 +spooky/bbh_textures.00800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 2048 + format: RGBA16 +spooky/bbh_textures.01800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 6144 + format: RGBA16 +spooky/bbh_textures.02800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 10240 + format: RGBA16 +spooky/bbh_textures.03800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 14336 + format: RGBA16 +spooky/bbh_textures.04800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 18432 + format: RGBA16 +spooky/bbh_textures.05000: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 20480 + format: RGBA16 +spooky/bbh_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 24576 + format: RGBA16 +spooky/bbh_textures.06800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 26624 + format: RGBA16 +spooky/bbh_textures.07000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3305024 + mio0: 28672 + format: RGBA16 +spooky/bbh_textures.08000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 32768 + format: RGBA16 +spooky/bbh_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 34816 + format: RGBA16 +spooky/bbh_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3305024 + mio0: 36864 + format: RGBA16 +spooky/bbh_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 1469536 + mio0: 49800 + format: RGBA16 +spooky/bbh_textures.0A800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 43008 + format: IA16 +spooky/bbh_textures.0B000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3305024 + mio0: 45056 + format: IA16 +spooky/bbh_textures.0B800: + type: TEXTURE + size: 4096 + width: 32 + height: 64 + offset: 3305024 + mio0: 47104 + format: IA16 +title_screen_bg/title_screen_bg.001C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 448 + format: RGBA16 +title_screen_bg/title_screen_bg.00E40: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 3648 + format: RGBA16 +title_screen_bg/title_screen_bg.01AC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 6848 + format: RGBA16 +title_screen_bg/title_screen_bg.02740: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 10048 + format: RGBA16 +title_screen_bg/title_screen_bg.033C0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 13248 + format: RGBA16 +title_screen_bg/title_screen_bg.04040: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 16448 + format: RGBA16 +title_screen_bg/title_screen_bg.04CC0: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 19648 + format: RGBA16 +title_screen_bg/title_screen_bg.05940: + type: TEXTURE + size: 3200 + width: 80 + height: 20 + offset: 2558144 + mio0: 22848 + format: RGBA16 +water/jrb_textures.00000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3361584 + mio0: 0 + format: RGBA16 +water/jrb_textures.00800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 2048 + format: RGBA16 +water/jrb_textures.01800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 6144 + format: RGBA16 +water/jrb_textures.02800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 10240 + format: RGBA16 +water/jrb_textures.03800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 14336 + format: RGBA16 +water/jrb_textures.04800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 18432 + format: RGBA16 +water/jrb_textures.05800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3361584 + mio0: 22528 + format: RGBA16 +water/jrb_textures.06000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3361584 + mio0: 24576 + format: RGBA16 +water/jrb_textures.06800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 26624 + format: RGBA16 +water/jrb_textures.07800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 30720 + format: RGBA16 +water/jrb_textures.08800: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3361584 + mio0: 34816 + format: RGBA16 +water/jrb_textures.09000: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 36864 + format: RGBA16 +water/jrb_textures.0A000: + type: TEXTURE + size: 2048 + width: 32 + height: 32 + offset: 3361584 + mio0: 40960 + format: RGBA16 +water/jrb_textures.0A800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 43008 + format: RGBA16 +water/jrb_textures.0B800: + type: TEXTURE + size: 4096 + width: 64 + height: 32 + offset: 3361584 + mio0: 47104 + format: RGBA16 diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..2f14f1b --- /dev/null +++ b/config.yml @@ -0,0 +1,23 @@ +# Supported game versions +# SM64 [JP, US, EU] +# MK64 [US] + +8a20a5c83d6ceb0f0506cfc9fa20d8f438cafe51: + name: Super Mario 64 [JP] + path: assets/sm64/jp + output: smcube.otr + +9bef1128717f958171a4afac3ed78ee2bb4e86ce: + name: Super Mario 64 [US] + path: assets/sm64/us + output: smcube.otr + +4ac5721683d0e0b6bbb561b58a71740845dceea9: + name: Super Mario 64 [EU] + path: assets/sm64/eu + output: smcube.otr + +579c48e211ae952530ffc8738709f078d5dd215e: + name: Mario Kart 64 [US] + path: assets/mk64/us + output: mkcube.otr \ No newline at end of file diff --git a/lib/hj/sha1.h b/lib/hj/sha1.h new file mode 100644 index 0000000..6fd1f36 --- /dev/null +++ b/lib/hj/sha1.h @@ -0,0 +1,633 @@ +/* + * Chocobo1/Hash + * + * Copyright 2017-2020 by Mike Tzou (Chocobo1) + * https://github.com/Chocobo1/Hash + * + * Licensed under GNU General Public License 3 or later. + * + * @license GPL3 + */ + +#ifndef CHOCOBO1_SHA1_H +#define CHOCOBO1_SHA1_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if (__cplusplus > 201703L) +#include +#endif + +#ifndef USE_STD_SPAN_CHOCOBO1_HASH +#if (__cpp_lib_span >= 202002L) +#define USE_STD_SPAN_CHOCOBO1_HASH 1 +#else +#define USE_STD_SPAN_CHOCOBO1_HASH 0 +#endif +#endif + +#if (USE_STD_SPAN_CHOCOBO1_HASH == 1) +#include +#else +#include "gsl/span" +#endif + + +namespace Chocobo1 +{ + // Use these!! + // SHA1(); +} + + +namespace Chocobo1 +{ +// users should ignore things in this namespace + + namespace Hash + { +#ifndef CONSTEXPR_CPP17_CHOCOBO1_HASH +#if __cplusplus >= 201703L +#define CONSTEXPR_CPP17_CHOCOBO1_HASH constexpr +#else +#define CONSTEXPR_CPP17_CHOCOBO1_HASH +#endif +#endif + +#if (USE_STD_SPAN_CHOCOBO1_HASH == 1) + using IndexType = std::size_t; +#else + using IndexType = gsl::index; +#endif + +#ifndef CHOCOBO1_HASH_BUFFER_IMPL +#define CHOCOBO1_HASH_BUFFER_IMPL + template + class Buffer + { + public: + using value_type = T; + using index_type = IndexType; + using size_type = std::size_t; + + constexpr Buffer() = default; + + CONSTEXPR_CPP17_CHOCOBO1_HASH Buffer(const std::initializer_list initList) + { +#if !defined(NDEBUG) + // check if out-of-bounds + static_cast(m_array.at(m_dataEndIdx + initList.size() - 1)); +#endif + + for (const auto &i : initList) + { + m_array[m_dataEndIdx] = i; + ++m_dataEndIdx; + } + } + + template + constexpr Buffer(const InputIt first, const InputIt last) + { + for (InputIt iter = first; iter != last; ++iter) + { + this->fill(*iter); + } + } + + constexpr T& operator[](const index_type pos) + { + return m_array[pos]; + } + + constexpr T operator[](const index_type pos) const + { + return m_array[pos]; + } + + CONSTEXPR_CPP17_CHOCOBO1_HASH void fill(const T &value, const index_type count = 1) + { +#if !defined(NDEBUG) + // check if out-of-bounds + static_cast(m_array.at(m_dataEndIdx + count - 1)); +#endif + + for (index_type i = 0; i < count; ++i) + { + m_array[m_dataEndIdx] = value; + ++m_dataEndIdx; + } + } + + template + constexpr void push_back(const InputIt first, const InputIt last) + { + for (InputIt iter = first; iter != last; ++iter) + { + this->fill(*iter); + } + } + + constexpr void clear() + { + m_array = {}; + m_dataEndIdx = 0; + } + + constexpr bool empty() const + { + return (m_dataEndIdx == 0); + } + + constexpr size_type size() const + { + return m_dataEndIdx; + } + + constexpr const T* data() const + { + return m_array.data(); + } + + private: + std::array m_array {}; + index_type m_dataEndIdx = 0; + }; +#endif + +#ifndef CHOCOBO1_HASH_ROR_IMPL +#define CHOCOBO1_HASH_ROR_IMPL + template + constexpr R ror(const T x, const unsigned int s) + { + static_assert(std::is_unsigned::value, ""); + static_assert(std::is_unsigned::value, ""); + return static_cast(x >> s); + } +#endif + +#ifndef CHOCOBO1_HASH_ROTL_IMPL +#define CHOCOBO1_HASH_ROTL_IMPL + template + constexpr T rotl(const T x, const unsigned int s) + { + static_assert(std::is_unsigned::value, ""); + if (s == 0) + return x; + return ((x << s) | (x >> ((sizeof(T) * 8) - s))); + } +#endif + + + namespace SHA1_NS + { + class SHA1 + { + // https://tools.ietf.org/html/rfc3174 + + public: + using Byte = uint8_t; + using ResultArrayType = std::array; + +#if (USE_STD_SPAN_CHOCOBO1_HASH == 1) + template + using Span = std::span; +#else + template + using Span = gsl::span; +#endif + + + constexpr SHA1(); + + constexpr void reset(); + CONSTEXPR_CPP17_CHOCOBO1_HASH SHA1& finalize(); // after this, only `operator T()`, `reset()`, `toArray()`, `toString()`, `toVector()` are available + + std::string toString() const; + std::vector toVector() const; + CONSTEXPR_CPP17_CHOCOBO1_HASH ResultArrayType toArray() const; + template + CONSTEXPR_CPP17_CHOCOBO1_HASH operator T() const noexcept; + + constexpr SHA1& addData(Span inData); + constexpr SHA1& addData(const void *ptr, std::size_t length); + template + constexpr SHA1& addData(const Byte (&array)[N]); + template + SHA1& addData(const T (&array)[N]); + template + SHA1& addData(Span inSpan); + + friend constexpr bool operator==(const SHA1 &left, const SHA1 &right) + { + for (int i = 0; i < 5; ++i) + { + if (left.m_state[i] != right.m_state[i]) + return false; + } + return true; + } + friend constexpr bool operator!=(const SHA1 &left, const SHA1 &right) + { + return !(left == right); + } + + private: + constexpr void addDataImpl(Span data); + + static constexpr int BLOCK_SIZE = 64; + + Buffer m_buffer; // x2 for paddings + uint64_t m_sizeCounter = 0; + + uint32_t m_state[5] = {}; + }; + + + // helpers + template + class Loader + { + // this class workaround loading data from unaligned memory boundaries + // also eliminate endianness issues + public: + explicit constexpr Loader(const uint8_t *ptr) + : m_ptr(ptr) + { + } + + constexpr T operator[](const IndexType idx) const + { + static_assert(std::is_same::value, ""); + // handle specific endianness here + const uint8_t *ptr = m_ptr + (sizeof(T) * idx); + return ( (static_cast(*(ptr + 0)) << 24) + | (static_cast(*(ptr + 1)) << 16) + | (static_cast(*(ptr + 2)) << 8) + | (static_cast(*(ptr + 3)) << 0)); + } + + private: + const uint8_t *m_ptr; + }; + + + // + constexpr SHA1::SHA1() + { + static_assert((CHAR_BIT == 8), "Sorry, we don't support exotic CPUs"); + reset(); + } + + constexpr void SHA1::reset() + { + m_buffer.clear(); + m_sizeCounter = 0; + + m_state[0] = 0x67452301; + m_state[1] = 0xEFCDAB89; + m_state[2] = 0x98BADCFE; + m_state[3] = 0x10325476; + m_state[4] = 0xC3D2E1F0; + } + + CONSTEXPR_CPP17_CHOCOBO1_HASH SHA1& SHA1::finalize() + { + m_sizeCounter += m_buffer.size(); + + // append 1 bit + m_buffer.fill(1 << 7); + + // append paddings + const auto len = static_cast(((2 * BLOCK_SIZE) - (m_buffer.size() + 8)) % BLOCK_SIZE); + m_buffer.fill(0, (len + 8)); + + // append size in bits + const uint64_t sizeCounterBits = m_sizeCounter * 8; + const uint32_t sizeCounterBitsL = ror(sizeCounterBits, 0); + const uint32_t sizeCounterBitsH = ror(sizeCounterBits, 32); + for (int i = 0; i < 4; ++i) + { + m_buffer[m_buffer.size() - 8 + i] = ror(sizeCounterBitsH, (8 * (3 - i))); + m_buffer[m_buffer.size() - 4 + i] = ror(sizeCounterBitsL, (8 * (3 - i))); + } + + addDataImpl({m_buffer.data(), m_buffer.size()}); + m_buffer.clear(); + + return (*this); + } + + std::string SHA1::toString() const + { + const auto digest = toArray(); + std::string ret; + ret.resize(2 * digest.size()); + + auto *retPtr = &ret.front(); + for (const auto c : digest) + { + const Byte upper = ror(c, 4); + *(retPtr++) = static_cast((upper < 10) ? (upper + '0') : (upper - 10 + 'a')); + + const Byte lower = c & 0xf; + *(retPtr++) = static_cast((lower < 10) ? (lower + '0') : (lower - 10 + 'a')); + } + + return ret; + } + + std::vector SHA1::toVector() const + { + const auto digest = toArray(); + return {digest.begin(), digest.end()}; + } + + CONSTEXPR_CPP17_CHOCOBO1_HASH SHA1::ResultArrayType SHA1::toArray() const + { + const Span state(m_state); + const int dataSize = sizeof(decltype(state)::value_type); + + ResultArrayType ret {}; + auto *retPtr = ret.data(); + for (const auto i : state) + { + for (int j = (dataSize - 1); j >= 0; --j) + *(retPtr++) = ror(i, (j * 8)); + } + + return ret; + } + + template + CONSTEXPR_CPP17_CHOCOBO1_HASH SHA1::operator T() const noexcept + { + static_assert(std::is_unsigned::value, ""); + + const auto digest = toArray(); + T ret = 0; + for (int i = 0, iMax = static_cast(std::min(sizeof(T), digest.size())); i < iMax; ++i) + { + ret <<= 8; + ret |= digest[i]; + } + return ret; + } + + constexpr SHA1& SHA1::addData(const Span inData) + { + Span data = inData; + + if (!m_buffer.empty()) + { + const size_t len = std::min((BLOCK_SIZE - m_buffer.size()), data.size()); // try fill to BLOCK_SIZE bytes + m_buffer.push_back(data.begin(), (data.begin() + len)); + + if (m_buffer.size() < BLOCK_SIZE) // still doesn't fill the buffer + return (*this); + + addDataImpl({m_buffer.data(), m_buffer.size()}); + m_buffer.clear(); + + data = data.subspan(len); + } + + const size_t dataSize = data.size(); + if (dataSize < BLOCK_SIZE) + { + m_buffer = {data.begin(), data.end()}; + return (*this); + } + + const size_t len = dataSize - (dataSize % BLOCK_SIZE); // align on BLOCK_SIZE bytes + addDataImpl(data.first(len)); + + if (len < dataSize) // didn't consume all data + m_buffer = {(data.begin() + len), data.end()}; + + return (*this); + } + + constexpr SHA1& SHA1::addData(const void *ptr, const std::size_t length) + { + // Span::size_type = std::size_t + return addData({static_cast(ptr), length}); + } + + template + constexpr SHA1& SHA1::addData(const Byte (&array)[N]) + { + return addData({array, N}); + } + + template + SHA1& SHA1::addData(const T (&array)[N]) + { + return addData({reinterpret_cast(array), (sizeof(T) * N)}); + } + + template + SHA1& SHA1::addData(const Span inSpan) + { + return addData({reinterpret_cast(inSpan.data()), inSpan.size_bytes()}); + } + + constexpr void SHA1::addDataImpl(const Span data) + { + assert((data.size() % BLOCK_SIZE) == 0); + + m_sizeCounter += data.size(); + + for (size_t i = 0, iend = static_cast(data.size() / BLOCK_SIZE); i < iend; ++i) + { + const Loader m(static_cast(data.data() + (i * BLOCK_SIZE))); + + uint32_t a = m_state[0]; + uint32_t b = m_state[1]; + uint32_t c = m_state[2]; + uint32_t d = m_state[3]; + uint32_t e = m_state[4]; + + uint32_t wTable[80] = {}; + +#ifdef sha1Round1 +#error "macro name clash" +#else +#define sha1Round1(a, b, c, d, e, t) \ + wTable[t] = m[t]; \ + e = rotl(a, 5) + ((b & (c ^ d)) ^ d) + e + wTable[t] + 0x5A827999; /* alternative f */ \ + b = rotl(b, 30); + + sha1Round1(a, b, c, d, e, 0); + sha1Round1(e, a, b, c, d, 1); + sha1Round1(d, e, a, b, c, 2); + sha1Round1(c, d, e, a, b, 3); + sha1Round1(b, c, d, e, a, 4); + sha1Round1(a, b, c, d, e, 5); + sha1Round1(e, a, b, c, d, 6); + sha1Round1(d, e, a, b, c, 7); + sha1Round1(c, d, e, a, b, 8); + sha1Round1(b, c, d, e, a, 9); + sha1Round1(a, b, c, d, e, 10); + sha1Round1(e, a, b, c, d, 11); + sha1Round1(d, e, a, b, c, 12); + sha1Round1(c, d, e, a, b, 13); + sha1Round1(b, c, d, e, a, 14); + sha1Round1(a, b, c, d, e, 15); +#undef sha1Round1 +#endif + +#ifdef sha1Round1a +#error "macro name clash" +#else +#define sha1Round1a(a, b, c, d, e, t) \ + wTable[t] = rotl((wTable[t - 3] ^ wTable[t - 8] ^ wTable[t - 14] ^ wTable[t - 16]), 1); \ + e = rotl(a, 5) + ((b & (c ^ d)) ^ d) + e + wTable[t] + 0x5A827999; /* alternative f */ \ + b = rotl(b, 30); + + sha1Round1a(e, a, b, c, d, 16); + sha1Round1a(d, e, a, b, c, 17); + sha1Round1a(c, d, e, a, b, 18); + sha1Round1a(b, c, d, e, a, 19); +#undef sha1Round1a +#endif + +#ifdef sha1Round2 +#error "macro name clash" +#else +#define sha1Round2(a, b, c, d, e, t) \ + wTable[t] = rotl((wTable[t - 3] ^ wTable[t - 8] ^ wTable[t - 14] ^ wTable[t - 16]), 1); \ + e = rotl(a, 5) + (b ^ c ^ d) + e + wTable[t] + 0x6ED9EBA1; \ + b = rotl(b, 30); + + sha1Round2(a, b, c, d, e, 20); + sha1Round2(e, a, b, c, d, 21); + sha1Round2(d, e, a, b, c, 22); + sha1Round2(c, d, e, a, b, 23); + sha1Round2(b, c, d, e, a, 24); + sha1Round2(a, b, c, d, e, 25); + sha1Round2(e, a, b, c, d, 26); + sha1Round2(d, e, a, b, c, 27); + sha1Round2(c, d, e, a, b, 28); + sha1Round2(b, c, d, e, a, 29); + sha1Round2(a, b, c, d, e, 30); + sha1Round2(e, a, b, c, d, 31); +#undef sha1Round2 +#endif + +#ifdef sha1Round2a +#error "macro name clash" +#else +#define sha1Round2a(a, b, c, d, e, t) \ + wTable[t] = rotl((wTable[t - 6] ^ wTable[t - 16] ^ wTable[t - 28] ^ wTable[t - 32]), 2); /* alternative */ \ + e = rotl(a, 5) + (b ^ c ^ d) + e + wTable[t] + 0x6ED9EBA1; \ + b = rotl(b, 30); + + sha1Round2a(d, e, a, b, c, 32); + sha1Round2a(c, d, e, a, b, 33); + sha1Round2a(b, c, d, e, a, 34); + sha1Round2a(a, b, c, d, e, 35); + sha1Round2a(e, a, b, c, d, 36); + sha1Round2a(d, e, a, b, c, 37); + sha1Round2a(c, d, e, a, b, 38); + sha1Round2a(b, c, d, e, a, 39); +#undef sha1Round2a +#endif + +#ifdef sha1Round3 +#error "macro name clash" +#else +#define sha1Round3(a, b, c, d, e, t) \ + wTable[t] = rotl((wTable[t - 6] ^ wTable[t - 16] ^ wTable[t - 28] ^ wTable[t - 32]), 2); /* alternative */ \ + e = rotl(a, 5) + ((b & c) | (d & (b | c))) + e + wTable[t] + 0x8F1BBCDC; \ + b = rotl(b, 30); + + sha1Round3(a, b, c, d, e, 40); + sha1Round3(e, a, b, c, d, 41); + sha1Round3(d, e, a, b, c, 42); + sha1Round3(c, d, e, a, b, 43); + sha1Round3(b, c, d, e, a, 44); + sha1Round3(a, b, c, d, e, 45); + sha1Round3(e, a, b, c, d, 46); + sha1Round3(d, e, a, b, c, 47); + sha1Round3(c, d, e, a, b, 48); + sha1Round3(b, c, d, e, a, 49); + sha1Round3(a, b, c, d, e, 50); + sha1Round3(e, a, b, c, d, 51); + sha1Round3(d, e, a, b, c, 52); + sha1Round3(c, d, e, a, b, 53); + sha1Round3(b, c, d, e, a, 54); + sha1Round3(a, b, c, d, e, 55); + sha1Round3(e, a, b, c, d, 56); + sha1Round3(d, e, a, b, c, 57); + sha1Round3(c, d, e, a, b, 58); + sha1Round3(b, c, d, e, a, 59); +#undef sha1Round3 +#endif + +#ifdef sha1Round4 +#error "macro name clash" +#else +#define sha1Round4(a, b, c, d, e, t) \ + wTable[t] = rotl((wTable[t - 6] ^ wTable[t - 16] ^ wTable[t - 28] ^ wTable[t - 32]), 2); /* alternative */ \ + e = rotl(a, 5) + (b ^ c ^ d) + e + wTable[t] + 0xCA62C1D6; \ + b = rotl(b, 30); + + sha1Round4(a, b, c, d, e, 60); + sha1Round4(e, a, b, c, d, 61); + sha1Round4(d, e, a, b, c, 62); + sha1Round4(c, d, e, a, b, 63); + sha1Round4(b, c, d, e, a, 64); + sha1Round4(a, b, c, d, e, 65); + sha1Round4(e, a, b, c, d, 66); + sha1Round4(d, e, a, b, c, 67); + sha1Round4(c, d, e, a, b, 68); + sha1Round4(b, c, d, e, a, 69); + sha1Round4(a, b, c, d, e, 70); + sha1Round4(e, a, b, c, d, 71); + sha1Round4(d, e, a, b, c, 72); + sha1Round4(c, d, e, a, b, 73); + sha1Round4(b, c, d, e, a, 74); + sha1Round4(a, b, c, d, e, 75); + sha1Round4(e, a, b, c, d, 76); + sha1Round4(d, e, a, b, c, 77); + sha1Round4(c, d, e, a, b, 78); + sha1Round4(b, c, d, e, a, 79); +#undef sha1Round4 +#endif + + // Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4 + E. + m_state[0] += a; + m_state[1] += b; + m_state[2] += c; + m_state[3] += d; + m_state[4] += e; + } + } + } + } + + using SHA1 = Hash::SHA1_NS::SHA1; +} + +namespace std +{ + template <> + struct hash + { + CONSTEXPR_CPP17_CHOCOBO1_HASH size_t operator()(const Chocobo1::SHA1 &hash) const noexcept + { + return hash; + } + }; +} + +#endif // CHOCOBO1_SHA1_H diff --git a/lib/nlohmann/json.hpp b/lib/nlohmann/json.hpp deleted file mode 100644 index ddd3131..0000000 --- a/lib/nlohmann/json.hpp +++ /dev/null @@ -1,24674 +0,0 @@ -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - -/****************************************************************************\ - * Note on documentation: The source files contain links to the online * - * documentation of the public API at https://json.nlohmann.me. This URL * - * contains the most recent documentation and should also be applicable to * - * previous versions; documentation for deprecated functions is not * - * removed, but marked deprecated. See "Generate documentation" section in * - * file docs/README.md. * -\****************************************************************************/ - -#ifndef INCLUDE_NLOHMANN_JSON_HPP_ -#define INCLUDE_NLOHMANN_JSON_HPP_ - -#include // all_of, find, for_each -#include // nullptr_t, ptrdiff_t, size_t -#include // hash, less -#include // initializer_list -#ifndef JSON_NO_IO - #include // istream, ostream -#endif // JSON_NO_IO -#include // random_access_iterator_tag -#include // unique_ptr -#include // string, stoi, to_string -#include // declval, forward, move, pair, swap -#include // vector - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// This file contains all macro definitions affecting or depending on the ABI - -#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK - #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) - #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2 - #warning "Already included a different version of the library!" - #endif - #endif -#endif - -#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum) - -#ifndef JSON_DIAGNOSTICS - #define JSON_DIAGNOSTICS 0 -#endif - -#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON - #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 -#endif - -#if JSON_DIAGNOSTICS - #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag -#else - #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS -#endif - -#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON - #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp -#else - #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION - #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 -#endif - -// Construct the namespace ABI tags component -#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b -#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ - NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) - -#define NLOHMANN_JSON_ABI_TAGS \ - NLOHMANN_JSON_ABI_TAGS_CONCAT( \ - NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ - NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) - -// Construct the namespace version component -#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ - _v ## major ## _ ## minor ## _ ## patch -#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ - NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) - -#if NLOHMANN_JSON_NAMESPACE_NO_VERSION -#define NLOHMANN_JSON_NAMESPACE_VERSION -#else -#define NLOHMANN_JSON_NAMESPACE_VERSION \ - NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ - NLOHMANN_JSON_VERSION_MINOR, \ - NLOHMANN_JSON_VERSION_PATCH) -#endif - -// Combine namespace components -#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b -#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ - NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) - -#ifndef NLOHMANN_JSON_NAMESPACE -#define NLOHMANN_JSON_NAMESPACE \ - nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ - NLOHMANN_JSON_ABI_TAGS, \ - NLOHMANN_JSON_NAMESPACE_VERSION) -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN -#define NLOHMANN_JSON_NAMESPACE_BEGIN \ - namespace nlohmann \ - { \ - inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ - NLOHMANN_JSON_ABI_TAGS, \ - NLOHMANN_JSON_NAMESPACE_VERSION) \ - { -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_END -#define NLOHMANN_JSON_NAMESPACE_END \ - } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ - } // namespace nlohmann -#endif - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // transform -#include // array -#include // forward_list -#include // inserter, front_inserter, end -#include // map -#include // string -#include // tuple, make_tuple -#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible -#include // unordered_map -#include // pair, declval -#include // valarray - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // nullptr_t -#include // exception -#if JSON_DIAGNOSTICS - #include // accumulate -#endif -#include // runtime_error -#include // to_string -#include // vector - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // array -#include // size_t -#include // uint8_t -#include // string - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // declval, pair -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template struct make_void -{ - using type = void; -}; -template using void_t = typename make_void::type; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -// https://en.cppreference.com/w/cpp/experimental/is_detected -struct nonesuch -{ - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - nonesuch(nonesuch const&&) = delete; - void operator=(nonesuch const&) = delete; - void operator=(nonesuch&&) = delete; -}; - -template class Op, - class... Args> -struct detector -{ - using value_t = std::false_type; - using type = Default; -}; - -template class Op, class... Args> -struct detector>, Op, Args...> -{ - using value_t = std::true_type; - using type = Op; -}; - -template class Op, class... Args> -using is_detected = typename detector::value_t; - -template class Op, class... Args> -struct is_detected_lazy : is_detected { }; - -template class Op, class... Args> -using detected_t = typename detector::type; - -template class Op, class... Args> -using detected_or = detector; - -template class Op, class... Args> -using detected_or_t = typename detected_or::type; - -template class Op, class... Args> -using is_detected_exact = std::is_same>; - -template class Op, class... Args> -using is_detected_convertible = - std::is_convertible, To>; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - - -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson -// SPDX-License-Identifier: MIT - -/* Hedley - https://nemequ.github.io/hedley - * Created by Evan Nemerson - */ - -#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) -#if defined(JSON_HEDLEY_VERSION) - #undef JSON_HEDLEY_VERSION -#endif -#define JSON_HEDLEY_VERSION 15 - -#if defined(JSON_HEDLEY_STRINGIFY_EX) - #undef JSON_HEDLEY_STRINGIFY_EX -#endif -#define JSON_HEDLEY_STRINGIFY_EX(x) #x - -#if defined(JSON_HEDLEY_STRINGIFY) - #undef JSON_HEDLEY_STRINGIFY -#endif -#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) - -#if defined(JSON_HEDLEY_CONCAT_EX) - #undef JSON_HEDLEY_CONCAT_EX -#endif -#define JSON_HEDLEY_CONCAT_EX(a,b) a##b - -#if defined(JSON_HEDLEY_CONCAT) - #undef JSON_HEDLEY_CONCAT -#endif -#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) - -#if defined(JSON_HEDLEY_CONCAT3_EX) - #undef JSON_HEDLEY_CONCAT3_EX -#endif -#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c - -#if defined(JSON_HEDLEY_CONCAT3) - #undef JSON_HEDLEY_CONCAT3 -#endif -#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) - -#if defined(JSON_HEDLEY_VERSION_ENCODE) - #undef JSON_HEDLEY_VERSION_ENCODE -#endif -#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) - #undef JSON_HEDLEY_VERSION_DECODE_MAJOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) - #undef JSON_HEDLEY_VERSION_DECODE_MINOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) - #undef JSON_HEDLEY_VERSION_DECODE_REVISION -#endif -#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) - -#if defined(JSON_HEDLEY_GNUC_VERSION) - #undef JSON_HEDLEY_GNUC_VERSION -#endif -#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) - #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#elif defined(__GNUC__) - #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) -#endif - -#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) - #undef JSON_HEDLEY_GNUC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GNUC_VERSION) - #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION) - #undef JSON_HEDLEY_MSVC_VERSION -#endif -#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) -#elif defined(_MSC_FULL_VER) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) -#elif defined(_MSC_VER) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) - #undef JSON_HEDLEY_MSVC_VERSION_CHECK -#endif -#if !defined(JSON_HEDLEY_MSVC_VERSION) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) -#elif defined(_MSC_VER) && (_MSC_VER >= 1200) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) -#else - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION) - #undef JSON_HEDLEY_INTEL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) - #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) -#elif defined(__INTEL_COMPILER) && !defined(__ICL) - #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) - #undef JSON_HEDLEY_INTEL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_VERSION) - #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) - #undef JSON_HEDLEY_INTEL_CL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) - #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) - #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) - #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION) - #undef JSON_HEDLEY_PGI_VERSION -#endif -#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) - #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) - #undef JSON_HEDLEY_PGI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PGI_VERSION) - #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION) - #undef JSON_HEDLEY_SUNPRO_VERSION -#endif -#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) -#elif defined(__SUNPRO_C) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) -#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) -#elif defined(__SUNPRO_CC) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) - #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_SUNPRO_VERSION) - #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) - #undef JSON_HEDLEY_EMSCRIPTEN_VERSION -#endif -#if defined(__EMSCRIPTEN__) - #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) - #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) - #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION) - #undef JSON_HEDLEY_ARM_VERSION -#endif -#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) - #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) -#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) - #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) - #undef JSON_HEDLEY_ARM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_ARM_VERSION) - #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION) - #undef JSON_HEDLEY_IBM_VERSION -#endif -#if defined(__ibmxl__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) -#elif defined(__xlC__) && defined(__xlC_ver__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) -#elif defined(__xlC__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) - #undef JSON_HEDLEY_IBM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IBM_VERSION) - #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_VERSION) - #undef JSON_HEDLEY_TI_VERSION -#endif -#if \ - defined(__TI_COMPILER_VERSION__) && \ - ( \ - defined(__TMS470__) || defined(__TI_ARM__) || \ - defined(__MSP430__) || \ - defined(__TMS320C2000__) \ - ) -#if (__TI_COMPILER_VERSION__ >= 16000000) - #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif -#endif - -#if defined(JSON_HEDLEY_TI_VERSION_CHECK) - #undef JSON_HEDLEY_TI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_VERSION) - #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) - #undef JSON_HEDLEY_TI_CL2000_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) - #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) - #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION) - #undef JSON_HEDLEY_TI_CL430_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) - #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL430_VERSION) - #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) - #undef JSON_HEDLEY_TI_ARMCL_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) - #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) - #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) - #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) - #undef JSON_HEDLEY_TI_CL6X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) - #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) - #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) - #undef JSON_HEDLEY_TI_CL7X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) - #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) - #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) - #undef JSON_HEDLEY_TI_CLPRU_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) - #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) - #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION) - #undef JSON_HEDLEY_CRAY_VERSION -#endif -#if defined(_CRAYC) - #if defined(_RELEASE_PATCHLEVEL) - #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) - #else - #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) - #endif -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) - #undef JSON_HEDLEY_CRAY_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_CRAY_VERSION) - #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION) - #undef JSON_HEDLEY_IAR_VERSION -#endif -#if defined(__IAR_SYSTEMS_ICC__) - #if __VER__ > 1000 - #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) - #else - #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) - #endif -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) - #undef JSON_HEDLEY_IAR_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IAR_VERSION) - #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION) - #undef JSON_HEDLEY_TINYC_VERSION -#endif -#if defined(__TINYC__) - #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) - #undef JSON_HEDLEY_TINYC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TINYC_VERSION) - #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION) - #undef JSON_HEDLEY_DMC_VERSION -#endif -#if defined(__DMC__) - #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) - #undef JSON_HEDLEY_DMC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_DMC_VERSION) - #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION) - #undef JSON_HEDLEY_COMPCERT_VERSION -#endif -#if defined(__COMPCERT_VERSION__) - #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) - #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_COMPCERT_VERSION) - #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION) - #undef JSON_HEDLEY_PELLES_VERSION -#endif -#if defined(__POCC__) - #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) - #undef JSON_HEDLEY_PELLES_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PELLES_VERSION) - #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) - #undef JSON_HEDLEY_MCST_LCC_VERSION -#endif -#if defined(__LCC__) && defined(__LCC_MINOR__) - #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) - #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) - #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION) - #undef JSON_HEDLEY_GCC_VERSION -#endif -#if \ - defined(JSON_HEDLEY_GNUC_VERSION) && \ - !defined(__clang__) && \ - !defined(JSON_HEDLEY_INTEL_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_ARM_VERSION) && \ - !defined(JSON_HEDLEY_CRAY_VERSION) && \ - !defined(JSON_HEDLEY_TI_VERSION) && \ - !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ - !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ - !defined(__COMPCERT__) && \ - !defined(JSON_HEDLEY_MCST_LCC_VERSION) - #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) - #undef JSON_HEDLEY_GCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GCC_VERSION) - #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_ATTRIBUTE -#endif -#if \ - defined(__has_attribute) && \ - ( \ - (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ - ) -# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) -#else -# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) - #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) - #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE -#endif -#if \ - defined(__has_cpp_attribute) && \ - defined(__cplusplus) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) - #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS -#endif -#if !defined(__cplusplus) || !defined(__has_cpp_attribute) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) -#elif \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_IAR_VERSION) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ - (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) -#else - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) - #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) - #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_BUILTIN) - #undef JSON_HEDLEY_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) -#else - #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) - #undef JSON_HEDLEY_GNUC_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) -#else - #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) - #undef JSON_HEDLEY_GCC_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) -#else - #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_FEATURE) - #undef JSON_HEDLEY_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) -#else - #define JSON_HEDLEY_HAS_FEATURE(feature) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) - #undef JSON_HEDLEY_GNUC_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) -#else - #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) - #undef JSON_HEDLEY_GCC_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) -#else - #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_EXTENSION) - #undef JSON_HEDLEY_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) -#else - #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) - #undef JSON_HEDLEY_GNUC_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) -#else - #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) - #undef JSON_HEDLEY_GCC_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) -#else - #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_WARNING) - #undef JSON_HEDLEY_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) -#else - #define JSON_HEDLEY_HAS_WARNING(warning) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) - #undef JSON_HEDLEY_GNUC_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) -#else - #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_WARNING) - #undef JSON_HEDLEY_GCC_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) -#else - #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - defined(__clang__) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ - (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) - #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_PRAGMA(value) __pragma(value) -#else - #define JSON_HEDLEY_PRAGMA(value) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) - #undef JSON_HEDLEY_DIAGNOSTIC_PUSH -#endif -#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) - #undef JSON_HEDLEY_DIAGNOSTIC_POP -#endif -#if defined(__clang__) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) - #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) -#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#else - #define JSON_HEDLEY_DIAGNOSTIC_PUSH - #define JSON_HEDLEY_DIAGNOSTIC_POP -#endif - -/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ -#endif -#if defined(__cplusplus) -# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") -# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") -# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# endif -# else -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# endif -# endif -#endif -#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x -#endif - -#if defined(JSON_HEDLEY_CONST_CAST) - #undef JSON_HEDLEY_CONST_CAST -#endif -#if defined(__cplusplus) -# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) -#elif \ - JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ - ((T) (expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_REINTERPRET_CAST) - #undef JSON_HEDLEY_REINTERPRET_CAST -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) -#else - #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_STATIC_CAST) - #undef JSON_HEDLEY_STATIC_CAST -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) -#else - #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_CPP_CAST) - #undef JSON_HEDLEY_CPP_CAST -#endif -#if defined(__cplusplus) -# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") -# define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ - ((T) (expr)) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) -# define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("diag_suppress=Pe137") \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) -# endif -#else -# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif - -#if defined(JSON_HEDLEY_DEPRECATED) - #undef JSON_HEDLEY_DEPRECATED -#endif -#if defined(JSON_HEDLEY_DEPRECATED_FOR) - #undef JSON_HEDLEY_DEPRECATED_FOR -#endif -#if \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) -#elif \ - (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) -#elif defined(__cplusplus) && (__cplusplus >= 201402L) - #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") -#else - #define JSON_HEDLEY_DEPRECATED(since) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) -#endif - -#if defined(JSON_HEDLEY_UNAVAILABLE) - #undef JSON_HEDLEY_UNAVAILABLE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) -#else - #define JSON_HEDLEY_UNAVAILABLE(available_since) -#endif - -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) - #undef JSON_HEDLEY_WARN_UNUSED_RESULT -#endif -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) - #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) -#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) - #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) - #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) -#elif defined(_Check_return_) /* SAL */ - #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ -#else - #define JSON_HEDLEY_WARN_UNUSED_RESULT - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) -#endif - -#if defined(JSON_HEDLEY_SENTINEL) - #undef JSON_HEDLEY_SENTINEL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) -#else - #define JSON_HEDLEY_SENTINEL(position) -#endif - -#if defined(JSON_HEDLEY_NO_RETURN) - #undef JSON_HEDLEY_NO_RETURN -#endif -#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_NO_RETURN __noreturn -#elif \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - #define JSON_HEDLEY_NO_RETURN _Noreturn -#elif defined(__cplusplus) && (__cplusplus >= 201103L) - #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) - #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) - #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) - #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#else - #define JSON_HEDLEY_NO_RETURN -#endif - -#if defined(JSON_HEDLEY_NO_ESCAPE) - #undef JSON_HEDLEY_NO_ESCAPE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) - #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) -#else - #define JSON_HEDLEY_NO_ESCAPE -#endif - -#if defined(JSON_HEDLEY_UNREACHABLE) - #undef JSON_HEDLEY_UNREACHABLE -#endif -#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) - #undef JSON_HEDLEY_UNREACHABLE_RETURN -#endif -#if defined(JSON_HEDLEY_ASSUME) - #undef JSON_HEDLEY_ASSUME -#endif -#if \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_ASSUME(expr) __assume(expr) -#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) - #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) -#elif \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) - #if defined(__cplusplus) - #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) - #else - #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) - #endif -#endif -#if \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() -#elif defined(JSON_HEDLEY_ASSUME) - #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif -#if !defined(JSON_HEDLEY_ASSUME) - #if defined(JSON_HEDLEY_UNREACHABLE) - #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) - #else - #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) - #endif -#endif -#if defined(JSON_HEDLEY_UNREACHABLE) - #if \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) - #else - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() - #endif -#else - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) -#endif -#if !defined(JSON_HEDLEY_UNREACHABLE) - #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif - -JSON_HEDLEY_DIAGNOSTIC_PUSH -#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") - #pragma clang diagnostic ignored "-Wpedantic" -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) - #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" -#endif -#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) - #if defined(__clang__) - #pragma clang diagnostic ignored "-Wvariadic-macros" - #elif defined(JSON_HEDLEY_GCC_VERSION) - #pragma GCC diagnostic ignored "-Wvariadic-macros" - #endif -#endif -#if defined(JSON_HEDLEY_NON_NULL) - #undef JSON_HEDLEY_NON_NULL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) - #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) -#else - #define JSON_HEDLEY_NON_NULL(...) -#endif -JSON_HEDLEY_DIAGNOSTIC_POP - -#if defined(JSON_HEDLEY_PRINTF_FORMAT) - #undef JSON_HEDLEY_PRINTF_FORMAT -#endif -#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) -#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) -#else - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) -#endif - -#if defined(JSON_HEDLEY_CONSTEXPR) - #undef JSON_HEDLEY_CONSTEXPR -#endif -#if defined(__cplusplus) - #if __cplusplus >= 201103L - #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) - #endif -#endif -#if !defined(JSON_HEDLEY_CONSTEXPR) - #define JSON_HEDLEY_CONSTEXPR -#endif - -#if defined(JSON_HEDLEY_PREDICT) - #undef JSON_HEDLEY_PREDICT -#endif -#if defined(JSON_HEDLEY_LIKELY) - #undef JSON_HEDLEY_LIKELY -#endif -#if defined(JSON_HEDLEY_UNLIKELY) - #undef JSON_HEDLEY_UNLIKELY -#endif -#if defined(JSON_HEDLEY_UNPREDICTABLE) - #undef JSON_HEDLEY_UNPREDICTABLE -#endif -#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) - #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) -#endif -#if \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) -# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) -# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) -#elif \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ - (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ - (__extension__ ({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ - })) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ - (__extension__ ({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ - })) -# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) -# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) -#else -# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) -# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) -# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) -#endif -#if !defined(JSON_HEDLEY_UNPREDICTABLE) - #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) -#endif - -#if defined(JSON_HEDLEY_MALLOC) - #undef JSON_HEDLEY_MALLOC -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_MALLOC __declspec(restrict) -#else - #define JSON_HEDLEY_MALLOC -#endif - -#if defined(JSON_HEDLEY_PURE) - #undef JSON_HEDLEY_PURE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PURE __attribute__((__pure__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) -# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") -#elif defined(__cplusplus) && \ - ( \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ - ) -# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") -#else -# define JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_CONST) - #undef JSON_HEDLEY_CONST -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_CONST __attribute__((__const__)) -#elif \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_CONST _Pragma("no_side_effect") -#else - #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_RESTRICT) - #undef JSON_HEDLEY_RESTRICT -#endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) - #define JSON_HEDLEY_RESTRICT restrict -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ - defined(__clang__) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_RESTRICT __restrict -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) - #define JSON_HEDLEY_RESTRICT _Restrict -#else - #define JSON_HEDLEY_RESTRICT -#endif - -#if defined(JSON_HEDLEY_INLINE) - #undef JSON_HEDLEY_INLINE -#endif -#if \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - (defined(__cplusplus) && (__cplusplus >= 199711L)) - #define JSON_HEDLEY_INLINE inline -#elif \ - defined(JSON_HEDLEY_GCC_VERSION) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) - #define JSON_HEDLEY_INLINE __inline__ -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_INLINE __inline -#else - #define JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_ALWAYS_INLINE) - #undef JSON_HEDLEY_ALWAYS_INLINE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) -# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_ALWAYS_INLINE __forceinline -#elif defined(__cplusplus) && \ - ( \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ - ) -# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) -# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") -#else -# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_NEVER_INLINE) - #undef JSON_HEDLEY_NEVER_INLINE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) - #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) - #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#else - #define JSON_HEDLEY_NEVER_INLINE -#endif - -#if defined(JSON_HEDLEY_PRIVATE) - #undef JSON_HEDLEY_PRIVATE -#endif -#if defined(JSON_HEDLEY_PUBLIC) - #undef JSON_HEDLEY_PUBLIC -#endif -#if defined(JSON_HEDLEY_IMPORT) - #undef JSON_HEDLEY_IMPORT -#endif -#if defined(_WIN32) || defined(__CYGWIN__) -# define JSON_HEDLEY_PRIVATE -# define JSON_HEDLEY_PUBLIC __declspec(dllexport) -# define JSON_HEDLEY_IMPORT __declspec(dllimport) -#else -# if \ - JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - ( \ - defined(__TI_EABI__) && \ - ( \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ - ) \ - ) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) -# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) -# else -# define JSON_HEDLEY_PRIVATE -# define JSON_HEDLEY_PUBLIC -# endif -# define JSON_HEDLEY_IMPORT extern -#endif - -#if defined(JSON_HEDLEY_NO_THROW) - #undef JSON_HEDLEY_NO_THROW -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) - #define JSON_HEDLEY_NO_THROW __declspec(nothrow) -#else - #define JSON_HEDLEY_NO_THROW -#endif - -#if defined(JSON_HEDLEY_FALL_THROUGH) - #undef JSON_HEDLEY_FALL_THROUGH -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) - #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) - #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) -#elif defined(__fallthrough) /* SAL */ - #define JSON_HEDLEY_FALL_THROUGH __fallthrough -#else - #define JSON_HEDLEY_FALL_THROUGH -#endif - -#if defined(JSON_HEDLEY_RETURNS_NON_NULL) - #undef JSON_HEDLEY_RETURNS_NON_NULL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) -#elif defined(_Ret_notnull_) /* SAL */ - #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ -#else - #define JSON_HEDLEY_RETURNS_NON_NULL -#endif - -#if defined(JSON_HEDLEY_ARRAY_PARAM) - #undef JSON_HEDLEY_ARRAY_PARAM -#endif -#if \ - defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ - !defined(__STDC_NO_VLA__) && \ - !defined(__cplusplus) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_TINYC_VERSION) - #define JSON_HEDLEY_ARRAY_PARAM(name) (name) -#else - #define JSON_HEDLEY_ARRAY_PARAM(name) -#endif - -#if defined(JSON_HEDLEY_IS_CONSTANT) - #undef JSON_HEDLEY_IS_CONSTANT -#endif -#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) - #undef JSON_HEDLEY_REQUIRE_CONSTEXPR -#endif -/* JSON_HEDLEY_IS_CONSTEXPR_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) - #undef JSON_HEDLEY_IS_CONSTEXPR_ -#endif -#if \ - JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) -#endif -#if !defined(__cplusplus) -# if \ - JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) -#if defined(__INTPTR_TYPE__) - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) -#else - #include - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) -#endif -# elif \ - ( \ - defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ - !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_IAR_VERSION)) || \ - (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) -#if defined(__INTPTR_TYPE__) - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) -#else - #include - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) -#endif -# elif \ - defined(JSON_HEDLEY_GCC_VERSION) || \ - defined(JSON_HEDLEY_INTEL_VERSION) || \ - defined(JSON_HEDLEY_TINYC_VERSION) || \ - defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ - defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ - defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ - defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ - defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ - defined(__clang__) -# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ - sizeof(void) != \ - sizeof(*( \ - 1 ? \ - ((void*) ((expr) * 0L) ) : \ -((struct { char v[sizeof(void) * 2]; } *) 1) \ - ) \ - ) \ - ) -# endif -#endif -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) - #if !defined(JSON_HEDLEY_IS_CONSTANT) - #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) - #endif - #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) -#else - #if !defined(JSON_HEDLEY_IS_CONSTANT) - #define JSON_HEDLEY_IS_CONSTANT(expr) (0) - #endif - #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) -#endif - -#if defined(JSON_HEDLEY_BEGIN_C_DECLS) - #undef JSON_HEDLEY_BEGIN_C_DECLS -#endif -#if defined(JSON_HEDLEY_END_C_DECLS) - #undef JSON_HEDLEY_END_C_DECLS -#endif -#if defined(JSON_HEDLEY_C_DECL) - #undef JSON_HEDLEY_C_DECL -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { - #define JSON_HEDLEY_END_C_DECLS } - #define JSON_HEDLEY_C_DECL extern "C" -#else - #define JSON_HEDLEY_BEGIN_C_DECLS - #define JSON_HEDLEY_END_C_DECLS - #define JSON_HEDLEY_C_DECL -#endif - -#if defined(JSON_HEDLEY_STATIC_ASSERT) - #undef JSON_HEDLEY_STATIC_ASSERT -#endif -#if \ - !defined(__cplusplus) && ( \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ - (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - defined(_Static_assert) \ - ) -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) -#elif \ - (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ - JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) -#else -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) -#endif - -#if defined(JSON_HEDLEY_NULL) - #undef JSON_HEDLEY_NULL -#endif -#if defined(__cplusplus) - #if __cplusplus >= 201103L - #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) - #elif defined(NULL) - #define JSON_HEDLEY_NULL NULL - #else - #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) - #endif -#elif defined(NULL) - #define JSON_HEDLEY_NULL NULL -#else - #define JSON_HEDLEY_NULL ((void*) 0) -#endif - -#if defined(JSON_HEDLEY_MESSAGE) - #undef JSON_HEDLEY_MESSAGE -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -# define JSON_HEDLEY_MESSAGE(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(message msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) -#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -# define JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_WARNING) - #undef JSON_HEDLEY_WARNING -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -# define JSON_HEDLEY_WARNING(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(clang warning msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_REQUIRE) - #undef JSON_HEDLEY_REQUIRE -#endif -#if defined(JSON_HEDLEY_REQUIRE_MSG) - #undef JSON_HEDLEY_REQUIRE_MSG -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) -# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") -# define JSON_HEDLEY_REQUIRE(expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), #expr, "error"))) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), msg, "error"))) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) -# endif -#else -# define JSON_HEDLEY_REQUIRE(expr) -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) -#endif - -#if defined(JSON_HEDLEY_FLAGS) - #undef JSON_HEDLEY_FLAGS -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) - #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) -#else - #define JSON_HEDLEY_FLAGS -#endif - -#if defined(JSON_HEDLEY_FLAGS_CAST) - #undef JSON_HEDLEY_FLAGS_CAST -#endif -#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) -# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("warning(disable:188)") \ - ((T) (expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) -#endif - -#if defined(JSON_HEDLEY_EMPTY_BASES) - #undef JSON_HEDLEY_EMPTY_BASES -#endif -#if \ - (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) -#else - #define JSON_HEDLEY_EMPTY_BASES -#endif - -/* Remaining macros are deprecated. */ - -#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) - #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK -#endif -#if defined(__clang__) - #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) -#else - #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) - #undef JSON_HEDLEY_CLANG_HAS_BUILTIN -#endif -#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) - -#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) - #undef JSON_HEDLEY_CLANG_HAS_FEATURE -#endif -#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) - -#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) - #undef JSON_HEDLEY_CLANG_HAS_EXTENSION -#endif -#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) - -#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) - #undef JSON_HEDLEY_CLANG_HAS_WARNING -#endif -#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) - -#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ - - -// This file contains all internal macro definitions (except those affecting ABI) -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// #include - - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) - #if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #endif -#endif - -// C++ language standard detection -// if the user manually specified the used c++ version this is skipped -#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) - #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) - #define JSON_HAS_CPP_20 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) - #define JSON_HAS_CPP_14 - #endif - // the cpp 11 flag is always specified because it is the minimal required version - #define JSON_HAS_CPP_11 -#endif - -#ifdef __has_include - #if __has_include() - #include - #endif -#endif - -#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) - #ifdef JSON_HAS_CPP_17 - #if defined(__cpp_lib_filesystem) - #define JSON_HAS_FILESYSTEM 1 - #elif defined(__cpp_lib_experimental_filesystem) - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #elif !defined(__has_include) - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #elif __has_include() - #define JSON_HAS_FILESYSTEM 1 - #elif __has_include() - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #endif - - // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ - #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support - #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support - #if defined(__clang_major__) && __clang_major__ < 7 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support - #if defined(_MSC_VER) && _MSC_VER < 1914 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before iOS 13 - #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before macOS Catalina - #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - #endif -#endif - -#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 -#endif - -#ifndef JSON_HAS_FILESYSTEM - #define JSON_HAS_FILESYSTEM 0 -#endif - -#ifndef JSON_HAS_THREE_WAY_COMPARISON - #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ - && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L - #define JSON_HAS_THREE_WAY_COMPARISON 1 - #else - #define JSON_HAS_THREE_WAY_COMPARISON 0 - #endif -#endif - -#ifndef JSON_HAS_RANGES - // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error - #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 - #define JSON_HAS_RANGES 0 - #elif defined(__cpp_lib_ranges) - #define JSON_HAS_RANGES 1 - #else - #define JSON_HAS_RANGES 0 - #endif -#endif - -#ifdef JSON_HAS_CPP_17 - #define JSON_INLINE_VARIABLE inline -#else - #define JSON_INLINE_VARIABLE -#endif - -#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) - #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] -#else - #define JSON_NO_UNIQUE_ADDRESS -#endif - -// disable documentation warnings on clang -#if defined(__clang__) - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdocumentation" - #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" -#endif - -// allow disabling exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) - #define JSON_THROW(exception) throw exception - #define JSON_TRY try - #define JSON_CATCH(exception) catch(exception) - #define JSON_INTERNAL_CATCH(exception) catch(exception) -#else - #include - #define JSON_THROW(exception) std::abort() - #define JSON_TRY if(true) - #define JSON_CATCH(exception) if(false) - #define JSON_INTERNAL_CATCH(exception) if(false) -#endif - -// override exception macros -#if defined(JSON_THROW_USER) - #undef JSON_THROW - #define JSON_THROW JSON_THROW_USER -#endif -#if defined(JSON_TRY_USER) - #undef JSON_TRY - #define JSON_TRY JSON_TRY_USER -#endif -#if defined(JSON_CATCH_USER) - #undef JSON_CATCH - #define JSON_CATCH JSON_CATCH_USER - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_CATCH_USER -#endif -#if defined(JSON_INTERNAL_CATCH_USER) - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER -#endif - -// allow overriding assert -#if !defined(JSON_ASSERT) - #include // assert - #define JSON_ASSERT(x) assert(x) -#endif - -// allow to access some private functions (needed by the test suite) -#if defined(JSON_TESTS_PRIVATE) - #define JSON_PRIVATE_UNLESS_TESTED public -#else - #define JSON_PRIVATE_UNLESS_TESTED private -#endif - -/*! -@brief macro to briefly define a mapping between an enum and JSON -@def NLOHMANN_JSON_SERIALIZE_ENUM -@since version 3.4.0 -*/ -#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ - template \ - inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [e](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.first == e; \ - }); \ - j = ((it != std::end(m)) ? it : std::begin(m))->second; \ - } \ - template \ - inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [&j](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.second == j; \ - }); \ - e = ((it != std::end(m)) ? it : std::begin(m))->first; \ - } - -// Ugly macros to avoid uglier copy-paste when specializing basic_json. They -// may be removed in the future once the class is split. - -#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ - template class ObjectType, \ - template class ArrayType, \ - class StringType, class BooleanType, class NumberIntegerType, \ - class NumberUnsignedType, class NumberFloatType, \ - template class AllocatorType, \ - template class JSONSerializer, \ - class BinaryType, \ - class CustomBaseClass> - -#define NLOHMANN_BASIC_JSON_TPL \ - basic_json - -// Macros to simplify conversion from/to types - -#define NLOHMANN_JSON_EXPAND( x ) x -#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME -#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ - NLOHMANN_JSON_PASTE64, \ - NLOHMANN_JSON_PASTE63, \ - NLOHMANN_JSON_PASTE62, \ - NLOHMANN_JSON_PASTE61, \ - NLOHMANN_JSON_PASTE60, \ - NLOHMANN_JSON_PASTE59, \ - NLOHMANN_JSON_PASTE58, \ - NLOHMANN_JSON_PASTE57, \ - NLOHMANN_JSON_PASTE56, \ - NLOHMANN_JSON_PASTE55, \ - NLOHMANN_JSON_PASTE54, \ - NLOHMANN_JSON_PASTE53, \ - NLOHMANN_JSON_PASTE52, \ - NLOHMANN_JSON_PASTE51, \ - NLOHMANN_JSON_PASTE50, \ - NLOHMANN_JSON_PASTE49, \ - NLOHMANN_JSON_PASTE48, \ - NLOHMANN_JSON_PASTE47, \ - NLOHMANN_JSON_PASTE46, \ - NLOHMANN_JSON_PASTE45, \ - NLOHMANN_JSON_PASTE44, \ - NLOHMANN_JSON_PASTE43, \ - NLOHMANN_JSON_PASTE42, \ - NLOHMANN_JSON_PASTE41, \ - NLOHMANN_JSON_PASTE40, \ - NLOHMANN_JSON_PASTE39, \ - NLOHMANN_JSON_PASTE38, \ - NLOHMANN_JSON_PASTE37, \ - NLOHMANN_JSON_PASTE36, \ - NLOHMANN_JSON_PASTE35, \ - NLOHMANN_JSON_PASTE34, \ - NLOHMANN_JSON_PASTE33, \ - NLOHMANN_JSON_PASTE32, \ - NLOHMANN_JSON_PASTE31, \ - NLOHMANN_JSON_PASTE30, \ - NLOHMANN_JSON_PASTE29, \ - NLOHMANN_JSON_PASTE28, \ - NLOHMANN_JSON_PASTE27, \ - NLOHMANN_JSON_PASTE26, \ - NLOHMANN_JSON_PASTE25, \ - NLOHMANN_JSON_PASTE24, \ - NLOHMANN_JSON_PASTE23, \ - NLOHMANN_JSON_PASTE22, \ - NLOHMANN_JSON_PASTE21, \ - NLOHMANN_JSON_PASTE20, \ - NLOHMANN_JSON_PASTE19, \ - NLOHMANN_JSON_PASTE18, \ - NLOHMANN_JSON_PASTE17, \ - NLOHMANN_JSON_PASTE16, \ - NLOHMANN_JSON_PASTE15, \ - NLOHMANN_JSON_PASTE14, \ - NLOHMANN_JSON_PASTE13, \ - NLOHMANN_JSON_PASTE12, \ - NLOHMANN_JSON_PASTE11, \ - NLOHMANN_JSON_PASTE10, \ - NLOHMANN_JSON_PASTE9, \ - NLOHMANN_JSON_PASTE8, \ - NLOHMANN_JSON_PASTE7, \ - NLOHMANN_JSON_PASTE6, \ - NLOHMANN_JSON_PASTE5, \ - NLOHMANN_JSON_PASTE4, \ - NLOHMANN_JSON_PASTE3, \ - NLOHMANN_JSON_PASTE2, \ - NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) -#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) -#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) -#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) -#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) -#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) -#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) -#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) -#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) -#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) -#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) -#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) -#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) -#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) -#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) -#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) -#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) -#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) -#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) -#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) -#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) -#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) -#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) -#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) -#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) -#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) -#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) -#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) -#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) -#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) -#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) -#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) -#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) -#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) -#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) -#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) -#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) -#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) -#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) -#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) -#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) -#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) -#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) -#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) -#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) -#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) -#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) -#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) -#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) -#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) -#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) -#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) -#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) -#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) -#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) -#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) - -#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; -#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); -#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1); - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } - -#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } - -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } - - -// inspired from https://stackoverflow.com/a/26745591 -// allows to call any std function as if (e.g. with begin): -// using std::begin; begin(x); -// -// it allows using the detected idiom to retrieve the return type -// of such an expression -#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ - namespace detail { \ - using std::std_name; \ - \ - template \ - using result_of_##std_name = decltype(std_name(std::declval()...)); \ - } \ - \ - namespace detail2 { \ - struct std_name##_tag \ - { \ - }; \ - \ - template \ - std_name##_tag std_name(T&&...); \ - \ - template \ - using result_of_##std_name = decltype(std_name(std::declval()...)); \ - \ - template \ - struct would_call_std_##std_name \ - { \ - static constexpr auto const value = ::nlohmann::detail:: \ - is_detected_exact::value; \ - }; \ - } /* namespace detail2 */ \ - \ - template \ - struct would_call_std_##std_name : detail2::would_call_std_##std_name \ - { \ - } - -#ifndef JSON_USE_IMPLICIT_CONVERSIONS - #define JSON_USE_IMPLICIT_CONVERSIONS 1 -#endif - -#if JSON_USE_IMPLICIT_CONVERSIONS - #define JSON_EXPLICIT -#else - #define JSON_EXPLICIT explicit -#endif - -#ifndef JSON_DISABLE_ENUM_SERIALIZATION - #define JSON_DISABLE_ENUM_SERIALIZATION 0 -#endif - -#ifndef JSON_USE_GLOBAL_UDLS - #define JSON_USE_GLOBAL_UDLS 1 -#endif - -#if JSON_HAS_THREE_WAY_COMPARISON - #include // partial_ordering -#endif - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/////////////////////////// -// JSON type enumeration // -/////////////////////////// - -/*! -@brief the JSON type enumeration - -This enumeration collects the different JSON types. It is internally used to -distinguish the stored values, and the functions @ref basic_json::is_null(), -@ref basic_json::is_object(), @ref basic_json::is_array(), -@ref basic_json::is_string(), @ref basic_json::is_boolean(), -@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), -@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), -@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and -@ref basic_json::is_structured() rely on it. - -@note There are three enumeration entries (number_integer, number_unsigned, and -number_float), because the library distinguishes these three types for numbers: -@ref basic_json::number_unsigned_t is used for unsigned integers, -@ref basic_json::number_integer_t is used for signed integers, and -@ref basic_json::number_float_t is used for floating-point numbers or to -approximate integers which do not fit in the limits of their respective type. - -@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON -value with the default value for a given type - -@since version 1.0.0 -*/ -enum class value_t : std::uint8_t -{ - null, ///< null value - object, ///< object (unordered set of name/value pairs) - array, ///< array (ordered collection of values) - string, ///< string value - boolean, ///< boolean value - number_integer, ///< number value (signed integer) - number_unsigned, ///< number value (unsigned integer) - number_float, ///< number value (floating-point) - binary, ///< binary array (ordered collection of bytes) - discarded ///< discarded by the parser callback function -}; - -/*! -@brief comparison operator for JSON types - -Returns an ordering that is similar to Python: -- order: null < boolean < number < object < array < string < binary -- furthermore, each type is not smaller than itself -- discarded values are not comparable -- binary is represented as a b"" string in python and directly comparable to a - string; however, making a binary array directly comparable with a string would - be surprising behavior in a JSON file. - -@since version 1.0.0 -*/ -#if JSON_HAS_THREE_WAY_COMPARISON - inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* -#else - inline bool operator<(const value_t lhs, const value_t rhs) noexcept -#endif -{ - static constexpr std::array order = {{ - 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, - 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, - 6 /* binary */ - } - }; - - const auto l_index = static_cast(lhs); - const auto r_index = static_cast(rhs); -#if JSON_HAS_THREE_WAY_COMPARISON - if (l_index < order.size() && r_index < order.size()) - { - return order[l_index] <=> order[r_index]; // *NOPAD* - } - return std::partial_ordering::unordered; -#else - return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; -#endif -} - -// GCC selects the built-in operator< over an operator rewritten from -// a user-defined spaceship operator -// Clang, MSVC, and ICC select the rewritten candidate -// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) -#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) -inline bool operator<(const value_t lhs, const value_t rhs) noexcept -{ - return std::is_lt(lhs <=> rhs); // *NOPAD* -} -#endif - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/*! -@brief replace all occurrences of a substring by another string - -@param[in,out] s the string to manipulate; changed so that all - occurrences of @a f are replaced with @a t -@param[in] f the substring to replace with @a t -@param[in] t the string to replace @a f - -@pre The search string @a f must not be empty. **This precondition is -enforced with an assertion.** - -@since version 2.0.0 -*/ -template -inline void replace_substring(StringType& s, const StringType& f, - const StringType& t) -{ - JSON_ASSERT(!f.empty()); - for (auto pos = s.find(f); // find first occurrence of f - pos != StringType::npos; // make sure f was found - s.replace(pos, f.size(), t), // replace with t, and - pos = s.find(f, pos + t.size())) // find next occurrence of f - {} -} - -/*! - * @brief string escaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to escape - * @return escaped string - * - * Note the order of escaping "~" to "~0" and "/" to "~1" is important. - */ -template -inline StringType escape(StringType s) -{ - replace_substring(s, StringType{"~"}, StringType{"~0"}); - replace_substring(s, StringType{"/"}, StringType{"~1"}); - return s; -} - -/*! - * @brief string unescaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to unescape - * @return unescaped string - * - * Note the order of escaping "~1" to "/" and "~0" to "~" is important. - */ -template -static void unescape(StringType& s) -{ - replace_substring(s, StringType{"~1"}, StringType{"/"}); - replace_substring(s, StringType{"~0"}, StringType{"~"}); -} - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // size_t - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/// struct to capture the start position of the current token -struct position_t -{ - /// the total number of characters read - std::size_t chars_read_total = 0; - /// the number of characters read in the current line - std::size_t chars_read_current_line = 0; - /// the number of lines read - std::size_t lines_read = 0; - - /// conversion to size_t to preserve SAX interface - constexpr operator size_t() const - { - return chars_read_total; - } -}; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-FileCopyrightText: 2018 The Abseil Authors -// SPDX-License-Identifier: MIT - - - -#include // array -#include // size_t -#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type -#include // index_sequence, make_index_sequence, index_sequence_for - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template -using uncvref_t = typename std::remove_cv::type>::type; - -#ifdef JSON_HAS_CPP_14 - -// the following utilities are natively available in C++14 -using std::enable_if_t; -using std::index_sequence; -using std::make_index_sequence; -using std::index_sequence_for; - -#else - -// alias templates to reduce boilerplate -template -using enable_if_t = typename std::enable_if::type; - -// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h -// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. - -//// START OF CODE FROM GOOGLE ABSEIL - -// integer_sequence -// -// Class template representing a compile-time integer sequence. An instantiation -// of `integer_sequence` has a sequence of integers encoded in its -// type through its template arguments (which is a common need when -// working with C++11 variadic templates). `absl::integer_sequence` is designed -// to be a drop-in replacement for C++14's `std::integer_sequence`. -// -// Example: -// -// template< class T, T... Ints > -// void user_function(integer_sequence); -// -// int main() -// { -// // user_function's `T` will be deduced to `int` and `Ints...` -// // will be deduced to `0, 1, 2, 3, 4`. -// user_function(make_integer_sequence()); -// } -template -struct integer_sequence -{ - using value_type = T; - static constexpr std::size_t size() noexcept - { - return sizeof...(Ints); - } -}; - -// index_sequence -// -// A helper template for an `integer_sequence` of `size_t`, -// `absl::index_sequence` is designed to be a drop-in replacement for C++14's -// `std::index_sequence`. -template -using index_sequence = integer_sequence; - -namespace utility_internal -{ - -template -struct Extend; - -// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. -template -struct Extend, SeqSize, 0> -{ - using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; -}; - -template -struct Extend, SeqSize, 1> -{ - using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; -}; - -// Recursion helper for 'make_integer_sequence'. -// 'Gen::type' is an alias for 'integer_sequence'. -template -struct Gen -{ - using type = - typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; -}; - -template -struct Gen -{ - using type = integer_sequence; -}; - -} // namespace utility_internal - -// Compile-time sequences of integers - -// make_integer_sequence -// -// This template alias is equivalent to -// `integer_sequence`, and is designed to be a drop-in -// replacement for C++14's `std::make_integer_sequence`. -template -using make_integer_sequence = typename utility_internal::Gen::type; - -// make_index_sequence -// -// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, -// and is designed to be a drop-in replacement for C++14's -// `std::make_index_sequence`. -template -using make_index_sequence = make_integer_sequence; - -// index_sequence_for -// -// Converts a typename pack into an index sequence of the same length, and -// is designed to be a drop-in replacement for C++14's -// `std::index_sequence_for()` -template -using index_sequence_for = make_index_sequence; - -//// END OF CODE FROM GOOGLE ABSEIL - -#endif - -// dispatch utility (taken from ranges-v3) -template struct priority_tag : priority_tag < N - 1 > {}; -template<> struct priority_tag<0> {}; - -// taken from ranges-v3 -template -struct static_const -{ - static JSON_INLINE_VARIABLE constexpr T value{}; -}; - -#ifndef JSON_HAS_CPP_17 - template - constexpr T static_const::value; -#endif - -template -inline constexpr std::array make_array(Args&& ... args) -{ - return std::array {{static_cast(std::forward(args))...}}; -} - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // numeric_limits -#include // false_type, is_constructible, is_integral, is_same, true_type -#include // declval -#include // tuple - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // random_access_iterator_tag - -// #include - -// #include - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template -struct iterator_types {}; - -template -struct iterator_types < - It, - void_t> -{ - using difference_type = typename It::difference_type; - using value_type = typename It::value_type; - using pointer = typename It::pointer; - using reference = typename It::reference; - using iterator_category = typename It::iterator_category; -}; - -// This is required as some compilers implement std::iterator_traits in a way that -// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. -template -struct iterator_traits -{ -}; - -template -struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> - : iterator_types -{ -}; - -template -struct iterator_traits::value>> -{ - using iterator_category = std::random_access_iterator_tag; - using value_type = T; - using difference_type = ptrdiff_t; - using pointer = T*; - using reference = T&; -}; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN - -NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); - -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN - -NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); - -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - -#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ - #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ - - #include // int64_t, uint64_t - #include // map - #include // allocator - #include // string - #include // vector - - // #include - - - /*! - @brief namespace for Niels Lohmann - @see https://github.com/nlohmann - @since version 1.0.0 - */ - NLOHMANN_JSON_NAMESPACE_BEGIN - - /*! - @brief default JSONSerializer template argument - - This serializer ignores the template arguments and uses ADL - ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) - for serialization. - */ - template - struct adl_serializer; - - /// a class to store JSON values - /// @sa https://json.nlohmann.me/api/basic_json/ - template class ObjectType = - std::map, - template class ArrayType = std::vector, - class StringType = std::string, class BooleanType = bool, - class NumberIntegerType = std::int64_t, - class NumberUnsignedType = std::uint64_t, - class NumberFloatType = double, - template class AllocatorType = std::allocator, - template class JSONSerializer = - adl_serializer, - class BinaryType = std::vector, // cppcheck-suppress syntaxError - class CustomBaseClass = void> - class basic_json; - - /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document - /// @sa https://json.nlohmann.me/api/json_pointer/ - template - class json_pointer; - - /*! - @brief default specialization - @sa https://json.nlohmann.me/api/json/ - */ - using json = basic_json<>; - - /// @brief a minimal map-like container that preserves insertion order - /// @sa https://json.nlohmann.me/api/ordered_map/ - template - struct ordered_map; - - /// @brief specialization that maintains the insertion order of object keys - /// @sa https://json.nlohmann.me/api/ordered_json/ - using ordered_json = basic_json; - - NLOHMANN_JSON_NAMESPACE_END - -#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ - - -NLOHMANN_JSON_NAMESPACE_BEGIN -/*! -@brief detail namespace with internal helper functions - -This namespace collects functions that should not be exposed, -implementations of some @ref basic_json methods, and meta-programming helpers. - -@since version 2.1.0 -*/ -namespace detail -{ - -///////////// -// helpers // -///////////// - -// Note to maintainers: -// -// Every trait in this file expects a non CV-qualified type. -// The only exceptions are in the 'aliases for detected' section -// (i.e. those of the form: decltype(T::member_function(std::declval()))) -// -// In this case, T has to be properly CV-qualified to constraint the function arguments -// (e.g. to_json(BasicJsonType&, const T&)) - -template struct is_basic_json : std::false_type {}; - -NLOHMANN_BASIC_JSON_TPL_DECLARATION -struct is_basic_json : std::true_type {}; - -// used by exceptions create() member functions -// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t -// false_type otherwise -template -struct is_basic_json_context : - std::integral_constant < bool, - is_basic_json::type>::type>::value - || std::is_same::value > -{}; - -////////////////////// -// json_ref helpers // -////////////////////// - -template -class json_ref; - -template -struct is_json_ref : std::false_type {}; - -template -struct is_json_ref> : std::true_type {}; - -////////////////////////// -// aliases for detected // -////////////////////////// - -template -using mapped_type_t = typename T::mapped_type; - -template -using key_type_t = typename T::key_type; - -template -using value_type_t = typename T::value_type; - -template -using difference_type_t = typename T::difference_type; - -template -using pointer_t = typename T::pointer; - -template -using reference_t = typename T::reference; - -template -using iterator_category_t = typename T::iterator_category; - -template -using to_json_function = decltype(T::to_json(std::declval()...)); - -template -using from_json_function = decltype(T::from_json(std::declval()...)); - -template -using get_template_function = decltype(std::declval().template get()); - -// trait checking if JSONSerializer::from_json(json const&, udt&) exists -template -struct has_from_json : std::false_type {}; - -// trait checking if j.get is valid -// use this trait instead of std::is_constructible or std::is_convertible, -// both rely on, or make use of implicit conversions, and thus fail when T -// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) -template -struct is_getable -{ - static constexpr bool value = is_detected::value; -}; - -template -struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -// This trait checks if JSONSerializer::from_json(json const&) exists -// this overload is used for non-default-constructible user-defined-types -template -struct has_non_default_from_json : std::false_type {}; - -template -struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -// This trait checks if BasicJsonType::json_serializer::to_json exists -// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. -template -struct has_to_json : std::false_type {}; - -template -struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -template -using detect_key_compare = typename T::key_compare; - -template -struct has_key_compare : std::integral_constant::value> {}; - -// obtains the actual object key comparator -template -struct actual_object_comparator -{ - using object_t = typename BasicJsonType::object_t; - using object_comparator_t = typename BasicJsonType::default_object_comparator_t; - using type = typename std::conditional < has_key_compare::value, - typename object_t::key_compare, object_comparator_t>::type; -}; - -template -using actual_object_comparator_t = typename actual_object_comparator::type; - -/////////////////// -// is_ functions // -/////////////////// - -// https://en.cppreference.com/w/cpp/types/conjunction -template struct conjunction : std::true_type { }; -template struct conjunction : B { }; -template -struct conjunction -: std::conditional(B::value), conjunction, B>::type {}; - -// https://en.cppreference.com/w/cpp/types/negation -template struct negation : std::integral_constant < bool, !B::value > { }; - -// Reimplementation of is_constructible and is_default_constructible, due to them being broken for -// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). -// This causes compile errors in e.g. clang 3.5 or gcc 4.9. -template -struct is_default_constructible : std::is_default_constructible {}; - -template -struct is_default_constructible> - : conjunction, is_default_constructible> {}; - -template -struct is_default_constructible> - : conjunction, is_default_constructible> {}; - -template -struct is_default_constructible> - : conjunction...> {}; - -template -struct is_default_constructible> - : conjunction...> {}; - - -template -struct is_constructible : std::is_constructible {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - - -template -struct is_iterator_traits : std::false_type {}; - -template -struct is_iterator_traits> -{ - private: - using traits = iterator_traits; - - public: - static constexpr auto value = - is_detected::value && - is_detected::value && - is_detected::value && - is_detected::value && - is_detected::value; -}; - -template -struct is_range -{ - private: - using t_ref = typename std::add_lvalue_reference::type; - - using iterator = detected_t; - using sentinel = detected_t; - - // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator - // and https://en.cppreference.com/w/cpp/iterator/sentinel_for - // but reimplementing these would be too much work, as a lot of other concepts are used underneath - static constexpr auto is_iterator_begin = - is_iterator_traits>::value; - - public: - static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; -}; - -template -using iterator_t = enable_if_t::value, result_of_begin())>>; - -template -using range_value_t = value_type_t>>; - -// The following implementation of is_complete_type is taken from -// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ -// and is written by Xiang Fan who agreed to using it in this library. - -template -struct is_complete_type : std::false_type {}; - -template -struct is_complete_type : std::true_type {}; - -template -struct is_compatible_object_type_impl : std::false_type {}; - -template -struct is_compatible_object_type_impl < - BasicJsonType, CompatibleObjectType, - enable_if_t < is_detected::value&& - is_detected::value >> -{ - using object_t = typename BasicJsonType::object_t; - - // macOS's is_constructible does not play well with nonesuch... - static constexpr bool value = - is_constructible::value && - is_constructible::value; -}; - -template -struct is_compatible_object_type - : is_compatible_object_type_impl {}; - -template -struct is_constructible_object_type_impl : std::false_type {}; - -template -struct is_constructible_object_type_impl < - BasicJsonType, ConstructibleObjectType, - enable_if_t < is_detected::value&& - is_detected::value >> -{ - using object_t = typename BasicJsonType::object_t; - - static constexpr bool value = - (is_default_constructible::value && - (std::is_move_assignable::value || - std::is_copy_assignable::value) && - (is_constructible::value && - std::is_same < - typename object_t::mapped_type, - typename ConstructibleObjectType::mapped_type >::value)) || - (has_from_json::value || - has_non_default_from_json < - BasicJsonType, - typename ConstructibleObjectType::mapped_type >::value); -}; - -template -struct is_constructible_object_type - : is_constructible_object_type_impl {}; - -template -struct is_compatible_string_type -{ - static constexpr auto value = - is_constructible::value; -}; - -template -struct is_constructible_string_type -{ - // launder type through decltype() to fix compilation failure on ICPC -#ifdef __INTEL_COMPILER - using laundered_type = decltype(std::declval()); -#else - using laundered_type = ConstructibleStringType; -#endif - - static constexpr auto value = - conjunction < - is_constructible, - is_detected_exact>::value; -}; - -template -struct is_compatible_array_type_impl : std::false_type {}; - -template -struct is_compatible_array_type_impl < - BasicJsonType, CompatibleArrayType, - enable_if_t < - is_detected::value&& - is_iterator_traits>>::value&& -// special case for types like std::filesystem::path whose iterator's value_type are themselves -// c.f. https://github.com/nlohmann/json/pull/3073 - !std::is_same>::value >> -{ - static constexpr bool value = - is_constructible>::value; -}; - -template -struct is_compatible_array_type - : is_compatible_array_type_impl {}; - -template -struct is_constructible_array_type_impl : std::false_type {}; - -template -struct is_constructible_array_type_impl < - BasicJsonType, ConstructibleArrayType, - enable_if_t::value >> - : std::true_type {}; - -template -struct is_constructible_array_type_impl < - BasicJsonType, ConstructibleArrayType, - enable_if_t < !std::is_same::value&& - !is_compatible_string_type::value&& - is_default_constructible::value&& -(std::is_move_assignable::value || - std::is_copy_assignable::value)&& -is_detected::value&& -is_iterator_traits>>::value&& -is_detected::value&& -// special case for types like std::filesystem::path whose iterator's value_type are themselves -// c.f. https://github.com/nlohmann/json/pull/3073 -!std::is_same>::value&& - is_complete_type < - detected_t>::value >> -{ - using value_type = range_value_t; - - static constexpr bool value = - std::is_same::value || - has_from_json::value || - has_non_default_from_json < - BasicJsonType, - value_type >::value; -}; - -template -struct is_constructible_array_type - : is_constructible_array_type_impl {}; - -template -struct is_compatible_integer_type_impl : std::false_type {}; - -template -struct is_compatible_integer_type_impl < - RealIntegerType, CompatibleNumberIntegerType, - enable_if_t < std::is_integral::value&& - std::is_integral::value&& - !std::is_same::value >> -{ - // is there an assert somewhere on overflows? - using RealLimits = std::numeric_limits; - using CompatibleLimits = std::numeric_limits; - - static constexpr auto value = - is_constructible::value && - CompatibleLimits::is_integer && - RealLimits::is_signed == CompatibleLimits::is_signed; -}; - -template -struct is_compatible_integer_type - : is_compatible_integer_type_impl {}; - -template -struct is_compatible_type_impl: std::false_type {}; - -template -struct is_compatible_type_impl < - BasicJsonType, CompatibleType, - enable_if_t::value >> -{ - static constexpr bool value = - has_to_json::value; -}; - -template -struct is_compatible_type - : is_compatible_type_impl {}; - -template -struct is_constructible_tuple : std::false_type {}; - -template -struct is_constructible_tuple> : conjunction...> {}; - -template -struct is_json_iterator_of : std::false_type {}; - -template -struct is_json_iterator_of : std::true_type {}; - -template -struct is_json_iterator_of : std::true_type -{}; - -// checks if a given type T is a template specialization of Primary -template