From 8918b146aa75a5a0bcdccbcc988c901e0edd3aa4 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 8 Jun 2015 09:48:14 +1000 Subject: [PATCH] Remove unused variables. --- 2D/Screens/FpsScreen.cs | 1 - Rendering/MapEnvRenderer.cs | 9 +++------ Rendering/StandardEnvRenderer.cs | 6 ++---- Selections/SelectionBox.cs | 2 -- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/2D/Screens/FpsScreen.cs b/2D/Screens/FpsScreen.cs index 9b62efd1b..30427878a 100644 --- a/2D/Screens/FpsScreen.cs +++ b/2D/Screens/FpsScreen.cs @@ -25,7 +25,6 @@ namespace ClassicalSharp { fpsCount++; maxDelta = Math.Max( maxDelta, delta ); accumulator += delta; - long vertices = Window.Vertices; if( accumulator >= 1 ) { fixed( char* ptr = text.value ) { diff --git a/Rendering/MapEnvRenderer.cs b/Rendering/MapEnvRenderer.cs index bb17d6134..09992b410 100644 --- a/Rendering/MapEnvRenderer.cs +++ b/Rendering/MapEnvRenderer.cs @@ -211,8 +211,7 @@ namespace ClassicalSharp { const int axisSize = 128; void DrawXPlaneParts( int x, int z1, int z2, int y1, int y2, FastColour col, VertexPos3fTex2fCol4b[] vertices ) { - int length = z2 - z1, endZ = z2; - int height = y2 - y1, endY = y2, startY = y1; + int endZ = z2, endY = y2, startY = y1; for( ; z1 < endZ; z1 += axisSize ) { z2 = z1 + axisSize; if( z2 > endZ ) z2 = endZ; @@ -226,8 +225,7 @@ namespace ClassicalSharp { } void DrawZPlaneParts( int z, int x1, int x2, int y1, int y2, FastColour col, VertexPos3fTex2fCol4b[] vertices ) { - int width = x2 - x1, endX = x2; - int height= y2 - y1, endY = y2, startY = y1; + int endX = x2, endY = y2, startY = y1; for( ; x1 < endX; x1 += axisSize ) { x2 = x1 + axisSize; if( x2 > endX ) x2 = endX; @@ -241,8 +239,7 @@ namespace ClassicalSharp { } void DrawYPlaneParts( int x1, int z1, int x2, int z2, int y, FastColour col, VertexPos3fTex2fCol4b[] vertices ) { - int width = x2 - x1, endX = x2; - int length = z2 - z1, endZ = z2, startZ = z1; + int endX = x2, endZ = z2, startZ = z1; for( ; x1 < endX; x1 += axisSize ) { x2 = x1 + axisSize; if( x2 > endX ) x2 = endX; diff --git a/Rendering/StandardEnvRenderer.cs b/Rendering/StandardEnvRenderer.cs index 8689c0043..4f87ddf36 100644 --- a/Rendering/StandardEnvRenderer.cs +++ b/Rendering/StandardEnvRenderer.cs @@ -203,8 +203,7 @@ namespace ClassicalSharp.Renderers { } void DrawSkyYPlaneParts( int x1, int z1, int x2, int z2, int y, FastColour col, VertexPos3fCol4b[] vertices ) { - int width = x2 - x1, endX = x2; - int length = z2 - z1, endZ = z2, startZ = z1; + int endX = x2, endZ = z2, startZ = z1; for( ; x1 < endX; x1 += 128 ) { x2 = x1 + 128; @@ -219,8 +218,7 @@ namespace ClassicalSharp.Renderers { } void DrawCloudsYPlaneParts( int x1, int z1, int x2, int z2, int y, FastColour col, VertexPos3fTex2fCol4b[] vertices ) { - int width = x2 - x1, endX = x2; - int length = z2 - z1, endZ = z2, startZ = z1; + int endX = x2, endZ = z2, startZ = z1; for( ; x1 < endX; x1 += 128 ) { x2 = x1 + 128; diff --git a/Selections/SelectionBox.cs b/Selections/SelectionBox.cs index ccc983f9b..9e33ecfab 100644 --- a/Selections/SelectionBox.cs +++ b/Selections/SelectionBox.cs @@ -59,7 +59,6 @@ namespace ClassicalSharp.Selections { Line( vertices, ref index, p2.X, p1.Y, p2.Z, p2.X, p2.Y, p2.Z ); Line( vertices, ref index, p1.X, p1.Y, p2.Z, p1.X, p2.Y, p2.Z ); LineVerticesCount = vertices.Length; - int size = vertices.Length * VertexPos3fCol4b.Size; LineVboId = Graphics.InitVb( vertices, VertexFormat.Pos3fCol4b ); vertices = new VertexPos3fCol4b[6 * 6]; @@ -72,7 +71,6 @@ namespace ClassicalSharp.Selections { RenderZPlane( vertices, ref index, p1.Z, p2.Z, p1.Y, p2.Y, p1.X ); RenderZPlane( vertices, ref index, p1.Z, p2.Z, p1.Y, p2.Y, p2.X ); VerticesCount = vertices.Length; - size = vertices.Length * VertexPos3fCol4b.Size; VboId = Graphics.InitVb( vertices, VertexFormat.Pos3fCol4b ); }