コード例 #1
0
        private void ExportToMiniMap()
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            LightingEngine.\u003C\u003Ec__DisplayClass24_0 cDisplayClass240 = new LightingEngine.\u003C\u003Ec__DisplayClass24_0();
            // ISSUE: reference to a compiler-generated field
            cDisplayClass240.\u003C\u003E4__this = this;
            if (!Main.mapEnabled || this._activeProcessedArea.Width <= 0 || this._activeProcessedArea.Height <= 0)
            {
                return;
            }
            // ISSUE: reference to a compiler-generated field
            cDisplayClass240.area = new Rectangle(this._activeProcessedArea.X + 28, this._activeProcessedArea.Y + 28, this._activeProcessedArea.Width - 56, this._activeProcessedArea.Height - 56);
            Rectangle rectangle = new Rectangle(0, 0, Main.maxTilesX, Main.maxTilesY);

            rectangle.Inflate(-Main.Map.BlackEdgeWidth, -Main.Map.BlackEdgeWidth);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            cDisplayClass240.area = Rectangle.Intersect(cDisplayClass240.area, rectangle);
            // ISSUE: reference to a compiler-generated field
            Main.mapMinX = cDisplayClass240.area.Left;
            // ISSUE: reference to a compiler-generated field
            Main.mapMinY = cDisplayClass240.area.Top;
            // ISSUE: reference to a compiler-generated field
            Main.mapMaxX = cDisplayClass240.area.Right;
            // ISSUE: reference to a compiler-generated field
            Main.mapMaxY = cDisplayClass240.area.Bottom;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: method pointer
            FastParallel.For(cDisplayClass240.area.Left, cDisplayClass240.area.Right, new ParallelForAction((object)cDisplayClass240, __methodptr(\u003CExportToMiniMap\u003Eb__0)), (object)null);
            Main.updateMap = true;
        }
コード例 #2
0
ファイル: LightMap.cs プロジェクト: egshels/Sources
 private void BlurPass()
 {
     // ISSUE: method pointer
     FastParallel.For(0, this.Width, new ParallelForAction((object)this, __methodptr(\u003CBlurPass\u003Eb__42_0)), (object)null);
     // ISSUE: method pointer
     FastParallel.For(0, this.Height, new ParallelForAction((object)this, __methodptr(\u003CBlurPass\u003Eb__42_1)), (object)null);
 }
コード例 #3
0
 private void ExportToMiniMap()
 {
     //IL_0114: Unknown result type (might be due to invalid IL or missing references)
     //IL_011f: Expected O, but got Unknown
     if (Main.mapEnabled && _activeProcessedArea.Width > 0 && _activeProcessedArea.Height > 0)
     {
         Rectangle area  = new Rectangle(_activeProcessedArea.X + 28, _activeProcessedArea.Y + 28, _activeProcessedArea.Width - 56, _activeProcessedArea.Height - 56);
         Rectangle value = new Rectangle(0, 0, Main.maxTilesX, Main.maxTilesY);
         value.Inflate(-Main.Map.BlackEdgeWidth, -Main.Map.BlackEdgeWidth);
         area         = Rectangle.Intersect(area, value);
         Main.mapMinX = area.Left;
         Main.mapMinY = area.Top;
         Main.mapMaxX = area.Right;
         Main.mapMaxY = area.Bottom;
         FastParallel.For(area.Left, area.Right, (ParallelForAction)(object)(ParallelForAction) delegate(int start, int end, object context)
         {
             for (int i = start; i < end; i++)
             {
                 for (int j = area.Top; j < area.Bottom; j++)
                 {
                     Vector3 vector = _activeLightMap[i - _activeProcessedArea.X, j - _activeProcessedArea.Y];
                     float num      = Math.Max(Math.Max(vector.X, vector.Y), vector.Z);
                     byte light     = (byte)Math.Min(255, (int)(num * 255f));
                     Main.Map.UpdateLighting(i, j, light);
                 }
             }
         }, (object)null);
         Main.updateMap = true;
     }
 }
コード例 #4
0
 private void BlurPass()
 {
     // really hard to figure out what these two lines are meant to be
     // ISSUE: method pointer
     FastParallel.For(0, this.Width, new ParallelForAction((startIndex, endIndex, context) => BlurLine(startIndex, endIndex, (int)context)));
     // ISSUE: method pointer
     FastParallel.For(0, this.Height, new ParallelForAction((startIndex, endIndex, context) => BlurLine(startIndex, endIndex, (int)context)));
 }
コード例 #5
0
 private void BlurPass()
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0019: Expected O, but got Unknown
     //IL_0027: Unknown result type (might be due to invalid IL or missing references)
     //IL_0032: Expected O, but got Unknown
     FastParallel.For(0, Width, (ParallelForAction) delegate(int start, int end, object context)
     {
         for (int j = start; j < end; j++)
         {
             BlurLine(IndexOf(j, 0), IndexOf(j, Height - 1 - NonVisiblePadding), 1);
             BlurLine(IndexOf(j, Height - 1), IndexOf(j, NonVisiblePadding), -1);
         }
     }, (object)null);
     FastParallel.For(0, Height, (ParallelForAction) delegate(int start, int end, object context)
     {
         for (int i = start; i < end; i++)
         {
             BlurLine(IndexOf(0, i), IndexOf(Width - 1 - NonVisiblePadding, i), Height);
             BlurLine(IndexOf(Width - 1, i), IndexOf(NonVisiblePadding, i), -Height);
         }
     }, (object)null);
 }