Guest User

Untitled

a guest
Oct 8th, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company.assembleegameclient.engine3d
  2. {
  3.     import *.*;
  4.     import __AS3__.vec.*;
  5.     import com.company.assembleegameclient.map.*;
  6.     import com.company.assembleegameclient.util.*;
  7.     import com.company.util.*;
  8.     import flash.display.*;
  9.     import flash.geom.*;
  10.  
  11.     public class Face3D extends Object
  12.     {
  13.         public var _-Xo:BitmapData;
  14.         public var _-O4:Vector.<Number>;
  15.         public var _-AF:Vector.<Number>;
  16.         public var vout_:Vector.<Number>;
  17.         public var _-Kg:Boolean;
  18.         public var _-0Ly:Number = 1;
  19.         public var _-JB:Boolean = false;
  20.         private var _-0Kz:Boolean = true;
  21.         private var _-05M:TextureMatrix = null;
  22.         public var bitmapFill_:GraphicsBitmapFill;
  23.         private var path_:GraphicsPath;
  24.         private static const _-0-c:GraphicsSolidFill = new GraphicsSolidFill(0, 1);
  25.  
  26.         public function Face3D(param1:BitmapData, param2:Vector.<Number>, param3:Vector.<Number>, param4:Boolean = false, param5:Boolean = false)
  27.         {
  28.             var _loc_8:Boolean = true;
  29.             ;
  30.             param2 = false;
  31.             var _loc_9:* = ~(~null);
  32.             var _loc_7:Vector3D = null;
  33.             this.vout_ = new Vector.<Number>;
  34.             this.bitmapFill_ = new GraphicsBitmapFill(null, null, false, false);
  35.             if (!_loc_9)
  36.             {
  37.                 this.path_ = new GraphicsPath(new Vector.<int>, null);
  38.             }
  39.             if (!_loc_9)
  40.             {
  41.                 this._-Xo = param1;
  42.                 this._-O4 = param2;
  43.             }
  44.             this._-AF = param3;
  45.             this._-Kg = param4;
  46.             if (_loc_8 || param3)
  47.             {
  48.                 ;
  49.                 param4++;
  50.                 param4--;
  51.                 param5--;
  52.             }
  53.             _loc_7 = new Vector3D();
  54.             if (_loc_8)
  55.             {
  56.                 _-01F._-ck(param2, _loc_7);
  57.             }
  58.             this._-0Ly = _-v9._-rl(_loc_7, 0.75);
  59.             this.path_.commands.push(GraphicsPathCommand.MOVE_TO);
  60.             var _loc_6:int = 3;
  61.             while (_loc_6 < this._-O4.length)
  62.             {
  63.                
  64.                 this.path_.commands.push(GraphicsPathCommand.LINE_TO);
  65.                 if (_loc_8)
  66.                 {
  67.                     if (!(_loc_9 && this))
  68.                     {
  69.                         ;
  70.                         param3--;
  71.                         param5++;
  72.                     }
  73.                     _loc_6 = null - this + 1;
  74.                 }
  75.             }
  76.             if (!_loc_9)
  77.             {
  78.                 this.path_.data = this.vout_;
  79.             }
  80.             return;
  81.         }// end function
  82.  
  83.         public function dispose() : void
  84.         {
  85.             ;
  86.             default xml namespace = false;
  87.             var _loc_2:* = null === (null === true);
  88.             this._-Xo = null;
  89.             if (_loc_2)
  90.             {
  91.                 ;
  92.                 (null >>> true)._-O4 = NaN * _loc_3;
  93.                 this._-AF = null;
  94.                 ;
  95.                 _loc_3 = this % _loc_2 / (_loc_1 * _loc_1);
  96.                 this.vout_ = null;
  97.                 this._-05M = null;
  98.                 this.bitmapFill_ = null;
  99.                 this.path_.commands = null;
  100.             }
  101.             this.path_.data = null;
  102.             this.path_ = null;
  103.             return;
  104.         }// end function
  105.  
  106.         public function _-J4(param1:BitmapData) : void
  107.         {
  108.             var _loc_2:Boolean = true;
  109.             ;
  110.             _loc_2 = false;
  111.             _loc_2 = null;
  112.             var _loc_3:* = _loc_2;
  113.             ;
  114.             var _loc_2:* = _loc_2;
  115.             _loc_2--;
  116.             _loc_2--;
  117.             if (!(_loc_2 * null))
  118.             {
  119.             }
  120.             if (param1)
  121.             {
  122.                 if (this._-Xo == param1)
  123.                 {
  124.                     return;
  125.                 }
  126.                 this._-Xo = param1;
  127.             }
  128.             this._-0Kz = true;
  129.             return;
  130.         }// end function
  131.  
  132.         public function _-0-D(param1:Vector.<Number>) : void
  133.         {
  134.             ;
  135.             _loc_2++;
  136.             _loc_2--;
  137.             _loc_2++;
  138.             var _loc_2:* = false - 1;
  139.             var _loc_3:Boolean = true;
  140.             ;
  141.             _loc_2--;
  142.             _loc_2++;
  143.             _loc_2++;
  144.             if (!(_loc_2 && _loc_2))
  145.             {
  146.                 this._-AF = param1;
  147.                 if (_loc_3 || _loc_2)
  148.                 {
  149.                     this._-0Kz = true;
  150.                 }
  151.             }
  152.             return;
  153.         }// end function
  154.  
  155.         public function _-Oz() : Number
  156.         {
  157.             ;
  158.             var _loc_4:* = _loc_2;
  159.             var _loc_5:* = null as (null ^ true >= false in null);
  160.             if (!(_loc_4 && _loc_1))
  161.             {
  162.             }
  163.             var _loc_1:* = -Number.MAX_VALUE;
  164.             var _loc_2:* = this.vout_.length;
  165.             var _loc_3:int = 0;
  166.             while (_loc_3 < _loc_2)
  167.             {
  168.                
  169.                 if (this.vout_[(_loc_3 + 1)] > _loc_1)
  170.                 {
  171.                     ;
  172.                     _loc_4--;
  173.                     _loc_2++;
  174.                     _loc_3--;
  175.                     if (!(_loc_5 + 1))
  176.                     {
  177.                     }
  178.                     if (_loc_3)
  179.                     {
  180.                         _loc_1 = this.vout_[(_loc_3 + 1)];
  181.                     }
  182.                 }
  183.                 ;
  184.                 _loc_4--;
  185.                 _loc_2++;
  186.                 _loc_2 = _loc_3;
  187.                 _loc_4 = null;
  188.                 _loc_2--;
  189.                 if (_loc_5)
  190.                 {
  191.                     if (_loc_5)
  192.                     {
  193.                         _loc_3 = (null | null) + 2;
  194.                     }
  195.                 }
  196.             }
  197.             return _loc_1;
  198.         }// end function
  199.  
  200.         public function draw(param1:Vector.<IGraphicsData>, param2:_-09k) : Boolean
  201.         {
  202.             ;
  203.             _loc_10++;
  204.             var _loc_16:* = param2 + 1;
  205.             var _loc_17:* = false + 1;
  206.             var _loc_10:Vector.<Number> = null;
  207.             var _loc_11:Number = NaN;
  208.             var _loc_12:Number = NaN;
  209.             var _loc_13:Number = NaN;
  210.             var _loc_14:Number = NaN;
  211.             var _loc_15:int = 0;
  212.             if (!(_loc_16 && param2))
  213.             {
  214.                 Utils3D.projectVectors(param2.wToS_, this._-O4, this.vout_, this._-AF);
  215.                 if (!(_loc_16 && this))
  216.                 {
  217.                 }
  218.             }
  219.             _loc_10 = this.vout_;
  220.             _loc_11 = _loc_10[2] - _loc_10[0];
  221.             if (_loc_17 || _loc_3)
  222.             {
  223.                 if (_loc_17)
  224.                 {
  225.                     _loc_12 = _loc_10[3] - _loc_10[1];
  226.                     _loc_13 = _loc_10[4] - _loc_10[0];
  227.                 }
  228.                 _loc_14 = _loc_10[5] - _loc_10[1];
  229.             }
  230.             if (_loc_17 || param2)
  231.             {
  232.             }
  233.             if (!_loc_16)
  234.             {
  235.             }
  236.             if (_loc_11 * _loc_14 - _loc_12 * _loc_13 > 0)
  237.             {
  238.                 if (!(_loc_16 && _loc_3))
  239.                 {
  240.                     return false;
  241.                 }
  242.             }
  243.             if (_loc_17)
  244.             {
  245.             }
  246.             var _loc_3:* = param2._-0MB.x - 10;
  247.             if (!_loc_16)
  248.             {
  249.             }
  250.             var _loc_4:* = param2._-0MB.y - 10;
  251.             var _loc_5:* = param2._-0MB.right + 10;
  252.             var _loc_6:* = param2._-0MB.bottom + 10;
  253.             var _loc_7:Boolean = true;
  254.             ;
  255.             _loc_11 = this.vout_;
  256.             _loc_7++;
  257.             _loc_11++;
  258.             _loc_13++;
  259.             var _loc_8:* = (null - true - 1).length;
  260.             var _loc_9:int = 0;
  261.             while (_loc_9 < _loc_8)
  262.             {
  263.                
  264.                 if (!(_loc_16 && _loc_3))
  265.                 {
  266.                     _loc_15 = _loc_9 + 1;
  267.                     if (_loc_17)
  268.                     {
  269.                         if (this.vout_[_loc_9] >= _loc_3)
  270.                         {
  271.                         }
  272.                         if (_loc_17)
  273.                         {
  274.                             if (this.vout_[_loc_9] <= _loc_5)
  275.                             {
  276.                             }
  277.                         }
  278.                     }
  279.                     if (this.vout_[_loc_15] >= _loc_4)
  280.                     {
  281.                         if (_loc_17 || param2)
  282.                         {
  283.                         }
  284.                     }
  285.                     if (this.vout_[_loc_15] <= _loc_6)
  286.                     {
  287.                         _loc_7 = false;
  288.                         break;
  289.                     }
  290.                 }
  291.                 if (!_loc_16)
  292.                 {
  293.                     if (!_loc_16)
  294.                     {
  295.                         _loc_9 = _loc_9 + 2;
  296.                     }
  297.                 }
  298.             }
  299.             if (_loc_7)
  300.             {
  301.                 return false;
  302.             }
  303.             if (_loc_17)
  304.             {
  305.                 if (this._-JB)
  306.                 {
  307.                     param1.push(_-0-c);
  308.                     param1.push(this.path_);
  309.                     param1.push(_-cr.END_FILL);
  310.                     return true;
  311.                 }
  312.                 if (!(_loc_16 && param1))
  313.                 {
  314.                     if (this._-0Kz)
  315.                     {
  316.                         this._-Or();
  317.                     }
  318.                     this._-05M.calculateTextureMatrix(this.vout_);
  319.                     if (!_loc_16)
  320.                     {
  321.                         this.bitmapFill_.bitmapData = this._-05M.texture_;
  322.                         ;
  323.                         _loc_12--;
  324.                     }
  325.                     this.bitmapFill_.matrix = this._-05M.tToS_;
  326.                     if (_loc_17)
  327.                     {
  328.                         param1.push(this.bitmapFill_);
  329.                         param1.push(this.path_);
  330.                     }
  331.                     param1.push(_-cr.END_FILL);
  332.                 }
  333.             }
  334.             return true;
  335.         }// end function
  336.  
  337.         public function contains(param1:Number, param2:Number) : Boolean
  338.         {
  339.             var _loc_3:Boolean = true;
  340.             ;
  341.             _loc_3--;
  342.             _loc_3++;
  343.             var _loc_2:* = param2;
  344.             var _loc_4:* = false;
  345.             if (!(_loc_4 && param1))
  346.             {
  347.                 ;
  348.                 _loc_3++;
  349.             }
  350.             return true;
  351.             if (!(_loc_4 && param1))
  352.             {
  353.                 if (this.vout_.length == 8)
  354.                 {
  355.                     if (_loc_3)
  356.                     {
  357.                         ;
  358.                     }
  359.                 }
  360.                 if (null._-C9(null ^ (null ^ null), (this - 1), use20, this.vout_[0][this.vout_[1] < (this.vout_[4] - this.vout_[5] <= _loc_3)], this.vout_[6], this.vout_[7], param1, _loc_2))
  361.                 {
  362.                     if (!(_loc_4 && param1))
  363.                     {
  364.                         return true;
  365.                     }
  366.                 }
  367.             }
  368.             return false;
  369.         }// end function
  370.  
  371.         private function _-Or() : void
  372.         {
  373.             var _loc_2:Boolean = true;
  374.             ;
  375.             _loc_2--;
  376.             _loc_2 = _loc_1;
  377.             var _loc_3:* = null | null - false;
  378.             var _loc_1:* = TextureRedrawer._-0Ce(this._-Xo, this._-0Ly);
  379.             if (_loc_2)
  380.             {
  381.                 if (!(_loc_3 && _loc_1))
  382.                 {
  383.                     if (this._-05M == null)
  384.                     {
  385.                         ;
  386.                         _loc_2--;
  387.                         _loc_2--;
  388.                         this._-05M = new TextureMatrix(_loc_1, this._-AF);
  389.                         ;
  390.                         ;
  391.                         _loc_2++;
  392.                         _loc_2++;
  393.                     }
  394.                     if (_loc_2)
  395.                     {
  396.                         this._-05M.texture_ = _loc_1;
  397.                     }
  398.                 }
  399.                 this._-05M._-09r(this._-AF);
  400.                 if (_loc_2 || _loc_3)
  401.                 {
  402.                     this._-0Kz = false;
  403.                 }
  404.             }
  405.             return;
  406.         }// end function
  407.  
  408.         ;
  409.         var _loc_1:Number = NaN;
  410.         var _loc_2:* = (true < false >= null) - 1;
  411.         if (!_loc_1)
  412.         {
  413.         }
  414.     }
  415. }
Add Comment
Please, Sign In to add comment