-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix suboptimal CLX encoding #3
Merged
Merged
Conversation
This file contains 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
Previously we did not check the fill width after the end of the encoding loop, resulting in frequent width=1 Fill commands. Before: CLX sprite: 16x20 pixelDataSize=97b command | width | bytes | color(s) --------|------:|------:|--------- Transp. | 80 | 1 | Pixels | 2 | 3 | 203 199 Fill | 3 | 2 | 202 Pixels | 2 | 3 | 199 201 Fill | 1 | 2 | 205 Transp. | 8 | 1 | Pixels | 3 | 4 | 205 199 196 Fill | 4 | 2 | 197 Fill | 1 | 2 | 202 Transp. | 9 | 1 | Pixels | 6 | 7 | 206 199 197 203 206 202 Fill | 1 | 2 | 204 Transp. | 10 | 1 | Pixels | 4 | 5 | 206 199 197 205 Fill | 1 | 2 | 207 Transp. | 12 | 1 | Pixels | 3 | 4 | 206 197 197 Fill | 1 | 2 | 205 Transp. | 9 | 1 | Pixels | 7 | 8 | 207 205 203 206 206 197 197 Fill | 1 | 2 | 206 Transp. | 8 | 1 | Pixels | 3 | 4 | 204 197 199 Fill | 1 | 2 | 205 Transp. | 1 | 1 | Pixels | 2 | 3 | 202 197 Fill | 1 | 2 | 204 Transp. | 8 | 1 | Pixels | 7 | 8 | 206 197 199 207 206 199 196 Fill | 1 | 2 | 205 Transp. | 9 | 1 | Pixels | 1 | 2 | 203 Fill | 4 | 2 | 197 Fill | 1 | 2 | 202 Transp. | 10 | 1 | Pixels | 5 | 6 | 207 205 199 199 203 Fill | 1 | 2 | 207 Transp. | 89 | 1 | After: CLX sprite: 16x20 pixelDataSize=88b command | width | bytes | color(s) --------|------:|------:|--------- Transp. | 80 | 1 | Pixels | 2 | 3 | 203 199 Fill | 3 | 2 | 202 Pixels | 3 | 4 | 199 201 205 Transp. | 8 | 1 | Pixels | 3 | 4 | 205 199 196 Fill | 4 | 2 | 197 Pixels | 1 | 2 | 202 Transp. | 9 | 1 | Pixels | 7 | 8 | 206 199 197 203 206 202 204 Transp. | 10 | 1 | Pixels | 5 | 6 | 206 199 197 205 207 Transp. | 12 | 1 | Pixels | 4 | 5 | 206 197 197 205 Transp. | 9 | 1 | Pixels | 8 | 9 | 207 205 203 206 206 197 197 206 Transp. | 8 | 1 | Pixels | 4 | 5 | 204 197 199 205 Transp. | 1 | 1 | Pixels | 3 | 4 | 202 197 204 Transp. | 8 | 1 | Pixels | 8 | 9 | 206 197 199 207 206 199 196 205 Transp. | 9 | 1 | Pixels | 1 | 2 | 203 Fill | 4 | 2 | 197 Pixels | 1 | 2 | 202 Transp. | 10 | 1 | Pixels | 6 | 7 | 207 205 199 199 203 207 Transp. | 89 | 1 |
glebm
added a commit
to glebm/devilutionX
that referenced
this pull request
Apr 10, 2023
glebm
added a commit
to glebm/devilutionX
that referenced
this pull request
Apr 10, 2023
Following the CLX encoding fix in diasurgical/devilutionx-graphics-tools#3
AJenbo
approved these changes
Apr 10, 2023
The table is very helpful for better understanding how this all works 👍 |
glebm
added a commit
to diasurgical/devilutionx-mpq-tools
that referenced
this pull request
Apr 10, 2023
The new version reduces CLX size diasurgical/devilutionx-graphics-tools#3
AJenbo
pushed a commit
to diasurgical/DevilutionX
that referenced
this pull request
Apr 10, 2023
AJenbo
pushed a commit
to diasurgical/DevilutionX
that referenced
this pull request
Apr 10, 2023
Following the CLX encoding fix in diasurgical/devilutionx-graphics-tools#3
artifacts-storage
pushed a commit
to artifacts-storage/devilutionx-artifacts
that referenced
this pull request
Apr 10, 2023
Following the CLX encoding fix in diasurgical/devilutionx-graphics-tools#3
artifacts-storage
pushed a commit
to artifacts-storage/devilutionx-artifacts
that referenced
this pull request
Apr 10, 2023
Following the CLX encoding fix in diasurgical/devilutionx-graphics-tools#3
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.
Previously we did not check the fill width after the end of the encoding loop, resulting in frequent width=1 Fill commands.
Before:
CLX sprite: 16x20 pixelDataSize=97b
After:
CLX sprite: 16x20 pixelDataSize=88b