Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// A Completely BOTCHED Function, SOSUMI!
- /// </summary>
- private void PopulateBorderRectangles( ) {
- _borderBoxes = new Box3D[4];
- int bBox = _grid.GetUpperBound( 0 );
- int tBox = _grid.GetUpperBound( 1 );
- Box b1 = _grid[ 0, tBox ];
- Box b2 = _grid[ bBox, 0 ];
- // TopBox
- int tX = 0;
- int tY = 0;
- int tW = Width - 1;
- int tH = GridOffsetY - 1;
- // Bottom Box
- int bX = 0;
- int bY = b2.YPosition2 + 1;
- int bW = tW;
- int bH = Height - bY - 1;
- // Left Box
- int lX = 0;
- int lY = tH;
- int lW = GridOffsetX - 1;
- int lH = bY - tH;
- // Right Box
- int rX = b1.XPosition2 + 1;
- int rY = lY;
- int rW = Width - rX - 1;
- int rH = lH;
- _borderBoxes[ 0 ] = new Box3D( new Rectangle( tX, tY, tW, tH ) );
- _borderBoxes[ 1 ] = new Box3D( new Rectangle( lX, lY, lW, lH ) );
- _borderBoxes[ 2 ] = new Box3D( new Rectangle( rX, rY, rW, rH ) );
- _borderBoxes[ 3 ] = new Box3D( new Rectangle( bX, bY, bW, bH ) );
- /*
- // Bullfucking shit - Old Code
- _borderBoxes [ 0 ] = new Box3D( new Rectangle( 0, 0, Width, GridOffsetY - 1 ) );
- _borderBoxes[ 1 ] =
- new Box3D( new Rectangle( 0, _borderBoxes[ 0 ].Bottom, GridOffsetX - 1,
- Height - _grid[ _grid.GetUpperBound( 0 ), 0 ].YPosition2 - 1 ) );
- _borderBoxes[ 2 ] =
- new Box3D(
- new Rectangle( _grid[ 0, _grid.GetUpperBound( 1 ) ].XPosition2, _borderBoxes[ 0 ].Bottom + 1,
- Width - _grid[ 0, _grid.GetUpperBound( 1 ) ].XPosition2, Height - _borderBoxes[ 0 ].Bottom - 1 ) );
- _borderBoxes[ 3 ] =
- new Box3D( new Rectangle( 0, _borderBoxes[ 1 ].Bottom - 1, Width,
- Height - _grid[ _grid.GetUpperBound( 0 ), 0 ].YPosition2 ) );
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement