Repository navigation
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
Updates
ACE.DatLoader.FileTypes.Textureto expose and preserve theDataCategoryfield serialized by the original Asheron's Call client.Analysis of the original client implementation identified this field as inherited metadata associated with
RenderSurfaceresources.The change preserves the original unsigned 32-bit value and adds regression coverage to verify that subsequent texture fields remain correctly aligned and decoded.
Problem
The original client serializes
m_dataCategoryas part of the resource metadata inherited fromDBObj.Although this value is present in the serialized texture record, the existing
Textureimplementation does not expose it to consumers ofACE.DatLoader.The identified binary layout is:
UInt32)UInt32)Int32)Int32)UInt32)Int32)The meaning of individual category values has not yet been established. Consequently, the implementation preserves the raw value without assigning unverified semantics.
Changes
DataCategoryproperty usingUInt32.Texture.Unpack()to populate the property immediately after reading the resource ID.No changes were made to texture decompression, bitmap generation, or image export functionality.
Validation
Added
TextureDataCategoryTests.cswith two regression scenarios:1. DataCategory preservation and field alignment
Tests the following values:
070x80000000UInt32.MaxValueVerifies that the parser preserves the category value and correctly decodes the following fields:
2. Palettized texture compatibility
Uses a
PFID_P8texture record withDataCategory = 10.Verifies:
Both tests construct their records in memory and do not require retail DAT archives.
Each test verifies that the parser reaches the exact end of the supplied binary record.
Impact
This change improves the completeness of the decoded
Textureresource representation.Preserving
DataCategoryprovides downstream applications access to metadata present in the original client format without requiring those applications to perform additional binary parsing.Potential consumers include ACViewer, DAT inspection utilities, texture analysis tools, and future world or content customization applications.
Existing texture decoding and rendering-related functionality remains unchanged.
Scope
Limited to:
ACE.DatLoader/FileTypes/Texture.csACE.DatLoader.Tests/TextureDataCategoryTests.csThis is a metadata preservation and regression-coverage change only.
No gameplay, rendering, or DAT format changes are intended.