Improves readability in HeightMapRenderObjClass::Update_Center - #926
Open
bobtista wants to merge 1 commit into
Open
Improves readability in HeightMapRenderObjClass::Update_Center#926bobtista wants to merge 1 commit into
bobtista wants to merge 1 commit into
Conversation
bobtista
force-pushed
the
heightmapUpdateCenter
branch
from
May 22, 2023 20:05
2f4bc96 to
98cd3e5
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #926 +/- ##
==========================================
- Coverage 2.97% 2.97% -0.01%
==========================================
Files 803 803
Lines 80343 80343
Branches 13764 13764
==========================================
- Hits 2390 2387 -3
- Misses 77610 77612 +2
- Partials 343 344 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bobtista
force-pushed
the
heightmapUpdateCenter
branch
from
May 22, 2023 20:33
98cd3e5 to
709f055
Compare
xezon
reviewed
May 25, 2023
| min_x = m_map->Border_Size() + min_x; | ||
| max_x = m_map->Border_Size() + max_x; | ||
| min_y = m_map->Border_Size() + min_y; | ||
| max_y = m_map->Border_Size() + max_y; |
| min_x = min_x / 10.0f; | ||
| max_x = max_x / 10.0f; | ||
| min_y = min_y / 10.0f; | ||
| max_y = max_y / 10.0f; |
| Update_Block(x_start_tile, 0, x_end_tile, m_y - 1, m_map, lights); | ||
| } else { | ||
| i6 = i6 + m_x - 1; | ||
| x_start_tile = x_start_tile + m_x - 1; |
| x_end_tile += increment; | ||
|
|
||
| if (m_originX < 0) { | ||
| m_originX = m_originX + m_x - 1; |
| Update_Block(0, y_start_tile, m_x - 1, y_end_tile, m_map, lights); | ||
| } else { | ||
| i4 = i4 + m_y - 1; | ||
| y_start_tile = y_start_tile + m_y - 1; |
| float x_dist = viewport_max.X - viewport_min.X; | ||
| float y_dist = viewport_max.Y - viewport_min.Y; | ||
| float scale_factor = -1.0f; | ||
| float min_x = 200000.0f; |
Collaborator
There was a problem hiding this comment.
Right now there is
x_dist
min_x
among others.
Perhaps it makes sense to name those x,y variables in consistent order?
Perhaps x,y always at the end of the name?
|
|
||
| float z = max_height; | ||
| Vector2 viewport_min; | ||
| Vector2 viewport_max; |
Collaborator
There was a problem hiding this comment.
Perhaps just view_max for short.
| Vector2 viewport_max; | ||
| camera->Get_View_Plane(viewport_min, viewport_max); | ||
| float x_dist = viewport_max.X - viewport_min.X; | ||
| float y_dist = viewport_max.Y - viewport_min.Y; |
Collaborator
There was a problem hiding this comment.
Perhaps this variable can still retain view in it.
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.
No description provided.