Advertisement
Blizzardo1

Suck it

Jun 25th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.16 KB | None | 0 0
  1.         /// <summary>
  2.         ///     A Completely BOTCHED Function, SOSUMI!
  3.         /// </summary>
  4.         private void PopulateBorderRectangles( ) {
  5.             _borderBoxes = new Box3D[4];
  6.  
  7.             int bBox = _grid.GetUpperBound( 0 );
  8.             int tBox = _grid.GetUpperBound( 1 );
  9.  
  10.             Box b1 = _grid[ 0, tBox ];
  11.             Box b2 = _grid[ bBox, 0 ];
  12.  
  13.             // TopBox
  14.             int tX = 0;
  15.             int tY = 0;
  16.             int tW = Width - 1;
  17.             int tH = GridOffsetY - 1;
  18.  
  19.             // Bottom Box
  20.             int bX = 0;
  21.             int bY = b2.YPosition2 + 1;
  22.             int bW = tW;
  23.             int bH = Height - bY - 1;
  24.  
  25.             // Left Box
  26.             int lX = 0;
  27.             int lY = tH;
  28.             int lW = GridOffsetX - 1;
  29.             int lH = bY - tH;
  30.  
  31.             // Right Box
  32.             int rX = b1.XPosition2 + 1;
  33.             int rY = lY;
  34.             int rW = Width - rX - 1;
  35.             int rH = lH;
  36.  
  37.  
  38.  
  39.             _borderBoxes[ 0 ] = new Box3D( new Rectangle( tX, tY, tW, tH ) );
  40.             _borderBoxes[ 1 ] = new Box3D( new Rectangle( lX, lY, lW, lH ) );
  41.             _borderBoxes[ 2 ] = new Box3D( new Rectangle( rX, rY, rW, rH ) );
  42.             _borderBoxes[ 3 ] = new Box3D( new Rectangle( bX, bY, bW, bH ) );
  43.  
  44.             /*
  45.             // Bullfucking shit - Old Code
  46.             _borderBoxes [ 0 ] = new Box3D( new Rectangle( 0, 0, Width, GridOffsetY - 1 ) );
  47.             _borderBoxes[ 1 ] =
  48.                 new Box3D( new Rectangle( 0, _borderBoxes[ 0 ].Bottom, GridOffsetX - 1,
  49.                     Height - _grid[ _grid.GetUpperBound( 0 ), 0 ].YPosition2 - 1 ) );
  50.             _borderBoxes[ 2 ] =
  51.                 new Box3D(
  52.                     new Rectangle( _grid[ 0, _grid.GetUpperBound( 1 ) ].XPosition2, _borderBoxes[ 0 ].Bottom + 1,
  53.                         Width - _grid[ 0, _grid.GetUpperBound( 1 ) ].XPosition2, Height - _borderBoxes[ 0 ].Bottom - 1 ) );
  54.             _borderBoxes[ 3 ] =
  55.                 new Box3D( new Rectangle( 0, _borderBoxes[ 1 ].Bottom - 1, Width,
  56.                     Height - _grid[ _grid.GetUpperBound( 0 ), 0 ].YPosition2 ) );
  57.                     */
  58.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement