Replace offset shifting animations with palette cycling#57
Open
morganchristiansson wants to merge 1 commit into
Open
Replace offset shifting animations with palette cycling#57morganchristiansson wants to merge 1 commit into
morganchristiansson wants to merge 1 commit into
Conversation
Flamefire
reviewed
Jun 30, 2026
| // array for all palettes | ||
| std::vector<bobPAL> global::palArray(MAXBOBPAL); | ||
| // palette animation data per tileset (indexed by 8-bit tileset bmpArray index) | ||
| std::vector<std::vector<PaletteAnimData>> global::tilesetAnimData; |
Member
There was a problem hiding this comment.
A bit hard to understand the comment as it only describes 1 vector, not which one nor the other one. maybe add a using PaletteAnimation = std::vector<PaletteAnimData> and name the variable vector<PaletteAnimation> tilesetAnimations or similar
Especially the above
auto& animData = global::tilesetAnimData[tilesetIdx8];
...
for(auto& anim : animData)
is confusingly named if anim is of type PaletteAnimData but animData is not.
You could also turn it around and renamed PaletteAnimData to PaletteAnimation and the vector of that is AnimData to match this code, but not sure if this is clearer.
Anyway such variable vs type naming mismatches are a clear indication of (mis)namings that need to be improved.
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.
Using pos values from GameDataLoader broke the offset shifting animations that started crolling in unrelated textures.
Existing animations also jump as the offset resets in the animation cycle.
Do what s25client does - animate water and lava by cycling palettes.