Skip to content

Use pos from GameDataLoader#55

Open
morganchristiansson wants to merge 1 commit into
Return-To-The-Roots:masterfrom
morganchristiansson:gdl-pos
Open

Use pos from GameDataLoader#55
morganchristiansson wants to merge 1 commit into
Return-To-The-Roots:masterfrom
morganchristiansson:gdl-pos

Conversation

@morganchristiansson

Copy link
Copy Markdown
Contributor

Instead of current hardcoded values.
GameDataLoader loads them from data/RTTR/gamedata/world/*.lua

This also removes water animations as they use coordinate offsets rather than palette animation, which should be addressed in another PR.

@morganchristiansson morganchristiansson changed the title GameDataLoader pos Use pos from GameDataLoader Jun 27, 2026

@Flamefire Flamefire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looses the correctly animated textures which is actually missing in s25main. The editor is currently the only instance that (still) handles it correctly so we won't remove it and make it look worse.

And shouldn't we e.g. check maps for "known" textures on load instead of handling that in getTerrainDesc? I'm not sure the handling will still be correct in absence of terrain data.

Comment thread CSurface.cpp
if(s2Id < map.s2IdToTerrain.size())
{
const auto idx = map.s2IdToTerrain[s2Id];
if(idx)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why exclude the 0 index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants