Skip to content

Clarify that animation tile ID is GID actually#181

Merged
fallahn merged 1 commit intofallahn:masterfrom
MrOnlineCoder:fix/docs-note-for-animation
Jan 16, 2026
Merged

Clarify that animation tile ID is GID actually#181
fallahn merged 1 commit intofallahn:masterfrom
MrOnlineCoder:fix/docs-note-for-animation

Conversation

@MrOnlineCoder
Copy link
Contributor

@MrOnlineCoder MrOnlineCoder commented Jan 15, 2026

During development I had some confusion and errors because of this line:

frame.tileID = frameNode.attribute("tileid").as_int() + m_firstGID;

I did not expect that member named tileID will actually contain a global ID (local + firstGID), and seems that such logic does not apply to regular tmx::Tileset::Tile.ID or terrain tile value. So I added a documentation note so that end user will not add the firstGID twice, as I did mistakenly.

@fallahn fallahn merged commit 8f58c71 into fallahn:master Jan 16, 2026
9 checks passed
@fallahn
Copy link
Owner

fallahn commented Jan 16, 2026

Thanks! Sorry for the confusion 😅

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