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

Remove VIEW_OFFSET_X/Y #40055

Merged
merged 1 commit into from
May 1, 2020
Merged

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented May 1, 2020

Summary

SUMMARY: None

Purpose of change

VIEW_OFFSET_X/Y are never set to values other than 0. According to a comment in game.cpp they were used to center the terrain window when the screen exceeds the required size. Since we now use the full screen space for the terrain window, they are essentially dead code now and can be removed. Most of the game windows do not take these two values into consideration, either, and even the terrain window itself glitched when I tested assigning non-zero values to the two variables.

Describe the solution

Remove the variables altogether.

Describe alternatives you've considered

Leave them as is to be revived in the future.

Testing

Opened the affected menus and they all displayed fine.

@ifreund ifreund added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels May 1, 2020
Copy link
Contributor

@ifreund ifreund left a comment

Choose a reason for hiding this comment

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

Thanks, the less code the better!

@ifreund ifreund merged commit 2b565c6 into CleverRaven:master May 1, 2020
@Qrox Qrox deleted the remove-view-offset-xy branch May 2, 2020 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants