decompiler: add texture merging feature #3083
Merged
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.
This adds a new feature to the decompiler to complement texture replacement with what I'm calling texture merging.
Instead of taking a PNG and using it's data to fully replace an existing texture, we instead only replace the pixels that are non-transparent from the merge image.
This might be useful in a few other situations, but what I'm interested in using it for is expanding the game's font without having to commit any of the existing texture assets, just merging in individual new characters.
For Jak 1, there isn't much empty room available and I'm not sure how easy it would be to support larger font-textures. But in Jak 2, across all
font.24*
textures, there are over 200 unused character slots.In some ways, this is an interim workaround because adding brand new textures to the game is non-trivial (ie. adding entire new font textures would allow for unlimited characters!).