Skip to content
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

Introduce GetDunSize and remove global SetPiece Handling #6841

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

obligaron
Copy link
Contributor

This PR includes three refactorings

  • Introduce a helper method GetDunSize to get the ".dun"-size. Use this in every place a WorldTileSize is needed. (first commit)
  • Use the new GetDunSize also in loops. I'm not 100% of this, that's also why this is a separate commit. (second commit)
  • Replace global pSetPiece and it's related helper functions (SetSetPieceRoom and FreeQuestSetPieces) with a anonymous function in each level generator (InitSetPiece). Less global variables. 😁 (third commit)

This PR also reduces warnings by 16 (from 153 to 137).

Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

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

This all looks good to me and is fairly well covered by tests.

(60% of the diff is covered by tests)

@AJenbo AJenbo merged commit 7cd7a34 into diasurgical:master Nov 28, 2023
23 checks passed
@obligaron obligaron deleted the setpiece branch November 28, 2023 17:18
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