Repository navigation
decomp-assets 0.6.0: textures packed with a demolition game's own codecs - #5
Merged
Merged
Conversation
An N64 demolition game packs ~3,600 textures with six back-reference codecs of its own and lists them in a texture table (offset, size, codec), with the colour tables codecs 4 and 5 read stored before the textures that use them. The table names no dimensions, so the width is inferred: where each texel is closest to the one below it, compared with strides one off, preferring a square that scores nearly as well. Against one release's decompilation 96% of widths agree; the preview takes another width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
New N64 recogniser
n64/blast_textures.pyfor a demolition game's texture table: 8-byte entries (offset from the table, packed size, codec) whose resources chain one after another. Codecs 1-6 are the game's own back-reference packings (RGBA16, RGBA32, IA8×2, IA16 through a 128-byte table, RGBA32 through a 256-byte table). The colour table used is the nearest one before the texture in the table (the decompilation's extractor leaves this as a TODO).The table names no dimensions. The width is inferred from the texels: the stride where each texel is closest to the one below it, relative to strides one off, preferring a square size that scores within 1.3×. Assets are
confidence='inferred', and the preview accepts anotherwidth.Results (read-only, the user's own ROMs)
Tests
tests/test_blast_textures.py(homemade table: codecs 1/3/5/6, back-references, width inference, width override, rejections). 158 pass, ruff clean.🤖 Generated with Claude Code