Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an optional
libeq_eqgcrate andlibeq::eqgfacade feature for EQG resource identification, raw binary zone parsing, and terrain/model geometry parsing. Consumers can recognize a resource before dispatch and read EQGZ v1/v2 records without embedding format readers in a renderer. Existing default facade features remain unchanged.identify(&[u8])recognizesEQGZ,EQGT,EQGM,EQTZP, andEQOBG. It preserves raw little-endian binary versions, distinguishes unknown signatures from matching truncated headers, and does not imply complete parsing support.zone::parse(&[u8])reads EQGZ v1/v2 string tables, nullable model references, placements, variable-length v2 extension data, regions, and lights. It validates byte/count bounds, string termination, and model indices. Extensions borrow the input bytes rather than allocating a second word array. Strings remain bytes, floating-point values retain their bits, and unknown region/light fields remain raw words. Extra bytes after the counted records are exposed astrailing_data.mesh::parse(&[u8])reads EQGT/EQGM versions 1–3 with checked materials, raw properties, vertex attributes, triangles, and version-2 secondary UV data. It preserves colors, flags, unknown material values, and suffix bytes. Model bone counts are exposed, but skeletal records are not decoded.The readers do not select resource providers, load referenced models, convert coordinates, reconstruct actor naming, or interpret collision/water semantics. Text terrain-project readers remain follow-up work. PFS retains archive extraction responsibility. This supports the downstream EQG zone project.
Validation
cargo test --workspace: 148 passed, three ignored.cargo fmt --all -- --check: passed.libeq_eqgand strict rustdoc build: passed.Strict workspace Clippy on Rust 1.98 reports three existing errors in
libeq_wld, reproduced on unchanged upstream main. The optional WLDgamedatatest feature requires fixtures absent from the checkout and is excluded from the passing default workspace result.The contribution is split into header-identification, binary-zone-parser, and mesh-parser commits for review. Acceptance covers raw records and the supplied corpus, not rendered scenes or gameplay.