Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company.assembleegameclient.engine3d
- {
- import *.*;
- import __AS3__.vec.*;
- import com.company.assembleegameclient.map.*;
- import com.company.assembleegameclient.util.*;
- import com.company.util.*;
- import flash.display.*;
- import flash.geom.*;
- public class Face3D extends Object
- {
- public var _-Xo:BitmapData;
- public var _-O4:Vector.<Number>;
- public var _-AF:Vector.<Number>;
- public var vout_:Vector.<Number>;
- public var _-Kg:Boolean;
- public var _-0Ly:Number = 1;
- public var _-JB:Boolean = false;
- private var _-0Kz:Boolean = true;
- private var _-05M:TextureMatrix = null;
- public var bitmapFill_:GraphicsBitmapFill;
- private var path_:GraphicsPath;
- private static const _-0-c:GraphicsSolidFill = new GraphicsSolidFill(0, 1);
- public function Face3D(param1:BitmapData, param2:Vector.<Number>, param3:Vector.<Number>, param4:Boolean = false, param5:Boolean = false)
- {
- var _loc_8:Boolean = true;
- ;
- param2 = false;
- var _loc_9:* = ~(~null);
- var _loc_7:Vector3D = null;
- this.vout_ = new Vector.<Number>;
- this.bitmapFill_ = new GraphicsBitmapFill(null, null, false, false);
- if (!_loc_9)
- {
- this.path_ = new GraphicsPath(new Vector.<int>, null);
- }
- if (!_loc_9)
- {
- this._-Xo = param1;
- this._-O4 = param2;
- }
- this._-AF = param3;
- this._-Kg = param4;
- if (_loc_8 || param3)
- {
- ;
- param4++;
- param4--;
- param5--;
- }
- _loc_7 = new Vector3D();
- if (_loc_8)
- {
- _-01F._-ck(param2, _loc_7);
- }
- this._-0Ly = _-v9._-rl(_loc_7, 0.75);
- this.path_.commands.push(GraphicsPathCommand.MOVE_TO);
- var _loc_6:int = 3;
- while (_loc_6 < this._-O4.length)
- {
- this.path_.commands.push(GraphicsPathCommand.LINE_TO);
- if (_loc_8)
- {
- if (!(_loc_9 && this))
- {
- ;
- param3--;
- param5++;
- }
- _loc_6 = null - this + 1;
- }
- }
- if (!_loc_9)
- {
- this.path_.data = this.vout_;
- }
- return;
- }// end function
- public function dispose() : void
- {
- ;
- default xml namespace = false;
- var _loc_2:* = null === (null === true);
- this._-Xo = null;
- if (_loc_2)
- {
- ;
- (null >>> true)._-O4 = NaN * _loc_3;
- this._-AF = null;
- ;
- _loc_3 = this % _loc_2 / (_loc_1 * _loc_1);
- this.vout_ = null;
- this._-05M = null;
- this.bitmapFill_ = null;
- this.path_.commands = null;
- }
- this.path_.data = null;
- this.path_ = null;
- return;
- }// end function
- public function _-J4(param1:BitmapData) : void
- {
- var _loc_2:Boolean = true;
- ;
- _loc_2 = false;
- _loc_2 = null;
- var _loc_3:* = _loc_2;
- ;
- var _loc_2:* = _loc_2;
- _loc_2--;
- _loc_2--;
- if (!(_loc_2 * null))
- {
- }
- if (param1)
- {
- if (this._-Xo == param1)
- {
- return;
- }
- this._-Xo = param1;
- }
- this._-0Kz = true;
- return;
- }// end function
- public function _-0-D(param1:Vector.<Number>) : void
- {
- ;
- _loc_2++;
- _loc_2--;
- _loc_2++;
- var _loc_2:* = false - 1;
- var _loc_3:Boolean = true;
- ;
- _loc_2--;
- _loc_2++;
- _loc_2++;
- if (!(_loc_2 && _loc_2))
- {
- this._-AF = param1;
- if (_loc_3 || _loc_2)
- {
- this._-0Kz = true;
- }
- }
- return;
- }// end function
- public function _-Oz() : Number
- {
- ;
- var _loc_4:* = _loc_2;
- var _loc_5:* = null as (null ^ true >= false in null);
- if (!(_loc_4 && _loc_1))
- {
- }
- var _loc_1:* = -Number.MAX_VALUE;
- var _loc_2:* = this.vout_.length;
- var _loc_3:int = 0;
- while (_loc_3 < _loc_2)
- {
- if (this.vout_[(_loc_3 + 1)] > _loc_1)
- {
- ;
- _loc_4--;
- _loc_2++;
- _loc_3--;
- if (!(_loc_5 + 1))
- {
- }
- if (_loc_3)
- {
- _loc_1 = this.vout_[(_loc_3 + 1)];
- }
- }
- ;
- _loc_4--;
- _loc_2++;
- _loc_2 = _loc_3;
- _loc_4 = null;
- _loc_2--;
- if (_loc_5)
- {
- if (_loc_5)
- {
- _loc_3 = (null | null) + 2;
- }
- }
- }
- return _loc_1;
- }// end function
- public function draw(param1:Vector.<IGraphicsData>, param2:_-09k) : Boolean
- {
- ;
- _loc_10++;
- var _loc_16:* = param2 + 1;
- var _loc_17:* = false + 1;
- var _loc_10:Vector.<Number> = null;
- var _loc_11:Number = NaN;
- var _loc_12:Number = NaN;
- var _loc_13:Number = NaN;
- var _loc_14:Number = NaN;
- var _loc_15:int = 0;
- if (!(_loc_16 && param2))
- {
- Utils3D.projectVectors(param2.wToS_, this._-O4, this.vout_, this._-AF);
- if (!(_loc_16 && this))
- {
- }
- }
- _loc_10 = this.vout_;
- _loc_11 = _loc_10[2] - _loc_10[0];
- if (_loc_17 || _loc_3)
- {
- if (_loc_17)
- {
- _loc_12 = _loc_10[3] - _loc_10[1];
- _loc_13 = _loc_10[4] - _loc_10[0];
- }
- _loc_14 = _loc_10[5] - _loc_10[1];
- }
- if (_loc_17 || param2)
- {
- }
- if (!_loc_16)
- {
- }
- if (_loc_11 * _loc_14 - _loc_12 * _loc_13 > 0)
- {
- if (!(_loc_16 && _loc_3))
- {
- return false;
- }
- }
- if (_loc_17)
- {
- }
- var _loc_3:* = param2._-0MB.x - 10;
- if (!_loc_16)
- {
- }
- var _loc_4:* = param2._-0MB.y - 10;
- var _loc_5:* = param2._-0MB.right + 10;
- var _loc_6:* = param2._-0MB.bottom + 10;
- var _loc_7:Boolean = true;
- ;
- _loc_11 = this.vout_;
- _loc_7++;
- _loc_11++;
- _loc_13++;
- var _loc_8:* = (null - true - 1).length;
- var _loc_9:int = 0;
- while (_loc_9 < _loc_8)
- {
- if (!(_loc_16 && _loc_3))
- {
- _loc_15 = _loc_9 + 1;
- if (_loc_17)
- {
- if (this.vout_[_loc_9] >= _loc_3)
- {
- }
- if (_loc_17)
- {
- if (this.vout_[_loc_9] <= _loc_5)
- {
- }
- }
- }
- if (this.vout_[_loc_15] >= _loc_4)
- {
- if (_loc_17 || param2)
- {
- }
- }
- if (this.vout_[_loc_15] <= _loc_6)
- {
- _loc_7 = false;
- break;
- }
- }
- if (!_loc_16)
- {
- if (!_loc_16)
- {
- _loc_9 = _loc_9 + 2;
- }
- }
- }
- if (_loc_7)
- {
- return false;
- }
- if (_loc_17)
- {
- if (this._-JB)
- {
- param1.push(_-0-c);
- param1.push(this.path_);
- param1.push(_-cr.END_FILL);
- return true;
- }
- if (!(_loc_16 && param1))
- {
- if (this._-0Kz)
- {
- this._-Or();
- }
- this._-05M.calculateTextureMatrix(this.vout_);
- if (!_loc_16)
- {
- this.bitmapFill_.bitmapData = this._-05M.texture_;
- ;
- _loc_12--;
- }
- this.bitmapFill_.matrix = this._-05M.tToS_;
- if (_loc_17)
- {
- param1.push(this.bitmapFill_);
- param1.push(this.path_);
- }
- param1.push(_-cr.END_FILL);
- }
- }
- return true;
- }// end function
- public function contains(param1:Number, param2:Number) : Boolean
- {
- var _loc_3:Boolean = true;
- ;
- _loc_3--;
- _loc_3++;
- var _loc_2:* = param2;
- var _loc_4:* = false;
- if (!(_loc_4 && param1))
- {
- ;
- _loc_3++;
- }
- return true;
- if (!(_loc_4 && param1))
- {
- if (this.vout_.length == 8)
- {
- if (_loc_3)
- {
- ;
- }
- }
- 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))
- {
- if (!(_loc_4 && param1))
- {
- return true;
- }
- }
- }
- return false;
- }// end function
- private function _-Or() : void
- {
- var _loc_2:Boolean = true;
- ;
- _loc_2--;
- _loc_2 = _loc_1;
- var _loc_3:* = null | null - false;
- var _loc_1:* = TextureRedrawer._-0Ce(this._-Xo, this._-0Ly);
- if (_loc_2)
- {
- if (!(_loc_3 && _loc_1))
- {
- if (this._-05M == null)
- {
- ;
- _loc_2--;
- _loc_2--;
- this._-05M = new TextureMatrix(_loc_1, this._-AF);
- ;
- ;
- _loc_2++;
- _loc_2++;
- }
- if (_loc_2)
- {
- this._-05M.texture_ = _loc_1;
- }
- }
- this._-05M._-09r(this._-AF);
- if (_loc_2 || _loc_3)
- {
- this._-0Kz = false;
- }
- }
- return;
- }// end function
- ;
- var _loc_1:Number = NaN;
- var _loc_2:* = (true < false >= null) - 1;
- if (!_loc_1)
- {
- }
- }
- }
Add Comment
Please, Sign In to add comment