1
0
forked from mirrors/0ad

Cleanup Camera related code and uses constant references where possible.

Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2350
This was SVN commit r23033.
This commit is contained in:
vladislavbelov
2019-10-03 12:58:47 +00:00
parent 7f38bef8e1
commit a19b14aeb7
9 changed files with 23 additions and 33 deletions
+2 -2
View File
@@ -1253,7 +1253,7 @@ void CPatchRData::RenderSides(CShaderProgramPtr& shader)
void CPatchRData::RenderPriorities(CTextRenderer& textRenderer)
{
CTerrain* terrain = m_Patch->m_Parent;
CCamera* camera = g_Game->GetView()->GetCamera();
const CCamera& camera = *(g_Game->GetView()->GetCamera());
for (ssize_t j = 0; j < PATCH_SIZE; ++j)
{
@@ -1270,7 +1270,7 @@ void CPatchRData::RenderPriorities(CTextRenderer& textRenderer)
pos.Z += TERRAIN_TILE_SIZE/4.f;
float x, y;
camera->GetScreenCoordinates(pos, x, y);
camera.GetScreenCoordinates(pos, x, y);
textRenderer.PrintfAt(x, y, L"%d", m_Patch->m_MiniPatches[j][i].Priority);
}