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.
When
HAS_CURRENT_FRAMEis set,SimpleSpriteDef::parse()consumes the current-frame word but storesNone. Serialization then retains the flag while omitting the word, shifting subsequent fields or preventing a round trip. Retain the parsed value and expose optionalcurrent_frame()andsleep()accessors on the high-levelTextureAPI.The accessors preserve absent fields, explicit zero and other raw
u32values. They do not assign timing units or playback semantics. Sleep retains its existingIS_ANIMATED && HAS_SLEEPpresence rule. Synthetic tests exercise literal parser/serializer round trips and complete WLD material-to-texture reference resolution across nine flag/value combinations, including non-animated current-frame metadata andHAS_SLEEPwithout animation.Closes #57.
Validation: author and independent workspace suites each passed 134 tests, 1 ignored; the serde-enabled WLD suite passed 118 tests, 1 ignored. The original parser failed the literal round-trip regression. Three independent mutations (discarding the parsed value or dropping explicit zero in either accessor) failed their targeted regressions; restored tests passed. A separate public-API probe loaded sixteen independently encoded synthetic WLD artifacts and verified metadata, flag gating and ordered image references. No native assets are required.