/// <summary> /// Set height information /// </summary> /// <param name="height"></param> /// <param name="ovl"></param> private static void FlattenMap(int height, MinimapManager.MapDrawing ovl) { for (int i = 0; i < ovl.TextureSize; i++) { for (int j = 0; j < ovl.TextureSize; j++) { ovl.HeightFilter.SetPixel(i, j, new Color(height, 0, 0)); } } ovl.HeightFilter.Apply(); }
/// <summary> /// Draw a square starting at every map pin /// </summary> /// <param name="color"></param> /// <param name="ovl"></param> /// <param name="extras"></param> private static void DrawSquaresOnMapPins(Color color, MinimapManager.MapDrawing ovl, bool extras = false) { foreach (var p in Minimap.instance.m_pins) { DrawSquare(ovl.MainTex, MinimapManager.Instance.WorldToOverlayCoords(p.m_pos, ovl.TextureSize), color, 10); if (extras) { DrawSquare(ovl.ForestFilter, MinimapManager.Instance.WorldToOverlayCoords(p.m_pos, ovl.TextureSize), MinimapManager.FilterOff, 10); DrawSquare(ovl.FogFilter, MinimapManager.Instance.WorldToOverlayCoords(p.m_pos, ovl.TextureSize), MinimapManager.FilterOff, 10); DrawSquare(ovl.HeightFilter, MinimapManager.Instance.WorldToOverlayCoords(p.m_pos, ovl.TextureSize), MinimapManager.MeadowHeight, 10); } } ovl.MainTex.Apply(); if (extras) { ovl.FogFilter.Apply(); ovl.ForestFilter.Apply(); ovl.HeightFilter.Apply(); } }