Index: binary-improvements2/MapRendering/src/MapRenderBlockBuffer.cs
===================================================================
--- binary-improvements2/MapRendering/MapRendering/MapRenderBlockBuffer.cs	(revision 374)
+++ binary-improvements2/MapRendering/src/MapRenderBlockBuffer.cs	(revision 391)
@@ -6,14 +6,14 @@
 using UnityEngine.Profiling;
 
-namespace AllocsFixes.MapRendering {
+namespace MapRendering {
 	public class MapRenderBlockBuffer {
-		private readonly Texture2D blockMap = new Texture2D (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE, Constants.DEFAULT_TEX_FORMAT, false);
+		private readonly Texture2D blockMap = new Texture2D (Constants.MapBlockSize, Constants.MapBlockSize, Constants.DefaultTextureFormat, false);
 		private readonly MapTileCache cache;
 		private readonly NativeArray<int> emptyImageData;
-		private readonly Texture2D zoomBuffer = new Texture2D (Constants.MAP_BLOCK_SIZE / 2, Constants.MAP_BLOCK_SIZE / 2, Constants.DEFAULT_TEX_FORMAT, false);
+		private readonly Texture2D zoomBuffer = new Texture2D (Constants.MapBlockSize / 2, Constants.MapBlockSize / 2, Constants.DefaultTextureFormat, false);
 		private readonly int zoomLevel;
 		private readonly string folderBase;
 		
-		private Vector2i currentBlockMapPos = new Vector2i (Int32.MinValue, Int32.MinValue);
+		private Vector2i currentBlockMapPos = new Vector2i (int.MinValue, int.MinValue);
 		private string currentBlockMapFolder = string.Empty;
 
@@ -21,11 +21,11 @@
 			zoomLevel = _level;
 			cache = _cache;
-			folderBase = Constants.MAP_DIRECTORY + "/" + zoomLevel + "/";
+			folderBase = Constants.MapDirectory + "/" + zoomLevel + "/";
 
 			{
 				// Initialize empty tile data
 				Color nullColor = new Color (0, 0, 0, 0);
-				for (int x = 0; x < Constants.MAP_BLOCK_SIZE; x++) {
-					for (int y = 0; y < Constants.MAP_BLOCK_SIZE; y++) {
+				for (int x = 0; x < Constants.MapBlockSize; x++) {
+					for (int y = 0; y < Constants.MapBlockSize; y++) {
 						blockMap.SetPixel (x, y, nullColor);
 					}
@@ -39,11 +39,9 @@
 		}
 
-		public TextureFormat FormatSelf {
-			get { return blockMap.format; }
-		}
+		public TextureFormat FormatSelf => blockMap.format;
 
 		public void ResetBlock () {
 			currentBlockMapFolder = string.Empty;
-			currentBlockMapPos = new Vector2i (Int32.MinValue, Int32.MinValue);
+			currentBlockMapPos = new Vector2i (int.MinValue, int.MinValue);
 			cache.ResetTile (zoomLevel);
 		}
@@ -94,7 +92,7 @@
 
 		public void SetPart (Vector2i _offset, int _partSize, Color32[] _pixels) {
-			if (_offset.x + _partSize > Constants.MAP_BLOCK_SIZE || _offset.y + _partSize > Constants.MAP_BLOCK_SIZE) {
-				Log.Error (string.Format ("MapBlockBuffer[{0}].SetPart ({1}, {2}, {3}) has blockMap.size ({4}/{5})",
-					zoomLevel, _offset, _partSize, _pixels.Length, Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE));
+			if (_offset.x + _partSize > Constants.MapBlockSize || _offset.y + _partSize > Constants.MapBlockSize) {
+				Log.Error (
+					$"MapBlockBuffer[{zoomLevel}].SetPart ({_offset}, {_partSize}, {_pixels.Length}) has blockMap.size ({Constants.MapBlockSize}/{Constants.MapBlockSize})");
 				return;
 			}
@@ -107,5 +105,5 @@
 		public Color32[] GetHalfScaled () {
 			Profiler.BeginSample ("HalfScaled.ResizeBuffer");
-			zoomBuffer.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
+			zoomBuffer.Resize (Constants.MapBlockSize, Constants.MapBlockSize);
 			Profiler.EndSample ();
 
@@ -125,5 +123,5 @@
 
 			Profiler.BeginSample ("HalfScaled.Scale");
-			TextureScale.Point (zoomBuffer, Constants.MAP_BLOCK_SIZE / 2, Constants.MAP_BLOCK_SIZE / 2);
+			TextureScale.Point (zoomBuffer, Constants.MapBlockSize / 2, Constants.MapBlockSize / 2);
 			Profiler.EndSample ();
 
@@ -136,7 +134,7 @@
 
 		public void SetPartNative (Vector2i _offset, int _partSize, NativeArray<int> _pixels) {
-			if (_offset.x + _partSize > Constants.MAP_BLOCK_SIZE || _offset.y + _partSize > Constants.MAP_BLOCK_SIZE) {
-				Log.Error (string.Format ("MapBlockBuffer[{0}].SetPart ({1}, {2}, {3}) has blockMap.size ({4}/{5})",
-					zoomLevel, _offset, _partSize, _pixels.Length, Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE));
+			if (_offset.x + _partSize > Constants.MapBlockSize || _offset.y + _partSize > Constants.MapBlockSize) {
+				Log.Error (
+					$"MapBlockBuffer[{zoomLevel}].SetPart ({_offset}, {_partSize}, {_pixels.Length}) has blockMap.size ({Constants.MapBlockSize}/{Constants.MapBlockSize})");
 				return;
 			}
@@ -157,6 +155,6 @@
 		public NativeArray<int> GetHalfScaledNative () {
 			Profiler.BeginSample ("HalfScaledNative.ResizeBuffer");
-			if (zoomBuffer.format != blockMap.format || zoomBuffer.height != Constants.MAP_BLOCK_SIZE / 2 || zoomBuffer.width != Constants.MAP_BLOCK_SIZE / 2) {
-				zoomBuffer.Resize (Constants.MAP_BLOCK_SIZE / 2, Constants.MAP_BLOCK_SIZE / 2, blockMap.format, false);
+			if (zoomBuffer.format != blockMap.format || zoomBuffer.height != Constants.MapBlockSize / 2 || zoomBuffer.width != Constants.MapBlockSize / 2) {
+				zoomBuffer.Resize (Constants.MapBlockSize / 2, Constants.MapBlockSize / 2, blockMap.format, false);
 			}
 			Profiler.EndSample ();
@@ -178,11 +176,11 @@
 			int newHeight = _targetTex.height;
 			
-			float ratioX = ((float) oldWidth) / newWidth;
-			float ratioY = ((float) oldHeight) / newHeight;
-
-			for (var y = 0; y < newHeight; y++) {
-				var oldLineStart = (int) (ratioY * y) * oldWidth;
-				var newLineStart = y * newWidth;
-				for (var x = 0; x < newWidth; x++) {
+			float ratioX = (float) oldWidth / newWidth;
+			float ratioY = (float) oldHeight / newHeight;
+
+			for (int y = 0; y < newHeight; y++) {
+				int oldLineStart = (int) (ratioY * y) * oldWidth;
+				int newLineStart = y * newWidth;
+				for (int x = 0; x < newWidth; x++) {
 					targetData [newLineStart + x] = srcData [(int) (oldLineStart + ratioX * x)];
 				}
@@ -198,6 +196,6 @@
 
 			Profiler.BeginSample ("LoadImage");
-			if (array != null && blockMap.LoadImage (array) && blockMap.height == Constants.MAP_BLOCK_SIZE &&
-			    blockMap.width == Constants.MAP_BLOCK_SIZE) {
+			if (array != null && blockMap.LoadImage (array) && blockMap.height == Constants.MapBlockSize &&
+			    blockMap.width == Constants.MapBlockSize) {
 				Profiler.EndSample ();
 
@@ -211,7 +209,7 @@
 			}
 
-			if (blockMap.format != Constants.DEFAULT_TEX_FORMAT || blockMap.height != Constants.MAP_BLOCK_SIZE ||
-			    blockMap.width != Constants.MAP_BLOCK_SIZE) {
-				blockMap.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE, Constants.DEFAULT_TEX_FORMAT,
+			if (blockMap.format != Constants.DefaultTextureFormat || blockMap.height != Constants.MapBlockSize ||
+			    blockMap.width != Constants.MapBlockSize) {
+				blockMap.Resize (Constants.MapBlockSize, Constants.MapBlockSize, Constants.DefaultTextureFormat,
 					false);
 			}
