code
stringlengths
57
237k
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.EnumCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity.CommonFacilityCC; import projects.tanks.client.battlefield.types.Vector3d; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.clients.flash.resources.resource.Tanks3DSResource; public class CodecCommonFacilityCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_facilityObject:ICodec; private var codec_facilityTeam:ICodec; private var codec_facilityTexture:ICodec; private var codec_localCenter:ICodec; private var codec_ownerId:ICodec; private var codec_position:ICodec; private var codec_rotation:ICodec; private var codec_useLight:ICodec; private var codec_useShadows:ICodec; public function CodecCommonFacilityCC() { super(); } public function init(param1:IProtocol) : void { this.codec_facilityObject = param1.getCodec(new TypeCodecInfo(Tanks3DSResource,false)); this.codec_facilityTeam = param1.getCodec(new EnumCodecInfo(BattleTeam,false)); this.codec_facilityTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false)); this.codec_localCenter = param1.getCodec(new TypeCodecInfo(Vector3d,false)); this.codec_ownerId = param1.getCodec(new TypeCodecInfo(Long,false)); this.codec_position = param1.getCodec(new TypeCodecInfo(Vector3d,false)); this.codec_rotation = param1.getCodec(new TypeCodecInfo(Vector3d,false)); this.codec_useLight = param1.getCodec(new TypeCodecInfo(Boolean,false)); this.codec_useShadows = param1.getCodec(new TypeCodecInfo(Boolean,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:CommonFacilityCC = new CommonFacilityCC(); local2.facilityObject = this.codec_facilityObject.decode(param1) as Tanks3DSResource; local2.facilityTeam = this.codec_facilityTeam.decode(param1) as BattleTeam; local2.facilityTexture = this.codec_facilityTexture.decode(param1) as TextureResource; local2.localCenter = this.codec_localCenter.decode(param1) as Vector3d; local2.ownerId = this.codec_ownerId.decode(param1) as Long; local2.position = this.codec_position.decode(param1) as Vector3d; local2.rotation = this.codec_rotation.decode(param1) as Vector3d; local2.useLight = this.codec_useLight.decode(param1) as Boolean; local2.useShadows = this.codec_useShadows.decode(param1) as Boolean; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:CommonFacilityCC = CommonFacilityCC(param2); this.codec_facilityObject.encode(param1,local3.facilityObject); this.codec_facilityTeam.encode(param1,local3.facilityTeam); this.codec_facilityTexture.encode(param1,local3.facilityTexture); this.codec_localCenter.encode(param1,local3.localCenter); this.codec_ownerId.encode(param1,local3.ownerId); this.codec_position.encode(param1,local3.position); this.codec_rotation.encode(param1,local3.rotation); this.codec_useLight.encode(param1,local3.useLight); this.codec_useShadows.encode(param1,local3.useShadows); } } }
package projects.tanks.client.panel.model.rankupbonus.alert { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class RankUpBonusAlertPanelModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function RankUpBonusAlertPanelModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.gui.panel.buttons { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.panel.buttons.MainPanelOrangeWideButton_buttonNormal.png")] public class MainPanelOrangeWideButton_buttonNormal extends BitmapAsset { public function MainPanelOrangeWideButton_buttonNormal() { super(); } } }
package controls.rangicons { import flash.display.Bitmap; import flash.display.DisplayObject; import flash.display.MovieClip; public class RangIconNormal extends RangIcon { [Embed(source="863.png")] private static const p1:Class; [Embed(source="864.png")] private static const p2:Class; [Embed(source="861.png")] private static const p3:Class; [Embed(source="862.png")] private static const p4:Class; [Embed(source="855.png")] private static const p5:Class; [Embed(source="856.png")] private static const p6:Class; [Embed(source="853.png")] private static const p7:Class; [Embed(source="854.png")] private static const p8:Class; [Embed(source="858.png")] private static const p9:Class; private static const p10:Class = RangIconNormal_p10; private static const p11:Class = RangIconNormal_p11; private static const p12:Class = RangIconNormal_p12; private static const p13:Class = RangIconNormal_p13; private static const p14:Class = RangIconNormal_p14; private static const p15:Class = RangIconNormal_p15; private static const p16:Class = RangIconNormal_p16; private static const p17:Class = RangIconNormal_p17; private static const p18:Class = RangIconNormal_p18; private static const p19:Class = RangIconNormal_p19; private static const p20:Class = RangIconNormal_p20; private static const p21:Class = RangIconNormal_p21; private static const p22:Class = RangIconNormal_p22; private static const p23:Class = RangIconNormal_p23; private static const p24:Class = RangIconNormal_p24; private static const p25:Class = RangIconNormal_p25; private static const p26:Class = RangIconNormal_p26; [Embed(source="963.png")] private static const p27:Class; [Embed(source="964.png")] private static const p28:Class; [Embed(source="965.png")] private static const p29:Class; [Embed(source="960.png")] private static const p30:Class; public var g:MovieClip; private var gl:DisplayObject; private var rangs1:Array; public function RangIconNormal(param1:int = 1) { this.rangs1 = [new p1(),new p2(),new p3(),new p4(),new p5(),new p6(),new p7(),new p8(),new p9(),new p10(),new p11(),new p12(),new p13(),new p14(),new p15(),new p16(),new p17(),new p18(),new p19(),new p20(),new p21(),new p22(),new p23(),new p24(),new p25(),new p26(),new p27(),new p28(),new p29(),new p30()]; addFrameScript(0,this.frame1); super(param1); this.removeChildren(); this._rang = param1; this.addChild(new Bitmap(this.rangs1[param1 - 1].bitmapData)); } public function set glow(param1:Boolean) : void { this.gl.visible = param1; } public function set rang1(param1:int) : void { this.removeChildren(); this._rang = param1; this.addChild(new Bitmap(this.rangs1[param1 - 1].bitmapData)); } private function frame1() : void { stop(); } } }
package alternativa.tanks.models.weapon.smoky.sfx { import alternativa.tanks.models.weapon.smoky.ISmokyEffects; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class ISmokySFXModelAdapt implements ISmokySFXModel { private var object:IGameObject; private var impl:ISmokySFXModel; public function ISmokySFXModelAdapt(param1:IGameObject, param2:ISmokySFXModel) { super(); this.object = param1; this.impl = param2; } public function getEffects() : ISmokyEffects { var result:ISmokyEffects = null; try { Model.object = this.object; result = this.impl.getEffects(); } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.models.continuebattle { import alternativa.tanks.service.matchmaking.MatchmakingFormService; import projects.tanks.client.battlefield.models.continuebattle.IMatchmakingContinueBattleModelBase; import projects.tanks.client.battlefield.models.continuebattle.MatchmakingContinueBattleModelBase; [ModelInfo] public class MatchmakingContinueBattleModel extends MatchmakingContinueBattleModelBase implements IMatchmakingContinueBattleModelBase, ContinueBattle { [Inject] public static var matchmakingFormService:MatchmakingFormService; public function MatchmakingContinueBattleModel() { super(); } public function continueBattle() : void { server.continueBattle(matchmakingFormService.getLastRegistrationMode()); } } }
package alternativa.tanks.display.resistance { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.display.resistance.ResistanceShieldIcon_blueShield.png")] public class ResistanceShieldIcon_blueShield extends BitmapAsset { public function ResistanceShieldIcon_blueShield() { super(); } } }
package alternativa.tanks.gui.communication.button { public class TabIcons { public static const newsIconClass:Class = TabIcons_newsIconClass; public static const chatIconClass:Class = TabIcons_chatIconClass; public static const clanChatIconClass:Class = TabIcons_clanChatIconClass; public function TabIcons() { super(); } } }
package _codec.projects.tanks.client.battlefield.models.tankparts.armor.common { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.tankparts.armor.common.HullCommonCC; public class VectorCodecHullCommonCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecHullCommonCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(HullCommonCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<HullCommonCC> = new Vector.<HullCommonCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = HullCommonCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:HullCommonCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<HullCommonCC> = Vector.<HullCommonCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.osgi.service.dump { import alternativa.osgi.service.dump.dumper.IDumper; import flash.utils.Dictionary; public interface IDumpService { function registerDumper(param1:IDumper) : void; function unregisterDumper(param1:String) : void; function dump(param1:Vector.<String>) : String; function get dumpers() : Dictionary; function get dumpersList() : Vector.<IDumper>; } }
package alternativa.tanks.models.tank.resistance { import projects.tanks.client.battlefield.models.user.resistance.TankResistance; [ModelInterface] public interface TankResistances { function getResistance(param1:Boolean) : int; function getResistances() : Vector.<TankResistance>; function updateOthersResistances() : void; } }
package alternativa.tanks.models.weapon.terminator { import alternativa.math.Vector3; import alternativa.physics.Body; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class TerminatorEvents implements Terminator { private var object:IGameObject; private var impl:Vector.<Object>; public function TerminatorEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function primaryCharge(param1:int, param2:int) : void { var i:int = 0; var m:Terminator = null; var time:int = param1; var barrelIndex:int = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Terminator(this.impl[i]); m.primaryCharge(time,barrelIndex); i++; } } finally { Model.popObject(); } } public function primaryShot(param1:int, param2:Vector3, param3:Vector.<Body>, param4:Vector.<Vector3>, param5:int) : void { var i:int = 0; var m:Terminator = null; var time:int = param1; var staticHitPoint:Vector3 = param2; var targets:Vector.<Body> = param3; var targetHitPoints:Vector.<Vector3> = param4; var barrelIndex:int = param5; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Terminator(this.impl[i]); m.primaryShot(time,staticHitPoint,targets,targetHitPoints,barrelIndex); i++; } } finally { Model.popObject(); } } public function primaryDummyShot(param1:int, param2:int) : void { var i:int = 0; var m:Terminator = null; var time:int = param1; var barrelIndex:int = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Terminator(this.impl[i]); m.primaryDummyShot(time,barrelIndex); i++; } } finally { Model.popObject(); } } public function secondaryOpen(param1:int) : void { var i:int = 0; var m:Terminator = null; var time:int = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Terminator(this.impl[i]); m.secondaryOpen(time); i++; } } finally { Model.popObject(); } } public function secondaryHide(param1:int) : void { var i:int = 0; var m:Terminator = null; var time:int = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Terminator(this.impl[i]); m.secondaryHide(time); i++; } } finally { Model.popObject(); } } } }
package alternativa.tanks.model.info.param { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battleselect.model.battle.param.BattleParamInfoCC; public class BattleParamsAdapt implements BattleParams { private var object:IGameObject; private var impl:BattleParams; public function BattleParamsAdapt(param1:IGameObject, param2:BattleParams) { super(); this.object = param1; this.impl = param2; } public function getConstructor() : BattleParamInfoCC { var result:BattleParamInfoCC = null; try { Model.object = this.object; result = this.impl.getConstructor(); } finally { Model.popObject(); } return result; } } }
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.ctf { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.battle.pointbased.ctf.CaptureTheFlagSoundFX; public class VectorCodecCaptureTheFlagSoundFXLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecCaptureTheFlagSoundFXLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(CaptureTheFlagSoundFX,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<CaptureTheFlagSoundFX> = new Vector.<CaptureTheFlagSoundFX>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = CaptureTheFlagSoundFX(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:CaptureTheFlagSoundFX = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<CaptureTheFlagSoundFX> = Vector.<CaptureTheFlagSoundFX>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.tanks.display.usertitle { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.display.usertitle.ProgressBarSkin_weaponRightCls.png")] public class ProgressBarSkin_weaponRightCls extends BitmapAsset { public function ProgressBarSkin_weaponRightCls() { super(); } } }
package alternativa.tanks.model.quest.daily.gui { import alternativa.tanks.model.quest.common.gui.window.CommonQuestView; import alternativa.tanks.model.quest.common.gui.window.buttons.DailyQuestChangeButton; import alternativa.tanks.model.quest.daily.DailyQuestChangeEvent; import alternativa.tanks.service.money.IMoneyService; import controls.base.ThreeLineBigButton; import flash.events.MouseEvent; import projects.tanks.client.panel.model.quest.QuestTypeEnum; import projects.tanks.client.panel.model.quest.daily.DailyQuestInfo; public class DailyQuestItemView extends CommonQuestView { [Inject] public static var moneyService:IMoneyService; public function DailyQuestItemView(param1:DailyQuestInfo) { super(param1); } private function dailyInfo() : DailyQuestInfo { return DailyQuestInfo(questInfo); } override protected function createActionButton() : ThreeLineBigButton { if(questInfo.progress >= questInfo.finishCriteria) { return createGetPrizeButton(); } return this.createChangeButton(); } private function createChangeButton() : ThreeLineBigButton { var local1:DailyQuestChangeButton = new DailyQuestChangeButton(); local1.addEventListener(MouseEvent.CLICK,this.onChangeButtonClick,false,0,true); if(this.dailyInfo().canSkipForFree) { local1.showButtonWithoutCrystals(); } else { local1.showButtonWithCrystals(this.dailyInfo().skipCost); } return ThreeLineBigButton(local1); } private function onChangeButtonClick(param1:MouseEvent) : void { if(this.dailyInfo().canSkipForFree || Boolean(moneyService.checkEnough(this.dailyInfo().skipCost))) { dispatchEvent(new DailyQuestChangeEvent(DailyQuestChangeEvent.DAILY_QUEST_CHANGE,this.dailyInfo())); } } public function updateItemViewWhenQuestChanged(param1:DailyQuestInfo) : void { this.questInfo = param1; questImage.bitmapData = param1.image.data; questInfoPanel.updatePanel(param1); } public function updateChangeCost(param1:int) : void { this.dailyInfo().canSkipForFree = false; this.dailyInfo().skipCost = param1; DailyQuestChangeButton(actionButton).showButtonWithCrystals(param1); } public function actionButtonIsChangeButton() : Boolean { return actionButton is DailyQuestChangeButton; } public function lockActionButton() : void { actionButton.enabled = false; } public function unlockActionButton() : void { actionButton.enabled = true; } override public function destroy() : void { super.destroy(); if(actionButton is DailyQuestChangeButton) { if(actionButton.hasEventListener(MouseEvent.CLICK)) { actionButton.removeEventListener(MouseEvent.CLICK,this.onChangeButtonClick); } (actionButton as DailyQuestChangeButton).removeListeners(); } } override public function getQuestType() : QuestTypeEnum { return QuestTypeEnum.DAILY; } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] public class ItemInfoPanel_shaftResistance extends BitmapAsset { public function ItemInfoPanel_shaftResistance() { super(); } } }
package alternativa.engine3d.containers { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Canvas; import alternativa.engine3d.core.Debug; import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.Object3DContainer; import alternativa.engine3d.core.RayIntersectionData; import alternativa.engine3d.core.VG; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.materials.Material; import alternativa.engine3d.objects.Decal; import alternativa.engine3d.objects.Occluder; import flash.geom.Matrix3D; import flash.geom.Vector3D; import flash.utils.Dictionary; use namespace alternativa3d; public class KDContainer extends ConflictContainer { private static const treeSphere:Vector3D = new Vector3D(); private static const splitCoordsX:Vector.<Number> = new Vector.<Number>(); private static const splitCoordsY:Vector.<Number> = new Vector.<Number>(); private static const splitCoordsZ:Vector.<Number> = new Vector.<Number>(); public var debugAlphaFade:Number = 0.8; public var ignoreChildrenInCollider:Boolean = false; alternativa3d var root:KDNode; private var nearPlaneX:Number; private var nearPlaneY:Number; private var nearPlaneZ:Number; private var nearPlaneOffset:Number; private var farPlaneX:Number; private var farPlaneY:Number; private var farPlaneZ:Number; private var farPlaneOffset:Number; private var leftPlaneX:Number; private var leftPlaneY:Number; private var leftPlaneZ:Number; private var leftPlaneOffset:Number; private var rightPlaneX:Number; private var rightPlaneY:Number; private var rightPlaneZ:Number; private var rightPlaneOffset:Number; private var topPlaneX:Number; private var topPlaneY:Number; private var topPlaneZ:Number; private var topPlaneOffset:Number; private var bottomPlaneX:Number; private var bottomPlaneY:Number; private var bottomPlaneZ:Number; private var bottomPlaneOffset:Number; private var occluders:Vector.<Vertex> = new Vector.<Vertex>(); private var numOccluders:int; public var batched:Boolean = true; public function KDContainer() { super(); } public function createTree(param1:Vector.<Object3D>, param2:Vector.<Occluder> = null) : void { var local3:int = 0; var local4:Object3D = null; var local5:Object3D = null; var local8:Object3D = null; var local9:Object3D = null; var local10:Object3D = null; var local11:Object3D = null; this.destroyTree(); var local6:int = int(param1.length); var local7:int = param2 != null ? int(param2.length) : 0; var local12:Number = 1e+22; var local13:Number = 1e+22; var local14:Number = 1e+22; var local15:Number = -1e+22; var local16:Number = -1e+22; var local17:Number = -1e+22; local3 = 0; while(local3 < local6) { local4 = param1[local3]; local5 = this.createObjectBounds(local4); if(local5.boundMinX <= local5.boundMaxX) { if(local4.alternativa3d::_parent != null) { local4.alternativa3d::_parent.removeChild(local4); } local4.alternativa3d::setParent(this); local4.alternativa3d::next = local8; local8 = local4; local5.alternativa3d::next = local9; local9 = local5; if(local5.boundMinX < local12) { local12 = local5.boundMinX; } if(local5.boundMaxX > local15) { local15 = local5.boundMaxX; } if(local5.boundMinY < local13) { local13 = local5.boundMinY; } if(local5.boundMaxY > local16) { local16 = local5.boundMaxY; } if(local5.boundMinZ < local14) { local14 = local5.boundMinZ; } if(local5.boundMaxZ > local17) { local17 = local5.boundMaxZ; } } local3++; } local3 = 0; while(local3 < local7) { local4 = param2[local3]; local5 = this.createObjectBounds(local4); if(local5.boundMinX <= local5.boundMaxX) { if(!(local5.boundMinX < local12 || local5.boundMaxX > local15 || local5.boundMinY < local13 || local5.boundMaxY > local16 || local5.boundMinZ < local14 || local5.boundMaxZ > local17)) { if(local4.alternativa3d::_parent != null) { local4.alternativa3d::_parent.removeChild(local4); } local4.alternativa3d::setParent(this); local4.alternativa3d::next = local10; local10 = local4; local5.alternativa3d::next = local11; local11 = local5; } } local3++; } if(local8 != null) { this.alternativa3d::root = this.createNode(local8,local9,local10,local11,local12,local13,local14,local15,local16,local17); } } public function destroyTree() : void { if(this.alternativa3d::root != null) { this.destroyNode(this.alternativa3d::root); this.alternativa3d::root = null; } } override public function intersectRay(param1:Vector3D, param2:Vector3D, param3:Dictionary = null, param4:Camera3D = null) : RayIntersectionData { var local6:RayIntersectionData = null; if(param3 != null && Boolean(param3[this])) { return null; } if(!alternativa3d::boundIntersectRay(param1,param2,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ)) { return null; } var local5:RayIntersectionData = super.intersectRay(param1,param2,param3,param4); if(this.alternativa3d::root != null && Boolean(alternativa3d::boundIntersectRay(param1,param2,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ))) { local6 = this.intersectRayNode(this.alternativa3d::root,param1,param2,param3,param4); if(local6 != null && (local5 == null || local6.time < local5.time)) { local5 = local6; } } return local5; } private function intersectRayNode(param1:KDNode, param2:Vector3D, param3:Vector3D, param4:Dictionary, param5:Camera3D) : RayIntersectionData { var local6:RayIntersectionData = null; var local7:Number = NaN; var local8:Object3D = null; var local9:Object3D = null; var local10:Vector3D = null; var local11:Vector3D = null; var local12:Boolean = false; var local13:Boolean = false; var local14:Number = NaN; var local15:Number = NaN; var local16:RayIntersectionData = null; if(param1.negative != null) { local12 = param1.axis == 0; local13 = param1.axis == 1; local14 = (local12 ? param2.x : (local13 ? param2.y : param2.z)) - param1.coord; if(local14 > 0) { if(alternativa3d::boundIntersectRay(param2,param3,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) { local6 = this.intersectRayNode(param1.positive,param2,param3,param4,param5); if(local6 != null) { return local6; } } local7 = local12 ? param3.x : (local13 ? param3.y : param3.z); if(local7 < 0) { local8 = param1.objectList; local9 = param1.objectBoundList; while(local8 != null) { if(alternativa3d::boundIntersectRay(param2,param3,local9.boundMinX,local9.boundMinY,local9.boundMinZ,local9.boundMaxX,local9.boundMaxY,local9.boundMaxZ)) { local8.alternativa3d::composeMatrix(); local8.alternativa3d::invertMatrix(); if(local10 == null) { local10 = new Vector3D(); local11 = new Vector3D(); } local10.x = local8.alternativa3d::ma * param2.x + local8.alternativa3d::mb * param2.y + local8.alternativa3d::mc * param2.z + local8.alternativa3d::md; local10.y = local8.alternativa3d::me * param2.x + local8.alternativa3d::mf * param2.y + local8.alternativa3d::mg * param2.z + local8.alternativa3d::mh; local10.z = local8.alternativa3d::mi * param2.x + local8.alternativa3d::mj * param2.y + local8.alternativa3d::mk * param2.z + local8.alternativa3d::ml; local11.x = local8.alternativa3d::ma * param3.x + local8.alternativa3d::mb * param3.y + local8.alternativa3d::mc * param3.z; local11.y = local8.alternativa3d::me * param3.x + local8.alternativa3d::mf * param3.y + local8.alternativa3d::mg * param3.z; local11.z = local8.alternativa3d::mi * param3.x + local8.alternativa3d::mj * param3.y + local8.alternativa3d::mk * param3.z; local6 = local8.intersectRay(local10,local11,param4,param5); if(local6 != null) { return local6; } } local8 = local8.alternativa3d::next; local9 = local9.alternativa3d::next; } if(alternativa3d::boundIntersectRay(param2,param3,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) { return this.intersectRayNode(param1.negative,param2,param3,param4,param5); } } } else { if(alternativa3d::boundIntersectRay(param2,param3,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) { local6 = this.intersectRayNode(param1.negative,param2,param3,param4,param5); if(local6 != null) { return local6; } } local7 = local12 ? param3.x : (local13 ? param3.y : param3.z); if(local7 > 0) { local8 = param1.objectList; local9 = param1.objectBoundList; while(local8 != null) { if(alternativa3d::boundIntersectRay(param2,param3,local9.boundMinX,local9.boundMinY,local9.boundMinZ,local9.boundMaxX,local9.boundMaxY,local9.boundMaxZ)) { local8.alternativa3d::composeMatrix(); local8.alternativa3d::invertMatrix(); if(local10 == null) { local10 = new Vector3D(); local11 = new Vector3D(); } local10.x = local8.alternativa3d::ma * param2.x + local8.alternativa3d::mb * param2.y + local8.alternativa3d::mc * param2.z + local8.alternativa3d::md; local10.y = local8.alternativa3d::me * param2.x + local8.alternativa3d::mf * param2.y + local8.alternativa3d::mg * param2.z + local8.alternativa3d::mh; local10.z = local8.alternativa3d::mi * param2.x + local8.alternativa3d::mj * param2.y + local8.alternativa3d::mk * param2.z + local8.alternativa3d::ml; local11.x = local8.alternativa3d::ma * param3.x + local8.alternativa3d::mb * param3.y + local8.alternativa3d::mc * param3.z; local11.y = local8.alternativa3d::me * param3.x + local8.alternativa3d::mf * param3.y + local8.alternativa3d::mg * param3.z; local11.z = local8.alternativa3d::mi * param3.x + local8.alternativa3d::mj * param3.y + local8.alternativa3d::mk * param3.z; local6 = local8.intersectRay(local10,local11,param4,param5); if(local6 != null) { return local6; } } local8 = local8.alternativa3d::next; local9 = local9.alternativa3d::next; } if(alternativa3d::boundIntersectRay(param2,param3,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) { return this.intersectRayNode(param1.positive,param2,param3,param4,param5); } } } return null; } local15 = 1e+22; local8 = param1.objectList; while(local8 != null) { local8.alternativa3d::composeMatrix(); local8.alternativa3d::invertMatrix(); if(local10 == null) { local10 = new Vector3D(); local11 = new Vector3D(); } local10.x = local8.alternativa3d::ma * param2.x + local8.alternativa3d::mb * param2.y + local8.alternativa3d::mc * param2.z + local8.alternativa3d::md; local10.y = local8.alternativa3d::me * param2.x + local8.alternativa3d::mf * param2.y + local8.alternativa3d::mg * param2.z + local8.alternativa3d::mh; local10.z = local8.alternativa3d::mi * param2.x + local8.alternativa3d::mj * param2.y + local8.alternativa3d::mk * param2.z + local8.alternativa3d::ml; local11.x = local8.alternativa3d::ma * param3.x + local8.alternativa3d::mb * param3.y + local8.alternativa3d::mc * param3.z; local11.y = local8.alternativa3d::me * param3.x + local8.alternativa3d::mf * param3.y + local8.alternativa3d::mg * param3.z; local11.z = local8.alternativa3d::mi * param3.x + local8.alternativa3d::mj * param3.y + local8.alternativa3d::mk * param3.z; local6 = local8.intersectRay(local10,local11,param4,param5); if(local6 != null && local6.time < local15) { local15 = local6.time; local16 = local6; } local8 = local8.alternativa3d::next; } return local16; } override alternativa3d function checkIntersection(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Dictionary) : Boolean { if(super.alternativa3d::checkIntersection(param1,param2,param3,param4,param5,param6,param7,param8)) { return true; } if(this.alternativa3d::root != null && Boolean(alternativa3d::boundCheckIntersection(param1,param2,param3,param4,param5,param6,param7,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ))) { return this.checkIntersectionNode(this.alternativa3d::root,param1,param2,param3,param4,param5,param6,param7,param8); } return false; } private function checkIntersectionNode(param1:KDNode, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number, param9:Dictionary) : Boolean { var local10:Object3D = null; var local11:Object3D = null; var local12:Number = NaN; var local13:Number = NaN; var local14:Number = NaN; var local15:Number = NaN; var local16:Number = NaN; var local17:Number = NaN; var local18:Number = NaN; var local19:Boolean = false; var local20:Boolean = false; var local21:Number = NaN; var local22:Number = NaN; if(param1.negative != null) { local19 = param1.axis == 0; local20 = param1.axis == 1; local21 = (local19 ? param2 : (local20 ? param3 : param4)) - param1.coord; local22 = local19 ? param5 : (local20 ? param6 : param7); if(local21 > 0) { if(local22 < 0) { local18 = -local21 / local22; if(local18 < param8) { local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) { local10.alternativa3d::composeMatrix(); local10.alternativa3d::invertMatrix(); local12 = local10.alternativa3d::ma * param2 + local10.alternativa3d::mb * param3 + local10.alternativa3d::mc * param4 + local10.alternativa3d::md; local13 = local10.alternativa3d::me * param2 + local10.alternativa3d::mf * param3 + local10.alternativa3d::mg * param4 + local10.alternativa3d::mh; local14 = local10.alternativa3d::mi * param2 + local10.alternativa3d::mj * param3 + local10.alternativa3d::mk * param4 + local10.alternativa3d::ml; local15 = local10.alternativa3d::ma * param5 + local10.alternativa3d::mb * param6 + local10.alternativa3d::mc * param7; local16 = local10.alternativa3d::me * param5 + local10.alternativa3d::mf * param6 + local10.alternativa3d::mg * param7; local17 = local10.alternativa3d::mi * param5 + local10.alternativa3d::mj * param6 + local10.alternativa3d::mk * param7; if(local10.alternativa3d::checkIntersection(local12,local13,local14,local15,local16,local17,param8,param9)) { return true; } } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(Boolean(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) && this.checkIntersectionNode(param1.negative,param2,param3,param4,param5,param6,param7,param8,param9)) { return true; } } } return Boolean(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) && this.checkIntersectionNode(param1.positive,param2,param3,param4,param5,param6,param7,param8,param9); } if(local22 > 0) { local18 = -local21 / local22; if(local18 < param8) { local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) { local10.alternativa3d::composeMatrix(); local10.alternativa3d::invertMatrix(); local12 = local10.alternativa3d::ma * param2 + local10.alternativa3d::mb * param3 + local10.alternativa3d::mc * param4 + local10.alternativa3d::md; local13 = local10.alternativa3d::me * param2 + local10.alternativa3d::mf * param3 + local10.alternativa3d::mg * param4 + local10.alternativa3d::mh; local14 = local10.alternativa3d::mi * param2 + local10.alternativa3d::mj * param3 + local10.alternativa3d::mk * param4 + local10.alternativa3d::ml; local15 = local10.alternativa3d::ma * param5 + local10.alternativa3d::mb * param6 + local10.alternativa3d::mc * param7; local16 = local10.alternativa3d::me * param5 + local10.alternativa3d::mf * param6 + local10.alternativa3d::mg * param7; local17 = local10.alternativa3d::mi * param5 + local10.alternativa3d::mj * param6 + local10.alternativa3d::mk * param7; if(local10.alternativa3d::checkIntersection(local12,local13,local14,local15,local16,local17,param8,param9)) { return true; } } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(Boolean(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) && this.checkIntersectionNode(param1.positive,param2,param3,param4,param5,param6,param7,param8,param9)) { return true; } } } return Boolean(alternativa3d::boundCheckIntersection(param2,param3,param4,param5,param6,param7,param8,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) && this.checkIntersectionNode(param1.negative,param2,param3,param4,param5,param6,param7,param8,param9); } local10 = param1.objectList; while(local10 != null) { local10.alternativa3d::composeMatrix(); local10.alternativa3d::invertMatrix(); local12 = local10.alternativa3d::ma * param2 + local10.alternativa3d::mb * param3 + local10.alternativa3d::mc * param4 + local10.alternativa3d::md; local13 = local10.alternativa3d::me * param2 + local10.alternativa3d::mf * param3 + local10.alternativa3d::mg * param4 + local10.alternativa3d::mh; local14 = local10.alternativa3d::mi * param2 + local10.alternativa3d::mj * param3 + local10.alternativa3d::mk * param4 + local10.alternativa3d::ml; local15 = local10.alternativa3d::ma * param5 + local10.alternativa3d::mb * param6 + local10.alternativa3d::mc * param7; local16 = local10.alternativa3d::me * param5 + local10.alternativa3d::mf * param6 + local10.alternativa3d::mg * param7; local17 = local10.alternativa3d::mi * param5 + local10.alternativa3d::mj * param6 + local10.alternativa3d::mk * param7; if(local10.alternativa3d::checkIntersection(local12,local13,local14,local15,local16,local17,param8,param9)) { return true; } local10 = local10.alternativa3d::next; } return false; } override alternativa3d function collectPlanes(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Vector3D, param5:Vector3D, param6:Vector.<Face>, param7:Dictionary = null) : void { var local9:Object3D = null; if(param7 != null && Boolean(param7[this])) { return; } var local8:Vector3D = alternativa3d::calculateSphere(param1,param2,param3,param4,param5,treeSphere); if(!this.ignoreChildrenInCollider) { if(!alternativa3d::boundIntersectSphere(local8,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ)) { return; } local9 = alternativa3d::childrenList; while(local9 != null) { local9.alternativa3d::composeAndAppend(this); local9.alternativa3d::collectPlanes(param1,param2,param3,param4,param5,param6,param7); local9 = local9.alternativa3d::next; } } if(this.alternativa3d::root != null && Boolean(alternativa3d::boundIntersectSphere(local8,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ))) { this.collectPlanesNode(this.alternativa3d::root,local8,param1,param2,param3,param4,param5,param6,param7); } } private function collectPlanesNode(param1:KDNode, param2:Vector3D, param3:Vector3D, param4:Vector3D, param5:Vector3D, param6:Vector3D, param7:Vector3D, param8:Vector.<Face>, param9:Dictionary = null) : void { var local10:Object3D = null; var local11:Object3D = null; var local12:Boolean = false; var local13:Boolean = false; var local14:Number = NaN; if(param1.negative != null) { local12 = param1.axis == 0; local13 = param1.axis == 1; local14 = (local12 ? param2.x : (local13 ? param2.y : param2.z)) - param1.coord; if(local14 >= param2.w) { if(alternativa3d::boundIntersectSphere(param2,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) { this.collectPlanesNode(param1.positive,param2,param3,param4,param5,param6,param7,param8,param9); } } else if(local14 <= -param2.w) { if(alternativa3d::boundIntersectSphere(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) { this.collectPlanesNode(param1.negative,param2,param3,param4,param5,param6,param7,param8,param9); } } else { local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(alternativa3d::boundIntersectSphere(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) { local10.alternativa3d::composeAndAppend(this); local10.alternativa3d::collectPlanes(param3,param4,param5,param6,param7,param8,param9); } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(alternativa3d::boundIntersectSphere(param2,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ)) { this.collectPlanesNode(param1.positive,param2,param3,param4,param5,param6,param7,param8,param9); } if(alternativa3d::boundIntersectSphere(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ)) { this.collectPlanesNode(param1.negative,param2,param3,param4,param5,param6,param7,param8,param9); } } } else { local10 = param1.objectList; while(local10 != null) { local10.alternativa3d::composeAndAppend(this); local10.alternativa3d::collectPlanes(param3,param4,param5,param6,param7,param8,param9); local10 = local10.alternativa3d::next; } } } public function createDecal(param1:Vector3D, param2:Vector3D, param3:Number, param4:Number, param5:Number, param6:Number, param7:Material) : Decal { var local8:Decal = new Decal(); local8.attenuation = param6; var local9:Matrix3D = new Matrix3D(); local9.appendRotation(param4 * 180 / Math.PI,Vector3D.Z_AXIS); local9.appendRotation(Math.atan2(-param2.z,Math.sqrt(param2.x * param2.x + param2.y * param2.y)) * 180 / Math.PI - 90,Vector3D.X_AXIS); local9.appendRotation(-Math.atan2(-param2.x,-param2.y) * 180 / Math.PI,Vector3D.Z_AXIS); local9.appendTranslation(param1.x,param1.y,param1.z); local8.matrix = local9; local8.alternativa3d::composeMatrix(); local8.boundMinX = -param3; local8.boundMaxX = param3; local8.boundMinY = -param3; local8.boundMaxY = param3; local8.boundMinZ = -param6; local8.boundMaxZ = param6; var local10:Number = 1e+22; var local11:Number = 1e+22; var local12:Number = 1e+22; var local13:Number = -1e+22; var local14:Number = -1e+22; var local15:Number = -1e+22; var local16:Vertex = alternativa3d::boundVertexList; local16.x = local8.boundMinX; local16.y = local8.boundMinY; local16.z = local8.boundMinZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMaxX; local16.y = local8.boundMinY; local16.z = local8.boundMinZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMinX; local16.y = local8.boundMaxY; local16.z = local8.boundMinZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMaxX; local16.y = local8.boundMaxY; local16.z = local8.boundMinZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMinX; local16.y = local8.boundMinY; local16.z = local8.boundMaxZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMaxX; local16.y = local8.boundMinY; local16.z = local8.boundMaxZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMinX; local16.y = local8.boundMaxY; local16.z = local8.boundMaxZ; local16 = local16.alternativa3d::next; local16.x = local8.boundMaxX; local16.y = local8.boundMaxY; local16.z = local8.boundMaxZ; local16 = alternativa3d::boundVertexList; while(local16 != null) { local16.alternativa3d::cameraX = local8.alternativa3d::ma * local16.x + local8.alternativa3d::mb * local16.y + local8.alternativa3d::mc * local16.z + local8.alternativa3d::md; local16.alternativa3d::cameraY = local8.alternativa3d::me * local16.x + local8.alternativa3d::mf * local16.y + local8.alternativa3d::mg * local16.z + local8.alternativa3d::mh; local16.alternativa3d::cameraZ = local8.alternativa3d::mi * local16.x + local8.alternativa3d::mj * local16.y + local8.alternativa3d::mk * local16.z + local8.alternativa3d::ml; if(local16.alternativa3d::cameraX < local10) { local10 = Number(local16.alternativa3d::cameraX); } if(local16.alternativa3d::cameraX > local13) { local13 = Number(local16.alternativa3d::cameraX); } if(local16.alternativa3d::cameraY < local11) { local11 = Number(local16.alternativa3d::cameraY); } if(local16.alternativa3d::cameraY > local14) { local14 = Number(local16.alternativa3d::cameraY); } if(local16.alternativa3d::cameraZ < local12) { local12 = Number(local16.alternativa3d::cameraZ); } if(local16.alternativa3d::cameraZ > local15) { local15 = Number(local16.alternativa3d::cameraZ); } local16 = local16.alternativa3d::next; } local8.alternativa3d::invertMatrix(); if(param5 > Math.PI / 2) { param5 = Math.PI / 2; } if(this.alternativa3d::root != null) { this.alternativa3d::root.collectPolygons(local8,Math.sqrt(param3 * param3 + param3 * param3 + param6 * param6),Math.cos(param5) - 0.001,local10,local13,local11,local14,local12,local15); } if(local8.alternativa3d::faceList != null) { local8.calculateBounds(); } else { local8.boundMinX = -1; local8.boundMinY = -1; local8.boundMinZ = -1; local8.boundMaxX = 1; local8.boundMaxY = 1; local8.boundMaxZ = 1; } local8.setMaterialToAllFaces(param7); return local8; } override public function clone() : Object3D { var local1:KDContainer = new KDContainer(); local1.clonePropertiesFrom(this); return local1; } override protected function clonePropertiesFrom(param1:Object3D) : void { super.clonePropertiesFrom(param1); var local2:KDContainer = param1 as KDContainer; this.debugAlphaFade = local2.debugAlphaFade; if(local2.alternativa3d::root != null) { this.alternativa3d::root = local2.cloneNode(local2.alternativa3d::root,this); } } private function cloneNode(param1:KDNode, param2:Object3DContainer) : KDNode { var local4:Object3D = null; var local5:Object3D = null; var local6:Object3D = null; var local3:KDNode = new KDNode(); local3.axis = param1.axis; local3.coord = param1.coord; local3.minCoord = param1.minCoord; local3.maxCoord = param1.maxCoord; local3.boundMinX = param1.boundMinX; local3.boundMinY = param1.boundMinY; local3.boundMinZ = param1.boundMinZ; local3.boundMaxX = param1.boundMaxX; local3.boundMaxY = param1.boundMaxY; local3.boundMaxZ = param1.boundMaxZ; local4 = param1.objectList; local5 = null; while(local4 != null) { local6 = local4.clone(); if(local3.objectList != null) { local5.alternativa3d::next = local6; } else { local3.objectList = local6; } local5 = local6; local6.alternativa3d::setParent(param2); local4 = local4.alternativa3d::next; } local4 = param1.objectBoundList; local5 = null; while(local4 != null) { local6 = local4.clone(); if(local3.objectBoundList != null) { local5.alternativa3d::next = local6; } else { local3.objectBoundList = local6; } local5 = local6; local4 = local4.alternativa3d::next; } local4 = param1.occluderList; local5 = null; while(local4 != null) { local6 = local4.clone(); if(local3.occluderList != null) { local5.alternativa3d::next = local6; } else { local3.occluderList = local6; } local5 = local6; local6.alternativa3d::setParent(param2); local4 = local4.alternativa3d::next; } local4 = param1.occluderBoundList; local5 = null; while(local4 != null) { local6 = local4.clone(); if(local3.occluderBoundList != null) { local5.alternativa3d::next = local6; } else { local3.occluderBoundList = local6; } local5 = local6; local4 = local4.alternativa3d::next; } if(param1.negative != null) { local3.negative = this.cloneNode(param1.negative,param2); } if(param1.positive != null) { local3.positive = this.cloneNode(param1.positive,param2); } return local3; } override alternativa3d function draw(param1:Camera3D, param2:Canvas) : void { var local3:Canvas = null; var local4:int = 0; var local5:int = 0; var local6:VG = null; var local7:VG = null; var local8:int = 0; var local9:Vertex = null; var local10:Vertex = null; if(this.alternativa3d::root != null) { alternativa3d::calculateInverseMatrix(); this.calculateCameraPlanes(param1.nearClipping,param1.farClipping); local5 = this.cullingInContainer(alternativa3d::culling,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ); if(local5 >= 0) { if(param1.debug && (local4 = int(param1.alternativa3d::checkInDebug(this))) > 0) { local3 = param2.alternativa3d::getChildCanvas(true,false); if(Boolean(local4 & Debug.NODES)) { this.debugNode(this.alternativa3d::root,local5,param1,local3,1); Debug.alternativa3d::drawBounds(param1,local3,this,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ,14496733); } if(Boolean(local4 & Debug.BOUNDS)) { Debug.alternativa3d::drawBounds(param1,local3,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } } local3 = param2.alternativa3d::getChildCanvas(false,true,this,alpha,blendMode,colorTransform,filters); local3.alternativa3d::numDraws = 0; this.numOccluders = 0; if(param1.alternativa3d::numOccluders > 0) { this.updateOccluders(param1); } local6 = alternativa3d::collectVG(param1); local7 = local6; while(local7 != null) { local7.alternativa3d::calculateAABB(alternativa3d::ima,alternativa3d::imb,alternativa3d::imc,alternativa3d::imd,alternativa3d::ime,alternativa3d::imf,alternativa3d::img,alternativa3d::imh,alternativa3d::imi,alternativa3d::imj,alternativa3d::imk,alternativa3d::iml); local7 = local7.alternativa3d::next; } this.drawNode(this.alternativa3d::root,local5,param1,local3,local6); local8 = 0; while(local8 < this.numOccluders) { local9 = this.occluders[local8]; local10 = local9; while(local10.alternativa3d::next != null) { local10 = local10.alternativa3d::next; } local10.alternativa3d::next = Vertex.alternativa3d::collector; Vertex.alternativa3d::collector = local9; this.occluders[local8] = null; local8++; } this.numOccluders = 0; if(local3.alternativa3d::numDraws > 0) { local3.alternativa3d::remChildren(local3.alternativa3d::numDraws); } else { --param2.alternativa3d::numDraws; } } else { super.alternativa3d::draw(param1,param2); } } else { super.alternativa3d::draw(param1,param2); } } override alternativa3d function getVG(param1:Camera3D) : VG { var local3:int = 0; var local2:VG = alternativa3d::collectVG(param1); if(this.alternativa3d::root != null) { this.numOccluders = 0; alternativa3d::calculateInverseMatrix(); this.calculateCameraPlanes(param1.nearClipping,param1.farClipping); local3 = this.cullingInContainer(alternativa3d::culling,this.alternativa3d::root.boundMinX,this.alternativa3d::root.boundMinY,this.alternativa3d::root.boundMinZ,this.alternativa3d::root.boundMaxX,this.alternativa3d::root.boundMaxY,this.alternativa3d::root.boundMaxZ); if(local3 >= 0) { local2 = this.collectVGNode(this.alternativa3d::root,local3,param1,local2); } } alternativa3d::colorizeVG(local2); return local2; } private function collectVGNode(param1:KDNode, param2:int, param3:Camera3D, param4:VG = null) : VG { var local5:VG = null; var local6:VG = null; var local9:VG = null; var local10:int = 0; var local11:int = 0; var local7:Object3D = param1.objectList; var local8:Object3D = param1.objectBoundList; while(local7 != null) { if(local7.visible && ((local7.alternativa3d::culling = param2) == 0 || (local7.alternativa3d::culling = this.cullingInContainer(param2,local8.boundMinX,local8.boundMinY,local8.boundMinZ,local8.boundMaxX,local8.boundMaxY,local8.boundMaxZ)) >= 0)) { local7.alternativa3d::composeAndAppend(this); local9 = local7.alternativa3d::getVG(param3); if(local9 != null) { if(local5 != null) { local6.alternativa3d::next = local9; } else { local5 = local9; local6 = local9; } while(local6.alternativa3d::next != null) { local6 = local6.alternativa3d::next; } } } local7 = local7.alternativa3d::next; local8 = local8.alternativa3d::next; } if(local5 != null) { local6.alternativa3d::next = param4; param4 = local5; } if(param1.negative != null) { local10 = param2 > 0 ? this.cullingInContainer(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ) : 0; local11 = param2 > 0 ? this.cullingInContainer(param2,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ) : 0; if(local10 >= 0) { param4 = this.collectVGNode(param1.negative,local10,param3,param4); } if(local11 >= 0) { param4 = this.collectVGNode(param1.positive,local11,param3,param4); } } return param4; } override alternativa3d function updateBounds(param1:Object3D, param2:Object3D = null) : void { super.alternativa3d::updateBounds(param1,param2); if(this.alternativa3d::root != null) { if(param2 != null) { this.updateBoundsNode(this.alternativa3d::root,param1,param2); } else { if(this.alternativa3d::root.boundMinX < param1.boundMinX) { param1.boundMinX = this.alternativa3d::root.boundMinX; } if(this.alternativa3d::root.boundMaxX > param1.boundMaxX) { param1.boundMaxX = this.alternativa3d::root.boundMaxX; } if(this.alternativa3d::root.boundMinY < param1.boundMinY) { param1.boundMinY = this.alternativa3d::root.boundMinY; } if(this.alternativa3d::root.boundMaxY > param1.boundMaxY) { param1.boundMaxY = this.alternativa3d::root.boundMaxY; } if(this.alternativa3d::root.boundMinZ < param1.boundMinZ) { param1.boundMinZ = this.alternativa3d::root.boundMinZ; } if(this.alternativa3d::root.boundMaxZ > param1.boundMaxZ) { param1.boundMaxZ = this.alternativa3d::root.boundMaxZ; } } } } private function updateBoundsNode(param1:KDNode, param2:Object3D, param3:Object3D) : void { var local4:Object3D = param1.objectList; while(local4 != null) { if(param3 != null) { local4.alternativa3d::composeAndAppend(param3); } else { local4.alternativa3d::composeMatrix(); } local4.alternativa3d::updateBounds(param2,local4); local4 = local4.alternativa3d::next; } if(param1.negative != null) { this.updateBoundsNode(param1.negative,param2,param3); this.updateBoundsNode(param1.positive,param2,param3); } } private function debugNode(param1:KDNode, param2:int, param3:Camera3D, param4:Canvas, param5:Number) : void { var local6:int = 0; var local7:int = 0; if(param1 != null && param1.negative != null) { local6 = param2 > 0 ? this.cullingInContainer(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ) : 0; local7 = param2 > 0 ? this.cullingInContainer(param2,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ) : 0; if(local6 >= 0) { this.debugNode(param1.negative,local6,param3,param4,param5 * this.debugAlphaFade); } Debug.alternativa3d::drawKDNode(param3,param4,this,param1.axis,param1.coord,param1.boundMinX,param1.boundMinY,param1.boundMinZ,param1.boundMaxX,param1.boundMaxY,param1.boundMaxZ,param5); if(local7 >= 0) { this.debugNode(param1.positive,local7,param3,param4,param5 * this.debugAlphaFade); } } } private function drawNode(param1:KDNode, param2:int, param3:Camera3D, param4:Canvas, param5:VG) : void { var local6:int = 0; var local7:VG = null; var local8:VG = null; var local9:VG = null; var local10:VG = null; var local11:Object3D = null; var local12:Object3D = null; var local13:int = 0; var local14:int = 0; var local15:Boolean = false; var local16:Boolean = false; var local17:Number = NaN; var local18:Number = NaN; if(param3.alternativa3d::occludedAll) { while(param5 != null) { local7 = param5.alternativa3d::next; param5.alternativa3d::destroy(); param5 = local7; } return; } if(param1.negative != null) { local13 = param2 > 0 || this.numOccluders > 0 ? this.cullingInContainer(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ) : 0; local14 = param2 > 0 || this.numOccluders > 0 ? this.cullingInContainer(param2,param1.positive.boundMinX,param1.positive.boundMinY,param1.positive.boundMinZ,param1.positive.boundMaxX,param1.positive.boundMaxY,param1.positive.boundMaxZ) : 0; local15 = param1.axis == 0; local16 = param1.axis == 1; if(local13 >= 0 && local14 >= 0) { while(param5 != null) { local7 = param5.alternativa3d::next; if(param5.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param5)) { param5.alternativa3d::destroy(); } else { local17 = local15 ? Number(param5.alternativa3d::boundMinX) : (local16 ? Number(param5.alternativa3d::boundMinY) : Number(param5.alternativa3d::boundMinZ)); local18 = local15 ? Number(param5.alternativa3d::boundMaxX) : (local16 ? Number(param5.alternativa3d::boundMaxY) : Number(param5.alternativa3d::boundMaxZ)); if(local18 <= param1.maxCoord) { if(local17 < param1.minCoord) { param5.alternativa3d::next = local8; local8 = param5; } else { param5.alternativa3d::next = local9; local9 = param5; } } else if(local17 >= param1.minCoord) { param5.alternativa3d::next = local10; local10 = param5; } else { param5.alternativa3d::split(param3,param1.axis == 0 ? 1 : 0,param1.axis == 1 ? 1 : 0,param1.axis == 2 ? 1 : 0,param1.coord,threshold); if(param5.alternativa3d::next != null) { param5.alternativa3d::next.alternativa3d::next = local8; local8 = param5.alternativa3d::next; } if(param5.alternativa3d::faceStruct != null) { param5.alternativa3d::next = local10; local10 = param5; } else { param5.alternativa3d::destroy(); } } } param5 = local7; } if(local15 && alternativa3d::imd > param1.coord || local16 && alternativa3d::imh > param1.coord || !local15 && !local16 && alternativa3d::iml > param1.coord) { this.drawNode(param1.positive,local14,param3,param4,local10); while(local9 != null) { local7 = local9.alternativa3d::next; if(local9.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,local9)) { local9.alternativa3d::draw(param3,param4,threshold,this); } local9.alternativa3d::destroy(); local9 = local7; } local11 = param1.objectList; local12 = param1.objectBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::draw(param3,param4); } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } local11 = param1.occluderList; local12 = param1.occluderBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::draw(param3,param4); } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } if(param1.occluderList != null) { this.updateOccluders(param3); } this.drawNode(param1.negative,local13,param3,param4,local8); } else { this.drawNode(param1.negative,local13,param3,param4,local8); while(local9 != null) { local7 = local9.alternativa3d::next; if(local9.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,local9)) { local9.alternativa3d::draw(param3,param4,threshold,this); } local9.alternativa3d::destroy(); local9 = local7; } local11 = param1.objectList; local12 = param1.objectBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::draw(param3,param4); } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } local11 = param1.occluderList; local12 = param1.occluderBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::draw(param3,param4); } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } if(param1.occluderList != null) { this.updateOccluders(param3); } this.drawNode(param1.positive,local14,param3,param4,local10); } } else if(local13 >= 0) { while(param5 != null) { local7 = param5.alternativa3d::next; if(param5.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param5)) { param5.alternativa3d::destroy(); } else { local17 = local15 ? Number(param5.alternativa3d::boundMinX) : (local16 ? Number(param5.alternativa3d::boundMinY) : Number(param5.alternativa3d::boundMinZ)); local18 = local15 ? Number(param5.alternativa3d::boundMaxX) : (local16 ? Number(param5.alternativa3d::boundMaxY) : Number(param5.alternativa3d::boundMaxZ)); if(local18 <= param1.maxCoord) { param5.alternativa3d::next = local8; local8 = param5; } else if(local17 >= param1.minCoord) { param5.alternativa3d::destroy(); } else { param5.alternativa3d::crop(param3,param1.axis == 0 ? -1 : 0,param1.axis == 1 ? -1 : 0,param1.axis == 2 ? -1 : 0,-param1.coord,threshold); if(param5.alternativa3d::faceStruct != null) { param5.alternativa3d::next = local8; local8 = param5; } else { param5.alternativa3d::destroy(); } } } param5 = local7; } this.drawNode(param1.negative,local13,param3,param4,local8); } else if(local14 >= 0) { while(param5 != null) { local7 = param5.alternativa3d::next; if(param5.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param5)) { param5.alternativa3d::destroy(); } else { local17 = local15 ? Number(param5.alternativa3d::boundMinX) : (local16 ? Number(param5.alternativa3d::boundMinY) : Number(param5.alternativa3d::boundMinZ)); local18 = local15 ? Number(param5.alternativa3d::boundMaxX) : (local16 ? Number(param5.alternativa3d::boundMaxY) : Number(param5.alternativa3d::boundMaxZ)); if(local18 <= param1.maxCoord) { param5.alternativa3d::destroy(); } else if(local17 >= param1.minCoord) { param5.alternativa3d::next = local10; local10 = param5; } else { param5.alternativa3d::crop(param3,param1.axis == 0 ? 1 : 0,param1.axis == 1 ? 1 : 0,param1.axis == 2 ? 1 : 0,param1.coord,threshold); if(param5.alternativa3d::faceStruct != null) { param5.alternativa3d::next = local10; local10 = param5; } else { param5.alternativa3d::destroy(); } } } param5 = local7; } this.drawNode(param1.positive,local14,param3,param4,local10); } else { while(param5 != null) { local7 = param5.alternativa3d::next; param5.alternativa3d::destroy(); param5 = local7; } } } else { if(param1.objectList != null) { if(param1.objectList.alternativa3d::next != null || param5 != null) { while(param5 != null) { local7 = param5.alternativa3d::next; if(param5.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param5)) { param5.alternativa3d::destroy(); } else { param5.alternativa3d::next = local9; local9 = param5; } param5 = local7; } local11 = param1.objectList; local12 = param1.objectBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); param5 = local11.alternativa3d::getVG(param3); while(param5 != null) { local7 = param5.alternativa3d::next; param5.alternativa3d::next = local9; local9 = param5; param5 = local7; } } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } if(local9 != null) { if(local9.alternativa3d::next != null) { alternativa3d::drawConflictGeometry(param3,param4,local9); } else { local9.alternativa3d::draw(param3,param4,threshold,this); local9.alternativa3d::destroy(); } } } else { local11 = param1.objectList; if(local11.visible) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::culling = param2; local11.alternativa3d::draw(param3,param4); } } } else if(param5 != null) { if(param5.alternativa3d::next != null) { if(this.numOccluders > 0) { while(param5 != null) { local7 = param5.alternativa3d::next; if(param5.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param5)) { param5.alternativa3d::destroy(); } else { param5.alternativa3d::next = local9; local9 = param5; } param5 = local7; } if(local9 != null) { if(local9.alternativa3d::next != null) { if(resolveByAABB) { alternativa3d::drawAABBGeometry(param3,param4,local9); } else if(resolveByOOBB) { param5 = local9; while(param5 != null) { param5.alternativa3d::calculateOOBB(this); param5 = param5.alternativa3d::next; } alternativa3d::drawOOBBGeometry(param3,param4,local9); } else { alternativa3d::drawConflictGeometry(param3,param4,local9); } } else { local9.alternativa3d::draw(param3,param4,threshold,this); local9.alternativa3d::destroy(); } } } else { local9 = param5; if(resolveByAABB) { alternativa3d::drawAABBGeometry(param3,param4,local9); } else if(resolveByOOBB) { param5 = local9; while(param5 != null) { param5.alternativa3d::calculateOOBB(this); param5 = param5.alternativa3d::next; } alternativa3d::drawOOBBGeometry(param3,param4,local9); } else { alternativa3d::drawConflictGeometry(param3,param4,local9); } } } else { if(param5.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,param5)) { param5.alternativa3d::draw(param3,param4,threshold,this); } param5.alternativa3d::destroy(); } } local11 = param1.occluderList; local12 = param1.occluderBoundList; while(local11 != null) { if(local11.visible && ((local11.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local11.alternativa3d::culling = this.cullingInContainer(param2,local12.boundMinX,local12.boundMinY,local12.boundMinZ,local12.boundMaxX,local12.boundMaxY,local12.boundMaxZ)) >= 0)) { local11.alternativa3d::composeAndAppend(this); local11.alternativa3d::draw(param3,param4); } local11 = local11.alternativa3d::next; local12 = local12.alternativa3d::next; } if(param1.occluderList != null) { this.updateOccluders(param3); } } } private function createObjectBounds(param1:Object3D) : Object3D { var local2:Object3D = new Object3D(); local2.boundMinX = 1e+22; local2.boundMinY = 1e+22; local2.boundMinZ = 1e+22; local2.boundMaxX = -1e+22; local2.boundMaxY = -1e+22; local2.boundMaxZ = -1e+22; param1.alternativa3d::composeMatrix(); param1.alternativa3d::updateBounds(local2,param1); return local2; } private function createNode(param1:Object3D, param2:Object3D, param3:Object3D, param4:Object3D, param5:Number, param6:Number, param7:Number, param8:Number, param9:Number, param10:Number) : KDNode { var local12:int = 0; var local13:int = 0; var local14:Object3D = null; var local15:Object3D = null; var local16:Number = NaN; var local21:Number = NaN; var local23:int = 0; var local24:int = 0; var local25:Number = NaN; var local26:Number = NaN; var local27:Number = NaN; var local28:Number = NaN; var local29:Object3D = null; var local30:Object3D = null; var local31:Object3D = null; var local32:Object3D = null; var local33:Object3D = null; var local34:Object3D = null; var local35:Object3D = null; var local36:Object3D = null; var local37:Number = NaN; var local38:Number = NaN; var local39:Object3D = null; var local40:Object3D = null; var local41:Number = NaN; var local42:Number = NaN; var local43:Number = NaN; var local44:Number = NaN; var local45:Number = NaN; var local46:Number = NaN; var local47:Number = NaN; var local48:Number = NaN; var local49:Number = NaN; var local50:Number = NaN; var local51:Number = NaN; var local52:Number = NaN; var local11:KDNode = new KDNode(); local11.boundMinX = param5; local11.boundMinY = param6; local11.boundMinZ = param7; local11.boundMaxX = param8; local11.boundMaxY = param9; local11.boundMaxZ = param10; if(param1 == null) { if(param3 != null) { } return local11; } var local17:int = 0; var local18:int = 0; var local19:int = 0; local15 = param2; while(local15 != null) { if(local15.boundMinX > param5 + threshold) { local13 = 0; while(local13 < local17) { if(local15.boundMinX >= splitCoordsX[local13] - threshold && local15.boundMinX <= splitCoordsX[local13] + threshold) { break; } local13++; } if(local13 == local17) { var local53:* = local17++; splitCoordsX[local53] = local15.boundMinX; } } if(local15.boundMaxX < param8 - threshold) { local13 = 0; while(local13 < local17) { if(local15.boundMaxX >= splitCoordsX[local13] - threshold && local15.boundMaxX <= splitCoordsX[local13] + threshold) { break; } local13++; } if(local13 == local17) { local53 = local17++; splitCoordsX[local53] = local15.boundMaxX; } } if(local15.boundMinY > param6 + threshold) { local13 = 0; while(local13 < local18) { if(local15.boundMinY >= splitCoordsY[local13] - threshold && local15.boundMinY <= splitCoordsY[local13] + threshold) { break; } local13++; } if(local13 == local18) { local53 = local18++; splitCoordsY[local53] = local15.boundMinY; } } if(local15.boundMaxY < param9 - threshold) { local13 = 0; while(local13 < local18) { if(local15.boundMaxY >= splitCoordsY[local13] - threshold && local15.boundMaxY <= splitCoordsY[local13] + threshold) { break; } local13++; } if(local13 == local18) { local53 = local18++; splitCoordsY[local53] = local15.boundMaxY; } } if(local15.boundMinZ > param7 + threshold) { local13 = 0; while(local13 < local19) { if(local15.boundMinZ >= splitCoordsZ[local13] - threshold && local15.boundMinZ <= splitCoordsZ[local13] + threshold) { break; } local13++; } if(local13 == local19) { local53 = local19++; splitCoordsZ[local53] = local15.boundMinZ; } } if(local15.boundMaxZ < param10 - threshold) { local13 = 0; while(local13 < local19) { if(local15.boundMaxZ >= splitCoordsZ[local13] - threshold && local15.boundMaxZ <= splitCoordsZ[local13] + threshold) { break; } local13++; } if(local13 == local19) { local53 = local19++; splitCoordsZ[local53] = local15.boundMaxZ; } } local15 = local15.alternativa3d::next; } var local20:int = -1; var local22:Number = 1e+22; local25 = (param9 - param6) * (param10 - param7); local12 = 0; while(local12 < local17) { local16 = splitCoordsX[local12]; local26 = local25 * (local16 - param5); local27 = local25 * (param8 - local16); local23 = 0; local24 = 0; local15 = param2; while(local15 != null) { if(local15.boundMaxX <= local16 + threshold) { if(local15.boundMinX < local16 - threshold) { local23++; } } else { if(local15.boundMinX < local16 - threshold) { break; } local24++; } local15 = local15.alternativa3d::next; } if(local15 == null) { local28 = local26 * local23 + local27 * local24; if(local28 < local22) { local22 = local28; local20 = 0; local21 = local16; } } local12++; } local25 = (param8 - param5) * (param10 - param7); local12 = 0; while(local12 < local18) { local16 = splitCoordsY[local12]; local26 = local25 * (local16 - param6); local27 = local25 * (param9 - local16); local23 = 0; local24 = 0; local15 = param2; while(local15 != null) { if(local15.boundMaxY <= local16 + threshold) { if(local15.boundMinY < local16 - threshold) { local23++; } } else { if(local15.boundMinY < local16 - threshold) { break; } local24++; } local15 = local15.alternativa3d::next; } if(local15 == null) { local28 = local26 * local23 + local27 * local24; if(local28 < local22) { local22 = local28; local20 = 1; local21 = local16; } } local12++; } local25 = (param8 - param5) * (param9 - param6); local12 = 0; while(local12 < local19) { local16 = splitCoordsZ[local12]; local26 = local25 * (local16 - param7); local27 = local25 * (param10 - local16); local23 = 0; local24 = 0; local15 = param2; while(local15 != null) { if(local15.boundMaxZ <= local16 + threshold) { if(local15.boundMinZ < local16 - threshold) { local23++; } } else { if(local15.boundMinZ < local16 - threshold) { break; } local24++; } local15 = local15.alternativa3d::next; } if(local15 == null) { local28 = local26 * local23 + local27 * local24; if(local28 < local22) { local22 = local28; local20 = 2; local21 = local16; } } local12++; } if(local20 < 0) { local11.objectList = param1; local11.objectBoundList = param2; local11.occluderList = param3; local11.occluderBoundList = param4; } else { local11.axis = local20; local11.coord = local21; local11.minCoord = local21 - threshold; local11.maxCoord = local21 + threshold; local14 = param1; local15 = param2; while(local14 != null) { local39 = local14.alternativa3d::next; local40 = local15.alternativa3d::next; local14.alternativa3d::next = null; local15.alternativa3d::next = null; local37 = local20 == 0 ? local15.boundMinX : (local20 == 1 ? local15.boundMinY : local15.boundMinZ); local38 = local20 == 0 ? local15.boundMaxX : (local20 == 1 ? local15.boundMaxY : local15.boundMaxZ); if(local38 <= local21 + threshold) { if(local37 < local21 - threshold) { local14.alternativa3d::next = local29; local29 = local14; local15.alternativa3d::next = local30; local30 = local15; } else { local14.alternativa3d::next = local11.objectList; local11.objectList = local14; local15.alternativa3d::next = local11.objectBoundList; local11.objectBoundList = local15; } } else if(local37 >= local21 - threshold) { local14.alternativa3d::next = local33; local33 = local14; local15.alternativa3d::next = local34; local34 = local15; } local14 = local39; local15 = local40; } local14 = param3; local15 = param4; while(local14 != null) { local39 = local14.alternativa3d::next; local40 = local15.alternativa3d::next; local14.alternativa3d::next = null; local15.alternativa3d::next = null; local37 = local20 == 0 ? local15.boundMinX : (local20 == 1 ? local15.boundMinY : local15.boundMinZ); local38 = local20 == 0 ? local15.boundMaxX : (local20 == 1 ? local15.boundMaxY : local15.boundMaxZ); if(local38 <= local21 + threshold) { if(local37 < local21 - threshold) { local14.alternativa3d::next = local31; local31 = local14; local15.alternativa3d::next = local32; local32 = local15; } else { local14.alternativa3d::next = local11.occluderList; local11.occluderList = local14; local15.alternativa3d::next = local11.occluderBoundList; local11.occluderBoundList = local15; } } else if(local37 >= local21 - threshold) { local14.alternativa3d::next = local35; local35 = local14; local15.alternativa3d::next = local36; local36 = local15; } local14 = local39; local15 = local40; } local41 = local11.boundMinX; local42 = local11.boundMinY; local43 = local11.boundMinZ; local44 = local11.boundMaxX; local45 = local11.boundMaxY; local46 = local11.boundMaxZ; local47 = local11.boundMinX; local48 = local11.boundMinY; local49 = local11.boundMinZ; local50 = local11.boundMaxX; local51 = local11.boundMaxY; local52 = local11.boundMaxZ; if(local20 == 0) { local44 = local21; local47 = local21; } else if(local20 == 1) { local45 = local21; local48 = local21; } else { local46 = local21; local49 = local21; } local11.negative = this.createNode(local29,local30,local31,local32,local41,local42,local43,local44,local45,local46); local11.positive = this.createNode(local33,local34,local35,local36,local47,local48,local49,local50,local51,local52); } return local11; } private function destroyNode(param1:KDNode) : void { var local2:Object3D = null; var local3:Object3D = null; if(param1.negative != null) { this.destroyNode(param1.negative); param1.negative = null; } if(param1.positive != null) { this.destroyNode(param1.positive); param1.positive = null; } local2 = param1.objectList; while(local2 != null) { local3 = local2.alternativa3d::next; local2.alternativa3d::setParent(null); local2.alternativa3d::next = null; local2 = local3; } local2 = param1.objectBoundList; while(local2 != null) { local3 = local2.alternativa3d::next; local2.alternativa3d::next = null; local2 = local3; } local2 = param1.occluderList; while(local2 != null) { local3 = local2.alternativa3d::next; local2.alternativa3d::setParent(null); local2.alternativa3d::next = null; local2 = local3; } local2 = param1.occluderBoundList; while(local2 != null) { local3 = local2.alternativa3d::next; local2.alternativa3d::next = null; local2 = local3; } param1.objectList = null; param1.objectBoundList = null; param1.occluderList = null; param1.occluderBoundList = null; } private function calculateCameraPlanes(param1:Number, param2:Number) : void { this.nearPlaneX = alternativa3d::imc; this.nearPlaneY = alternativa3d::img; this.nearPlaneZ = alternativa3d::imk; this.nearPlaneOffset = (alternativa3d::imc * param1 + alternativa3d::imd) * this.nearPlaneX + (alternativa3d::img * param1 + alternativa3d::imh) * this.nearPlaneY + (alternativa3d::imk * param1 + alternativa3d::iml) * this.nearPlaneZ; this.farPlaneX = -alternativa3d::imc; this.farPlaneY = -alternativa3d::img; this.farPlaneZ = -alternativa3d::imk; this.farPlaneOffset = (alternativa3d::imc * param2 + alternativa3d::imd) * this.farPlaneX + (alternativa3d::img * param2 + alternativa3d::imh) * this.farPlaneY + (alternativa3d::imk * param2 + alternativa3d::iml) * this.farPlaneZ; var local3:Number = -alternativa3d::ima - alternativa3d::imb + alternativa3d::imc; var local4:Number = -alternativa3d::ime - alternativa3d::imf + alternativa3d::img; var local5:Number = -alternativa3d::imi - alternativa3d::imj + alternativa3d::imk; var local6:Number = alternativa3d::ima - alternativa3d::imb + alternativa3d::imc; var local7:Number = alternativa3d::ime - alternativa3d::imf + alternativa3d::img; var local8:Number = alternativa3d::imi - alternativa3d::imj + alternativa3d::imk; this.topPlaneX = local8 * local4 - local7 * local5; this.topPlaneY = local6 * local5 - local8 * local3; this.topPlaneZ = local7 * local3 - local6 * local4; this.topPlaneOffset = alternativa3d::imd * this.topPlaneX + alternativa3d::imh * this.topPlaneY + alternativa3d::iml * this.topPlaneZ; local3 = local6; local4 = local7; local5 = local8; local6 = alternativa3d::ima + alternativa3d::imb + alternativa3d::imc; local7 = alternativa3d::ime + alternativa3d::imf + alternativa3d::img; local8 = alternativa3d::imi + alternativa3d::imj + alternativa3d::imk; this.rightPlaneX = local8 * local4 - local7 * local5; this.rightPlaneY = local6 * local5 - local8 * local3; this.rightPlaneZ = local7 * local3 - local6 * local4; this.rightPlaneOffset = alternativa3d::imd * this.rightPlaneX + alternativa3d::imh * this.rightPlaneY + alternativa3d::iml * this.rightPlaneZ; local3 = local6; local4 = local7; local5 = local8; local6 = -alternativa3d::ima + alternativa3d::imb + alternativa3d::imc; local7 = -alternativa3d::ime + alternativa3d::imf + alternativa3d::img; local8 = -alternativa3d::imi + alternativa3d::imj + alternativa3d::imk; this.bottomPlaneX = local8 * local4 - local7 * local5; this.bottomPlaneY = local6 * local5 - local8 * local3; this.bottomPlaneZ = local7 * local3 - local6 * local4; this.bottomPlaneOffset = alternativa3d::imd * this.bottomPlaneX + alternativa3d::imh * this.bottomPlaneY + alternativa3d::iml * this.bottomPlaneZ; local3 = local6; local4 = local7; local5 = local8; local6 = -alternativa3d::ima - alternativa3d::imb + alternativa3d::imc; local7 = -alternativa3d::ime - alternativa3d::imf + alternativa3d::img; local8 = -alternativa3d::imi - alternativa3d::imj + alternativa3d::imk; this.leftPlaneX = local8 * local4 - local7 * local5; this.leftPlaneY = local6 * local5 - local8 * local3; this.leftPlaneZ = local7 * local3 - local6 * local4; this.leftPlaneOffset = alternativa3d::imd * this.leftPlaneX + alternativa3d::imh * this.leftPlaneY + alternativa3d::iml * this.leftPlaneZ; } private function updateOccluders(param1:Camera3D) : void { var local3:Vertex = null; var local4:Vertex = null; var local5:Vertex = null; var local6:Number = NaN; var local7:Number = NaN; var local8:Number = NaN; var local9:Number = NaN; var local10:Number = NaN; var local11:Number = NaN; var local2:int = this.numOccluders; while(local2 < param1.alternativa3d::numOccluders) { local3 = null; local4 = param1.alternativa3d::occluders[local2]; while(local4 != null) { local5 = local4.alternativa3d::create(); local5.alternativa3d::next = local3; local3 = local5; local6 = alternativa3d::ima * local4.x + alternativa3d::imb * local4.y + alternativa3d::imc * local4.z; local7 = alternativa3d::ime * local4.x + alternativa3d::imf * local4.y + alternativa3d::img * local4.z; local8 = alternativa3d::imi * local4.x + alternativa3d::imj * local4.y + alternativa3d::imk * local4.z; local9 = alternativa3d::ima * local4.u + alternativa3d::imb * local4.v + alternativa3d::imc * local4.alternativa3d::offset; local10 = alternativa3d::ime * local4.u + alternativa3d::imf * local4.v + alternativa3d::img * local4.alternativa3d::offset; local11 = alternativa3d::imi * local4.u + alternativa3d::imj * local4.v + alternativa3d::imk * local4.alternativa3d::offset; local3.x = local11 * local7 - local10 * local8; local3.y = local9 * local8 - local11 * local6; local3.z = local10 * local6 - local9 * local7; local3.alternativa3d::offset = alternativa3d::imd * local3.x + alternativa3d::imh * local3.y + alternativa3d::iml * local3.z; local4 = local4.alternativa3d::next; } this.occluders[this.numOccluders] = local3; ++this.numOccluders; local2++; } } private function cullingInContainer(param1:int, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number) : int { var local9:Vertex = null; if(param1 > 0) { if(Boolean(param1 & 1)) { if(this.nearPlaneX >= 0) { if(this.nearPlaneY >= 0) { if(this.nearPlaneZ >= 0) { if(param5 * this.nearPlaneX + param6 * this.nearPlaneY + param7 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param2 * this.nearPlaneX + param3 * this.nearPlaneY + param4 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } else { if(param5 * this.nearPlaneX + param6 * this.nearPlaneY + param4 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param2 * this.nearPlaneX + param3 * this.nearPlaneY + param7 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } } else if(this.nearPlaneZ >= 0) { if(param5 * this.nearPlaneX + param3 * this.nearPlaneY + param7 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param2 * this.nearPlaneX + param6 * this.nearPlaneY + param4 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } else { if(param5 * this.nearPlaneX + param3 * this.nearPlaneY + param4 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param2 * this.nearPlaneX + param6 * this.nearPlaneY + param7 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } } else if(this.nearPlaneY >= 0) { if(this.nearPlaneZ >= 0) { if(param2 * this.nearPlaneX + param6 * this.nearPlaneY + param7 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param5 * this.nearPlaneX + param3 * this.nearPlaneY + param4 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } else { if(param2 * this.nearPlaneX + param6 * this.nearPlaneY + param4 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param5 * this.nearPlaneX + param3 * this.nearPlaneY + param7 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } } else if(this.nearPlaneZ >= 0) { if(param2 * this.nearPlaneX + param3 * this.nearPlaneY + param7 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param5 * this.nearPlaneX + param6 * this.nearPlaneY + param4 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } else { if(param2 * this.nearPlaneX + param3 * this.nearPlaneY + param4 * this.nearPlaneZ <= this.nearPlaneOffset) { return -1; } if(param5 * this.nearPlaneX + param6 * this.nearPlaneY + param7 * this.nearPlaneZ > this.nearPlaneOffset) { param1 &= 62; } } } if(Boolean(param1 & 2)) { if(this.farPlaneX >= 0) { if(this.farPlaneY >= 0) { if(this.farPlaneZ >= 0) { if(param5 * this.farPlaneX + param6 * this.farPlaneY + param7 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param2 * this.farPlaneX + param3 * this.farPlaneY + param4 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } else { if(param5 * this.farPlaneX + param6 * this.farPlaneY + param4 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param2 * this.farPlaneX + param3 * this.farPlaneY + param7 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } } else if(this.farPlaneZ >= 0) { if(param5 * this.farPlaneX + param3 * this.farPlaneY + param7 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param2 * this.farPlaneX + param6 * this.farPlaneY + param4 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } else { if(param5 * this.farPlaneX + param3 * this.farPlaneY + param4 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param2 * this.farPlaneX + param6 * this.farPlaneY + param7 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } } else if(this.farPlaneY >= 0) { if(this.farPlaneZ >= 0) { if(param2 * this.farPlaneX + param6 * this.farPlaneY + param7 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param5 * this.farPlaneX + param3 * this.farPlaneY + param4 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } else { if(param2 * this.farPlaneX + param6 * this.farPlaneY + param4 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param5 * this.farPlaneX + param3 * this.farPlaneY + param7 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } } else if(this.farPlaneZ >= 0) { if(param2 * this.farPlaneX + param3 * this.farPlaneY + param7 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param5 * this.farPlaneX + param6 * this.farPlaneY + param4 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } else { if(param2 * this.farPlaneX + param3 * this.farPlaneY + param4 * this.farPlaneZ <= this.farPlaneOffset) { return -1; } if(param5 * this.farPlaneX + param6 * this.farPlaneY + param7 * this.farPlaneZ > this.farPlaneOffset) { param1 &= 61; } } } if(Boolean(param1 & 4)) { if(this.leftPlaneX >= 0) { if(this.leftPlaneY >= 0) { if(this.leftPlaneZ >= 0) { if(param5 * this.leftPlaneX + param6 * this.leftPlaneY + param7 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param2 * this.leftPlaneX + param3 * this.leftPlaneY + param4 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } else { if(param5 * this.leftPlaneX + param6 * this.leftPlaneY + param4 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param2 * this.leftPlaneX + param3 * this.leftPlaneY + param7 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } } else if(this.leftPlaneZ >= 0) { if(param5 * this.leftPlaneX + param3 * this.leftPlaneY + param7 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param2 * this.leftPlaneX + param6 * this.leftPlaneY + param4 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } else { if(param5 * this.leftPlaneX + param3 * this.leftPlaneY + param4 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param2 * this.leftPlaneX + param6 * this.leftPlaneY + param7 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } } else if(this.leftPlaneY >= 0) { if(this.leftPlaneZ >= 0) { if(param2 * this.leftPlaneX + param6 * this.leftPlaneY + param7 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param5 * this.leftPlaneX + param3 * this.leftPlaneY + param4 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } else { if(param2 * this.leftPlaneX + param6 * this.leftPlaneY + param4 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param5 * this.leftPlaneX + param3 * this.leftPlaneY + param7 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } } else if(this.leftPlaneZ >= 0) { if(param2 * this.leftPlaneX + param3 * this.leftPlaneY + param7 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param5 * this.leftPlaneX + param6 * this.leftPlaneY + param4 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } else { if(param2 * this.leftPlaneX + param3 * this.leftPlaneY + param4 * this.leftPlaneZ <= this.leftPlaneOffset) { return -1; } if(param5 * this.leftPlaneX + param6 * this.leftPlaneY + param7 * this.leftPlaneZ > this.leftPlaneOffset) { param1 &= 59; } } } if(Boolean(param1 & 8)) { if(this.rightPlaneX >= 0) { if(this.rightPlaneY >= 0) { if(this.rightPlaneZ >= 0) { if(param5 * this.rightPlaneX + param6 * this.rightPlaneY + param7 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param2 * this.rightPlaneX + param3 * this.rightPlaneY + param4 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } else { if(param5 * this.rightPlaneX + param6 * this.rightPlaneY + param4 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param2 * this.rightPlaneX + param3 * this.rightPlaneY + param7 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } } else if(this.rightPlaneZ >= 0) { if(param5 * this.rightPlaneX + param3 * this.rightPlaneY + param7 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param2 * this.rightPlaneX + param6 * this.rightPlaneY + param4 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } else { if(param5 * this.rightPlaneX + param3 * this.rightPlaneY + param4 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param2 * this.rightPlaneX + param6 * this.rightPlaneY + param7 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } } else if(this.rightPlaneY >= 0) { if(this.rightPlaneZ >= 0) { if(param2 * this.rightPlaneX + param6 * this.rightPlaneY + param7 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param5 * this.rightPlaneX + param3 * this.rightPlaneY + param4 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } else { if(param2 * this.rightPlaneX + param6 * this.rightPlaneY + param4 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param5 * this.rightPlaneX + param3 * this.rightPlaneY + param7 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } } else if(this.rightPlaneZ >= 0) { if(param2 * this.rightPlaneX + param3 * this.rightPlaneY + param7 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param5 * this.rightPlaneX + param6 * this.rightPlaneY + param4 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } else { if(param2 * this.rightPlaneX + param3 * this.rightPlaneY + param4 * this.rightPlaneZ <= this.rightPlaneOffset) { return -1; } if(param5 * this.rightPlaneX + param6 * this.rightPlaneY + param7 * this.rightPlaneZ > this.rightPlaneOffset) { param1 &= 55; } } } if(Boolean(param1 & 0x10)) { if(this.topPlaneX >= 0) { if(this.topPlaneY >= 0) { if(this.topPlaneZ >= 0) { if(param5 * this.topPlaneX + param6 * this.topPlaneY + param7 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param2 * this.topPlaneX + param3 * this.topPlaneY + param4 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } else { if(param5 * this.topPlaneX + param6 * this.topPlaneY + param4 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param2 * this.topPlaneX + param3 * this.topPlaneY + param7 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } } else if(this.topPlaneZ >= 0) { if(param5 * this.topPlaneX + param3 * this.topPlaneY + param7 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param2 * this.topPlaneX + param6 * this.topPlaneY + param4 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } else { if(param5 * this.topPlaneX + param3 * this.topPlaneY + param4 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param2 * this.topPlaneX + param6 * this.topPlaneY + param7 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } } else if(this.topPlaneY >= 0) { if(this.topPlaneZ >= 0) { if(param2 * this.topPlaneX + param6 * this.topPlaneY + param7 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param5 * this.topPlaneX + param3 * this.topPlaneY + param4 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } else { if(param2 * this.topPlaneX + param6 * this.topPlaneY + param4 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param5 * this.topPlaneX + param3 * this.topPlaneY + param7 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } } else if(this.topPlaneZ >= 0) { if(param2 * this.topPlaneX + param3 * this.topPlaneY + param7 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param5 * this.topPlaneX + param6 * this.topPlaneY + param4 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } else { if(param2 * this.topPlaneX + param3 * this.topPlaneY + param4 * this.topPlaneZ <= this.topPlaneOffset) { return -1; } if(param5 * this.topPlaneX + param6 * this.topPlaneY + param7 * this.topPlaneZ > this.topPlaneOffset) { param1 &= 47; } } } if(Boolean(param1 & 0x20)) { if(this.bottomPlaneX >= 0) { if(this.bottomPlaneY >= 0) { if(this.bottomPlaneZ >= 0) { if(param5 * this.bottomPlaneX + param6 * this.bottomPlaneY + param7 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param2 * this.bottomPlaneX + param3 * this.bottomPlaneY + param4 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } else { if(param5 * this.bottomPlaneX + param6 * this.bottomPlaneY + param4 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param2 * this.bottomPlaneX + param3 * this.bottomPlaneY + param7 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } } else if(this.bottomPlaneZ >= 0) { if(param5 * this.bottomPlaneX + param3 * this.bottomPlaneY + param7 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param2 * this.bottomPlaneX + param6 * this.bottomPlaneY + param4 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } else { if(param5 * this.bottomPlaneX + param3 * this.bottomPlaneY + param4 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param2 * this.bottomPlaneX + param6 * this.bottomPlaneY + param7 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } } else if(this.bottomPlaneY >= 0) { if(this.bottomPlaneZ >= 0) { if(param2 * this.bottomPlaneX + param6 * this.bottomPlaneY + param7 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param5 * this.bottomPlaneX + param3 * this.bottomPlaneY + param4 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } else { if(param2 * this.bottomPlaneX + param6 * this.bottomPlaneY + param4 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param5 * this.bottomPlaneX + param3 * this.bottomPlaneY + param7 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } } else if(this.bottomPlaneZ >= 0) { if(param2 * this.bottomPlaneX + param3 * this.bottomPlaneY + param7 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param5 * this.bottomPlaneX + param6 * this.bottomPlaneY + param4 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } else { if(param2 * this.bottomPlaneX + param3 * this.bottomPlaneY + param4 * this.bottomPlaneZ <= this.bottomPlaneOffset) { return -1; } if(param5 * this.bottomPlaneX + param6 * this.bottomPlaneY + param7 * this.bottomPlaneZ > this.bottomPlaneOffset) { param1 &= 31; } } } } var local8:int = 0; while(true) { if(local8 >= this.numOccluders) { return param1; } local9 = this.occluders[local8]; while(local9 != null) { if(local9.x >= 0) { if(local9.y >= 0) { if(local9.z >= 0) { if(param5 * local9.x + param6 * local9.y + param7 * local9.z > local9.alternativa3d::offset) { break; } } else if(param5 * local9.x + param6 * local9.y + param4 * local9.z > local9.alternativa3d::offset) { break; } } else if(local9.z >= 0) { if(param5 * local9.x + param3 * local9.y + param7 * local9.z > local9.alternativa3d::offset) { break; } } else if(param5 * local9.x + param3 * local9.y + param4 * local9.z > local9.alternativa3d::offset) { break; } } else if(local9.y >= 0) { if(local9.z >= 0) { if(param2 * local9.x + param6 * local9.y + param7 * local9.z > local9.alternativa3d::offset) { break; } } else if(param2 * local9.x + param6 * local9.y + param4 * local9.z > local9.alternativa3d::offset) { break; } } else if(local9.z >= 0) { if(param2 * local9.x + param3 * local9.y + param7 * local9.z > local9.alternativa3d::offset) { break; } } else if(param2 * local9.x + param3 * local9.y + param4 * local9.z > local9.alternativa3d::offset) { break; } local9 = local9.alternativa3d::next; } if(local9 == null) { break; } local8++; } return -1; } private function occludeGeometry(param1:Camera3D, param2:VG) : Boolean { var local4:Vertex = null; var local3:int = int(param2.alternativa3d::numOccluders); while(true) { if(local3 >= this.numOccluders) { param2.alternativa3d::numOccluders = this.numOccluders; return false; } local4 = this.occluders[local3]; while(local4 != null) { if(local4.x >= 0) { if(local4.y >= 0) { if(local4.z >= 0) { if(param2.alternativa3d::boundMaxX * local4.x + param2.alternativa3d::boundMaxY * local4.y + param2.alternativa3d::boundMaxZ * local4.z > local4.alternativa3d::offset) { break; } } else if(param2.alternativa3d::boundMaxX * local4.x + param2.alternativa3d::boundMaxY * local4.y + param2.alternativa3d::boundMinZ * local4.z > local4.alternativa3d::offset) { break; } } else if(local4.z >= 0) { if(param2.alternativa3d::boundMaxX * local4.x + param2.alternativa3d::boundMinY * local4.y + param2.alternativa3d::boundMaxZ * local4.z > local4.alternativa3d::offset) { break; } } else if(param2.alternativa3d::boundMaxX * local4.x + param2.alternativa3d::boundMinY * local4.y + param2.alternativa3d::boundMinZ * local4.z > local4.alternativa3d::offset) { break; } } else if(local4.y >= 0) { if(local4.z >= 0) { if(param2.alternativa3d::boundMinX * local4.x + param2.alternativa3d::boundMaxY * local4.y + param2.alternativa3d::boundMaxZ * local4.z > local4.alternativa3d::offset) { break; } } else if(param2.alternativa3d::boundMinX * local4.x + param2.alternativa3d::boundMaxY * local4.y + param2.alternativa3d::boundMinZ * local4.z > local4.alternativa3d::offset) { break; } } else if(local4.z >= 0) { if(param2.alternativa3d::boundMinX * local4.x + param2.alternativa3d::boundMinY * local4.y + param2.alternativa3d::boundMaxZ * local4.z > local4.alternativa3d::offset) { break; } } else if(param2.alternativa3d::boundMinX * local4.x + param2.alternativa3d::boundMinY * local4.y + param2.alternativa3d::boundMinZ * local4.z > local4.alternativa3d::offset) { break; } local4 = local4.alternativa3d::next; } if(local4 == null) { break; } local3++; } return true; } } } import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.core.Wrapper; import alternativa.engine3d.objects.BSP; import alternativa.engine3d.objects.Decal; import alternativa.engine3d.objects.Mesh; use namespace alternativa3d; class KDNode { public var negative:KDNode; public var positive:KDNode; public var axis:int; public var coord:Number; public var minCoord:Number; public var maxCoord:Number; public var boundMinX:Number; public var boundMinY:Number; public var boundMinZ:Number; public var boundMaxX:Number; public var boundMaxY:Number; public var boundMaxZ:Number; public var objectList:Object3D; public var objectBoundList:Object3D; public var occluderList:Object3D; public var occluderBoundList:Object3D; public function KDNode() { super(); } public function collectPolygons(param1:Decal, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number, param9:Number) : void { var local10:Object3D = null; var local11:Object3D = null; var local12:Boolean = false; var local13:Boolean = false; var local14:Number = NaN; var local15:Number = NaN; if(this.negative != null) { local12 = this.axis == 0; local13 = this.axis == 1; local14 = local12 ? param4 : (local13 ? param6 : param8); local15 = local12 ? param5 : (local13 ? param7 : param9); if(local15 <= this.maxCoord) { this.negative.collectPolygons(param1,param2,param3,param4,param5,param6,param7,param8,param9); } else if(local14 >= this.minCoord) { this.positive.collectPolygons(param1,param2,param3,param4,param5,param6,param7,param8,param9); } else { local11 = this.objectBoundList; local10 = this.objectList; while(local11 != null) { if(local12) { if(param6 < local11.boundMaxY && param7 > local11.boundMinY && param8 < local11.boundMaxZ && param9 > local11.boundMinZ) { this.clip(param1,param2,param3,local10); } } else if(local13) { if(param4 < local11.boundMaxX && param5 > local11.boundMinX && param8 < local11.boundMaxZ && param9 > local11.boundMinZ) { this.clip(param1,param2,param3,local10); } } else if(param4 < local11.boundMaxX && param5 > local11.boundMinX && param6 < local11.boundMaxY && param7 > local11.boundMinY) { this.clip(param1,param2,param3,local10); } local11 = local11.alternativa3d::next; local10 = local10.alternativa3d::next; } this.negative.collectPolygons(param1,param2,param3,param4,param5,param6,param7,param8,param9); this.positive.collectPolygons(param1,param2,param3,param4,param5,param6,param7,param8,param9); } } else { local10 = this.objectList; while(local10 != null) { this.clip(param1,param2,param3,local10); local10 = local10.alternativa3d::next; } } } private function clip(param1:Decal, param2:Number, param3:Number, param4:Object3D) : void { var local5:Face = null; var local6:Vertex = null; var local7:Wrapper = null; var local8:Vertex = null; var local9:Vector.<Face> = null; var local12:Number = NaN; var local13:Number = NaN; var local14:Vertex = null; var local15:Vertex = null; var local16:Vertex = null; var local17:Vertex = null; var local18:Vertex = null; var local19:Vertex = null; var local20:Wrapper = null; if(param4 is Mesh) { local8 = Mesh(param4).alternativa3d::vertexList; local5 = Mesh(param4).alternativa3d::faceList; if(local5.material == null || Boolean(local5.material.alternativa3d::transparent)) { return; } local9 = Mesh(param4).faces; } else if(param4 is BSP) { local8 = BSP(param4).alternativa3d::vertexList; local9 = BSP(param4).alternativa3d::faces; local5 = local9[0]; if(local5.material == null || Boolean(local5.material.alternativa3d::transparent)) { return; } } param4.alternativa3d::composeAndAppend(param1); param4.alternativa3d::calculateInverseMatrix(); ++param4.alternativa3d::transformId; var local10:int = int(local9.length); var local11:int = 0; while(local11 < local10) { local5 = local9[local11]; if(-local5.alternativa3d::normalX * param4.alternativa3d::imc - local5.alternativa3d::normalY * param4.alternativa3d::img - local5.alternativa3d::normalZ * param4.alternativa3d::imk >= param3) { local12 = local5.alternativa3d::normalX * param4.alternativa3d::imd + local5.alternativa3d::normalY * param4.alternativa3d::imh + local5.alternativa3d::normalZ * param4.alternativa3d::iml; if(!(local12 <= local5.alternativa3d::offset - param2 || local12 >= local5.alternativa3d::offset + param2)) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { local6 = local7.alternativa3d::vertex; if(local6.alternativa3d::transformId != param4.alternativa3d::transformId) { local6.alternativa3d::cameraX = param4.alternativa3d::ma * local6.x + param4.alternativa3d::mb * local6.y + param4.alternativa3d::mc * local6.z + param4.alternativa3d::md; local6.alternativa3d::cameraY = param4.alternativa3d::me * local6.x + param4.alternativa3d::mf * local6.y + param4.alternativa3d::mg * local6.z + param4.alternativa3d::mh; local6.alternativa3d::cameraZ = param4.alternativa3d::mi * local6.x + param4.alternativa3d::mj * local6.y + param4.alternativa3d::mk * local6.z + param4.alternativa3d::ml; local6.alternativa3d::transformId = param4.alternativa3d::transformId; } local7 = local7.alternativa3d::next; } local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraX > param1.boundMinX) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraX < param1.boundMaxX) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraY > param1.boundMinY) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraY < param1.boundMaxY) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraZ > param1.boundMinZ) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local7 = local5.alternativa3d::wrapper; while(local7 != null) { if(local7.alternativa3d::vertex.alternativa3d::cameraZ < param1.boundMaxZ) { break; } local7 = local7.alternativa3d::next; } if(local7 != null) { local18 = null; local19 = null; local7 = local5.alternativa3d::wrapper; while(local7 != null) { local6 = local7.alternativa3d::vertex; local16 = new Vertex(); local16.x = local6.alternativa3d::cameraX; local16.y = local6.alternativa3d::cameraY; local16.z = local6.alternativa3d::cameraZ; local16.normalX = param4.alternativa3d::ma * local6.normalX + param4.alternativa3d::mb * local6.normalY + param4.alternativa3d::mc * local6.normalZ; local16.normalY = param4.alternativa3d::me * local6.normalX + param4.alternativa3d::mf * local6.normalY + param4.alternativa3d::mg * local6.normalZ; local16.normalZ = param4.alternativa3d::mi * local6.normalX + param4.alternativa3d::mj * local6.normalY + param4.alternativa3d::mk * local6.normalZ; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; local7 = local7.alternativa3d::next; } local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.z > param1.boundMinZ && local14.z <= param1.boundMinZ || local15.z <= param1.boundMinZ && local14.z > param1.boundMinZ) { local13 = (param1.boundMinZ - local14.z) / (local15.z - local14.z); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.z > param1.boundMinZ) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.z < param1.boundMaxZ && local14.z >= param1.boundMaxZ || local15.z >= param1.boundMaxZ && local14.z < param1.boundMaxZ) { local13 = (param1.boundMaxZ - local14.z) / (local15.z - local14.z); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.z < param1.boundMaxZ) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.x > param1.boundMinX && local14.x <= param1.boundMinX || local15.x <= param1.boundMinX && local14.x > param1.boundMinX) { local13 = (param1.boundMinX - local14.x) / (local15.x - local14.x); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.x > param1.boundMinX) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.x < param1.boundMaxX && local14.x >= param1.boundMaxX || local15.x >= param1.boundMaxX && local14.x < param1.boundMaxX) { local13 = (param1.boundMaxX - local14.x) / (local15.x - local14.x); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.x < param1.boundMaxX) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.y > param1.boundMinY && local14.y <= param1.boundMinY || local15.y <= param1.boundMinY && local14.y > param1.boundMinY) { local13 = (param1.boundMinY - local14.y) / (local15.y - local14.y); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.y > param1.boundMinY) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local14 = local19; local15 = local18; local18 = null; local19 = null; while(local15 != null) { local17 = local15.alternativa3d::next; local15.alternativa3d::next = null; if(local15.y < param1.boundMaxY && local14.y >= param1.boundMaxY || local15.y >= param1.boundMaxY && local14.y < param1.boundMaxY) { local13 = (param1.boundMaxY - local14.y) / (local15.y - local14.y); local16 = new Vertex(); local16.x = local14.x + (local15.x - local14.x) * local13; local16.y = local14.y + (local15.y - local14.y) * local13; local16.z = local14.z + (local15.z - local14.z) * local13; local16.normalX = local14.normalX + (local15.normalX - local14.normalX) * local13; local16.normalY = local14.normalY + (local15.normalY - local14.normalY) * local13; local16.normalZ = local14.normalZ + (local15.normalZ - local14.normalZ) * local13; if(local19 != null) { local19.alternativa3d::next = local16; } else { local18 = local16; } local19 = local16; } if(local15.y < param1.boundMaxY) { if(local19 != null) { local19.alternativa3d::next = local15; } else { local18 = local15; } local19 = local15; } local14 = local15; local15 = local17; } if(local18 != null) { local5 = new Face(); local20 = null; local6 = local18; while(local6 != null) { local17 = local6.alternativa3d::next; local6.alternativa3d::next = param1.alternativa3d::vertexList; param1.alternativa3d::vertexList = local6; local6.u = (local6.x - param1.boundMinX) / (param1.boundMaxX - param1.boundMinX); local6.v = (local6.y - param1.boundMinY) / (param1.boundMaxY - param1.boundMinY); if(local20 != null) { local20.alternativa3d::next = new Wrapper(); local20 = local20.alternativa3d::next; } else { local5.alternativa3d::wrapper = new Wrapper(); local20 = local5.alternativa3d::wrapper; } local20.alternativa3d::vertex = local6; local6 = local17; } local5.alternativa3d::calculateBestSequenceAndNormal(); local5.alternativa3d::next = param1.alternativa3d::faceList; param1.alternativa3d::faceList = local5; } } } } } } } } } } } } } } local11++; } } }
package projects.tanks.client.battlefield.models.tankparts.armor.rankup { public interface ITankRankUpEffectModelBase { } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] public class ItemInfoPanel_bitmapVampireRate extends BitmapAsset { public function ItemInfoPanel_bitmapVampireRate() { super(); } } }
package projects.tanks.client.battlefield.models.battle.gui.inventory { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class InventoryModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function InventoryModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package scpacker.resource.tanks { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.loaders.Parser3DS; import alternativa.engine3d.objects.Mesh; import alternativa.init.Main; import alternativa.osgi.service.storage.IStorageService; import flash.events.Event; import flash.events.IOErrorEvent; import flash.geom.Vector3D; import flash.net.URLLoader; import flash.net.URLLoaderDataFormat; import flash.net.URLRequest; import flash.utils.ByteArray; import flash.utils.Dictionary; import scpacker.resource.ResourceUtil; import scpacker.resource.cache.CacheURLLoader; import scpacker.resource.failed.FailedResource; import specter.utils.Logger; public class TankResourceLoader { private var path:String; public var list:TankResourceList; private var queue:Vector.<TankResource>; private var length:int = 0; public var status:int = 0; private var lengthFailed:int = 0; private var failedResources:Dictionary; public function TankResourceLoader(path:String) { this.failedResources = new Dictionary(); super(); this.path = path; this.list = new TankResourceList(); this.queue = new Vector.<TankResource>(); var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE,this.parse); loader.load(new URLRequest(path)); } private function parse(e:Event) : void { var path:String = null; var oldPath:String = null; var newPath:String = null; var obj:Object = null; var config:Object = JSON.parse(e.target.data); if(config.id == "MODELS") { for each(obj in config.items) { path = obj.src; if(IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_old_textures"] == true && (path.search("hull/") != -1 || path.search("turret/") != -1)) { oldPath = path.split("/")[1]; newPath = oldPath + "_old"; path = path.replace(oldPath,newPath); } this.queue.push(new TankResource(null,obj.name,path)); ++this.length; } this.loadQueue(); } } private function loadQueue() : void { var file:TankResource = null; for each(file in this.queue) { this.loadModel(file); } } private function loadModel(str:TankResource) : void { var prefix:String = null; var loader:CacheURLLoader = null; prefix = null; loader = null; prefix = !!Game.local ? "" : "resources/"; loader = new CacheURLLoader(); loader.dataFormat = URLLoaderDataFormat.BINARY; loader.addEventListener(Event.COMPLETE,function(e:Event):void { var flagMount:Vector3D = null; var turretMount:Vector3D = null; var obj:Object3D = null; var bytes:ByteArray = ByteArray(loader.data); var parser:Parser3DS = new Parser3DS(); var muzzles:Vector.<Vector3D> = new Vector.<Vector3D>(); parser.parse(bytes); for each(obj in parser.objects) { if(obj.name.split("0")[0] == "muzzle") { muzzles.push(new Vector3D(obj.x,obj.y,obj.z)); } if(obj.name.indexOf("fmnt") >= 0) { flagMount = new Vector3D(obj.x,obj.y,obj.z); } if(obj.name == "mount") { turretMount = new Vector3D(obj.x,obj.y,obj.z); } } if(parser.objects.length < 1) { Logger.log("Invalid mesh width 0 objects: " + str.next as String); return; } var tnk:TankResource = new TankResource(Mesh(parser.objects[0]),str.id,null,muzzles,flagMount,turretMount); tnk.objects = parser.objects; list.add(tnk); var url:String = str.next as String; if(url.indexOf("?") >= 0) { url = url.split("?")[0]; } var failedImage:FailedResource = failedResources[url]; if(failedImage != null) { --lengthFailed; } if(length == 1 && lengthFailed <= 0) { status = 1; ResourceUtil.onCompleteLoading(); failedResources = new Dictionary(); } --length; muzzles = null; }); loader.load(new URLRequest(prefix + (str.next as String))); loader.addEventListener(IOErrorEvent.IO_ERROR,function(e:IOErrorEvent):void { Main.debug.showAlert("Coun\'t load resouce: " + prefix + (str.next as String)); var url:String = str.next as String; if(url.indexOf("?") >= 0) { url = url.split("?")[0]; } var failedImage:FailedResource = failedResources[url]; if(failedImage == null) { failedImage = new FailedResource(); failedResources[url] = failedImage; ++lengthFailed; } ++failedImage.failedCount; url = str.next as String; if(url.indexOf("?") >= 0) { url = url.split("?")[0] + "?rand=" + Math.random(); } else { url += "?rand=" + Math.random(); } str.next = url; if(failedImage.failedCount >= 3) { Main.debug.showAlert("Coun\'t load resouce: " + prefix + str.next + " before 3 attempt."); return; } loadModel(str); }); } } }
package alternativa.tanks.battle.objects.tank { public class SimpleValueSmoother implements ValueSmoother { private var currentValue:Number; private var targetValue:Number; private var smoothingSpeedUp:Number; private var smoothingSpeedDown:Number; public function SimpleValueSmoother(param1:Number, param2:Number, param3:Number, param4:Number) { super(); this.smoothingSpeedUp = param1; this.smoothingSpeedDown = param2; this.targetValue = param3; this.currentValue = param4; } public function reset(param1:Number) : void { this.currentValue = param1; this.targetValue = param1; } public function update(param1:Number) : Number { if(this.currentValue < this.targetValue) { this.currentValue += this.smoothingSpeedUp * param1; if(this.currentValue > this.targetValue) { this.currentValue = this.targetValue; } } else if(this.currentValue > this.targetValue) { this.currentValue -= this.smoothingSpeedDown * param1; if(this.currentValue < this.targetValue) { this.currentValue = this.targetValue; } } return this.currentValue; } public function setTargetValue(param1:Number) : void { this.targetValue = param1; } public function getTargetValue() : Number { return this.targetValue; } } }
package _codec.projects.tanks.client.panel.model.shop.discount { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.shop.discount.ShopDiscountCC; public class CodecShopDiscountCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_discountInPercent:ICodec; private var codec_enabled:ICodec; public function CodecShopDiscountCC() { super(); } public function init(param1:IProtocol) : void { this.codec_discountInPercent = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_enabled = param1.getCodec(new TypeCodecInfo(Boolean,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:ShopDiscountCC = new ShopDiscountCC(); local2.discountInPercent = this.codec_discountInPercent.decode(param1) as int; local2.enabled = this.codec_enabled.decode(param1) as Boolean; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:ShopDiscountCC = ShopDiscountCC(param2); this.codec_discountInPercent.encode(param1,local3.discountInPercent); this.codec_enabled.encode(param1,local3.enabled); } } }
package alternativa.tanks.models.battle.gui.gui.statistics.field.timelimit { import alternativa.tanks.models.battle.gui.gui.statistics.field.wink.WinkManager; import alternativa.tanks.models.battle.gui.gui.statistics.field.wink.WinkingField; import flash.display.DisplayObject; import flash.events.Event; import flash.events.TimerEvent; import flash.utils.Timer; import flash.utils.getTimer; public class TimeLimitField extends WinkingField { private var timer:Timer; private var targetTime:uint; private var onlySeconds:Boolean; public function TimeLimitField(param1:int, param2:DisplayObject, param3:WinkManager, param4:Boolean) { super(param1,param2,param3); this.onlySeconds = param4; this.timer = new Timer(1000); this.timer.addEventListener(TimerEvent.TIMER,this.onTimer); } private static function getMinutes(param1:int) : String { var local2:int = param1 / 60; return local2 > 9 ? local2.toString() : "0" + local2.toString(); } private static function getSeconds(param1:int) : String { var local2:int = param1 % 60; return local2 > 9 ? local2.toString() : "0" + local2.toString(); } public function startCountdown(param1:int) : void { this.targetTime = Math.round(getTimer() / 1000 + param1); value = param1; if(_value > 0) { this.timer.stop(); this.timer.start(); } else { stopWink(); } } public function stopCountdown() : void { this.timer.stop(); } override protected function updateLabel() : void { if(this.onlySeconds) { label.text = _value < 10 ? "0" + _value.toString() : _value.toString(); } else { label.text = getMinutes(_value) + " : " + getSeconds(_value); } } override protected function onRemovedFromStage(param1:Event) : void { super.onRemovedFromStage(param1); this.timer.stop(); } private function onTimer(param1:TimerEvent) : void { var local2:int = 0; if(_value > 0) { local2 = Math.round(this.targetTime - getTimer() / 1000); value = local2 < 0 ? 0 : local2; } else { this.timer.stop(); } } } }
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.flag { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.battle.pointbased.flag.FlagFlyPoint; public class VectorCodecFlagFlyPointLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecFlagFlyPointLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(FlagFlyPoint,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<FlagFlyPoint> = new Vector.<FlagFlyPoint>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = FlagFlyPoint(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:FlagFlyPoint = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<FlagFlyPoint> = Vector.<FlagFlyPoint>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.tanks.models.weapon.railgun { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.RayIntersectionData; import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.battle.objects.tank.tankskin.TankSkin; import alternativa.tanks.sfx.AnimatedLightEffect; import alternativa.tanks.sfx.AnimatedSpriteEffect; import alternativa.tanks.sfx.DistanceScaledAnimatedPlaneEffect; import alternativa.tanks.sfx.GraphicEffect; import alternativa.tanks.sfx.GraphicsEffectDestructionListener; import alternativa.tanks.sfx.ISound3DEffect; import alternativa.tanks.sfx.ISoundEffectDestructionListener; import alternativa.tanks.sfx.MuzzlePositionProvider; import alternativa.tanks.sfx.NormalObject3DPositionProvider; import alternativa.tanks.sfx.Sound3D; import alternativa.tanks.sfx.Sound3DEffect; import alternativa.tanks.sfx.StaticObject3DPositionProvider; import alternativa.tanks.sfx.TubeLightEffect; import flash.geom.Vector3D; public class RailgunEffects implements IRailgunEffects, GraphicsEffectDestructionListener, ISoundEffectDestructionListener { public static const CHARGE_EFFECT_SIZE:int = 300; public static const RINGS_SIZE:Number = 300; public static const SPHERE_SIZE:Number = 200; public static const POW_WIDTH:Number = 30; private static const DECAL_RADIUS:Number = 50; private static const TRAIL_WIDTH:Number = 25; private static const TRAIL_BEGIN_SCALE:Number = 0.5; private static const TRAIL_END_SCALE:Number = 1.5; private static const TRAIL_MOVE_DISTANCE:Number = 20; private static const TRAIL_LIFE_TIME:int = 500; private static const SMOKE_WIDTH:Number = 80; private static const SMOKE_BEGIN_SCALE:Number = 0.5; private static const SMOKE_END_SCALE:Number = 2; private static const SMOKE_MOVE_DISTANCE:Number = 100; private static const SMOKE_LIFE_TIME:int = 2200; private static const SOUND_VOLUME:Number = 1; private static const _rayOrigin:Vector3D = new Vector3D(); private static const _rayDirection:Vector3D = new Vector3D(); private static const _effectPosition:Vector3 = new Vector3(); private static const _effectNormal:Vector3 = new Vector3(); private static const _effectDirection:Vector3 = new Vector3(); private static const _rotation:Vector3 = new Vector3(); private static const v:Vector3 = new Vector3(); private var sfxData:RailgunSFXData; private var battleService:BattleService; private var chargeEffect:ChargeEffect; private var chargeLightEffect:AnimatedLightEffect; private var soundEffect:Sound3DEffect; public function RailgunEffects(param1:RailgunSFXData, param2:BattleService) { super(); this.sfxData = param1; this.battleService = param2; } private static function projectHitPoint(param1:Vector3, param2:Vector3, param3:Vector3, param4:Vector3) : void { param4.copy(param1).subtract(param2); var local5:Number = param4.dot(param3); param4.copy(param2).addScaled(local5,param3); } private static function getRaycastData(param1:Vector3D, param2:Vector3D, param3:TankSkin) : RayIntersectionData { var local4:RayIntersectionData = raycast(param3.getHullMesh(),param1,param2); var local5:RayIntersectionData = raycast(param3.getTurret3D(),param1,param2); if(local4 == null) { return local5; } if(local5 == null) { return local4; } if(local5.time < local4.time) { return local5; } return local4; } private static function raycast(param1:Object3D, param2:Vector3D, param3:Vector3D) : RayIntersectionData { var local4:Vector3D = param1.globalToLocal(param2); var local5:Vector3D = param3.clone(); local5.x += param1.x; local5.y += param1.y; local5.z += param1.z; var local6:Vector3D = param1.globalToLocal(local5); return param1.intersectRay(local4,local6); } private static function getRotation(param1:Vector3) : Vector3 { _rotation.x = Math.atan2(param1.z,Math.sqrt(param1.x * param1.x + param1.y * param1.y)) - Math.PI / 2; _rotation.y = 0; _rotation.z = -Math.atan2(param1.x,param1.y); return _rotation; } public function createChargeEffect(param1:Vector3, param2:Object3D, param3:int) : void { if(this.chargeEffect != null) { this.chargeEffect.kill(); } this.chargeEffect = ChargeEffect(this.battleService.getObjectPool().getObject(ChargeEffect)); this.chargeEffect.init(CHARGE_EFFECT_SIZE,CHARGE_EFFECT_SIZE,this.sfxData.chargingAnimation,param1,param2,0,this.getChargingEffectFPS(param3),this); this.battleService.addGraphicEffect(this.chargeEffect); this.createChargeLightEffect(param1,param2,param3); } public function createChargeLightEffect(param1:Vector3, param2:Object3D, param3:int) : void { if(this.chargeLightEffect != null) { this.chargeLightEffect.kill(); } this.chargeLightEffect = AnimatedLightEffect(this.battleService.getObjectPool().getObject(AnimatedLightEffect)); var local4:MuzzlePositionProvider = MuzzlePositionProvider(this.battleService.getObjectPool().getObject(MuzzlePositionProvider)); local4.init(param2,param1); this.chargeLightEffect.initFromTime(local4,param3,this.sfxData.chargeLightAnimation); this.battleService.addGraphicEffect(this.chargeLightEffect); } private function getChargingEffectFPS(param1:int) : Number { return 1000 * this.sfxData.chargingAnimation.frames.length / param1; } public function createSoundEffect(param1:Vector3, param2:int) : void { var local3:Sound3D = Sound3D.create(this.sfxData.sound,SOUND_VOLUME); this.soundEffect = Sound3DEffect.create(param1,local3,0,param2,this); this.battleService.addSound3DEffect(this.soundEffect); } public function createShotTrail(param1:Vector3, param2:Vector3, param3:Vector3) : void { var local4:ShotTrailEffect = null; var local5:ShotSmokeEffect = null; if(param2 == null) { param2 = RailgunUtils.getDistantPoint(param1,param3); } v.diff(param2,param1); if(v.dot(param3) > 0) { local4 = ShotTrailEffect(this.battleService.getObjectPool().getObject(ShotTrailEffect)); local4.init(param1,param2,this.sfxData.trailMaterial,TRAIL_WIDTH,TRAIL_BEGIN_SCALE,TRAIL_END_SCALE,TRAIL_MOVE_DISTANCE,TRAIL_LIFE_TIME); this.battleService.addGraphicEffect(local4); local5 = ShotSmokeEffect(this.battleService.getObjectPool().getObject(ShotSmokeEffect)); local5.init(param1,param2,this.sfxData.smokeMaterial,SMOKE_WIDTH,SMOKE_BEGIN_SCALE,SMOKE_END_SCALE,SMOKE_MOVE_DISTANCE,SMOKE_LIFE_TIME); this.battleService.addGraphicEffect(local5); } this.createShotLightEffect(param1); this.createRailLightEffect(param1,param2); } private function createRailLightEffect(param1:Vector3, param2:Vector3) : void { var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(this.battleService.getObjectPool().getObject(StaticObject3DPositionProvider)); var local4:StaticObject3DPositionProvider = StaticObject3DPositionProvider(this.battleService.getObjectPool().getObject(StaticObject3DPositionProvider)); local3.init(param1,0); local4.init(param2,0); var local5:TubeLightEffect = TubeLightEffect(this.battleService.getObjectPool().getObject(TubeLightEffect)); local5.init(local3,local4,this.sfxData.railLightAnimation); this.battleService.addGraphicEffect(local5); } public function createShotLightEffect(param1:Vector3) : void { var local2:AnimatedLightEffect = AnimatedLightEffect(this.battleService.getObjectPool().getObject(AnimatedLightEffect)); var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(this.battleService.getObjectPool().getObject(StaticObject3DPositionProvider)); local3.init(param1,0); local2.init(local3,this.sfxData.shotLightAnimation); this.battleService.addGraphicEffect(local2); } public function createStaticHitMark(param1:Vector3, param2:Vector3) : void { if(param2 != null) { this.battleService.getBattleScene3D().addDecal(param2,param1,DECAL_RADIUS,this.sfxData.hitMarkMaterial); } } public function stopEffects() : void { if(this.chargeEffect != null) { this.chargeEffect.kill(); this.chargeEffect = null; } if(this.chargeLightEffect != null) { this.chargeLightEffect.kill(); this.chargeLightEffect = null; } if(this.soundEffect != null) { this.soundEffect.kill(); this.soundEffect = null; } } public function onGraphicsEffectDestroyed(param1:GraphicEffect) : void { if(this.chargeEffect == param1) { this.chargeEffect = null; } } public function onSoundEffectDestroyed(param1:ISound3DEffect) : void { if(this.soundEffect == param1) { this.soundEffect = null; } } public function createTargetHitEffects(param1:Vector3, param2:Vector3, param3:Vector.<Vector3>, param4:Vector.<Body>) : void { var local6:Body = null; var local7:Tank = null; var local8:RayIntersectionData = null; var local9:Object3D = null; var local10:Vector3D = null; _rayOrigin.x = param1.x; _rayOrigin.y = param1.y; _rayOrigin.z = param1.z; _rayDirection.x = param2.x - param1.x; _rayDirection.y = param2.y - param1.y; _rayDirection.z = param2.z - param1.z; _effectDirection.copy(param2).subtract(param1).normalize(); var local5:int = 0; while(local5 < param4.length) { local6 = param4[local5]; if(local6 != null && local6.tank != null) { local7 = local6.tank; local8 = getRaycastData(_rayOrigin,_rayDirection,local7.getSkin()); if(local8 == null) { projectHitPoint(param3[local5],param1,_effectDirection,_effectPosition); _effectNormal.copy(_effectDirection); } else { local9 = local8.object; _effectPosition.copyFromVector3D(local9.localToGlobal(local8.point)); local10 = local9.localToGlobal(local8.face.normal); _effectNormal.x = local10.x - local9.x; _effectNormal.y = local10.y - local9.y; _effectNormal.z = local10.z - local9.z; } this.createHitEffect(_effectPosition,_effectNormal,_effectDirection); this.createHitLightEffect(_effectPosition,_effectNormal); } local5++; } } private function createHitLightEffect(param1:Vector3, param2:Vector3) : void { var local3:AnimatedLightEffect = AnimatedLightEffect(this.battleService.getObjectPool().getObject(AnimatedLightEffect)); var local4:NormalObject3DPositionProvider = NormalObject3DPositionProvider(this.battleService.getObjectPool().getObject(NormalObject3DPositionProvider)); local4.init(param1,param2,50); local3.init(local4,this.sfxData.hitLightAnimation); this.battleService.addGraphicEffect(local3); } private function createHitEffect(param1:Vector3, param2:Vector3, param3:Vector3) : void { var local4:DistanceScaledAnimatedPlaneEffect = DistanceScaledAnimatedPlaneEffect(this.battleService.getObjectPool().getObject(DistanceScaledAnimatedPlaneEffect)); local4.init(RINGS_SIZE,param1,getRotation(param2),this.sfxData.ringsAnimation,1); this.battleService.getBattleScene3D().addGraphicEffect(local4); var local5:AnimatedSpriteEffect = AnimatedSpriteEffect(this.battleService.getObjectPool().getObject(AnimatedSpriteEffect)); var local6:StaticObject3DPositionProvider = StaticObject3DPositionProvider(this.battleService.getObjectPool().getObject(StaticObject3DPositionProvider)); local6.init(param1,30); local5.init(SPHERE_SIZE,SPHERE_SIZE,this.sfxData.ringsAnimation,0,local6,0.5,0.5,null,0); this.battleService.getBattleScene3D().addGraphicEffect(local5); var local7:RailgunPowEffect = RailgunPowEffect(this.battleService.getObjectPool().getObject(RailgunPowEffect)); local7.init(param1,param3,this.sfxData.powAnimation); this.battleService.getBattleScene3D().addGraphicEffect(local7); } public function createStaticHitEffect(param1:Vector3, param2:Vector3, param3:Vector3) : void { _effectDirection.copy(param2).subtract(param1).normalize(); this.createHitEffect(param2,param3,_effectDirection); this.createHitLightEffect(param2,param3); } } }
package alternativa.tanks.models.dom.cp { import mx.core.BitmapAsset; [ExcludeClass] public class ControlPointSprite_alphaC extends BitmapAsset { public function ControlPointSprite_alphaC() { super(); } } }
package alternativa.tanks.model.push { import platform.client.core.general.pushnotification.impl.model.FirebasePushNotificationPanelUserProfileModelBase; import platform.client.core.general.pushnotification.impl.model.IFirebasePushNotificationPanelUserProfileModelBase; [ModelInfo] public class FirebasePushNotificationPanelUserProfileModel extends FirebasePushNotificationPanelUserProfileModelBase implements IFirebasePushNotificationPanelUserProfileModelBase { public function FirebasePushNotificationPanelUserProfileModel() { super(); } } }
package alternativa.tanks.sfx { import alternativa.math.Vector3; import flash.media.Sound; import flash.media.SoundChannel; import flash.media.SoundTransform; public class Sound3D { private static var pool:Sound3D; public static const ETERNAL_LOOP:int = 1000000; private static const NEAR_RADIUS:Number = 1000; private static const FAR_RADIUS:Number = 5000; private static const FAR_DELIMITER:Number = 5; internal var nextInPool:Sound3D; private var nearRadius:Number; private var volumeCoefficient:Number; private var sound:Sound; private var _channel:SoundChannel; private var transform:SoundTransform = new SoundTransform(0); private var _volume:Number = 1; private var _baseVolume:Number = 1; private var effectiveVolume:Number = 1; public function Sound3D(param1:Sound, param2:Number, param3:Number, param4:Number, param5:Number) { super(); this.init(param1,param2,param3,param4,param5); } public static function create(param1:Sound, param2:Number = 1, param3:Number = 1000, param4:Number = 5000, param5:Number = 5) : Sound3D { var local6:Sound3D = null; if(pool == null) { return new Sound3D(param1,param3,param4,param5,param2); } local6 = pool; local6.init(param1,param3,param4,param5,param2); pool = local6.nextInPool; local6.nextInPool = null; return local6; } public static function destroy(param1:Sound3D) : void { param1.clear(); if(pool == null) { pool = param1; } else { param1.nextInPool = pool; pool = param1; } } public function isPlaying() : Boolean { return this._channel != null; } public function get channel() : SoundChannel { return this._channel; } public function get position() : Number { return this._channel == null ? 0 : this._channel.position; } public function init(param1:Sound, param2:Number, param3:Number, param4:Number, param5:Number) : void { this.sound = param1; this.nearRadius = param2; this._baseVolume = param5; this.volumeCoefficient = (Math.sqrt(param4) - 1) / (param3 - param2); this.volume = 1; } public function clear() : void { this.stop(); this.sound = null; } public function get baseVolume() : Number { return this._baseVolume; } public function set baseVolume(param1:Number) : void { this._baseVolume = param1; this.updateEffectiveVolume(); } public function get volume() : Number { return this._volume; } public function set volume(param1:Number) : void { this._volume = param1; this.updateEffectiveVolume(); } public function calculateSoundProperties(param1:Vector3, param2:Vector3, param3:Vector3, param4:SoundTransform) : void { var local9:Number = NaN; var local5:Number = param2.x - param1.x; var local6:Number = param2.y - param1.y; var local7:Number = param2.z - param1.z; var local8:Number = Math.sqrt(local5 * local5 + local6 * local6 + local7 * local7); if(local8 < this.nearRadius) { param4.volume = 1; param4.pan = 0; } else { local9 = 1 + this.volumeCoefficient * (local8 - this.nearRadius); local9 = 1 / (local9 * local9); param4.volume = local9; local8 = 1 / local8; local5 *= local8; local6 *= local8; local7 *= local8; param4.pan = (local5 * param3.x + local6 * param3.y + local7 * param3.z) * (1 - local9); } } public function checkVolume(param1:Vector3, param2:Vector3, param3:Vector3) : void { if(this._channel != null) { this.calculateSoundProperties(param1,param2,param3,this.transform); this.transform.volume *= this.effectiveVolume; this._channel.soundTransform = this.transform; } } public function play(param1:int, param2:int) : SoundChannel { if(this._channel != null) { this._channel.stop(); } return this._channel = this.sound.play(param1,param2); } public function stop() : void { if(this._channel != null) { this._channel.stop(); this._channel = null; } } private function updateEffectiveVolume() : void { this.effectiveVolume = this._baseVolume * this._volume; } } }
package projects.tanks.client.clans.user { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.network.command.SpaceCommand; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; public class ClanUserLoaderModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _hideClanId:Long = Long.getLong(1773660503,-329990730); private var _showClanId:Long = Long.getLong(1773660433,-1765075589); private var model:IModel; public function ClanUserLoaderModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } public function hideClan() : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; ByteArray(this.protocolBuffer.writer).position = 0; if(Model.object == null) { throw new Error("Execute method without model context."); } var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._hideClanId,this.protocolBuffer); var local2:IGameObject = Model.object; var local3:ISpace = local2.space; local3.commandSender.sendCommand(local1); this.protocolBuffer.optionalMap.clear(); } public function showClan() : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; ByteArray(this.protocolBuffer.writer).position = 0; if(Model.object == null) { throw new Error("Execute method without model context."); } var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._showClanId,this.protocolBuffer); var local2:IGameObject = Model.object; var local3:ISpace = local2.space; local3.commandSender.sendCommand(local1); this.protocolBuffer.optionalMap.clear(); } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapRange.png")] public class ItemInfoPanelBitmaps_bitmapRange extends BitmapAsset { public function ItemInfoPanelBitmaps_bitmapRange() { super(); } } }
package _codec.projects.tanks.client.commons.models.captcha { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.commons.models.captcha.CaptchaLocation; public class CodecCaptchaLocation implements ICodec { public function CodecCaptchaLocation() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:CaptchaLocation = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = CaptchaLocation.LOGIN_FORM; break; case 1: local2 = CaptchaLocation.REGISTER_FORM; break; case 2: local2 = CaptchaLocation.CLIENT_STARTUP; break; case 3: local2 = CaptchaLocation.RESTORE_PASSWORD_FORM; break; case 4: local2 = CaptchaLocation.EMAIL_CHANGE_HASH; break; case 5: local2 = CaptchaLocation.ACCOUNT_SETTINGS_FORM; } return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:int = int(param2.value); param1.writer.writeInt(local3); } } }
package alternativa.engine3d.animation { import alternativa.engine3d.alternativa3d; use namespace alternativa3d; public class AnimationNode { alternativa3d var _isActive:Boolean = false; alternativa3d var _parent:AnimationNode; alternativa3d var controller:AnimationController; public var speed:Number = 1; public function AnimationNode() { super(); } public function get isActive() : Boolean { return this.alternativa3d::_isActive && this.alternativa3d::controller != null; } public function get parent() : AnimationNode { return this.alternativa3d::_parent; } alternativa3d function update(param1:Number, param2:Number) : void { } alternativa3d function setController(param1:AnimationController) : void { this.alternativa3d::controller = param1; } alternativa3d function addNode(param1:AnimationNode) : void { if(param1.alternativa3d::_parent != null) { param1.alternativa3d::_parent.alternativa3d::removeNode(param1); } param1.alternativa3d::_parent = this; param1.alternativa3d::setController(this.alternativa3d::controller); } alternativa3d function removeNode(param1:AnimationNode) : void { param1.alternativa3d::setController(null); param1.alternativa3d::_isActive = false; param1.alternativa3d::_parent = null; } } }
package projects.tanks.client.battlefield.models.tankparts.armor.rankup { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class TankRankUpEffectModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function TankRankUpEffectModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.model.quest.challenge.stars { import flash.events.EventDispatcher; public class StarsInfoServiceImpl extends EventDispatcher implements StarsInfoService { private var stars:int; public function StarsInfoServiceImpl() { super(); } public function getStars() : int { return this.stars; } public function setStars(param1:int) : void { this.stars = param1; dispatchEvent(new StarsChangedEvent()); } } }
package _codec.platform.client.core.general.spaces.loading.dispatcher.types { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.CollectionCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import platform.client.core.general.spaces.loading.dispatcher.types.ObjectsData; import platform.client.core.general.spaces.loading.modelconstructors.ModelData; import platform.client.fp10.core.type.IGameObject; public class CodecObjectsData implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_modelsData:ICodec; private var codec_objects:ICodec; public function CodecObjectsData() { super(); } public function init(param1:IProtocol) : void { this.codec_modelsData = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(ModelData,false),false,1)); this.codec_objects = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); } public function decode(param1:ProtocolBuffer) : Object { var local2:ObjectsData = new ObjectsData(); local2.modelsData = this.codec_modelsData.decode(param1) as Vector.<ModelData>; local2.objects = this.codec_objects.decode(param1) as Vector.<IGameObject>; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:ObjectsData = ObjectsData(param2); this.codec_modelsData.encode(param1,local3.modelsData); this.codec_objects.encode(param1,local3.objects); } } }
package alternativa.tanks.services.materialregistry.impl { import alternativa.console.ConsoleVarFloat; import alternativa.console.ConsoleVarInt; import alternativa.init.OSGi; import alternativa.osgi.service.dump.IDumpService; import alternativa.osgi.service.dump.dumper.IDumper; import alternativa.tanks.engine3d.IMaterialSequenceRegistry; import alternativa.tanks.engine3d.ITextureMaterialRegistry; import alternativa.tanks.engine3d.IndexedTextureConstructor; import alternativa.tanks.engine3d.MaterialSequenceRegistry; import alternativa.tanks.engine3d.TextureMaterialRegistry; import alternativa.tanks.services.materialregistry.IMaterialRegistry; import alternativa.tanks.vehicles.tanks.ISkinTextureRegistry; import alternativa.tanks.vehicles.tanks.SkinTextureRegistry; public class MaterialRegistry implements IMaterialRegistry, IDumper { private static const TIMER_INTERVAL:int = 60; private var textureMaterialRegistryInterval:ConsoleVarInt; private var mapMaterialRegistryInterval:ConsoleVarInt; private var materialSequenceRegistryInterval:ConsoleVarInt; private var textureResolution:ConsoleVarFloat; private var _textureMaterialRegistry:TextureMaterialRegistry; private var _materialSequenceRegistry:MaterialSequenceRegistry; private var _mapMaterialRegistry:TextureMaterialRegistry; private var _skinTextureRegistry:SkinTextureRegistry; public function MaterialRegistry(osgi:OSGi) { this.textureMaterialRegistryInterval = new ConsoleVarInt("tmr_timer_interval",TIMER_INTERVAL,30,1000,this.onTimerIntervalChange); this.mapMaterialRegistryInterval = new ConsoleVarInt("mmr_timer_interval",TIMER_INTERVAL,30,1000,this.onTimerIntervalChange); this.materialSequenceRegistryInterval = new ConsoleVarInt("msr_timer_interval",TIMER_INTERVAL,30,1000,this.onTimerIntervalChange); this.textureResolution = new ConsoleVarFloat("tex_res",5.8,0,100,this.onTextureResolutionChange); this._textureMaterialRegistry = new TextureMaterialRegistry(TIMER_INTERVAL); this._materialSequenceRegistry = new MaterialSequenceRegistry(TIMER_INTERVAL); this._mapMaterialRegistry = new TextureMaterialRegistry(TIMER_INTERVAL); this._skinTextureRegistry = new SkinTextureRegistry(); super(); var dumpService:IDumpService = IDumpService(osgi.getService(IDumpService)); if(dumpService != null) { dumpService.registerDumper(this); } } public function get useMipMapping() : Boolean { return this._textureMaterialRegistry.useMipMapping; } public function set useMipMapping(value:Boolean) : void { this._textureMaterialRegistry.useMipMapping = value; this._materialSequenceRegistry.useMipMapping = value; this._mapMaterialRegistry.useMipMapping = value; } public function get textureMaterialRegistry() : ITextureMaterialRegistry { return this._textureMaterialRegistry; } public function get materialSequenceRegistry() : IMaterialSequenceRegistry { return this._materialSequenceRegistry; } public function get mapMaterialRegistry() : ITextureMaterialRegistry { return this._mapMaterialRegistry; } public function get skinTextureRegistry() : ISkinTextureRegistry { return this._skinTextureRegistry; } public function clear() : void { this._textureMaterialRegistry.clear(); this._materialSequenceRegistry.clear(); this._mapMaterialRegistry.clear(); this._skinTextureRegistry.clear(); } public function dump(params:Vector.<String>) : String { return this._textureMaterialRegistry.getDump() + this._materialSequenceRegistry.getDump() + this._mapMaterialRegistry.getDump(); } public function get dumperName() : String { return "materials"; } public function createTextureConstructor() : IndexedTextureConstructor { return new IndexedTextureConstructor(); } private function onTimerIntervalChange(variable:ConsoleVarInt) : void { switch(variable) { case this.textureMaterialRegistryInterval: this._textureMaterialRegistry.timerInterval = variable.value; break; case this.mapMaterialRegistryInterval: this._mapMaterialRegistry.timerInterval = variable.value; break; case this.materialSequenceRegistryInterval: this._materialSequenceRegistry.timerInterval = variable.value; } } private function onTextureResolutionChange(variable:ConsoleVarFloat) : void { this._mapMaterialRegistry.resoluion = variable.value; } } }
package controls.scroller.gray { import mx.core.BitmapAsset; [ExcludeClass] public class ScrollSkinGray_thumbMiddle extends BitmapAsset { public function ScrollSkinGray_thumbMiddle() { super(); } } }
package alternativa.tanks.materials { import alternativa.engine3d.core.ShadowMap; import alternativa.gfx.agal.FragmentShader; import alternativa.gfx.agal.SamplerDim; import alternativa.gfx.agal.SamplerFilter; import alternativa.gfx.agal.SamplerMipMap; import alternativa.gfx.agal.SamplerRepeat; import alternativa.gfx.agal.SamplerType; public class AnimatedPaintFragmentShader extends FragmentShader { public function AnimatedPaintFragmentShader(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean, param6:Boolean, param7:Boolean, param8:Boolean, param9:Boolean, param10:Boolean, param11:Boolean, param12:Boolean, param13:Boolean, param14:Boolean, param15:Boolean, param16:Boolean, param17:Boolean, param18:Boolean) { var local23:int = 0; super(); var local19:SamplerRepeat = param1 ? SamplerRepeat.WRAP : SamplerRepeat.CLAMP; var local20:SamplerFilter = param2 ? SamplerFilter.LINEAR : SamplerFilter.NEAREST; var local21:SamplerMipMap = SamplerMipMap.NONE; var local22:SamplerType = param4 ? SamplerType.DXT1 : SamplerType.RGBA; div(ft4,v6,fc[24]); frc(ft4,ft4); mul(ft4,ft4,fc[24]); add(ft4.x,ft4.x,fc[24].z); add(ft4.y,ft4.y,fc[24].w); tex(ft0,ft4,fs4.dim(SamplerDim.D2).repeat(local19).filter(local20).mipmap(local21).type(local22)); tex(ft1,v0,fs6.dim(SamplerDim.D2).repeat(local19).filter(local20).mipmap(local21).type(local22)); mul(ft2,ft0,ft1); mul(ft2,fc[23].w,ft2); sub(ft3,fc[23].z,ft0); sub(ft4,fc[23].z,ft1); mul(ft3,fc[23].w,ft3); mul(ft3,ft3,ft4); sub(ft3,fc[23].z,ft3); sge(ft4.x,ft1.x,fc[23].z); sub(ft4.y,fc[23].z,ft4.x); mul(ft5,ft4.x,ft3); mul(ft6,ft4.y,ft2); add(ft0,ft5,ft6); mov(ft0.w,ft1.w); tex(ft1,v0,fs0.dim(SamplerDim.D2).repeat(local19).filter(local20).mipmap(local21).type(local22)); sub(ft2.w,fc[23].z,ft1.w); mul(ft0.x,ft0.x,ft2.w); mul(ft0.y,ft0.y,ft2.w); mul(ft0.z,ft0.z,ft2.w); add(ft0.xyz,ft0.xyz,ft1.xyz); mov(ft1,fc[23].x); mov(ft2,fc[23].x); mov(ft3,fc[23].x); mov(ft4,fc[23].x); mov(ft5,fc[23].x); mov(ft6,fc[23].x); if(param5) { sub(ft1.w,ft0,fc[14]); kil(ft1.w); } if(param6) { add(ft1.w,ft0,fc[18]); div(ft0.xyz,ft0,ft1.w); } if(param7) { mul(ft0.xyz,ft0,fc[0]); add(ft0.xyz,ft0,fc[1]); } if(param8) { mul(ft0.w,ft0,fc[0]); } if(param9) { abs(ft1,v0.z); sat(ft1,ft1); sub(ft1,fc[17],ft1); mul(ft0.w,ft0,ft1); } if(param11 || param12 || param13 || param15) { div(ft4,v1,v1.z); mul(ft4.xy,ft4,fc[18]); add(ft4.xy,ft4,fc[18]); } if(param11 || param12 || param13) { mul(ft3,ft4,fc[4]); } if(param11 || param12) { tex(ft1,ft3,fs1.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); } if(param13) { tex(ft6,ft3,fs5.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); } if(param11) { dp3(ft2,ft1,fc[17]); sub(ft2,ft2,v1); abs(ft2,ft2); div(ft2,ft2,fc[14]); sat(ft2,ft2); mul(ft0.w,ft0,ft2.z); } if(param12) { mul(ft2,fc[12],ft1.w); sub(ft2,fc[17].w,ft2); mul(ft0.xyz,ft0,ft2); } if(param15) { mov(ft5,fc[5]); mul(ft5.z,ft5,v2); mul(ft3,ft4,fc[7]); tex(ft1,ft3,fs3.dim(SamplerDim.D2).repeat(SamplerRepeat.WRAP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); mul(ft1.z,ft1,fc[6]); mul(ft2,ft1.z,ft1); local23 = 0; while(local23 < ShadowMap.numSamples) { if(local23 == 0) { add(ft1,ft2,v2); tex(ft1,ft1,fs2.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); dp3(ft1,ft1,ft5); sat(ft1,ft1); mov(ft4,ft1); } else { if(local23 % 2 > 0) { dp3(ft3.x,ft2,fc[8]); dp3(ft3.y,ft2,fc[9]); add(ft1,ft3,v2); } else { dp3(ft2.x,ft3,fc[8]); dp3(ft2.y,ft3,fc[9]); add(ft1,ft2,v2); } tex(ft1,ft1,fs2.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); dp3(ft1,ft1,ft5); sat(ft1,ft1); add(ft4,ft4,ft1); } local23++; } mul(ft2,ft4,fc[6]); sat(ft1,v2); mul(ft2,ft2,ft1); mul(ft2.w,ft2,fc[7]); } if(param10) { if(param15) { sat(ft1,v1); max(ft2,ft2,ft1); } else { sat(ft2,v1); } } if(param15 || param10) { sub(ft2,fc[17],ft2); mul(ft2,fc[10],ft2.w); add(ft2,ft2,fc[11]); if(param13) { add(ft6,ft6,ft6); add(ft2,ft2,ft6); } else if(param14) { add(ft2,ft2,fc[13]); } mul(ft0.xyz,ft0,ft2); } else if(param13) { add(ft2,ft6,ft6); mul(ft0.xyz,ft0,ft2); } else if(param14) { mul(ft0.xyz,ft0,fc[13]); } if(param16) { if(param17) { mul(ft0.xyz,ft0,fc[13].w); add(ft0.xyz,ft0,fc[13]); } else { sat(ft1,v0); mul(ft1,ft1,fc[2]); if(param18) { sub(ft1,fc[17],ft1); mul(ft0.w,ft0,ft1); } else { mul(ft1.xyz,fc[2],ft1.w); sub(ft1.w,fc[17],ft1); mul(ft0.xyz,ft0,ft1.w); add(ft0.xyz,ft0,ft1); } } } mov(oc,ft0); } } }
package projects.tanks.client.tanksservices.model.notifier.uid { import projects.tanks.client.tanksservices.model.notifier.AbstractNotifier; public class UidNotifierData extends AbstractNotifier { private var _uid:String; public function UidNotifierData(param1:String = null) { super(); this._uid = param1; } public function get uid() : String { return this._uid; } public function set uid(param1:String) : void { this._uid = param1; } override public function toString() : String { var local1:String = "UidNotifierData ["; local1 += "uid = " + this.uid + " "; local1 += super.toString(); return local1 + "]"; } } }
package com.alternativaplatform.projects.tanks.client.models.tank { import com.alternativaplatform.projects.tanks.client.commons.types.TankSpecification; import com.alternativaplatform.projects.tanks.client.commons.types.TankState; import projects.tanks.client.battleservice.model.team.BattleTeamType; public class ClientTank { public var self:Boolean; public var teamType:BattleTeamType; public var incarnationId:int; public var tankSpecification:TankSpecification; public var tankState:TankState; public var spawnState:TankSpawnState; public var health:int; public function ClientTank() { super(); } } }
package platform.client.fp10.core.service.address { import flash.events.Event; public interface AddressService { function back() : void; function forward() : void; function up() : void; function go(param1:int) : void; function href(param1:String, param2:String = "_self") : void; function popup(param1:String, param2:String = "popup", param3:String = "\"\"", param4:String = "") : void; function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void; function removeEventListener(param1:String, param2:Function) : void; function dispatchEvent(param1:Event) : Boolean; function hasEventListener(param1:String) : Boolean; function getBaseURL() : String; function getStrict() : Boolean; function setStrict(param1:Boolean) : void; function getHistory() : Boolean; function setHistory(param1:Boolean) : void; function getTracker() : String; function setTracker(param1:String) : void; function getTitle() : String; function setTitle(param1:String) : void; function getStatus() : String; function setStatus(param1:String) : void; function resetStatus() : void; function getValue() : String; function setValue(param1:String, param2:Boolean = true) : void; function getPath() : String; function getPathNames() : Array; function getQueryString() : String; function getParameter(param1:String) : String; function getQueryParameter(param1:String) : String; function getParameterNames() : Array; function reload() : void; } }
package alternativa.tanks.controller.events { import flash.events.Event; public class PasswordRestoreResultEvent extends Event { public static const RESTORE_MESSAGE_HAVE_BEEN_SENT:String = "RESTORE_MESSAGE_HAVE_BEEN_SENT"; public static const EMAIL_DOES_NOT_EXISTS:String = "EMAIL_DOES_NOT_EXISTS"; public function PasswordRestoreResultEvent(param1:String) { super(param1); } } }
package alternativa.tanks.engine3d { import alternativa.tanks.services.colortransform.ColorTransformer; public interface ColorCorrectedTextureRegistry extends MutableTextureRegistry, ColorTransformer { } }
package alternativa.tanks.models.bonus.gold { import alternativa.engine3d.core.MipMapping; import alternativa.engine3d.materials.TextureMaterial; import alternativa.math.Vector3; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.battle.BattleService; import alternativa.tanks.models.battle.battlefield.BattleUserInfoService; import alternativa.tanks.models.battle.ctf.MessageColor; import alternativa.tanks.models.battle.gui.BattlefieldGUI; import alternativa.tanks.models.battle.gui.gui.statistics.messages.UserAction; import alternativa.tanks.sfx.BonusCrystalsEffectUtils; import alternativa.tanks.sfx.Sound3D; import alternativa.tanks.sfx.Sound3DEffect; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; import projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal.BattleGoldBonusesModelBase; import projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal.IBattleGoldBonusesModelBase; import projects.tanks.client.battlefield.types.Vector3d; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService; [ModelInfo] public class BattleGoldBonusesModel extends BattleGoldBonusesModelBase implements IBattleGoldBonusesModelBase, ObjectLoadListener { [Inject] public static var localeService:ILocaleService; [Inject] public static var battleService:BattleService; [Inject] public static var userInfoService:BattleUserInfoService; [Inject] public static var userPropertiesService:IUserPropertiesService; public static const DELAY:int = 800; public function BattleGoldBonusesModel() { super(); } [Obfuscation(rename="false")] public function goldTaken(param1:IGameObject) : void { if(param1 != null) { this.showBonusPickupNotification(param1,TanksLocale.TEXT_BATTLE_GOLD_TAKEN); } } private function showBonusPickupNotification(param1:IGameObject, param2:String) : void { var local8:ISpace = null; var local9:IGameObject = null; var local10:BattlefieldGUI = null; var local3:Vector3d = BonusCrystalsEffectUtils.getTargetPosition(param1); var local4:TextureMaterial = TextureMaterial(getData(TextureMaterial)); BonusCrystalsEffectUtils.drawEffectForCatcherPosition(local3,DELAY,local4); var local5:Sound3D = Sound3D.create(getInitParam().sound.sound,0.5); var local6:Vector3 = new Vector3(local3.x,local3.y,local3.z + 300); battleService.addSound3DEffect(Sound3DEffect.create(local6,local5,DELAY)); var local7:String = userInfoService.getUserName(param1.id); if(local7 != null) { local8 = object.space; local9 = local8.rootObject; local10 = BattlefieldGUI(local9.adapt(BattlefieldGUI)); local10.showBattleMessage(MessageColor.ORANGE,local7 + localeService.getText(param2)); local10.showUserBattleLogMessage(param1.id,UserAction.PLAYER_GOLD_BOX); } } [Obfuscation(rename="false")] public function objectLoaded() : void { var local1:TextureMaterial = new TextureMaterial(getInitParam().sprite.data,false,true,MipMapping.PER_PIXEL,1); putData(TextureMaterial,local1); } } }
package _codec.projects.tanks.client.battlefield.models.user.bossstate { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.user.bossstate.BossStateCC; public class VectorCodecBossStateCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecBossStateCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(BossStateCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = int(LengthCodecHelper.decodeLength(param1)); var local3:Vector.<BossStateCC> = new Vector.<BossStateCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = BossStateCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:BossStateCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<BossStateCC> = Vector.<BossStateCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package _codec.projects.tanks.client.battleselect.model.matchmaking.group.invitewindow { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import projects.tanks.client.battleselect.model.matchmaking.group.invitewindow.MatchMakingUserInfo; public class CodecMatchMakingUserInfo implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_friend:ICodec; private var codec_id:ICodec; private var codec_onLine:ICodec; private var codec_rank:ICodec; private var codec_sameClan:ICodec; private var codec_uid:ICodec; public function CodecMatchMakingUserInfo() { super(); } public function init(param1:IProtocol) : void { this.codec_friend = param1.getCodec(new TypeCodecInfo(Boolean,false)); this.codec_id = param1.getCodec(new TypeCodecInfo(Long,false)); this.codec_onLine = param1.getCodec(new TypeCodecInfo(Boolean,false)); this.codec_rank = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_sameClan = param1.getCodec(new TypeCodecInfo(Boolean,false)); this.codec_uid = param1.getCodec(new TypeCodecInfo(String,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:MatchMakingUserInfo = new MatchMakingUserInfo(); local2.friend = this.codec_friend.decode(param1) as Boolean; local2.id = this.codec_id.decode(param1) as Long; local2.onLine = this.codec_onLine.decode(param1) as Boolean; local2.rank = this.codec_rank.decode(param1) as int; local2.sameClan = this.codec_sameClan.decode(param1) as Boolean; local2.uid = this.codec_uid.decode(param1) as String; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:MatchMakingUserInfo = MatchMakingUserInfo(param2); this.codec_friend.encode(param1,local3.friend); this.codec_id.encode(param1,local3.id); this.codec_onLine.encode(param1,local3.onLine); this.codec_rank.encode(param1,local3.rank); this.codec_sameClan.encode(param1,local3.sameClan); this.codec_uid.encode(param1,local3.uid); } } }
package alternativa.tanks.models.foreignclan { import alternativa.tanks.gui.foreignclan.ForeignClanWindow; import flash.events.EventDispatcher; import projects.tanks.client.clans.panel.foreignclan.ForeignClanData; public class ForeignClanServiceImpl extends EventDispatcher implements ForeignClanService { private var _foreignClanWindow:ForeignClanWindow; private var _isShowForeignClan:Boolean; public function ForeignClanServiceImpl() { super(); } public function showForeignClan(param1:ForeignClanData) : void { this._isShowForeignClan = true; this._foreignClanWindow = new ForeignClanWindow(param1); } public function sendRequest() : void { dispatchEvent(new ForeignClanEvent(ForeignClanEvent.SEND_REQUEST)); } public function acceptRequest() : void { dispatchEvent(new ForeignClanEvent(ForeignClanEvent.ACCEPT_REQUEST)); } public function revokeRequest() : void { dispatchEvent(new ForeignClanEvent(ForeignClanEvent.REVOKE_REQUEST)); } public function userSmallRankForAddClan() : void { this._foreignClanWindow.showAlertSmallRank(); } public function onJoinClan(param1:String) : void { if(this._foreignClanWindow != null) { this._foreignClanWindow.joinClan(param1); } } public function alreadyInClanOutgoing() : void { if(this._foreignClanWindow != null) { this._foreignClanWindow.alreadyInClanOutgoing(); } } public function alreadyInIncoming() : void { if(this._foreignClanWindow != null) { this._foreignClanWindow.alreadyInIncoming(); } } public function clanBlocked(param1:String) : void { if(this._foreignClanWindow != null) { this._foreignClanWindow.clanBlocked(param1); } } public function destroyWindow() : void { this._foreignClanWindow.destroy(); } public function resetWindow() : void { this._foreignClanWindow = null; this._isShowForeignClan = false; } public function isShowForeignClan() : Boolean { return this._isShowForeignClan; } } }
package alternativa.tanks.models.weapon.shaft { import alternativa.tanks.models.weapon.WeaponObject; import alternativa.tanks.models.weapon.laser.LaserPointer; import platform.client.fp10.core.type.IGameObject; public class ShaftObject extends WeaponObject { public function ShaftObject(param1:IGameObject) { super(param1); } public function getEffects() : ShaftEffects { var local1:IShaftSFXModel = IShaftSFXModel(object.adapt(IShaftSFXModel)); return local1.getEffects(); } public function laser() : LaserPointer { return LaserPointer(object.adapt(LaserPointer)); } } }
package alternativa.tanks.view.icons { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.icons.BattleParamsCheckButtonIcons_upgradesClass.png")] public class BattleParamsCheckButtonIcons_upgradesClass extends BitmapAsset { public function BattleParamsCheckButtonIcons_upgradesClass() { super(); } } }
package alternativa.engine3d.animation.keys { import alternativa.engine3d.alternativa3d; use namespace alternativa3d; public class NumberKey extends Keyframe { alternativa3d var _value:Number = 0; alternativa3d var next:NumberKey; public function NumberKey() { super(); } public function interpolate(param1:NumberKey, param2:NumberKey, param3:Number) : void { this.alternativa3d::_value = (1 - param3) * param1.alternativa3d::_value + param3 * param2.alternativa3d::_value; } override public function get value() : Object { return this.alternativa3d::_value; } override public function set value(param1:Object) : void { this.alternativa3d::_value = Number(param1); } override alternativa3d function get nextKeyFrame() : Keyframe { return this.alternativa3d::next; } override alternativa3d function set nextKeyFrame(param1:Keyframe) : void { this.alternativa3d::next = NumberKey(param1); } } }
package alternativa.tanks.models.bonus.region { public class BonusRegionAlphaMultiplier { private static const MIN_MULTIPLIER:Number = 0; private static const MAX_MULTIPLIER:Number = 1; private var _startTime:int; private var _duration:int; private var _startAlphaMesh:Number; private var _newAlpha:Number; public function BonusRegionAlphaMultiplier() { super(); } private static function clamp(param1:Number) : Number { return Math.max(MIN_MULTIPLIER,Math.min(MAX_MULTIPLIER,param1)); } public function init(param1:int, param2:int, param3:Number) : void { this._startTime = param1; this._duration = param2; this._startAlphaMesh = param3; } public function reset() : void { this._startTime = -1; this._duration = 0; } public function getAlphaMultiplier(param1:int, param2:Boolean) : Number { if(param1 > this._startTime + this._duration) { if(param2) { return MAX_MULTIPLIER; } return MIN_MULTIPLIER; } var local3:Number = (param1 - this._startTime) / this._duration; if(!param2) { local3 = 1 - local3; } return clamp(local3); } public function getAlpha(param1:int, param2:Boolean) : Number { var local4:Number = NaN; if(param1 > this._startTime + this._duration) { if(param2) { return MAX_MULTIPLIER; } return MIN_MULTIPLIER; } var local3:Number = (param1 - this._startTime) / this._duration; if(param2) { local4 = this._startAlphaMesh + (1 - this._startAlphaMesh) * local3; } else { local4 = this._startAlphaMesh * (1 - local3); } return clamp(local4); } public function get startAlphaMesh() : Number { return this._startAlphaMesh; } public function get newAlpha() : Number { return this._newAlpha; } public function set newAlpha(param1:Number) : void { this._newAlpha = param1; } } }
package alternativa.tanks.sfx.christmas { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.sfx.christmas.ChristmasTreeToyEffect_RedTexture.png")] public class ChristmasTreeToyEffect_RedTexture extends BitmapAsset { public function ChristmasTreeToyEffect_RedTexture() { super(); } } }
package alternativa.proplib.types { import alternativa.proplib.objects.PropObject; public class PropLOD { public var prop:PropObject; public var distance:Number; public function PropLOD(prop:PropObject, distance:Number) { super(); this.prop = prop; this.distance = distance; } public function traceLOD() : void { trace("Lod distance",this.distance); this.prop.traceProp(); } } }
package alternativa.proplib.utils { import alternativa.utils.textureutils.TextureByteData; public class TextureByteDataMap { private var _data:Object; public function TextureByteDataMap(data:Object = null) { super(); this._data = data == null ? {} : data; } public function get data() : Object { return this._data; } public function getValue(key:String) : TextureByteData { return this._data[key]; } public function putValue(key:String, value:TextureByteData) : void { this._data[key] = value; } } }
package mx.core { public interface IFlexAsset { } }
package controls.resultassets { import assets.resultwindow.bres_NORMAL_GREEN_PIXEL; import assets.resultwindow.bres_NORMAL_GREEN_TL; import controls.statassets.StatLineBase; public class ResultWindowGreenNormal extends StatLineBase { public function ResultWindowGreenNormal() { super(); tl = new bres_NORMAL_GREEN_TL(1,1); px = new bres_NORMAL_GREEN_PIXEL(1,1); } } }
package alternativa.tanks.model.challenge.battlepass.notifier { import flash.events.Event; public class BattlePassPurchaseEvent extends Event { public static const PURCHASE:String = "BattlePassPurchaseEvent.PURCHASE"; public function BattlePassPurchaseEvent() { super(PURCHASE,true); } } }
package projects.tanks.client.battlefield.models.bonus.battle.bonusregions { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class BonusRegionsModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function BonusRegionsModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.materials { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.materials.TextureMaterialFragmentShader; import alternativa.engine3d.materials.TextureResourcesRegistry; import alternativa.engine3d.materials.UVMatrixProvider; import alternativa.gfx.core.Device; import alternativa.gfx.core.IndexBufferResource; import alternativa.gfx.core.ProgramResource; import alternativa.gfx.core.VertexBufferResource; import flash.display.BitmapData; import flash.display3D.Context3DProgramType; import flash.display3D.Context3DVertexBufferFormat; import flash.utils.ByteArray; use namespace alternativa3d; public class TrackMaterial extends TextureMaterial { private static var programs:Array = []; public var uvMatrixProvider:UVMatrixProvider; public function TrackMaterial(param1:BitmapData) { this.uvMatrixProvider = new UVMatrixProvider(); super(param1,true); } public function update() : void { uvTransformConst = this.uvMatrixProvider.getValues(); } override alternativa3d function get transparent() : Boolean { return false; } override alternativa3d function drawOpaque(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D) : void { var _loc7_:BitmapData = texture; if(_loc7_ == null) { return; } this.update(); var _loc8_:Device = param1.device; var _loc9_:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0; var _loc10_:Boolean = !param1.view.constrained && param1.ssao && param1.ssaoStrength > 0 && param6.useDepth; var _loc11_:Boolean = !param1.view.constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight; var _loc12_:Boolean = !param1.view.constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap; var _loc13_:Boolean = !param1.view.constrained && param1.deferredLighting && param1.deferredLightingStrength > 0 && param6.useDepth && param6.useLight; var _loc14_:Boolean = alphaTestThreshold > 0 && this.transparent; _loc8_.setProgram(this.getProgram(!_loc14_,false,false,false,param1.view.quality,repeat,_mipMapping > 0,param6.concatenatedColorTransform != null,false,_loc9_,false,_loc10_,_loc11_,_loc12_,_loc7_ == null,false,_loc13_,false,param1.view.correction,param6.concatenatedBlendMode != "normal",_loc14_,false)); _loc8_.setTextureAt(0,textureResource); uvCorrection[0] = textureResource.correctionU; uvCorrection[1] = textureResource.correctionV; if(_loc10_) { _loc8_.setTextureAt(1,param1.depthMap); } else { _loc8_.setTextureAt(1,null); } if(_loc12_) { _loc8_.setTextureAt(2,param1.shadowMap.map); _loc8_.setTextureAt(3,param1.shadowMap.noise); } else { _loc8_.setTextureAt(2,null); _loc8_.setTextureAt(3,null); } _loc8_.setTextureAt(4,null); _loc8_.setTextureAt(6,null); if(_loc13_) { _loc8_.setTextureAt(5,param1.lightMap); } else { _loc8_.setTextureAt(5,null); } _loc8_.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_3); _loc8_.setVertexBufferAt(1,param2,3,Context3DVertexBufferFormat.FLOAT_2); if(_loc11_) { _loc8_.setVertexBufferAt(2,param2,5,Context3DVertexBufferFormat.FLOAT_3); } else { _loc8_.setVertexBufferAt(2,null); } _loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.transformConst,3,false); _loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1); _loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,14,uvTransformConst,2); if(param6.concatenatedColorTransform != null) { _loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,2,false); } if(_loc14_) { fragmentConst[3] = alphaTestThreshold; _loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1,false); } _loc8_.drawTriangles(param3,param4,param5); ++param1.numDraws; param1.numTriangles += param5; } override alternativa3d function drawTransparent(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D, param7:Boolean = false) : void { var _loc8_:BitmapData = texture; if(_loc8_ == null) { return; } var _loc9_:Device = param1.device; var _loc10_:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0; var _loc11_:Boolean = !param1.view.constrained && param1.softTransparency && param1.softTransparencyStrength > 0 && param6.softAttenuation > 0; var _loc12_:Boolean = !param1.view.constrained && param1.ssao && param1.ssaoStrength > 0 && param6.useDepth; var _loc13_:Boolean = !param1.view.constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight; var _loc14_:Boolean = !param1.view.constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap; var _loc15_:Boolean = !param1.view.constrained && param1.deferredLighting && param1.deferredLightingStrength > 0; var _loc16_:Boolean = _loc15_ && param6.useDepth && param6.useLight; _loc9_.setProgram(this.getProgram(false,false,false,false,param1.view.quality,repeat,_mipMapping > 0,param6.concatenatedColorTransform != null,param6.concatenatedAlpha < 1,_loc10_,_loc11_,_loc12_,_loc13_,_loc14_,_loc8_ == null,_loc8_ == null && _textureATFAlpha != null,_loc16_,false,param1.view.correction,param6.concatenatedBlendMode != "normal",false,param7)); _loc9_.setTextureAt(0,textureResource); uvCorrection[0] = textureResource.correctionU; uvCorrection[1] = textureResource.correctionV; if(_loc12_ || _loc11_) { _loc9_.setTextureAt(1,param1.depthMap); } else { _loc9_.setTextureAt(1,null); } if(_loc14_) { _loc9_.setTextureAt(2,param1.shadowMap.map); _loc9_.setTextureAt(3,param1.shadowMap.noise); } else { _loc9_.setTextureAt(2,null); _loc9_.setTextureAt(3,null); } _loc9_.setTextureAt(4,null); _loc9_.setTextureAt(6,null); if(_loc16_) { _loc9_.setTextureAt(5,param1.lightMap); } else { _loc9_.setTextureAt(5,null); } _loc9_.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_1); _loc9_.setVertexBufferAt(1,null); _loc9_.setVertexBufferAt(2,null); _loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.transformConst,3,false); _loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1); if(_loc11_) { fragmentConst[2] = param6.softAttenuation; _loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1); } if(param6.concatenatedColorTransform != null) { _loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,2,false); } else if(param6.concatenatedAlpha < 1) { _loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,1); } _loc9_.drawTriangles(param3,param4,param5); ++param1.numDraws; param1.numTriangles += param5; } override protected function getProgram(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean, param6:Boolean, param7:Boolean, param8:Boolean, param9:Boolean, param10:Boolean, param11:Boolean, param12:Boolean, param13:Boolean, param14:Boolean, param15:Boolean, param16:Boolean, param17:Boolean, param18:Boolean, param19:Boolean, param20:Boolean, param21:Boolean, param22:Boolean) : ProgramResource { var _loc25_:ByteArray = null; var _loc26_:ByteArray = null; var _loc23_:int = int(param1) | int(param2) << 1 | int(param3) << 2 | int(param4) << 3 | int(param5) << 4 | int(param6) << 5 | int(param7) << 6 | int(param8) << 7 | int(param9) << 8 | int(param10) << 9 | int(param11) << 10 | int(param12) << 11 | int(param13) << 12 | int(param14) << 13 | int(param15) << 14 | int(param16) << 15 | int(param17) << 16 | int(param18) << 17 | int(param19) << 18 | int(param20) << 19 | int(param21) << 20 | int(param22) << 21; var _loc24_:ProgramResource = programs[_loc23_]; if(_loc24_ == null) { _loc25_ = new TrackMaterialVertexShader(!param22,param14 || param11 || param12 || param17,param13,param4,param14,param10,param2,param3,param3,param19).agalcode; _loc26_ = new TextureMaterialFragmentShader(param6,param5,param7,param15,param16,param21,!param1 && !param16 && !param15,param8,param9,param3,param13,param11,param12,param17,param18,param14,param10,param2,param20).agalcode; _loc24_ = new ProgramResource(_loc25_,_loc26_); programs[_loc23_] = _loc24_; } return _loc24_; } override public function set mipMapping(param1:int) : void { _mipMapping = param1; textureResource = TextureResourcesRegistry.getTextureResource(bitmap,_mipMapping,repeat,_hardwareMipMaps); } } }
package com.alternativaplatform.projects.tanks.client.warfare.models.common.longterm { import alternativa.object.ClientObject; import alternativa.types.Long; public interface ILongTermBonusModelBase { function effectStart(param1:ClientObject, param2:Long, param3:int) : void; function effectStop(param1:ClientObject, param2:Long) : void; } }
package projects.tanks.client.battlefield.models.statistics { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class MemoryStatisticsModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:MemoryStatisticsModelServer; private var client:IMemoryStatisticsModelBase = IMemoryStatisticsModelBase(this); private var modelId:Long = Long.getLong(2138145909,-1607792064); public function MemoryStatisticsModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new MemoryStatisticsModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package com.lorentz.SVG.utils { import flash.geom.Point; /** Class: Bezier Bezier approximation methods used in SVG import. (see muSpriteLogo.png) */ public final class Bezier { /** Approximation deviation tolerance. Approximation deviation tolerance. Determines how precise bezier curves are approximated. Set tolerance to zero to use Timothee Groleau's midpoint method. Or larger than zero to use Robert Penner's recursive approximation method. In Robert Penner's version of getQuadBezier, the last argument is tolerance (1 = very accurate, 25 (eg) = faster, not so accurate) By default, Robert Penner's recursive approximation method is used for approximation. In such case, this value determines how many pixels a quadratic can be off the real bezier curve. If this value is set to 1 (the default), every quadratic will be one pixel off the real bezier curve, or less. This is precise enough for most uses. You can set this value to 25, for instance, to make the approximation process faster. If you are planning on displaying the SVG path very large (by scaling it), it might be useful to ensure some extra precision by setting this value to something less than 1, such as .1. If you set this value to 0 (zero), Timothee Groleau's midpoint method will be used for approximation. */ public static var tolerance:Number = 1; public static var savedBeziers:Object = new Object(); public var p1:Point = null; public var p2:Point = null; public var c1:Point = null; public var c2:Point = null; public var QPts:Array = null; /** Bezier object Constructor Defines a cubic bezier curve with anchor points p1 and p2, and control points c1 and c2. Also calls getQuadBezier to create an array of quadratic bezier points, QPts, which approximate the cubic Parameters: p1 - first anchor p2 - second anchor c1 - first control c2 - second control */ public function Bezier(p1Anchor:Point, c1Control:Point, c2Control:Point, p2Anchor:Point):void { p1 = p1Anchor; p2 = p2Anchor; c1 = c1Control; c2 = c2Control; QPts = new Array(); getQuadBezier(p1, c1, c2, p2); } /** Calls either <GetQuadBez_TG> or <GetQuadBez_RP> depending on <tolerance>. Parameters: p1Anchor - first anchor p2Anchor - second anchor c1Control - first control c2Control - second control */ private function getQuadBezier(p1Anchor:Point, c1Control:Point, c2Control:Point, p2Anchor:Point):void { if (tolerance == 0) { // Timothee Groleau's midpoint method: GetQuadBez_TG(p1Anchor, c1Control, c2Control, p2Anchor); } else { // Robert Penner's recursive approximation method: GetQuadBez_RP(p1Anchor, c1Control, c2Control, p2Anchor); } } /** Midpoint approximation of a cubic bezier with four quad segments. Set tolerance to zero to use it. Adds 4 elements to QPts array. Parameters: P0 - first anchor P1 - first control P2 - second control P3 - second anchor */ private function GetQuadBez_TG(P0:Point, P1:Point, P2:Point, P3:Point):void { // calculates the useful base points var PA:Point = Point.interpolate(P0, P1, 3/4); var PB:Point = Point.interpolate(P3, P2, 3/4); // get 1/16 of the [P3, P0] segment var dx:Number = (P3.x - P0.x)/16; var dy:Number = (P3.y - P0.y)/16; // calculates control point 1 var Pc_1:Point = Point.interpolate(P0, P1, 3/8); // calculates control point 2 var Pc_2:Point = Point.interpolate(PA, PB, 3/8); Pc_2.x -= dx; Pc_2.y -= dy; // calculates control point 3 var Pc_3:Point = Point.interpolate(PB, PA, 3/8); Pc_3.x += dx; Pc_3.y += dy; // calculates control point 4 var Pc_4:Point = Point.interpolate(P3, P2, 3/8); // calculates the 3 anchor points var Pa_1:Point = Point.interpolate(Pc_1, Pc_2, 0.5); var Pa_2:Point = Point.interpolate(PA, PB, 0.5); var Pa_3:Point = Point.interpolate(Pc_3, Pc_4, 0.5); // save the four quadratic subsegments this.QPts = [{s:P0,p:Pa_1, c:Pc_1}, {s:Pa_1,p:Pa_2, c:Pc_2}, {s:Pa_2,p:Pa_3, c:Pc_3}, {s:Pa_3,p:P3, c:Pc_4}]; } /** Recursive midpoint approximation of a cubic bezier with as many quadratic bezier segments (n) as required to achieve specified tolerance. Set tolerance larger than zero to use. Adds n elements to QPts array. Parameters: a - first anchor point b - first control point c - second control point d - second anchor point k - tolerance (low number = most accurate result) */ private function GetQuadBez_RP(a:Point, b:Point, c:Point, d:Point):void { // find intersection between bezier arms var s:Point = MathUtils.intersect2Lines(a, b, c, d); if (s && !isNaN(s.x) && !isNaN(s.y) && s.length != Infinity) { // find distance between the midpoints var dx:Number = (a.x + d.x + s.x * 4 - (b.x + c.x) * 3) * .125; var dy:Number = (a.y + d.y + s.y * 4 - (b.y + c.y) * 3) * .125; // split curve if the quadratic isn't close enough if (dx*dx + dy*dy <= tolerance*tolerance) { // end recursion by saving points this.QPts.push({s:a,p:d,c:s}); return; } } else { var mp:Point = Point.interpolate(a, d, 0.5); if(Point.distance(a, mp)<=tolerance){ this.QPts.push({s:a,p:d,c:mp}); return; } } var halves:Object = MathUtils.bezierSplit (a, b, c, d); var b0:Object = halves.b0; var b1:Object = halves.b1; // recursive call to subdivide curve GetQuadBez_RP(a, b0.b, b0.c, b0.d); GetQuadBez_RP(b1.a, b1.b, b1.c, d); } } }
package alternativa.tanks.calculators { import flash.geom.Point; public class LinearUtil { public function LinearUtil() { super(); } public static function interpolateX(param1:Point, param2:Point, param3:Number) : Number { return param1.y + (param3 - param1.x) / (param2.x - param1.x) * (param2.y - param1.y); } public static function interpolateY(param1:Point, param2:Point, param3:Number) : Number { return param1.x + (param3 - param1.y) / (param2.y - param1.y) * (param2.x - param1.x); } } }
package alternativa.tanks.models.bonus.battlefield { import alternativa.math.Vector3; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventListener; import alternativa.tanks.battle.events.BattleFinishEvent; import alternativa.tanks.battle.events.StateCorrectionEvent; import alternativa.tanks.bonuses.Bonus; import alternativa.tanks.models.battle.battlefield.BattleUserInfoService; import alternativa.tanks.models.battle.battlefield.BattlefieldEvents; import alternativa.tanks.models.effects.common.IBonusCommonModel; import alternativa.types.Long; import flash.utils.Dictionary; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.bonus.battle.BonusSpawnData; import projects.tanks.client.battlefield.models.bonus.battle.battlefield.BattlefieldBonusesModelBase; import projects.tanks.client.battlefield.models.bonus.battle.battlefield.IBattlefieldBonusesModelBase; import projects.tanks.client.battlefield.types.Vector3d; import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService; [ModelInfo] public class BattlefieldBonusesModel extends BattlefieldBonusesModelBase implements IBattlefieldBonusesModelBase, BattleEventListener, BattlefieldEvents { [Inject] public static var battleEventDispatcher:BattleEventDispatcher; [Inject] public static var userInfoService:BattleUserInfoService; [Inject] public static var userPropertiesService:IUserPropertiesService; private var bonuses:Dictionary = new Dictionary(); public function BattlefieldBonusesModel() { super(); battleEventDispatcher.addBattleEventListener(BattleFinishEvent,this); } public function handleBattleEvent(param1:Object) : void { this.removeAllBonuses(); } private function removeAllBonuses() : void { var local1:* = undefined; for(local1 in this.bonuses) { this.removeBonus(local1); } } private function spawnBonus(param1:IGameObject, param2:Long, param3:Vector3d, param4:int, param5:Boolean) : void { var local6:IBonusCommonModel = null; var local7:Bonus = null; if(param1 != null) { local6 = IBonusCommonModel(param1.adapt(IBonusCommonModel)); local7 = local6.getBonus(param2); local7.spawn(new Vector3(param3.x,param3.y,param3.z),param4,getInitParam().bonusFallSpeed,param5,getFunctionWrapper(this.onBonusTankCollision)); this.bonuses[local7.bonusId] = local7; } } private function onBonusTankCollision(param1:Bonus) : void { battleEventDispatcher.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE); server.attemptToTakeBonus(param1.bonusId); } [Obfuscation(rename="false")] public function spawnBonuses(param1:Vector.<BonusSpawnData>) : void { var local2:BonusSpawnData = null; if(param1 != null) { for each(local2 in param1) { this.spawnBonus(local2.battleBonusObject,local2.bonusId,local2.spawnPosition,0,false); } } } [Obfuscation(rename="false")] public function removeBonuses(param1:Vector.<Long>) : void { var local2:Long = null; if(param1 != null) { for each(local2 in param1) { this.removeBonus(local2); } } } private function removeBonus(param1:Long) : void { var local2:Bonus = this.bonuses[param1]; if(local2 != null) { delete this.bonuses[param1]; local2.remove(); } } [Obfuscation(rename="false")] public function bonusTaken(param1:Long) : void { var local2:Bonus = this.bonuses[param1]; if(local2 != null) { delete this.bonuses[param1]; local2.pickup(); } } [Obfuscation(rename="false")] public function attemptToTakeBonusFailedTankNotActive(param1:Long) : void { var local2:Bonus = this.bonuses[param1]; if(local2 != null) { local2.enableTrigger(); } } public function onBattleLoaded() : void { this.createExistingBonuses(); } private function createExistingBonuses() : void { var local1:BonusSpawnData = null; for each(local1 in getInitParam().bonuses) { this.spawnBonus(local1.battleBonusObject,local1.bonusId,local1.spawnPosition,local1.lifeTime,false); } getInitParam().bonuses = null; } [Obfuscation(rename="false")] public function spawnBonusesOnGround(param1:Vector.<BonusSpawnData>) : void { var local2:BonusSpawnData = null; for each(local2 in param1) { this.spawnBonus(local2.battleBonusObject,local2.bonusId,local2.spawnPosition,0,true); } } } }
package alternativa.tanks.models.battlefield.effects.levelup.rangs { import mx.core.BitmapAsset; [ExcludeClass] public class BigRangIcon_rang_3 extends BitmapAsset { public function BigRangIcon_rang_3() { super(); } } }
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.common { import scpacker.Base; public class WeaponCommonModelBase extends Base { public function WeaponCommonModelBase() { super(); } } }
package projects.tanks.client.panel.model.shopabonement { public interface IActiveShopAbonementsModelBase { } }
package projects.tanks.client.clans.user.outgoing { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; public class ClanUserOutgoingModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ClanUserOutgoingModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.engine3d.loaders.collada { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.containers.BSPContainer; import alternativa.engine3d.containers.ConflictContainer; import alternativa.engine3d.containers.DistanceSortContainer; import alternativa.engine3d.containers.KDContainer; import alternativa.engine3d.containers.LODContainer; import alternativa.engine3d.core.Clipping; import alternativa.engine3d.core.Object3DContainer; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.materials.Material; import alternativa.engine3d.objects.Mesh; import alternativa.engine3d.objects.Sprite3D; use namespace collada; use namespace alternativa3d; use namespace daeAlternativa3DLibrary; use namespace daeAlternativa3DMesh; public class DaeAlternativa3DObject extends DaeElement { public var isSplitter:Boolean = false; public var isBaseGeometry:Boolean = false; public function DaeAlternativa3DObject(param1:XML, param2:DaeDocument) { super(param1,param2); } override protected function parseImplementation() : Boolean { var local1:String = null; var local2:XML = null; var local3:XML = null; if(data.localName() == "mesh") { local2 = data.baseGeometry[0]; if(local2 != null) { local1 = local2.toString(); this.isBaseGeometry = local1 == "true" || parseInt(local1) != 0; } local3 = data.splitter[0]; if(local3 != null) { local1 = local3.toString(); this.isSplitter = local1 == "true" || parseInt(local1) != 0; } } return true; } public function parseContainer(param1:String) : Object3DContainer { var local2:Object3DContainer = null; var local3:XML = null; switch(data.localName()) { case "object3d": local2 = new Object3DContainer(); local2.name = param1; return this.setParams(local2); case "distanceSort": local2 = new DistanceSortContainer(); local2.name = param1; return this.setParams(local2); case "conflict": local2 = new ConflictContainer(); local2.name = param1; return this.setParams(local2); case "kdTree": local2 = new KDContainer(); local2.name = param1; return this.setParams(local2); case "bspTree": local2 = new BSPContainer(); local3 = data.clipping[0]; if(local3 != null) { (local2 as BSPContainer).clipping = this.getClippingValue(local3); } local2.name = param1; return this.setParams(local2); default: return null; } } private function getClippingValue(param1:XML) : int { switch(param1.toString()) { case "BOUND_CULLING": return Clipping.BOUND_CULLING; case "FACE_CULLING": return Clipping.FACE_CULLING; case "FACE_CLIPPING": return Clipping.FACE_CLIPPING; default: return Clipping.BOUND_CULLING; } } private function getSortingValue(param1:XML) : int { switch(param1.toString()) { case "STATIC_BSP": return 3; case "DYNAMIC_BSP": return Sorting.DYNAMIC_BSP; case "NONE": return Sorting.NONE; case "AVERAGE_Z": return Sorting.AVERAGE_Z; default: return Sorting.NONE; } } public function parseSprite3D(param1:String, param2:Material = null) : Sprite3D { var local3:Sprite3D = null; var local4:XML = null; var local5:XML = null; var local6:XML = null; if(data.localName() == "sprite") { local3 = new Sprite3D(100,100,param2); local3.name = param1; local4 = data.sorting[0]; local5 = data.clipping[0]; if(local4 != null) { local3.sorting = this.getSortingValue(local4); } if(local5 != null) { local3.clipping = this.getClippingValue(local5); } local6 = data.rotation[0]; if(local6 != null) { local3.rotation = parseInt(local6.toString()) * Math.PI / 180; } return this.setParams(local3); } return null; } public function applyA3DMeshProperties(param1:Mesh) : void { var local2:XML = null; var local3:XML = null; var local4:XML = null; var local5:Boolean = false; if(data.localName() == "mesh") { local2 = data.sorting[0]; local3 = data.clipping[0]; local4 = data.optimizeBSP[0]; if(local3 != null) { param1.clipping = this.getClippingValue(local3); } local5 = local4 != null ? local4.toString() != "false" : true; if(local2 != null) { param1.sorting = this.getSortingValue(local2); if(local5) { param1.alternativa3d::transformId = 1; } } this.setParams(param1); } } public function parseLOD(param1:String, param2:DaeNode) : LODContainer { var local3:LODContainer = null; var local4:XMLList = null; var local5:int = 0; var local6:int = 0; var local7:XML = null; var local8:DaeNode = null; var local9:DaeObject = null; if(data.localName() == "lod") { local3 = new LODContainer(); local3.name = param1; local4 = data.level; local5 = int(local4.length()); local6 = 0; while(local6 < local5) { local7 = local4[local6]; local8 = document.findNode(local7.@url[0]); if(local8.scene == null) { param2.nodes.push(local8); } local9 = null; if(local8 != null) { if(local8.rootJoint != null) { local8 = local8.rootJoint; local8.parse(); if(local8.skins != null) { local9 = local8.skins[0]; } } else { local8.parse(); if(local8.objects != null) { local9 = local8.objects[0]; } } } else { document.logger.logNotFoundError(local7.@url[0]); } if(local9 != null) { local9.lodDistance = parseNumber(local7.@distance[0]); } local6++; } return this.setParams(local3); } return null; } private function setParams(param1:*) : * { var param:XML = null; var name:String = null; var value:String = null; var num:Number = NaN; var object:* = param1; var params:XMLList = data.param; var i:int = 0; var count:int = int(params.length()); while(i < count) { param = params[i]; try { name = param.@name[0].toString(); value = param.text().toString(); if(value == "true") { object[name] = true; } else if(value == "false") { object[name] = false; } else if(value.charAt(0) == "\"" && value.charAt(value.length - 1) == "\"" || value.charAt(0) == "\'" && value.charAt(value.length - 1) == "\'") { object[name] = value; } else { if(value.indexOf(".") >= 0) { num = parseFloat(value); } else if(value.indexOf(",") >= 0) { value = value.replace(/,/,"."); num = parseFloat(value); } else { num = parseInt(value); } if(isNaN(num)) { object[name] = value; } else { object[name] = num; } } } catch(e:Error) { } i++; } return object; } } }
package alternativa.tanks.view.forms { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.controller.events.ChangeEmailCaptchaEvent; import alternativa.tanks.controller.events.NavigationEvent; import alternativa.tanks.loader.ILoaderWindowService; import alternativa.tanks.service.IPasswordParamsService; import alternativa.tanks.view.bubbles.Bubble; import alternativa.tanks.view.bubbles.EntranceBubbleFactory; import alternativa.tanks.view.forms.commons.RegistrationCommonElementsSection; import alternativa.tanks.view.forms.primivites.Alert; import alternativa.tanks.view.forms.primivites.ValidationIcon; import controls.base.DefaultButtonBase; import controls.base.TankInputBase; import flash.display.Bitmap; import flash.display.Sprite; import flash.events.Event; import flash.events.FocusEvent; import flash.events.MouseEvent; import flash.geom.Point; import forms.TankWindowWithHeader; import forms.events.AlertEvent; import forms.events.LoginFormEvent; import projects.tanks.clients.flash.commons.models.captcha.CaptchaSection; import projects.tanks.clients.flash.commons.models.captcha.RefreshCaptchaClickedEvent; import projects.tanks.clients.flash.commons.services.validate.IValidateService; import projects.tanks.clients.fp10.libraries.TanksLocale; import services.alertservice.AlertAnswer; public class ChangeEmailAndPasswordForm extends Sprite { [Inject] public static var localeService:ILocaleService; [Inject] public static var passwordParamsService:IPasswordParamsService; [Inject] public static var validateService:IValidateService; [Inject] public static var loaderWindowService:ILoaderWindowService; private var windowSize:Point; private var window:TankWindowWithHeader; private var pass1:TankInputBase; private var pass2:TankInputBase; private var emailInput:TankInputBase; private var pass1CheckIcon:ValidationIcon; private var pass2CheckIcon:ValidationIcon; private var emailCheckIcon:ValidationIcon; private var okButton:DefaultButtonBase; private var cancelButton:DefaultButtonBase; public var captchaSection:CaptchaSection; private const windowMargin:int = 12; private const margin:int = 20; private const buttonSize:Point = new Point(104,33); private var _inputsLeftMargin:int = 110; private var passwordIsTooEasyBubble:Bubble; private var passwordsDoNotMatchBubble:Bubble; private var emailInvalodBubble:Bubble; private var passChangeAlert:Alert; private var passChangeFailureAlert:Alert; private var windowShown:Boolean; public function ChangeEmailAndPasswordForm() { super(); this.init(); } private static function isPasswordValid(param1:String) : Boolean { return param1 == "" || param1.length >= passwordParamsService.minPasswordLength && passwordParamsService.forbiddenPasswords.indexOf(param1.toLowerCase()) == -1; } public function init() : void { this.initGUI(); if(Boolean(stage)) { this.initEvents(); this.alignYourself(null); } else { addEventListener(Event.ADDED_TO_STAGE,function(param1:Event):void { initEvents(); alignYourself(null); dispatchEvent(new RefreshCaptchaClickedEvent()); loaderWindowService.hide(); }); } this.windowShown = true; } private function initGUI() : void { var local2:int = 0; var local3:int = 0; var local1:int = 120; this.emailInput = new TankInputBase(); this.emailInput.label = localeService.getText(TanksLocale.TEXT_SETTINGS_EMAIL_LABEL_TEXT); this.emailInput.maxChars = RegistrationCommonElementsSection.MAX_CHARS_EMAIL; this.pass1 = new TankInputBase(); this.pass1.label = localeService.getText(TanksLocale.TEXT_SETTINGS_NEW_PASSWORD_LABEL_TEXT); this._inputsLeftMargin = this.margin + 3 + (int(Math.abs(this.emailInput._label.x)) > int(Math.abs(this.pass1._label.x)) ? int(Math.abs(this.emailInput._label.x)) : int(Math.abs(this.pass1._label.x))); this.pass1.hidden = true; this.pass1.width = local1; this.pass1.x = this._inputsLeftMargin; this.pass1.y = this.margin + 6; this.pass1.maxChars = passwordParamsService.maxPasswordLength; this.pass1.tabIndex = 1; this.pass2 = new TankInputBase(); this.pass2.width = local1; this.pass2.hidden = true; this.pass2.label = localeService.getText(TanksLocale.TEXT_SETTINGS_REENTER_PASSWORD_LABEL_TEXT); this.pass2.x = int(this.margin + 4 + this.pass1.width + 20 + this.pass2._label.width); this.pass2.y = this.pass1.y; this.pass2.maxChars = passwordParamsService.maxPasswordLength; this.pass2.tabIndex = 2; local3 = this.pass2.x + local1 + this.margin + 5; this.emailInput.x = this._inputsLeftMargin; this.emailInput.y = this.pass2.y + this.pass2.height + this.windowMargin; local2 = int(local3 - this.margin - this.emailInput.x - 5); this.emailInput.width = local2; this.emailInput.tabIndex = 3; this.captchaSection = new CaptchaSection(); this.captchaSection.manualInitialize(); this.captchaSection.y = int(this.emailInput.y + this.emailInput.height + this.margin); this.captchaSection.x = this._inputsLeftMargin; this.captchaSection.width = local2; this.captchaSection.visible = true; this.captchaSection.tabIndex = 4; this.pass1CheckIcon = new ValidationIcon(); this.pass2CheckIcon = new ValidationIcon(); this.emailCheckIcon = new ValidationIcon(); this.pass1CheckIcon.x = local1 - this.pass1CheckIcon.width - 10; this.pass1CheckIcon.y = 7; this.pass2CheckIcon.x = local1 - this.pass2CheckIcon.width - 10; this.pass2CheckIcon.y = 7; this.emailCheckIcon.x = local2 - this.emailCheckIcon.width - 10; this.emailCheckIcon.y = 7; this.okButton = new DefaultButtonBase(); this.okButton.label = localeService.getText(TanksLocale.TEXT_SETTINGS_BUTTON_SAVE_TEXT); this.okButton.x = int(local3 - this.buttonSize.x - this.margin + 3); this.okButton.y = this.captchaSection.y + this.captchaSection.height + this.windowMargin; this.okButton.enable = false; this.cancelButton = new DefaultButtonBase(); this.cancelButton.label = localeService.getText(TanksLocale.TEXT_SETTINGS_BUTTON_CANCEL_TEXT); this.cancelButton.x = int(local3 - this.buttonSize.x * 2 - 5 - this.margin); this.cancelButton.y = this.okButton.y; var local4:int = int(this.okButton.y + this.okButton.height + this.windowMargin); this.windowSize = new Point(local3,local4); this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_CHANGE_PASSWORD_EMAIL,this.windowSize.x,this.windowSize.y); addChild(this.window); addChild(this.okButton); addChild(this.cancelButton); addChild(this.emailInput); addChild(this.captchaSection); addChild(this.pass1); addChild(this.pass2); this.pass1.addChild(this.pass1CheckIcon); this.pass2.addChild(this.pass2CheckIcon); this.emailInput.addChild(this.emailCheckIcon); this.window.height = this.windowSize.y; this.window.width = this.windowSize.x; this.createBubbles(); } private function initEvents() : void { stage.addEventListener(Event.RESIZE,this.alignYourself); this.pass1.addEventListener(LoginFormEvent.TEXT_CHANGED,this.updatePasswordBlock); this.pass1.addEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.pass2.addEventListener(LoginFormEvent.TEXT_CHANGED,this.updatePasswordBlock); this.pass2.addEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.emailInput.addEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.emailInput.addEventListener(LoginFormEvent.TEXT_CHANGED,this.checkEmailConfirmation); this.okButton.addEventListener(MouseEvent.CLICK,this.onOkClick); this.cancelButton.addEventListener(MouseEvent.CLICK,this.onCancelClick); this.captchaSection.refreshButton.addEventListener(MouseEvent.CLICK,function(param1:MouseEvent):void { dispatchEvent(new RefreshCaptchaClickedEvent()); }); } public function get password() : String { if(this.pass2.validValue && this.pass1.value == this.pass2.value) { return this.pass1.value; } return null; } public function get email() : String { if(this.emailInput.validValue) { return this.emailInput.value; } return null; } public function set email(param1:String) : void { this.emailInput.value = param1; this.updatePasswordBlock(null); } private function alignYourself(param1:Event) : void { if(Boolean(stage)) { this.x = int((stage.stageWidth - this.windowSize.x) / 2); this.y = int((stage.stageHeight - this.windowSize.y) / 2); } } private function updatePasswordBlock(param1:Event) : void { this.pass1.validValue = isPasswordValid(this.pass1.value); this.pass1CheckIcon.markAsInvalid(); var local2:Boolean = true; this.pass2.validValue = this.pass2.value == "" || this.pass1.value == this.pass2.value; this.pass2CheckIcon.markAsInvalid(); if(this.pass1.value == "") { this.pass1CheckIcon.turnOff(); local2 = false; } else if(this.pass1.validValue) { this.pass1CheckIcon.markAsValid(); local2 = false; } if(this.pass2.value == "") { this.pass2CheckIcon.turnOff(); } else if(this.pass2.validValue) { this.pass2CheckIcon.markAsValid(); } if(local2) { this.pass1CheckIcon.addChild(this.passwordIsTooEasyBubble); } else { this.passwordIsTooEasyBubble.hide(); } var local3:Boolean = !(local2 || this.pass2.validValue); if(local3) { this.pass2CheckIcon.addChild(this.passwordsDoNotMatchBubble); } else { this.passwordsDoNotMatchBubble.hide(); } var local4:Boolean = Boolean(validateService.isEmailValid(this.emailInput.value)); if(local4) { this.emailInput.validValue = true; if(this.emailInput.value == "") { this.emailCheckIcon.turnOff(); } else { this.emailCheckIcon.markAsValid(); } } else { this.emailInput.validValue = false; this.emailCheckIcon.markAsInvalid(); } var local5:Boolean = !(local2 || local3) && !local4; if(local5) { this.emailCheckIcon.addChild(this.emailInvalodBubble); } else { this.emailInvalodBubble.hide(); } this.okButton.enable = this.pass1.value != "" && this.pass1.validValue && this.pass2.value != "" && this.pass2.validValue && this.emailInput.value != "" && this.emailInput.validValue; } private function removeEvents() : void { stage.removeEventListener(Event.RESIZE,this.alignYourself); this.pass1.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.updatePasswordBlock); this.pass1.removeEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.pass2.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.updatePasswordBlock); this.pass2.removeEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.emailInput.removeEventListener(FocusEvent.FOCUS_OUT,this.updatePasswordBlock); this.emailInput.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.updatePasswordBlock); this.okButton.removeEventListener(MouseEvent.CLICK,this.onOkClick); this.cancelButton.removeEventListener(MouseEvent.CLICK,this.onCancelClick); } private function createBubbles() : void { this.passwordIsTooEasyBubble = EntranceBubbleFactory.passwordIsTooEasyBubble(); this.passwordsDoNotMatchBubble = EntranceBubbleFactory.passwordsDoNotMatchBubble(); this.emailInvalodBubble = EntranceBubbleFactory.emailInvalidBubble(); } private function onOkClick(param1:MouseEvent) : void { dispatchEvent(new ChangeEmailCaptchaEvent(this.getCaptchaAnswer(),this.password,this.email)); } private function onCancelClick(param1:MouseEvent) : void { this.gotToLoginForm(); } private function gotToLoginForm() : void { dispatchEvent(new NavigationEvent(NavigationEvent.GO_TO_LOGIN_FORM)); } private function checkEmailConfirmation(param1:Event) : void { this.updatePasswordBlock(null); } public function hideYourself() : void { if(this.windowShown) { this.removeEvents(); this.windowShown = false; } } public function setPasswordChangeResult(param1:Boolean, param2:String) : void { if(param1) { this.passChangeAlert = new Alert(); this.passChangeAlert.showAlert(param2,Vector.<String>([AlertAnswer.OK])); if(Boolean(parent)) { parent.addChild(this.passChangeAlert); } this.passChangeAlert.addEventListener(AlertEvent.ALERT_BUTTON_PRESSED,this.onChangePasswordAndEmailAlertPressed); } else { this.passChangeFailureAlert = new Alert(); this.passChangeFailureAlert.showAlert(param2,Vector.<String>([AlertAnswer.OK])); if(Boolean(parent)) { parent.addChild(this.passChangeFailureAlert); } this.passChangeFailureAlert.addEventListener(AlertEvent.ALERT_BUTTON_PRESSED,this.onChangePassChangeFailureAlertPressed); } } private function onChangePassChangeFailureAlertPressed(param1:AlertEvent) : void { this.passChangeFailureAlert.parent.removeChild(this.passChangeFailureAlert); this.gotToLoginForm(); } private function onChangePasswordAndEmailAlertPressed(param1:AlertEvent) : void { this.passChangeAlert.parent.removeChild(this.passChangeAlert); this.gotToLoginForm(); } private function getCaptchaAnswer() : String { return this.captchaSection.captchaAnswer.value; } public function setCaptchaImage(param1:Bitmap) : void { this.captchaSection.captcha = param1; } public function captchaFailed() : void { dispatchEvent(new RefreshCaptchaClickedEvent()); } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] public class ConfugirationsNewbiesWindow_b extends BitmapAsset { public function ConfugirationsNewbiesWindow_b() { super(); } } }
package alternativa.tanks.gui.shopitems.item.kits.description.panel { import alternativa.tanks.gui.shopitems.item.kits.description.KitPackageDescriptionView; import flash.display.Bitmap; import flash.display.Shape; import flash.display.Sprite; public class KitPackageDescriptionPanel extends Sprite { private var top:Bitmap; private var topLeft:Bitmap; private var topRight:Bitmap; private var left:Bitmap; private var right:Bitmap; private var bottom:Bitmap; private var bottomLeft:Bitmap; private var bottomRight:Bitmap; private var center:Bitmap; private var backgroundFillTopPart:Shape; private var backgroundFillBottomPart:Shape; public function KitPackageDescriptionPanel() { super(); this.topLeft = new Bitmap(KitPackageDescriptionPanelBitmaps.leftTopCorner); addChild(this.topLeft); this.top = new Bitmap(KitPackageDescriptionPanelBitmaps.topLine); addChild(this.top); this.topRight = new Bitmap(KitPackageDescriptionPanelBitmaps.rightTopCorner); addChild(this.topRight); this.left = new Bitmap(KitPackageDescriptionPanelBitmaps.leftLine); addChild(this.left); this.right = new Bitmap(KitPackageDescriptionPanelBitmaps.rightLine); addChild(this.right); this.bottom = new Bitmap(KitPackageDescriptionPanelBitmaps.bottomLine); addChild(this.bottom); this.bottomLeft = new Bitmap(KitPackageDescriptionPanelBitmaps.leftBottomCorner); addChild(this.bottomLeft); this.bottomRight = new Bitmap(KitPackageDescriptionPanelBitmaps.rightBottomCorner); addChild(this.bottomRight); this.center = new Bitmap(KitPackageDescriptionPanelBitmaps.centerLine); addChild(this.center); this.backgroundFillTopPart = new Shape(); addChild(this.backgroundFillTopPart); this.backgroundFillBottomPart = new Shape(); addChild(this.backgroundFillBottomPart); } public function resize(param1:int) : void { var _loc2_:int = 0; var _loc3_:int = 0; _loc2_ = KitPackageDescriptionView.WIDTH; _loc3_ = (param1 + 2) * KitPackageDescriptionView.ITEM_HEIGHT + KitPackageDescriptionView.LEFT_TOP_MARGIN * 3 - this.topLeft.height; this.top.x = this.topLeft.width; this.top.width = _loc2_ - this.topRight.width - this.topLeft.width; this.topRight.x = _loc2_ - this.topRight.width; this.bottomLeft.y = _loc3_ - this.bottomLeft.height; this.bottomRight.x = this.topRight.x; this.bottomRight.y = this.bottomLeft.y; this.bottom.y = this.bottomLeft.y; this.bottom.x = this.top.x; this.bottom.width = this.top.width; this.left.y = this.topLeft.height; this.left.height = this.bottomLeft.y - this.left.y; this.right.y = this.left.y; this.right.x = this.topRight.x; this.right.height = this.bottomRight.y - this.right.y; this.center.x = 1; this.center.y = _loc3_ - KitPackageDescriptionView.LEFT_TOP_MARGIN * 3 - KitPackageDescriptionView.ITEM_HEIGHT + this.center.height; this.center.width = _loc2_ - 2; this.fillBackgroundShape(this.backgroundFillTopPart,this.topLeft.width,this.topLeft.height,this.top.width,this.center.y - this.center.height); this.fillBackgroundShape(this.backgroundFillBottomPart,this.topLeft.width,this.center.y + this.center.height,this.top.width,KitPackageDescriptionView.LEFT_TOP_MARGIN * 3 + KitPackageDescriptionView.ITEM_HEIGHT - this.center.height * 3); } private function fillBackgroundShape(param1:Shape, param2:Number, param3:Number, param4:Number, param5:Number) : void { param1.graphics.clear(); param1.graphics.beginBitmapFill(KitPackageDescriptionPanelBitmaps.backgroundPixel); param1.graphics.drawRect(param2,param3,param4,param5); } } }
package alternativa.tanks.models.weapon.ricochet { import alternativa.math.Vector3; import alternativa.physics.Body; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class RicochetWeaponCallbackAdapt implements RicochetWeaponCallback { private var object:IGameObject; private var impl:RicochetWeaponCallback; public function RicochetWeaponCallbackAdapt(param1:IGameObject, param2:RicochetWeaponCallback) { super(); this.object = param1; this.impl = param2; } public function onShot(param1:int, param2:int, param3:Vector3) : void { var time:int = param1; var shotId:int = param2; var shotDirection:Vector3 = param3; try { Model.object = this.object; this.impl.onShot(time,shotId,shotDirection); } finally { Model.popObject(); } } public function onDummyShot(param1:int) : void { var time:int = param1; try { Model.object = this.object; this.impl.onDummyShot(time); } finally { Model.popObject(); } } public function onTargetHit(param1:int, param2:Body, param3:Vector.<Vector3>) : void { var shotId:int = param1; var targetBody:Body = param2; var impactPoints:Vector.<Vector3> = param3; try { Model.object = this.object; this.impl.onTargetHit(shotId,targetBody,impactPoints); } finally { Model.popObject(); } } public function onStaticHit(param1:int, param2:Vector.<Vector3>) : void { var shotId:int = param1; var impactPoints:Vector.<Vector3> = param2; try { Model.object = this.object; this.impl.onStaticHit(shotId,impactPoints); } finally { Model.popObject(); } } } }
package utils { import controls.scroller.blue.ScrollSkinBlue; import controls.scroller.blue.ScrollThumbSkinBlue; import controls.scroller.gray.ScrollSkinGray; import controls.scroller.gray.ScrollThumbSkinGray; import controls.scroller.green.ScrollSkinGreen; import controls.scroller.green.ScrollThumbSkinGreen; import controls.scroller.red.ScrollSkinRed; import controls.scroller.red.ScrollThumbSkinRed; import fl.core.UIComponent; public class ScrollStyleUtils { public function ScrollStyleUtils() { super(); } public static function setStyle(param1:UIComponent, param2:Class, param3:Class, param4:Class, param5:Class) : void { param1.setStyle("downArrowUpSkin",param2); param1.setStyle("downArrowDownSkin",param2); param1.setStyle("downArrowOverSkin",param2); param1.setStyle("downArrowDisabledSkin",param2); param1.setStyle("upArrowUpSkin",param3); param1.setStyle("upArrowDownSkin",param3); param1.setStyle("upArrowOverSkin",param3); param1.setStyle("upArrowDisabledSkin",param3); param1.setStyle("trackUpSkin",param4); param1.setStyle("trackDownSkin",param4); param1.setStyle("trackOverSkin",param4); param1.setStyle("trackDisabledSkin",param4); param1.setStyle("thumbUpSkin",param5); param1.setStyle("thumbDownSkin",param5); param1.setStyle("thumbOverSkin",param5); param1.setStyle("thumbDisabledSkin",param5); } public static function setGreenStyle(param1:UIComponent) : void { setStyle(param1,ScrollSkinGreen.trackBottom,ScrollSkinGreen.trackTop,ScrollSkinGreen.track,ScrollThumbSkinGreen); } public static function setGrayStyle(param1:UIComponent) : void { setStyle(param1,ScrollSkinGray.trackBottom,ScrollSkinGray.trackTop,ScrollSkinGray.track,ScrollThumbSkinGray); } public static function setBlueStyle(param1:UIComponent) : void { setStyle(param1,ScrollSkinBlue.trackBottom,ScrollSkinBlue.trackTop,ScrollSkinBlue.track,ScrollThumbSkinBlue); } public static function setRedStyle(param1:UIComponent) : void { setStyle(param1,ScrollSkinRed.trackBottom,ScrollSkinRed.trackTop,ScrollSkinRed.track,ScrollThumbSkinRed); } } }
package alternativa.tanks.gui.shop.payment.promo { import alternativa.osgi.service.display.IDisplay; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.gui.shop.components.paymentview.PaymentView; import alternativa.tanks.gui.shop.events.ShopWindowBackButtonEvent; import alternativa.tanks.gui.shop.windows.ShopWindow; import controls.TankWindowInner; import controls.ValidationIcon; import controls.base.DefaultButtonBase; import controls.base.LabelBase; import controls.base.TankInput; import flash.events.Event; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.TextEvent; import flash.text.TextFieldAutoSize; import flash.text.TextFormatAlign; import flash.ui.Keyboard; import projects.tanks.clients.flash.commons.services.validate.IValidateService; import projects.tanks.clients.flash.commons.services.validate.ValidateService; import projects.tanks.clients.fp10.libraries.TanksLocale; import utils.tweener.TweenLite; import utils.tweener.core.SimpleTimeline; import utils.tweener.easing.Elastic; public class PromoCodeActivateForm extends PaymentView { [Inject] public static var localeService:ILocaleService; [Inject] public static var validateService:IValidateService; [Inject] public static var display:IDisplay; public static const DESCRIPTION_HEIGHT:int = 82; public static const MARGIN:int = 8; protected static const MAX_LENGTH:int = 50; protected static const BLOCK_LENGTH:int = 5; protected static const TWEEN_FORCE:int = 100; private var codeField:TankInput; private var sendButton:DefaultButtonBase; private var validationIcon:ValidationIcon; private var codeTween:SimpleTimeline; private var code:String = ""; private var descriptionWindow:TankWindowInner; private var descriptionLabel:LabelBase; private var invalidCodeLabel:LabelBase; public function PromoCodeActivateForm() { super(); this.descriptionWindow = new TankWindowInner(0,0,TankWindowInner.GREEN); this.descriptionWindow.showBlink = true; addChild(this.descriptionWindow); this.descriptionLabel = this.createDescriptionLabel(); this.descriptionWindow.addChild(this.descriptionLabel); this.codeField = this.createCodeField(); addChild(this.codeField); this.sendButton = this.createSendButton(); addChild(this.sendButton); this.validationIcon = this.createValidationIcon(); addChild(this.validationIcon); this.invalidCodeLabel = this.createInvalidCodeLabel(); addChild(this.invalidCodeLabel); } private function createDescriptionLabel() : LabelBase { var local1:LabelBase = new LabelBase(); local1.autoSize = TextFieldAutoSize.NONE; local1.multiline = true; local1.wordWrap = true; local1.htmlText = localeService.getText(TanksLocale.TEXT_PROMO_CODE_DESCRIPTION_TEXT); return local1; } protected function createCodeField() : TankInput { var local1:TankInput = new TankInput(); local1.align = TextFormatAlign.CENTER; local1.restrict = ValidateService.PROMO_CODE_PATTERN; return local1; } protected function createSendButton() : DefaultButtonBase { var local1:DefaultButtonBase = new DefaultButtonBase(); local1.tabEnabled = false; local1.enable = false; local1.label = localeService.getText(TanksLocale.TEXT_BUG_REPORT_BUTTON_SEND_TEXT); return local1; } protected function createValidationIcon() : ValidationIcon { var local1:ValidationIcon = new ValidationIcon(); local1.fadeTime = 0.2; local1.mouseEnabled = false; local1.mouseChildren = false; return local1; } protected function createInvalidCodeLabel() : LabelBase { var local1:LabelBase = new LabelBase(); local1.visible = false; local1.text = localeService.getText(TanksLocale.TEXT_PROMO_CODE_INVALID_LABEL); return local1; } private function onBackButtonClick(param1:Event) : void { display.stage.focus = null; } private function getCodeTween() : SimpleTimeline { if(!this.codeTween) { this.codeTween = new SimpleTimeline(); this.codeTween.insert(TweenLite.to(this.codeField.textField,0.2,{ "x":TWEEN_FORCE, "ease":Elastic.easeInOut })); this.codeTween.insert(TweenLite.to(this.codeField.textField,0.2,{ "x":0, "ease":Elastic.easeInOut })); } return this.codeTween; } private function textInputHandler(param1:TextEvent = null) : void { this.getCodeTween().restart(true); } private function textEditHandler(param1:Event) : void { var local7:String = null; this.codeField.validValue = true; this.validationIcon.turnOff(); this.invalidCodeLabel.visible = false; var local2:String = ""; var local3:int = this.codeField.textField.length; var local4:int = 0; var local5:int = 0; var local6:int = local3 - this.codeField.textField.selectionBeginIndex; this.code = ""; while(local4 < local3) { local7 = this.codeField.textField.text.charAt(local4).toUpperCase(); if(local7 != "-") { this.code = this.code.concat(local7); if(local3 - local4 > 1 && local2.length - BLOCK_LENGTH + 1 >= 0 && (local2.length - local5 + 1) % BLOCK_LENGTH == 0) { local7 = local7.concat("-"); local5++; } local2 = local2.concat(local7); } local4++; } if(local2.charAt(local2.length - 1) == "-") { local2 = local2.substr(0,local2.length - 1); } this.codeField.maxChars = MAX_LENGTH + local5; this.codeField.textField.text = local2; this.codeField.textField.setSelection(local2.length - local6,local2.length - local6); this.sendButton.enable = validateService.isValidPromoCode(this.code); } private function sendOnEnterHandler(param1:KeyboardEvent) : void { if(param1.keyCode == Keyboard.ENTER) { this.sendClickHandler(); } } protected function sendClickHandler(param1:MouseEvent = null) : void { if(validateService.isValidPromoCode(this.code)) { this.validationIcon.startProgress(); this.sendButton.enable = false; this.codeField.enable = false; dispatchEvent(new SendPromoCodeEvent(this.getPromoCode())); } else { this.textInputHandler(); } } override public function render(param1:int, param2:int) : void { super.render(param1,param2); this.getCodeTween().restart(true); this.sendButton.enable = validateService.isValidPromoCode(this.code); this.descriptionWindow.width = param1; this.descriptionWindow.height = DESCRIPTION_HEIGHT; this.descriptionLabel.width = param1 - 2 * ShopWindow.WINDOW_PADDING; this.descriptionLabel.height = DESCRIPTION_HEIGHT - 2 * ShopWindow.WINDOW_PADDING; this.descriptionLabel.x = this.descriptionLabel.y = ShopWindow.WINDOW_PADDING; var local3:int = param2 - DESCRIPTION_HEIGHT; this.codeField.width = Math.max(this.codeField.textField.textWidth,int(param1 * 0.66)); this.codeField.x = param1 - this.codeField.width - this.sendButton.width - MARGIN >> 1; this.codeField.y = (local3 - this.codeField.height >> 1) + DESCRIPTION_HEIGHT; this.sendButton.x = this.codeField.x + this.codeField.width + MARGIN; this.sendButton.y = this.codeField.y; this.invalidCodeLabel.x = int(this.codeField.x + this.codeField.width / 2) - int(this.invalidCodeLabel.width / 2); this.invalidCodeLabel.y = int(this.codeField.y + this.codeField.height + MARGIN); var local4:int = this.codeField.height - this.validationIcon.height >> 1; this.validationIcon.x = this.codeField.x + this.codeField.width - local4 - this.validationIcon.height; this.validationIcon.y = this.codeField.y + local4 + 2; } override public function postRender() : void { super.postRender(); this.codeField.addEventListener(TextEvent.TEXT_INPUT,this.textInputHandler); this.codeField.addEventListener(Event.CHANGE,this.textEditHandler); this.codeField.addEventListener(KeyboardEvent.KEY_DOWN,this.sendOnEnterHandler); this.sendButton.addEventListener(MouseEvent.CLICK,this.sendClickHandler); window.addEventListener(ShopWindowBackButtonEvent.CLICK,this.onBackButtonClick); } override public function destroy() : void { this.codeField.removeEventListener(TextEvent.TEXT_INPUT,this.textInputHandler); this.codeField.removeEventListener(Event.CHANGE,this.textEditHandler); this.codeField.removeEventListener(KeyboardEvent.KEY_DOWN,this.sendOnEnterHandler); this.sendButton.removeEventListener(MouseEvent.CLICK,this.sendClickHandler); window.removeEventListener(ShopWindowBackButtonEvent.CLICK,this.onBackButtonClick); super.destroy(); } private function getPromoCode() : String { return this.code; } public function activateFailed() : void { this.codeField.validValue = false; this.codeField.enable = true; this.validationIcon.markAsInvalid(); this.invalidCodeLabel.visible = true; } public function codeActivatedSuccessful() : void { this.codeField.enable = true; this.validationIcon.markAsValid(); } } }
package alternativa.engine3d.objects { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Debug; import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.RayIntersectionData; import alternativa.engine3d.core.VG; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.core.Wrapper; import alternativa.engine3d.materials.Material; import alternativa.gfx.core.IndexBufferResource; import alternativa.gfx.core.VertexBufferResource; import flash.geom.Vector3D; import flash.utils.Dictionary; use namespace alternativa3d; public class BSP extends Object3D { public var clipping:int = 2; public var threshold:Number = 0.01; public var splitAnalysis:Boolean = true; alternativa3d var vertexList:Vertex; alternativa3d var root:Node; alternativa3d var faces:Vector.<Face>; alternativa3d var vertexBuffer:VertexBufferResource; alternativa3d var indexBuffer:IndexBufferResource; alternativa3d var numTriangles:int; public function BSP() { this.faces = new Vector.<Face>(); super(); } public function createTree(param1:Mesh, param2:Boolean = false) : void { this.destroyTree(); if(!param2) { param1 = param1.clone() as Mesh; } param1.optimizeForDynamicBSP(2); var _loc3_:Face = param1.faceList; this.vertexList = param1.vertexList; param1.faceList = null; param1.vertexList = null; var _loc4_:Vertex = this.vertexList; while(_loc4_ != null) { _loc4_.transformId = 0; _loc4_.id = null; _loc4_ = _loc4_.next; } var _loc5_:int = 0; var _loc6_:Face = _loc3_; while(_loc6_ != null) { _loc6_.calculateBestSequenceAndNormal(); _loc6_.id = null; this.faces[_loc5_] = _loc6_; _loc5_++; _loc6_ = _loc6_.next; } if(_loc3_ != null) { this.root = this.createNode(_loc3_); } calculateBounds(); } public function destroyTree() : void { this.deleteResources(); this.vertexList = null; if(this.root != null) { this.destroyNode(this.root); this.root = null; } this.faces.length = 0; } public function setMaterialToAllFaces(param1:Material) : void { var _loc4_:Face = null; this.deleteResources(); var _loc2_:int = this.faces.length; var _loc3_:int = 0; while(_loc3_ < _loc2_) { _loc4_ = this.faces[_loc3_]; _loc4_.material = param1; _loc3_++; } if(this.root != null) { this.setMaterialToNode(this.root,param1); } } override public function intersectRay(origin:Vector3D, direction:Vector3D, exludedObjects:Dictionary = null, camera:Camera3D = null) : RayIntersectionData { if(exludedObjects != null && exludedObjects[this]) { return null; } if(!boundIntersectRay(origin,direction,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ)) { return null; } if(this.root != null) { return this.intersectRayNode(this.root,origin.x,origin.y,origin.z,direction.x,direction.y,direction.z); } return null; } private function intersectRayNode(node:Node, ox:Number, oy:Number, oz:Number, dx:Number, dy:Number, dz:Number) : RayIntersectionData { var data:RayIntersectionData = null; var dot:Number = NaN; var time:Number = NaN; var cx:Number = NaN; var cy:Number = NaN; var cz:Number = NaN; var f:Face = null; var wrapper:Wrapper = null; var a:Vertex = null; var b:Vertex = null; var abx:Number = NaN; var aby:Number = NaN; var abz:Number = NaN; var acx:Number = NaN; var acy:Number = NaN; var acz:Number = NaN; var offset:Number = node.normalX * ox + node.normalY * oy + node.normalZ * oz - node.offset; if(offset > 0) { if(node.positive != null) { data = this.intersectRayNode(node.positive,ox,oy,oz,dx,dy,dz); if(data != null) { return data; } } dot = dx * node.normalX + dy * node.normalY + dz * node.normalZ; if(dot < 0) { time = -offset / dot; cx = ox + dx * time; cy = oy + dy * time; cz = oz + dz * time; f = node.faceList; while(true) { if(f != null) { for(wrapper = f.wrapper; wrapper != null; wrapper = wrapper.next) { a = wrapper.vertex; b = wrapper.next != null ? wrapper.next.vertex : f.wrapper.vertex; abx = b.x - a.x; aby = b.y - a.y; abz = b.z - a.z; acx = cx - a.x; acy = cy - a.y; acz = cz - a.z; if((acz * aby - acy * abz) * node.normalX + (acx * abz - acz * abx) * node.normalY + (acy * abx - acx * aby) * node.normalZ < 0) { break; } } continue; } if(node.negative != null) { return this.intersectRayNode(node.negative,ox,oy,oz,dx,dy,dz); } } data = new RayIntersectionData(); data.object = this; data.face = f; data.point = new Vector3D(cx,cy,cz); data.time = time; return data; } } else { if(node.negative != null) { data = this.intersectRayNode(node.negative,ox,oy,oz,dx,dy,dz); if(data != null) { return data; } } if(node.positive != null && dx * node.normalX + dy * node.normalY + dz * node.normalZ > 0) { return this.intersectRayNode(node.positive,ox,oy,oz,dx,dy,dz); } } return null; } override alternativa3d function checkIntersection(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Dictionary) : Boolean { return this.root != null ? Boolean(Boolean(this.checkIntersectionNode(this.root,param1,param2,param3,param4,param5,param6,param7))) : Boolean(Boolean(false)); } private function checkIntersectionNode(param1:Node, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number) : Boolean { var _loc9_:Number = NaN; var _loc14_:Number = NaN; var _loc15_:Number = NaN; var _loc16_:Number = NaN; var _loc17_:Number = NaN; var _loc18_:Face = null; var _loc19_:Wrapper = null; var _loc20_:Vertex = null; var _loc21_:Vertex = null; var _loc22_:Number = NaN; var _loc23_:Number = NaN; var _loc24_:Number = NaN; var _loc25_:Number = NaN; var _loc26_:Number = NaN; var _loc27_:Number = NaN; var _loc10_:Number = param1.normalX; var _loc11_:Number = param1.normalY; var _loc12_:Number = param1.normalZ; var _loc13_:Number = _loc10_ * param2 + _loc11_ * param3 + _loc12_ * param4 - param1.offset; if(_loc13_ > 0) { _loc9_ = param5 * _loc10_ + param6 * _loc11_ + param7 * _loc12_; if(_loc9_ < 0) { _loc14_ = -_loc13_ / _loc9_; if(_loc14_ < param8) { _loc15_ = param2 + param5 * _loc14_; _loc16_ = param3 + param6 * _loc14_; _loc17_ = param4 + param7 * _loc14_; _loc18_ = param1.faceList; while(true) { if(_loc18_ == null) { if(param1.negative != null && this.checkIntersectionNode(param1.negative,param2,param3,param4,param5,param6,param7,param8)) { return true; } } else { _loc19_ = _loc18_.wrapper; while(_loc19_ != null) { _loc20_ = _loc19_.vertex; _loc21_ = _loc19_.next != null ? _loc19_.next.vertex : _loc18_.wrapper.vertex; _loc22_ = _loc21_.x - _loc20_.x; _loc23_ = _loc21_.y - _loc20_.y; _loc24_ = _loc21_.z - _loc20_.z; _loc25_ = _loc15_ - _loc20_.x; _loc26_ = _loc16_ - _loc20_.y; _loc27_ = _loc17_ - _loc20_.z; if((_loc27_ * _loc23_ - _loc26_ * _loc24_) * _loc10_ + (_loc25_ * _loc24_ - _loc27_ * _loc22_) * _loc11_ + (_loc26_ * _loc22_ - _loc25_ * _loc23_) * _loc12_ < 0) { break; } _loc19_ = _loc19_.next; } if(_loc19_ == null) { break; } _loc18_ = _loc18_.next; } } return true; } } return param1.positive != null && this.checkIntersectionNode(param1.positive,param2,param3,param4,param5,param6,param7,param8); } if(param1.negative != null && this.checkIntersectionNode(param1.negative,param2,param3,param4,param5,param6,param7,param8)) { return true; } if(param1.positive != null) { _loc9_ = param5 * _loc10_ + param6 * _loc11_ + param7 * _loc12_; return _loc9_ > 0 && -_loc13_ / _loc9_ < param8 && this.checkIntersectionNode(param1.positive,param2,param3,param4,param5,param6,param7,param8); } return false; } override alternativa3d function collectPlanes(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Vector3D, param5:Vector3D, param6:Vector.<Face>, param7:Dictionary = null) : void { if(param7 != null && param7[this] || this.root == null) { return; } var _loc8_:Vector3D = calculateSphere(param1,param2,param3,param4,param5); if(!boundIntersectSphere(_loc8_,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ)) { return; } this.collectPlanesNode(this.root,_loc8_,param6); } private function collectPlanesNode(param1:Node, param2:Vector3D, param3:Vector.<Face>) : void { var _loc5_:Face = null; var _loc6_:Wrapper = null; var _loc7_:Vertex = null; var _loc4_:Number = param1.normalX * param2.x + param1.normalY * param2.y + param1.normalZ * param2.z - param1.offset; if(_loc4_ >= param2.w) { if(param1.positive != null) { this.collectPlanesNode(param1.positive,param2,param3); } } else if(_loc4_ <= -param2.w) { if(param1.negative != null) { this.collectPlanesNode(param1.negative,param2,param3); } } else { _loc5_ = param1.faceList; while(_loc5_ != null) { _loc6_ = _loc5_.wrapper; while(_loc6_ != null) { _loc7_ = _loc6_.vertex; _loc7_.cameraX = ma * _loc7_.x + mb * _loc7_.y + mc * _loc7_.z + md; _loc7_.cameraY = me * _loc7_.x + mf * _loc7_.y + mg * _loc7_.z + mh; _loc7_.cameraZ = mi * _loc7_.x + mj * _loc7_.y + mk * _loc7_.z + ml; _loc6_ = _loc6_.next; } param3.push(_loc5_); _loc5_ = _loc5_.next; } if(param1.positive != null) { this.collectPlanesNode(param1.positive,param2,param3); } if(param1.negative != null) { this.collectPlanesNode(param1.negative,param2,param3); } } } override public function clone() : Object3D { var _loc1_:BSP = new BSP(); _loc1_.clonePropertiesFrom(this); return _loc1_; } override protected function clonePropertiesFrom(param1:Object3D) : void { var _loc3_:Vertex = null; var _loc4_:Vertex = null; var _loc8_:Vertex = null; var _loc9_:Face = null; var _loc10_:Face = null; var _loc11_:Wrapper = null; var _loc12_:Wrapper = null; var _loc13_:Wrapper = null; super.clonePropertiesFrom(param1); var _loc2_:BSP = param1 as BSP; this.clipping = _loc2_.clipping; this.threshold = _loc2_.threshold; this.splitAnalysis = _loc2_.splitAnalysis; _loc3_ = _loc2_.vertexList; while(_loc3_ != null) { _loc8_ = new Vertex(); _loc8_.x = _loc3_.x; _loc8_.y = _loc3_.y; _loc8_.z = _loc3_.z; _loc8_.u = _loc3_.u; _loc8_.v = _loc3_.v; _loc8_.normalX = _loc3_.normalX; _loc8_.normalY = _loc3_.normalY; _loc8_.normalZ = _loc3_.normalZ; _loc3_.value = _loc8_; if(_loc4_ != null) { _loc4_.next = _loc8_; } else { this.vertexList = _loc8_; } _loc4_ = _loc8_; _loc3_ = _loc3_.next; } var _loc5_:Dictionary = new Dictionary(); var _loc6_:int = _loc2_.faces.length; var _loc7_:int = 0; while(_loc7_ < _loc6_) { _loc9_ = _loc2_.faces[_loc7_]; _loc10_ = new Face(); _loc10_.material = _loc9_.material; _loc10_.smoothingGroups = _loc9_.smoothingGroups; _loc10_.normalX = _loc9_.normalX; _loc10_.normalY = _loc9_.normalY; _loc10_.normalZ = _loc9_.normalZ; _loc10_.offset = _loc9_.offset; _loc11_ = null; _loc12_ = _loc9_.wrapper; while(_loc12_ != null) { _loc13_ = new Wrapper(); _loc13_.vertex = _loc12_.vertex.value; if(_loc11_ != null) { _loc11_.next = _loc13_; } else { _loc10_.wrapper = _loc13_; } _loc11_ = _loc13_; _loc12_ = _loc12_.next; } this.faces[_loc7_] = _loc10_; _loc5_[_loc9_] = _loc10_; _loc7_++; } if(_loc2_.root != null) { this.root = _loc2_.cloneNode(_loc2_.root,_loc5_); } _loc3_ = _loc2_.vertexList; while(_loc3_ != null) { _loc3_.value = null; _loc3_ = _loc3_.next; } } private function cloneNode(param1:Node, param2:Dictionary) : Node { var _loc4_:Face = null; var _loc6_:Face = null; var _loc7_:Wrapper = null; var _loc8_:Wrapper = null; var _loc9_:Wrapper = null; var _loc3_:Node = new Node(); var _loc5_:Face = param1.faceList; while(_loc5_ != null) { _loc6_ = param2[_loc5_]; if(_loc6_ == null) { _loc6_ = new Face(); _loc6_.material = _loc5_.material; _loc6_.normalX = _loc5_.normalX; _loc6_.normalY = _loc5_.normalY; _loc6_.normalZ = _loc5_.normalZ; _loc6_.offset = _loc5_.offset; _loc7_ = null; _loc8_ = _loc5_.wrapper; while(_loc8_ != null) { _loc9_ = new Wrapper(); _loc9_.vertex = _loc8_.vertex.value; if(_loc7_ != null) { _loc7_.next = _loc9_; } else { _loc6_.wrapper = _loc9_; } _loc7_ = _loc9_; _loc8_ = _loc8_.next; } } if(_loc3_.faceList != null) { _loc4_.next = _loc6_; } else { _loc3_.faceList = _loc6_; } _loc4_ = _loc6_; _loc5_ = _loc5_.next; } _loc3_.normalX = param1.normalX; _loc3_.normalY = param1.normalY; _loc3_.normalZ = param1.normalZ; _loc3_.offset = param1.offset; if(param1.negative != null) { _loc3_.negative = this.cloneNode(param1.negative,param2); } if(param1.positive != null) { _loc3_.positive = this.cloneNode(param1.positive,param2); } return _loc3_; } private function setMaterialToNode(param1:Node, param2:Material) : void { var _loc3_:Face = param1.faceList; while(_loc3_ != null) { _loc3_.material = param2; _loc3_ = _loc3_.next; } if(param1.negative != null) { this.setMaterialToNode(param1.negative,param2); } if(param1.positive != null) { this.setMaterialToNode(param1.positive,param2); } } override alternativa3d function draw(param1:Camera3D) : void { var _loc4_:Face = null; var _loc5_:Face = null; var _loc6_:Face = null; var _loc7_:Face = null; var _loc8_:Vertex = null; if(this.root == null) { return; } if(this.clipping == 0) { if(culling & 1) { return; } culling = 0; } this.prepareResources(); if(useDepth = !param1.view.constrained && (param1.softTransparency && param1.softTransparencyStrength > 0 || param1.ssao && param1.ssaoStrength > 0 || param1.deferredLighting && param1.deferredLightingStrength > 0) && concatenatedAlpha >= depthMapAlphaThreshold) { param1.depthObjects[param1.depthCount] = this; ++param1.depthCount; } var _loc2_:int = !!param1.debug ? int(int(param1.checkInDebug(this))) : int(int(0)); var _loc3_:Face = this.faces[0]; if(concatenatedAlpha >= 1 && concatenatedBlendMode == "normal" && _loc3_.material != null && (!_loc3_.material.transparent || _loc3_.material.alphaTestThreshold > 0)) { param1.addOpaque(_loc3_.material,this.vertexBuffer,this.indexBuffer,0,this.numTriangles,this); if(_loc2_ > 0) { if(_loc2_ & Debug.EDGES) { Debug.drawEdges(param1,null,16777215); } if(_loc2_ & Debug.BOUNDS) { Debug.drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } } } else { if(transformId > 500000000) { transformId = 0; _loc8_ = this.vertexList; while(_loc8_ != null) { _loc8_.transformId = 0; _loc8_ = _loc8_.next; } } ++transformId; calculateInverseMatrix(); _loc4_ = this.collectNode(this.root); if(_loc4_ == null) { return; } if(culling > 0) { if(this.clipping == 1) { _loc4_ = param1.cull(_loc4_,culling); } else { _loc4_ = param1.clip(_loc4_,culling); } if(_loc4_ == null) { return; } } if(_loc2_ > 0) { if(_loc2_ & Debug.EDGES) { Debug.drawEdges(param1,_loc4_,16777215); } if(_loc2_ & Debug.BOUNDS) { Debug.drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } } _loc7_ = _loc4_; while(_loc7_ != null) { _loc5_ = _loc7_.processNext; if(_loc5_ == null || _loc5_.material != _loc4_.material) { _loc7_.processNext = null; if(_loc4_.material != null) { _loc4_.processNegative = _loc6_; _loc6_ = _loc4_; } else { while(_loc4_ != null) { _loc7_ = _loc4_.processNext; _loc4_.processNext = null; _loc4_ = _loc7_; } } _loc4_ = _loc5_; } _loc7_ = _loc5_; } _loc4_ = _loc6_; while(_loc4_ != null) { _loc5_ = _loc4_.processNegative; _loc4_.processNegative = null; param1.addTransparent(_loc4_,this); _loc4_ = _loc5_; } } transformConst[0] = ma; transformConst[1] = mb; transformConst[2] = mc; transformConst[3] = md; transformConst[4] = me; transformConst[5] = mf; transformConst[6] = mg; transformConst[7] = mh; transformConst[8] = mi; transformConst[9] = mj; transformConst[10] = mk; transformConst[11] = ml; } override alternativa3d function getVG(param1:Camera3D) : VG { var _loc4_:Face = null; var _loc5_:Vertex = null; if(this.root == null) { return null; } if(this.clipping == 0) { if(culling & 1) { return null; } culling = 0; } this.prepareResources(); if(useDepth = !param1.view.constrained && (param1.softTransparency && param1.softTransparencyStrength > 0 || param1.ssao && param1.ssaoStrength > 0 || param1.deferredLighting && param1.deferredLightingStrength > 0) && concatenatedAlpha >= depthMapAlphaThreshold) { param1.depthObjects[param1.depthCount] = this; ++param1.depthCount; } var _loc2_:int = !!param1.debug ? int(int(param1.checkInDebug(this))) : int(int(0)); var _loc3_:Face = this.faces[0]; if(concatenatedAlpha >= 1 && concatenatedBlendMode == "normal" && _loc3_.material != null && (!_loc3_.material.transparent || _loc3_.material.alphaTestThreshold > 0)) { param1.addOpaque(_loc3_.material,this.vertexBuffer,this.indexBuffer,0,this.numTriangles,this); if(_loc2_ > 0) { if(_loc2_ & Debug.EDGES) { Debug.drawEdges(param1,null,16777215); } if(_loc2_ & Debug.BOUNDS) { Debug.drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } } transformConst[0] = ma; transformConst[1] = mb; transformConst[2] = mc; transformConst[3] = md; transformConst[4] = me; transformConst[5] = mf; transformConst[6] = mg; transformConst[7] = mh; transformConst[8] = mi; transformConst[9] = mj; transformConst[10] = mk; transformConst[11] = ml; return null; } if(transformId > 500000000) { transformId = 0; _loc5_ = this.vertexList; while(_loc5_ != null) { _loc5_.transformId = 0; _loc5_ = _loc5_.next; } } ++transformId; calculateInverseMatrix(); transformConst[0] = ma; transformConst[1] = mb; transformConst[2] = mc; transformConst[3] = md; transformConst[4] = me; transformConst[5] = mf; transformConst[6] = mg; transformConst[7] = mh; transformConst[8] = mi; transformConst[9] = mj; transformConst[10] = mk; transformConst[11] = ml; _loc4_ = this.prepareNode(this.root,culling,param1); if(_loc4_ != null) { return VG.create(this,_loc4_,3,_loc2_,false); } return null; } alternativa3d function prepareResources() : void { var _loc1_:Vector.<Number> = null; var _loc2_:int = 0; var _loc3_:int = 0; var _loc4_:Vertex = null; var _loc5_:Vector.<uint> = null; var _loc6_:int = 0; var _loc7_:Face = null; var _loc8_:Wrapper = null; var _loc9_:uint = 0; var _loc10_:uint = 0; var _loc11_:uint = 0; if(this.vertexBuffer == null) { _loc1_ = new Vector.<Number>(); _loc2_ = 0; _loc3_ = 0; _loc4_ = this.vertexList; while(_loc4_ != null) { _loc1_[_loc2_] = _loc4_.x; _loc2_++; _loc1_[_loc2_] = _loc4_.y; _loc2_++; _loc1_[_loc2_] = _loc4_.z; _loc2_++; _loc1_[_loc2_] = _loc4_.u; _loc2_++; _loc1_[_loc2_] = _loc4_.v; _loc2_++; _loc1_[_loc2_] = _loc4_.normalX; _loc2_++; _loc1_[_loc2_] = _loc4_.normalY; _loc2_++; _loc1_[_loc2_] = _loc4_.normalZ; _loc2_++; _loc4_.index = _loc3_; _loc3_++; _loc4_ = _loc4_.next; } this.vertexBuffer = new VertexBufferResource(_loc1_,8); _loc5_ = new Vector.<uint>(); _loc6_ = 0; this.numTriangles = 0; for each(_loc7_ in this.faces) { _loc8_ = _loc7_.wrapper; _loc9_ = _loc8_.vertex.index; _loc8_ = _loc8_.next; _loc10_ = _loc8_.vertex.index; _loc8_ = _loc8_.next; while(_loc8_ != null) { _loc11_ = _loc8_.vertex.index; _loc5_[_loc6_] = _loc9_; _loc6_++; _loc5_[_loc6_] = _loc10_; _loc6_++; _loc5_[_loc6_] = _loc11_; _loc6_++; _loc10_ = _loc11_; ++this.numTriangles; _loc8_ = _loc8_.next; } } this.indexBuffer = new IndexBufferResource(_loc5_); } } alternativa3d function deleteResources() : void { if(this.vertexBuffer != null) { this.vertexBuffer.dispose(); this.vertexBuffer = null; this.indexBuffer.dispose(); this.indexBuffer = null; this.numTriangles = 0; } } private function collectNode(param1:Node, param2:Face = null) : Face { var _loc3_:Face = null; var _loc4_:Wrapper = null; var _loc5_:Vertex = null; var _loc6_:Number = NaN; var _loc7_:Number = NaN; var _loc8_:Number = NaN; if(param1.normalX * imd + param1.normalY * imh + param1.normalZ * iml > param1.offset) { if(param1.positive != null) { param2 = this.collectNode(param1.positive,param2); } _loc3_ = param1.faceList; while(_loc3_ != null) { _loc4_ = _loc3_.wrapper; while(_loc4_ != null) { _loc5_ = _loc4_.vertex; if(_loc5_.transformId != transformId) { _loc6_ = _loc5_.x; _loc7_ = _loc5_.y; _loc8_ = _loc5_.z; _loc5_.cameraX = ma * _loc6_ + mb * _loc7_ + mc * _loc8_ + md; _loc5_.cameraY = me * _loc6_ + mf * _loc7_ + mg * _loc8_ + mh; _loc5_.cameraZ = mi * _loc6_ + mj * _loc7_ + mk * _loc8_ + ml; _loc5_.transformId = transformId; _loc5_.drawId = 0; } _loc4_ = _loc4_.next; } _loc3_.processNext = param2; param2 = _loc3_; _loc3_ = _loc3_.next; } if(param1.negative != null) { param2 = this.collectNode(param1.negative,param2); } } else { if(param1.negative != null) { param2 = this.collectNode(param1.negative,param2); } if(param1.positive != null) { param2 = this.collectNode(param1.positive,param2); } } return param2; } private function prepareNode(param1:Node, param2:int, param3:Camera3D) : Face { var _loc4_:Face = null; var _loc5_:Wrapper = null; var _loc8_:Face = null; var _loc9_:Vertex = null; var _loc10_:Number = NaN; var _loc11_:Number = NaN; var _loc12_:Number = NaN; var _loc13_:Vertex = null; var _loc14_:Vertex = null; var _loc15_:Vertex = null; var _loc16_:Number = NaN; var _loc17_:Number = NaN; var _loc18_:Number = NaN; var _loc19_:Number = NaN; var _loc20_:Number = NaN; var _loc21_:Number = NaN; var _loc22_:Number = NaN; var _loc23_:Number = NaN; var _loc24_:Number = NaN; var _loc25_:Number = NaN; if(imd * param1.normalX + imh * param1.normalY + iml * param1.normalZ > param1.offset) { _loc4_ = param1.faceList; _loc8_ = _loc4_; while(_loc8_ != null) { _loc5_ = _loc8_.wrapper; while(_loc5_ != null) { _loc9_ = _loc5_.vertex; if(_loc9_.transformId != transformId) { _loc10_ = _loc9_.x; _loc11_ = _loc9_.y; _loc12_ = _loc9_.z; _loc9_.cameraX = ma * _loc10_ + mb * _loc11_ + mc * _loc12_ + md; _loc9_.cameraY = me * _loc10_ + mf * _loc11_ + mg * _loc12_ + mh; _loc9_.cameraZ = mi * _loc10_ + mj * _loc11_ + mk * _loc12_ + ml; _loc9_.transformId = transformId; _loc9_.drawId = 0; } _loc5_ = _loc5_.next; } _loc8_.processNext = _loc8_.next; _loc8_ = _loc8_.next; } if(param2 > 0) { if(this.clipping == 1) { _loc4_ = param3.cull(_loc4_,param2); } else { _loc4_ = param3.clip(_loc4_,param2); } } } var _loc6_:Face = param1.negative != null ? this.prepareNode(param1.negative,param2,param3) : null; var _loc7_:Face = param1.positive != null ? this.prepareNode(param1.positive,param2,param3) : null; if(_loc4_ != null || _loc6_ != null && _loc7_ != null) { if(_loc4_ == null) { _loc4_ = param1.faceList.create(); param3.lastFace.next = _loc4_; param3.lastFace = _loc4_; } _loc5_ = param1.faceList.wrapper; _loc13_ = _loc5_.vertex; _loc5_ = _loc5_.next; _loc14_ = _loc5_.vertex; _loc5_ = _loc5_.next; _loc15_ = _loc5_.vertex; if(_loc13_.transformId != transformId) { _loc13_.cameraX = ma * _loc13_.x + mb * _loc13_.y + mc * _loc13_.z + md; _loc13_.cameraY = me * _loc13_.x + mf * _loc13_.y + mg * _loc13_.z + mh; _loc13_.cameraZ = mi * _loc13_.x + mj * _loc13_.y + mk * _loc13_.z + ml; _loc13_.transformId = transformId; _loc13_.drawId = 0; } if(_loc14_.transformId != transformId) { _loc14_.cameraX = ma * _loc14_.x + mb * _loc14_.y + mc * _loc14_.z + md; _loc14_.cameraY = me * _loc14_.x + mf * _loc14_.y + mg * _loc14_.z + mh; _loc14_.cameraZ = mi * _loc14_.x + mj * _loc14_.y + mk * _loc14_.z + ml; _loc14_.transformId = transformId; _loc14_.drawId = 0; } if(_loc15_.transformId != transformId) { _loc15_.cameraX = ma * _loc15_.x + mb * _loc15_.y + mc * _loc15_.z + md; _loc15_.cameraY = me * _loc15_.x + mf * _loc15_.y + mg * _loc15_.z + mh; _loc15_.cameraZ = mi * _loc15_.x + mj * _loc15_.y + mk * _loc15_.z + ml; _loc15_.transformId = transformId; _loc15_.drawId = 0; } _loc16_ = _loc14_.cameraX - _loc13_.cameraX; _loc17_ = _loc14_.cameraY - _loc13_.cameraY; _loc18_ = _loc14_.cameraZ - _loc13_.cameraZ; _loc19_ = _loc15_.cameraX - _loc13_.cameraX; _loc20_ = _loc15_.cameraY - _loc13_.cameraY; _loc21_ = _loc15_.cameraZ - _loc13_.cameraZ; _loc22_ = _loc21_ * _loc17_ - _loc20_ * _loc18_; _loc23_ = _loc19_ * _loc18_ - _loc21_ * _loc16_; _loc24_ = _loc20_ * _loc16_ - _loc19_ * _loc17_; _loc25_ = _loc22_ * _loc22_ + _loc23_ * _loc23_ + _loc24_ * _loc24_; if(_loc25_ > 0) { _loc25_ = 1 / Math.sqrt(length); _loc22_ *= _loc25_; _loc23_ *= _loc25_; _loc24_ *= _loc25_; } _loc4_.normalX = _loc22_; _loc4_.normalY = _loc23_; _loc4_.normalZ = _loc24_; _loc4_.offset = _loc13_.cameraX * _loc22_ + _loc13_.cameraY * _loc23_ + _loc13_.cameraZ * _loc24_; _loc4_.processNegative = _loc6_; _loc4_.processPositive = _loc7_; } else { _loc4_ = _loc6_ != null ? _loc6_ : _loc7_; } return _loc4_; } override alternativa3d function updateBounds(param1:Object3D, param2:Object3D = null) : void { var _loc3_:Vertex = this.vertexList; while(_loc3_ != null) { if(param2 != null) { _loc3_.cameraX = param2.ma * _loc3_.x + param2.mb * _loc3_.y + param2.mc * _loc3_.z + param2.md; _loc3_.cameraY = param2.me * _loc3_.x + param2.mf * _loc3_.y + param2.mg * _loc3_.z + param2.mh; _loc3_.cameraZ = param2.mi * _loc3_.x + param2.mj * _loc3_.y + param2.mk * _loc3_.z + param2.ml; } else { _loc3_.cameraX = _loc3_.x; _loc3_.cameraY = _loc3_.y; _loc3_.cameraZ = _loc3_.z; } if(_loc3_.cameraX < param1.boundMinX) { param1.boundMinX = _loc3_.cameraX; } if(_loc3_.cameraX > param1.boundMaxX) { param1.boundMaxX = _loc3_.cameraX; } if(_loc3_.cameraY < param1.boundMinY) { param1.boundMinY = _loc3_.cameraY; } if(_loc3_.cameraY > param1.boundMaxY) { param1.boundMaxY = _loc3_.cameraY; } if(_loc3_.cameraZ < param1.boundMinZ) { param1.boundMinZ = _loc3_.cameraZ; } if(_loc3_.cameraZ > param1.boundMaxZ) { param1.boundMaxZ = _loc3_.cameraZ; } _loc3_ = _loc3_.next; } } override alternativa3d function split(param1:Vector3D, param2:Vector3D, param3:Vector3D, param4:Number) : Vector.<Object3D> { var _loc9_:Vertex = null; var _loc10_:Vertex = null; var _loc14_:Face = null; var _loc15_:Face = null; var _loc16_:Face = null; var _loc17_:Face = null; var _loc22_:Face = null; var _loc23_:Face = null; var _loc24_:Wrapper = null; var _loc25_:Vertex = null; var _loc26_:Vertex = null; var _loc27_:Vertex = null; var _loc28_:Boolean = false; var _loc29_:Boolean = false; var _loc30_:Face = null; var _loc31_:Face = null; var _loc32_:Wrapper = null; var _loc33_:Wrapper = null; var _loc34_:Wrapper = null; var _loc35_:Number = NaN; var _loc36_:Vertex = null; var _loc5_:Vector.<Object3D> = new Vector.<Object3D>(2); var _loc6_:Vector3D = calculatePlane(param1,param2,param3); var _loc7_:Number = _loc6_.w - param4; var _loc8_:Number = _loc6_.w + param4; _loc9_ = this.vertexList; while(_loc9_ != null) { _loc10_ = _loc9_.next; _loc9_.next = null; _loc9_.offset = _loc9_.x * _loc6_.x + _loc9_.y * _loc6_.y + _loc9_.z * _loc6_.z; if(_loc9_.offset >= _loc7_ && _loc9_.offset <= _loc8_) { _loc9_.value = new Vertex(); _loc9_.value.x = _loc9_.x; _loc9_.value.y = _loc9_.y; _loc9_.value.z = _loc9_.z; _loc9_.value.u = _loc9_.u; _loc9_.value.v = _loc9_.v; _loc9_.value.normalX = _loc9_.normalX; _loc9_.value.normalY = _loc9_.normalY; _loc9_.value.normalZ = _loc9_.normalZ; } _loc9_.transformId = 0; _loc9_ = _loc10_; } this.vertexList = null; if(this.root != null) { this.destroyNode(this.root); this.root = null; } var _loc11_:Vector.<Face> = this.faces; this.faces = new Vector.<Face>(); var _loc12_:BSP = this.clone() as BSP; var _loc13_:BSP = this.clone() as BSP; var _loc18_:int = 0; var _loc19_:int = 0; var _loc20_:int = _loc11_.length; var _loc21_:int = 0; while(_loc21_ < _loc20_) { _loc22_ = _loc11_[_loc21_]; _loc23_ = _loc22_.next; _loc24_ = _loc22_.wrapper; _loc25_ = _loc24_.vertex; _loc24_ = _loc24_.next; _loc26_ = _loc24_.vertex; _loc24_ = _loc24_.next; _loc27_ = _loc24_.vertex; _loc28_ = _loc25_.offset < _loc7_ || _loc26_.offset < _loc7_ || _loc27_.offset < _loc7_; _loc29_ = _loc25_.offset > _loc8_ || _loc26_.offset > _loc8_ || _loc27_.offset > _loc8_; _loc24_ = _loc24_.next; while(_loc24_ != null) { _loc9_ = _loc24_.vertex; if(_loc9_.offset < _loc7_) { _loc28_ = true; } else if(_loc9_.offset > _loc8_) { _loc29_ = true; } _loc24_ = _loc24_.next; } if(!_loc28_) { if(_loc17_ != null) { _loc17_.next = _loc22_; } else { _loc16_ = _loc22_; } _loc17_ = _loc22_; _loc13_.faces[_loc19_] = _loc22_; _loc19_++; } else if(!_loc29_) { if(_loc15_ != null) { _loc15_.next = _loc22_; } else { _loc14_ = _loc22_; } _loc15_ = _loc22_; _loc12_.faces[_loc18_] = _loc22_; _loc18_++; _loc24_ = _loc22_.wrapper; while(_loc24_ != null) { if(_loc24_.vertex.value != null) { _loc24_.vertex = _loc24_.vertex.value; } _loc24_ = _loc24_.next; } } else { _loc30_ = new Face(); _loc31_ = new Face(); _loc32_ = null; _loc33_ = null; _loc24_ = _loc22_.wrapper.next.next; while(_loc24_.next != null) { _loc24_ = _loc24_.next; } _loc25_ = _loc24_.vertex; _loc24_ = _loc22_.wrapper; while(_loc24_ != null) { _loc26_ = _loc24_.vertex; if(_loc25_.offset < _loc7_ && _loc26_.offset > _loc8_ || _loc25_.offset > _loc8_ && _loc26_.offset < _loc7_) { _loc35_ = (_loc6_.w - _loc25_.offset) / (_loc26_.offset - _loc25_.offset); _loc9_ = new Vertex(); _loc9_.x = _loc25_.x + (_loc26_.x - _loc25_.x) * _loc35_; _loc9_.y = _loc25_.y + (_loc26_.y - _loc25_.y) * _loc35_; _loc9_.z = _loc25_.z + (_loc26_.z - _loc25_.z) * _loc35_; _loc9_.u = _loc25_.u + (_loc26_.u - _loc25_.u) * _loc35_; _loc9_.v = _loc25_.v + (_loc26_.v - _loc25_.v) * _loc35_; _loc9_.normalX = _loc25_.normalX + (_loc26_.normalX - _loc25_.normalX) * _loc35_; _loc9_.normalY = _loc25_.normalY + (_loc26_.normalY - _loc25_.normalY) * _loc35_; _loc9_.normalZ = _loc25_.normalZ + (_loc26_.normalZ - _loc25_.normalZ) * _loc35_; _loc34_ = new Wrapper(); _loc34_.vertex = _loc9_; if(_loc32_ != null) { _loc32_.next = _loc34_; } else { _loc30_.wrapper = _loc34_; } _loc32_ = _loc34_; _loc36_ = new Vertex(); _loc36_.x = _loc9_.x; _loc36_.y = _loc9_.y; _loc36_.z = _loc9_.z; _loc36_.u = _loc9_.u; _loc36_.v = _loc9_.v; _loc36_.normalX = _loc9_.normalX; _loc36_.normalY = _loc9_.normalY; _loc36_.normalZ = _loc9_.normalZ; _loc34_ = new Wrapper(); _loc34_.vertex = _loc36_; if(_loc33_ != null) { _loc33_.next = _loc34_; } else { _loc31_.wrapper = _loc34_; } _loc33_ = _loc34_; } if(_loc26_.offset < _loc7_) { _loc34_ = _loc24_.create(); _loc34_.vertex = _loc26_; if(_loc32_ != null) { _loc32_.next = _loc34_; } else { _loc30_.wrapper = _loc34_; } _loc32_ = _loc34_; } else if(_loc26_.offset > _loc8_) { _loc34_ = _loc24_.create(); _loc34_.vertex = _loc26_; if(_loc33_ != null) { _loc33_.next = _loc34_; } else { _loc31_.wrapper = _loc34_; } _loc33_ = _loc34_; } else { _loc34_ = _loc24_.create(); _loc34_.vertex = _loc26_.value; if(_loc32_ != null) { _loc32_.next = _loc34_; } else { _loc30_.wrapper = _loc34_; } _loc32_ = _loc34_; _loc34_ = _loc24_.create(); _loc34_.vertex = _loc26_; if(_loc33_ != null) { _loc33_.next = _loc34_; } else { _loc31_.wrapper = _loc34_; } _loc33_ = _loc34_; } _loc25_ = _loc26_; _loc24_ = _loc24_.next; } _loc30_.material = _loc22_.material; _loc30_.calculateBestSequenceAndNormal(); if(_loc15_ != null) { _loc15_.next = _loc30_; } else { _loc14_ = _loc30_; } _loc15_ = _loc30_; _loc12_.faces[_loc18_] = _loc30_; _loc18_++; _loc31_.material = _loc22_.material; _loc31_.calculateBestSequenceAndNormal(); if(_loc17_ != null) { _loc17_.next = _loc31_; } else { _loc16_ = _loc31_; } _loc17_ = _loc31_; _loc13_.faces[_loc19_] = _loc31_; _loc19_++; } _loc21_++; } if(_loc15_ != null) { _loc15_.next = null; ++_loc12_.transformId; _loc12_.collectVertices(); _loc12_.root = _loc12_.createNode(_loc14_); _loc12_.calculateBounds(); _loc5_[0] = _loc12_; } if(_loc17_ != null) { _loc17_.next = null; ++_loc13_.transformId; _loc13_.collectVertices(); _loc13_.root = _loc13_.createNode(_loc16_); _loc13_.calculateBounds(); _loc5_[1] = _loc13_; } return _loc5_; } private function collectVertices() : void { var _loc3_:Face = null; var _loc4_:Wrapper = null; var _loc5_:Vertex = null; var _loc1_:int = this.faces.length; var _loc2_:int = 0; while(_loc2_ < _loc1_) { _loc3_ = this.faces[_loc2_]; _loc4_ = _loc3_.wrapper; while(_loc4_ != null) { _loc5_ = _loc4_.vertex; if(_loc5_.transformId != transformId) { _loc5_.next = this.vertexList; this.vertexList = _loc5_; _loc5_.transformId = transformId; _loc5_.value = null; } _loc4_ = _loc4_.next; } _loc2_++; } } private function createNode(param1:Face) : Node { var _loc3_:Wrapper = null; var _loc4_:Vertex = null; var _loc5_:Vertex = null; var _loc6_:Vertex = null; var _loc7_:Vertex = null; var _loc8_:Boolean = false; var _loc9_:Boolean = false; var _loc10_:Number = NaN; var _loc11_:Number = NaN; var _loc12_:Number = NaN; var _loc13_:Number = NaN; var _loc14_:Number = NaN; var _loc15_:Number = NaN; var _loc16_:Number = NaN; var _loc17_:Number = NaN; var _loc18_:Number = NaN; var _loc19_:Number = NaN; var _loc21_:Face = null; var _loc22_:Face = null; var _loc25_:Face = null; var _loc26_:Face = null; var _loc27_:int = 0; var _loc28_:Face = null; var _loc29_:int = 0; var _loc30_:Face = null; var _loc31_:Face = null; var _loc32_:Face = null; var _loc33_:Face = null; var _loc34_:Wrapper = null; var _loc35_:Wrapper = null; var _loc36_:Wrapper = null; var _loc37_:Number = NaN; var _loc2_:Node = new Node(); var _loc20_:Face = param1; if(this.splitAnalysis && param1.next != null) { _loc27_ = 2147483647; _loc28_ = param1; while(_loc28_ != null) { _loc14_ = _loc28_.normalX; _loc15_ = _loc28_.normalY; _loc16_ = _loc28_.normalZ; _loc17_ = _loc28_.offset; _loc18_ = _loc17_ - this.threshold; _loc19_ = _loc17_ + this.threshold; _loc29_ = 0; _loc30_ = param1; while(_loc30_ != null) { if(_loc30_ != _loc28_) { _loc3_ = _loc30_.wrapper; _loc4_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc5_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc6_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc10_ = _loc4_.x * _loc14_ + _loc4_.y * _loc15_ + _loc4_.z * _loc16_; _loc11_ = _loc5_.x * _loc14_ + _loc5_.y * _loc15_ + _loc5_.z * _loc16_; _loc12_ = _loc6_.x * _loc14_ + _loc6_.y * _loc15_ + _loc6_.z * _loc16_; _loc8_ = _loc10_ < _loc18_ || _loc11_ < _loc18_ || _loc12_ < _loc18_; _loc9_ = _loc10_ > _loc19_ || _loc11_ > _loc19_ || _loc12_ > _loc19_; while(_loc3_ != null) { _loc7_ = _loc3_.vertex; _loc13_ = _loc7_.x * _loc14_ + _loc7_.y * _loc15_ + _loc7_.z * _loc16_; if(_loc13_ < _loc18_) { _loc8_ = true; if(_loc9_) { break; } } else if(_loc13_ > _loc19_) { _loc9_ = true; if(_loc8_) { break; } } _loc3_ = _loc3_.next; } if(_loc9_ && _loc8_) { _loc29_++; if(_loc29_ >= _loc27_) { break; } } } _loc30_ = _loc30_.next; } if(_loc29_ < _loc27_) { _loc20_ = _loc28_; _loc27_ = _loc29_; if(_loc27_ == 0) { break; } } _loc28_ = _loc28_.next; } } var _loc23_:Face = _loc20_; var _loc24_:Face = _loc20_.next; _loc14_ = _loc20_.normalX; _loc15_ = _loc20_.normalY; _loc16_ = _loc20_.normalZ; _loc17_ = _loc20_.offset; _loc18_ = _loc17_ - this.threshold; _loc19_ = _loc17_ + this.threshold; while(param1 != null) { if(param1 != _loc20_) { _loc31_ = param1.next; _loc3_ = param1.wrapper; _loc4_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc5_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc6_ = _loc3_.vertex; _loc3_ = _loc3_.next; _loc10_ = _loc4_.x * _loc14_ + _loc4_.y * _loc15_ + _loc4_.z * _loc16_; _loc11_ = _loc5_.x * _loc14_ + _loc5_.y * _loc15_ + _loc5_.z * _loc16_; _loc12_ = _loc6_.x * _loc14_ + _loc6_.y * _loc15_ + _loc6_.z * _loc16_; _loc8_ = _loc10_ < _loc18_ || _loc11_ < _loc18_ || _loc12_ < _loc18_; _loc9_ = _loc10_ > _loc19_ || _loc11_ > _loc19_ || _loc12_ > _loc19_; while(_loc3_ != null) { _loc7_ = _loc3_.vertex; _loc13_ = _loc7_.x * _loc14_ + _loc7_.y * _loc15_ + _loc7_.z * _loc16_; if(_loc13_ < _loc18_) { _loc8_ = true; } else if(_loc13_ > _loc19_) { _loc9_ = true; } _loc7_.offset = _loc13_; _loc3_ = _loc3_.next; } if(!_loc8_) { if(!_loc9_) { if(param1.normalX * _loc14_ + param1.normalY * _loc15_ + param1.normalZ * _loc16_ > 0) { _loc23_.next = param1; _loc23_ = param1; } else { if(_loc21_ != null) { _loc22_.next = param1; } else { _loc21_ = param1; } _loc22_ = param1; } } else { if(_loc25_ != null) { _loc26_.next = param1; } else { _loc25_ = param1; } _loc26_ = param1; } } else if(!_loc9_) { if(_loc21_ != null) { _loc22_.next = param1; } else { _loc21_ = param1; } _loc22_ = param1; } else { _loc4_.offset = _loc10_; _loc5_.offset = _loc11_; _loc6_.offset = _loc12_; _loc32_ = new Face(); _loc33_ = new Face(); _loc34_ = null; _loc35_ = null; _loc3_ = param1.wrapper.next.next; while(_loc3_.next != null) { _loc3_ = _loc3_.next; } _loc4_ = _loc3_.vertex; _loc10_ = _loc4_.offset; _loc3_ = param1.wrapper; while(_loc3_ != null) { _loc5_ = _loc3_.vertex; _loc11_ = _loc5_.offset; if(_loc10_ < _loc18_ && _loc11_ > _loc19_ || _loc10_ > _loc19_ && _loc11_ < _loc18_) { _loc37_ = (_loc17_ - _loc10_) / (_loc11_ - _loc10_); _loc7_ = new Vertex(); _loc7_.next = this.vertexList; this.vertexList = _loc7_; _loc7_.x = _loc4_.x + (_loc5_.x - _loc4_.x) * _loc37_; _loc7_.y = _loc4_.y + (_loc5_.y - _loc4_.y) * _loc37_; _loc7_.z = _loc4_.z + (_loc5_.z - _loc4_.z) * _loc37_; _loc7_.u = _loc4_.u + (_loc5_.u - _loc4_.u) * _loc37_; _loc7_.v = _loc4_.v + (_loc5_.v - _loc4_.v) * _loc37_; _loc7_.normalX = _loc4_.normalX + (_loc5_.normalX - _loc4_.normalX) * _loc37_; _loc7_.normalY = _loc4_.normalY + (_loc5_.normalY - _loc4_.normalY) * _loc37_; _loc7_.normalZ = _loc4_.normalZ + (_loc5_.normalZ - _loc4_.normalZ) * _loc37_; _loc36_ = new Wrapper(); _loc36_.vertex = _loc7_; if(_loc34_ != null) { _loc34_.next = _loc36_; } else { _loc32_.wrapper = _loc36_; } _loc34_ = _loc36_; _loc36_ = new Wrapper(); _loc36_.vertex = _loc7_; if(_loc35_ != null) { _loc35_.next = _loc36_; } else { _loc33_.wrapper = _loc36_; } _loc35_ = _loc36_; } if(_loc11_ <= _loc19_) { _loc36_ = new Wrapper(); _loc36_.vertex = _loc5_; if(_loc34_ != null) { _loc34_.next = _loc36_; } else { _loc32_.wrapper = _loc36_; } _loc34_ = _loc36_; } if(_loc11_ >= _loc18_) { _loc36_ = new Wrapper(); _loc36_.vertex = _loc5_; if(_loc35_ != null) { _loc35_.next = _loc36_; } else { _loc33_.wrapper = _loc36_; } _loc35_ = _loc36_; } _loc4_ = _loc5_; _loc10_ = _loc11_; _loc3_ = _loc3_.next; } _loc32_.material = param1.material; _loc32_.smoothingGroups = param1.smoothingGroups; _loc32_.calculateBestSequenceAndNormal(); if(_loc21_ != null) { _loc22_.next = _loc32_; } else { _loc21_ = _loc32_; } _loc22_ = _loc32_; _loc33_.material = param1.material; _loc33_.smoothingGroups = param1.smoothingGroups; _loc33_.calculateBestSequenceAndNormal(); if(_loc25_ != null) { _loc26_.next = _loc33_; } else { _loc25_ = _loc33_; } _loc26_ = _loc33_; } param1 = _loc31_; } else { param1 = _loc24_; } } if(_loc21_ != null) { _loc22_.next = null; _loc2_.negative = this.createNode(_loc21_); } _loc23_.next = null; _loc2_.faceList = _loc20_; _loc2_.normalX = _loc14_; _loc2_.normalY = _loc15_; _loc2_.normalZ = _loc16_; _loc2_.offset = _loc17_; if(_loc25_ != null) { _loc26_.next = null; _loc2_.positive = this.createNode(_loc25_); } return _loc2_; } private function destroyNode(param1:Node) : void { var _loc3_:Face = null; if(param1.negative != null) { this.destroyNode(param1.negative); param1.negative = null; } if(param1.positive != null) { this.destroyNode(param1.positive); param1.positive = null; } var _loc2_:Face = param1.faceList; while(_loc2_ != null) { _loc3_ = _loc2_.next; _loc2_.next.destroy(); _loc2_.next = null; _loc2_ = _loc3_; } } override public function destroy() : void { var buf:Vertex = null; var f:Face = null; if(this.vertexList != null) { while(this.vertexList.next != null) { buf = this.vertexList; this.vertexList = null; this.vertexList = buf.next; } this.vertexList = null; } if(this.faces != null) { for each(f in this.faces) { f.destroy(); f = null; } this.faces = null; } } } } import alternativa.engine3d.core.Face; class Node { public var negative:Node; public var positive:Node; public var faceList:Face; public var normalX:Number; public var normalY:Number; public var normalZ:Number; public var offset:Number; function Node() { super(); } }
package com.alternativaplatform.projects.tanks.client.garage.item { import scpacker.Base; public class ItemModelBase extends Base { public function ItemModelBase() { super(); } } }
package alternativa.tanks.models.battle.battlefield.keyboard { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_stableplazmaIconClass.png")] public class DeviceIcons_stableplazmaIconClass extends BitmapAsset { public function DeviceIcons_stableplazmaIconClass() { super(); } } }
package alternativa.protocol.codec { import alternativa.network.command.ControlCommand; import alternativa.protocol.factory.ICodecFactory; import alternativa.protocol.type.Byte; import alternativa.register.ClassInfo; import alternativa.resource.ResourceInfo; import alternativa.types.Long; import flash.utils.ByteArray; import flash.utils.IDataInput; import flash.utils.IDataOutput; public class ControlRootCodec extends AbstractCodec { private var codecFactory:ICodecFactory; public function ControlRootCodec(codecFactory:ICodecFactory) { super(); this.codecFactory = codecFactory; } override protected function doDecode(reader:IDataInput, nullmap:NullMap, notnull:Boolean) : Object { var hash:ByteArray = null; var arrayCodec:ICodec = null; var idArrayCodec:ICodec = null; var resourceArrayCodec:ICodec = null; var i:int = 0; var commands:Array = new Array(); var params:Array = new Array(); var commandId:int = int(this.codecFactory.getCodec(Byte).decode(reader,nullmap,true)); switch(commandId) { case ControlCommand.HASH_RESPONCE: hash = new ByteArray(); for(i = 0; i < 32; i++) { hash.writeByte(int(this.codecFactory.getCodec(Byte).decode(reader,nullmap,true))); } hash.position = 0; commands.push(hash); break; case ControlCommand.OPEN_SPACE: commands.push(new ControlCommand(ControlCommand.OPEN_SPACE,"openSpace",new Array())); break; case ControlCommand.LOAD_RESOURCES: params.push(int(this.codecFactory.getCodec(int).decode(reader,nullmap,true))); arrayCodec = this.codecFactory.getArrayCodec(ResourceInfo,true,2); params.push(arrayCodec.decode(reader,nullmap,true) as Array); commands.push(new ControlCommand(ControlCommand.LOAD_RESOURCES,"loadResources",params)); break; case ControlCommand.UNLOAD_CLASSES_AND_RESOURCES: idArrayCodec = this.codecFactory.getArrayCodec(Long,true,1); resourceArrayCodec = this.codecFactory.getArrayCodec(ResourceInfo,true,1); params.push(idArrayCodec.decode(reader,nullmap,true) as Array); params.push(resourceArrayCodec.decode(reader,nullmap,true) as Array); commands.push(new ControlCommand(ControlCommand.UNLOAD_CLASSES_AND_RESOURCES,"unloadClassesAndResources",params)); break; case ControlCommand.COMMAND_REQUEST: params.push(String(this.codecFactory.getCodec(String).decode(reader,nullmap,true))); commands.push(new ControlCommand(ControlCommand.COMMAND_REQUEST,"commandRequest",params)); break; case ControlCommand.SERVER_MESSAGE: params.push(int(this.codecFactory.getCodec(int).decode(reader,nullmap,true))); params.push(String(this.codecFactory.getCodec(String).decode(reader,nullmap,true))); commands.push(new ControlCommand(ControlCommand.SERVER_MESSAGE,"serverMessage",params)); break; case ControlCommand.LOAD_CLASSES: params.push(int(this.codecFactory.getCodec(int).decode(reader,nullmap,true))); arrayCodec = this.codecFactory.getArrayCodec(ClassInfo,false); params.push(arrayCodec.decode(reader,nullmap,true)); params.push(reader); params.push(nullmap); commands.push(new ControlCommand(ControlCommand.LOAD_CLASSES,"loadClasses",params)); } return commands; } override protected function doEncode(dest:IDataOutput, object:Object, nullmap:NullMap, notnull:Boolean) : void { var c:ControlCommand = ControlCommand(object); var byteCodec:ICodec = this.codecFactory.getCodec(Byte); byteCodec.encode(dest,c.id,nullmap,true); switch(c.id) { case ControlCommand.HASH_REQUEST: break; case ControlCommand.HASH_ACCEPT: break; case ControlCommand.RESOURCES_LOADED: this.codecFactory.getCodec(int).encode(dest,int(c.params[0]),nullmap,true); break; case ControlCommand.LOG: this.codecFactory.getCodec(int).encode(dest,int(c.params[0]),nullmap,true); this.codecFactory.getCodec(String).encode(dest,String(c.params[1]),nullmap,true); break; case ControlCommand.COMMAND_RESPONCE: this.codecFactory.getCodec(String).encode(dest,String(c.params[0]),nullmap,true); break; case ControlCommand.CLASSES_LOADED: this.codecFactory.getCodec(int).encode(dest,int(c.params[0]),nullmap,true); } } } }
package projects.tanks.client.battlefield.models.tankparts.weapons.machinegun { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; import projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc.MachineGunCC; public class MachineGunModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:MachineGunModelServer; private var client:IMachineGunModelBase = IMachineGunModelBase(this); private var modelId:Long = Long.getLong(1635158664,1411719504); private var _reconfigureWeaponId:Long = Long.getLong(458370105,-2041665930); private var _reconfigureWeapon_spinUpTimeCodec:ICodec; private var _reconfigureWeapon_spinDownTimeCodec:ICodec; private var _setSpunStateId:Long = Long.getLong(815911334,941718050); public function MachineGunModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new MachineGunModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(MachineGunCC,false))); this._reconfigureWeapon_spinUpTimeCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); this._reconfigureWeapon_spinDownTimeCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : MachineGunCC { return MachineGunCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._reconfigureWeaponId: this.client.reconfigureWeapon(int(this._reconfigureWeapon_spinUpTimeCodec.decode(param2)),int(this._reconfigureWeapon_spinDownTimeCodec.decode(param2))); break; case this._setSpunStateId: this.client.setSpunState(); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.thunder { public interface IThunderShootSFXModelBase { } }
package alternativa.tanks.gui.confirm { import flash.display.Bitmap; import flash.display.BitmapData; import platform.client.fp10.core.type.IGameObject; import projects.tanks.clients.fp10.libraries.TanksLocale; public class DeviceConfirmAlert extends ConfirmAlert { private static const devicePlateBitmapClass:Class = DeviceConfirmAlert_devicePlateBitmapClass; private static const devicePlateBitmapData:BitmapData = new devicePlateBitmapClass().bitmapData; public function DeviceConfirmAlert(param1:IGameObject, param2:int) { super(param1,param2); var local3:Bitmap = new Bitmap(devicePlateBitmapData); local3.x = previewInner.x + (previewInner.width - devicePlateBitmapData.width >> 1); local3.y = previewInner.y + (previewInner.height - devicePlateBitmapData.height >> 1); addChildAt(local3,2); } override protected function getItemName(param1:IGameObject) : String { return localeService.getText(TanksLocale.TEXT_DEVICE); } } }
package projects.tanks.client.partners.impl.china.china3rdplatform.payment { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.network.command.SpaceCommand; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; public class China3rdPlatformPaymentModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _getPaymentUrlId:Long = Long.getLong(1666298807,-1212905917); private var _getPaymentUrl_shopItemIdCodec:ICodec; private var model:IModel; public function China3rdPlatformPaymentModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); this._getPaymentUrl_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); } public function getPaymentUrl(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._getPaymentUrl_shopItemIdCodec.encode(this.protocolBuffer,param1); ByteArray(this.protocolBuffer.writer).position = 0; if(Model.object == null) { throw new Error("Execute method without model context."); } var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentUrlId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } } }
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.flamethrower { import scpacker.Base; public class FlameThrowerModelBase extends Base { public function FlameThrowerModelBase() { super(); } } }
package _codec.projects.tanks.client.panel.model.donationalert { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import platform.client.fp10.core.resource.types.LocalizedImageResource; import projects.tanks.client.panel.model.donationalert.DonationAlertCC; public class CodecDonationAlertCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_imageWithEmail:ICodec; private var codec_imageWithoutEmail:ICodec; private var codec_message:ICodec; public function CodecDonationAlertCC() { super(); } public function init(param1:IProtocol) : void { this.codec_imageWithEmail = param1.getCodec(new TypeCodecInfo(LocalizedImageResource,false)); this.codec_imageWithoutEmail = param1.getCodec(new TypeCodecInfo(LocalizedImageResource,false)); this.codec_message = param1.getCodec(new TypeCodecInfo(String,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:DonationAlertCC = new DonationAlertCC(); local2.imageWithEmail = this.codec_imageWithEmail.decode(param1) as LocalizedImageResource; local2.imageWithoutEmail = this.codec_imageWithoutEmail.decode(param1) as LocalizedImageResource; local2.message = this.codec_message.decode(param1) as String; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:DonationAlertCC = DonationAlertCC(param2); this.codec_imageWithEmail.encode(param1,local3.imageWithEmail); this.codec_imageWithoutEmail.encode(param1,local3.imageWithoutEmail); this.codec_message.encode(param1,local3.message); } } }
package alternativa.tanks.models.weapons.targeting { import alternativa.physics.collision.types.RayHit; import alternativa.tanks.models.weapon.AllGlobalGunParams; import alternativa.tanks.models.weapons.targeting.debug.TargetingVisualDebug; import alternativa.tanks.models.weapons.targeting.direction.TargetingDirection; import alternativa.tanks.models.weapons.targeting.direction.TargetingDirectionCalculator; import alternativa.tanks.models.weapons.targeting.priority.TargetingPriorityCalculator; import alternativa.tanks.models.weapons.targeting.processor.TargetingDirectionProcessor; public class TargetingSystem { private static const visualDebug:TargetingVisualDebug = new TargetingVisualDebug(); private var directionCalculator:TargetingDirectionCalculator; private var priorityCalculator:TargetingPriorityCalculator; private var directionProcessor:TargetingDirectionProcessor; private var result:TargetingResult = new TargetingResult(); public function TargetingSystem(param1:TargetingDirectionCalculator, param2:TargetingDirectionProcessor, param3:TargetingPriorityCalculator) { super(); this.directionCalculator = param1; this.directionProcessor = param2; this.priorityCalculator = param3; } public function getProcessor() : TargetingDirectionProcessor { return this.directionProcessor; } public function target(param1:AllGlobalGunParams) : TargetingResult { var local4:TargetingDirection = null; var local5:Vector.<RayHit> = null; var local6:Number = NaN; var local2:Vector.<TargetingDirection> = this.directionCalculator.getDirections(param1); local2.push(new TargetingDirection(param1.direction,0,0)); local2.sort(TargetingDirection.comparator); var local3:Number = Number.NEGATIVE_INFINITY; visualDebug.reset(); for each(local4 in local2) { if(local4.getMaxPriority() < local3) { break; } local5 = this.directionProcessor.process(param1,local4.getDirection()); local6 = this.priorityCalculator.getPriorityForRayHits(local4.getAngle(),local5); if(local6 > 0) { local6 += local4.getBonusPriority(); } if(local6 > local3 || local6 == local3 && local4.getAngle() == 0) { local3 = local6; this.result.setData(local4.getDirection(),local5); } } return this.result; } } }
package alternativa.tanks.battle.events { import alternativa.tanks.battle.objects.tank.Tank; public class TankActivationEvent { public var tank:Tank; public function TankActivationEvent(param1:Tank) { super(); this.tank = param1; } } }
package controls { import assets.combo.ComboListOverState; import controls.rangicons.RangIconSmall; import fl.controls.listClasses.CellRenderer; import fl.controls.listClasses.ListData; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.DisplayObject; import flash.display.Sprite; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; public class ComboListRenderer extends CellRenderer { private var format:TextFormat = new TextFormat("MyriadPro",13); private var nicon:DisplayObject; private var normalStyle:Bitmap; private var overStyle:ComboListOverState = new ComboListOverState(); public function ComboListRenderer() { super(); } override public function set data(param1:Object) : void { var local2:ButtonState = null; this.normalStyle = new Bitmap(new BitmapData(1,1,true,0)); _data = param1; setStyle("upSkin",this.normalStyle); setStyle("downSkin",this.overStyle); setStyle("overSkin",this.overStyle); setStyle("selectedUpSkin",this.normalStyle); setStyle("selectedOverSkin",this.overStyle); setStyle("selectedDownSkin",this.overStyle); } private function myIcon(param1:Object) : Sprite { var local3:Label = null; var local4:RangIconSmall = null; var local2:Sprite = new Sprite(); local3 = new Label(); local3.autoSize = TextFieldAutoSize.NONE; local3.color = 16777215; local3.alpha = param1.rang > 0 ? 0.5 : 1; local3.text = param1.gameName; local3.height = 20; local3.width = _width - 20; local3.x = 12; local3.y = 0; if(param1.rang > 0) { local4 = new RangIconSmall(param1.rang); local4.x = -2; local4.y = 2; local2.addChild(local4); } local2.addChild(local3); return local2; } override public function set listData(param1:ListData) : void { _listData = param1; label = ""; this.nicon = this.myIcon(_data); if(this.nicon != null) { setStyle("icon",this.nicon); } } override protected function drawIcon() : void { var local1:DisplayObject = icon; var local2:String = enabled ? mouseState : "disabled"; if(selected) { local2 = "selected" + local2.substr(0,1).toUpperCase() + local2.substr(1); } local2 += "Icon"; var local3:Object = getStyleValue(local2); if(local3 == null) { local3 = getStyleValue("icon"); } if(local3 != null) { icon = getDisplayObjectInstance(local3); } if(icon != null) { addChildAt(icon,1); } if(local1 != null && local1 != icon && local1.parent == this) { removeChild(local1); } } } }
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.thunder { public interface IThunderModelBase { } }
package alternativa.tanks.models.weapon.railgun { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Sprite3D; import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.engine3d.TextureAnimation; import alternativa.tanks.engine3d.UVFrame; import alternativa.tanks.sfx.GraphicEffect; import alternativa.tanks.sfx.GraphicsEffectDestructionListener; import alternativa.tanks.utils.objectpool.Pool; import alternativa.tanks.utils.objectpool.PooledObject; public class ChargeEffect extends PooledObject implements GraphicEffect { private static const globalPosition:Vector3 = new Vector3(); private static const matrix:Matrix4 = new Matrix4(); protected var sprite:Sprite3D; private var framesPerMillisecond:Number; private var currFrame:Number; private var frames:Vector.<UVFrame>; private var numFrames:int; private var localMuzzlePosition:Vector3 = new Vector3(); private var turret:Object3D; private var listener:GraphicsEffectDestructionListener; private var container:Scene3DContainer; public function ChargeEffect(param1:Pool) { super(param1); this.sprite = new Sprite3D(1,1); this.sprite.useShadowMap = false; this.sprite.useLight = false; } public function init(param1:Number, param2:Number, param3:TextureAnimation, param4:Vector3, param5:Object3D, param6:Number, param7:Number, param8:GraphicsEffectDestructionListener) : void { this.initSprite(param1,param2,param6,param3.material); this.frames = param3.frames; this.framesPerMillisecond = 0.001 * param7; this.localMuzzlePosition.copy(param4); this.localMuzzlePosition.y += 10; this.turret = param5; this.listener = param8; this.numFrames = this.frames.length; this.currFrame = 0; } public function addedToScene(param1:Scene3DContainer) : void { this.container = param1; param1.addChild(this.sprite); } public function play(param1:int, param2:GameCamera) : Boolean { if(this.currFrame >= this.numFrames) { return false; } matrix.setMatrix(this.turret.x,this.turret.y,this.turret.z,this.turret.rotationX,this.turret.rotationY,this.turret.rotationZ); matrix.transformVector(this.localMuzzlePosition,globalPosition); this.sprite.x = globalPosition.x; this.sprite.y = globalPosition.y; this.sprite.z = globalPosition.z; this.setFrame(this.frames[int(this.currFrame)]); this.currFrame += this.framesPerMillisecond * param1; return true; } private function setFrame(param1:UVFrame) : void { this.sprite.topLeftU = param1.topLeftU; this.sprite.topLeftV = param1.topLeftV; this.sprite.bottomRightU = param1.bottomRightU; this.sprite.bottomRightV = param1.bottomRightV; } public function destroy() : void { this.listener.onGraphicsEffectDestroyed(this); this.listener = null; this.container.removeChild(this.sprite); this.sprite.material = null; this.frames = null; recycle(); } public function kill() : void { this.currFrame = this.numFrames + 1; } private function initSprite(param1:Number, param2:Number, param3:Number, param4:TextureMaterial) : void { this.sprite.width = param1; this.sprite.height = param2; this.sprite.rotation = param3; this.sprite.material = param4; } } }
package controls.windowinner { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.windowinner.WindowInner_topLeftClass.png")] public class WindowInner_topLeftClass extends BitmapAsset { public function WindowInner_topLeftClass() { super(); } } }
package projects.tanks.client.panel.model.shop.kitview.localized { import platform.client.fp10.core.resource.types.LocalizedImageResource; public class KitViewResourceLocalizedCC { private var _buttonKit:LocalizedImageResource; private var _buttonKitOver:LocalizedImageResource; public function KitViewResourceLocalizedCC(param1:LocalizedImageResource = null, param2:LocalizedImageResource = null) { super(); this._buttonKit = param1; this._buttonKitOver = param2; } public function get buttonKit() : LocalizedImageResource { return this._buttonKit; } public function set buttonKit(param1:LocalizedImageResource) : void { this._buttonKit = param1; } public function get buttonKitOver() : LocalizedImageResource { return this._buttonKitOver; } public function set buttonKitOver(param1:LocalizedImageResource) : void { this._buttonKitOver = param1; } public function toString() : String { var local1:String = "KitViewResourceLocalizedCC ["; local1 += "buttonKit = " + this.buttonKit + " "; local1 += "buttonKitOver = " + this.buttonKitOver + " "; return local1 + "]"; } } }
package alternativa.tanks.model.garage.resistance { import flash.display.Bitmap; import flash.display.DisplayObjectContainer; import projects.tanks.client.commons.types.ItemGarageProperty; public class ResistancesIconsUtils { public function ResistancesIconsUtils() { super(); } public static function addResistanceIcons(param1:Bitmap, param2:Vector.<ItemGarageProperty>) : void { var local6:ItemGarageProperty = null; var local7:Bitmap = null; var local3:DisplayObjectContainer = param1.parent; var local4:uint = param2.length; var local5:int = 0; while(local5 < local4) { local6 = param2[local5]; local7 = new Bitmap(ResistancesIcons.getBitmapData(local6)); local7.x = (param1.width - local7.width + 1 >> 1) + param1.x; local7.y = (param1.height - local7.height - 7 >> 1) + param1.y; local3.addChild(local7); local5++; } } public static function getResistanceBigIcon(param1:ItemGarageProperty) : Bitmap { return new Bitmap(ResistancesIcons.getBigBitmapData(param1)); } } }
package alternativa.engine3d.core { import alternativa.gfx.agal.FragmentShader; import alternativa.gfx.agal.SamplerDim; import alternativa.gfx.agal.SamplerFilter; import alternativa.gfx.agal.SamplerMipMap; import alternativa.gfx.agal.SamplerRepeat; import alternativa.gfx.agal.SamplerType; public class DepthRendererDepthFragmentShader extends FragmentShader { public function DepthRendererDepthFragmentShader(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean) { var _loc6_:SamplerRepeat = null; var _loc7_:SamplerFilter = null; var _loc8_:SamplerMipMap = null; var _loc9_:SamplerType = null; super(); if(param2) { _loc6_ = !!param4 ? SamplerRepeat.WRAP : SamplerRepeat.CLAMP; _loc7_ = !!param3 ? SamplerFilter.LINEAR : SamplerFilter.NEAREST; _loc8_ = !!param5 ? (!!param3 ? SamplerMipMap.LINEAR : SamplerMipMap.NEAREST) : SamplerMipMap.NONE; _loc9_ = SamplerType.RGBA; tex(ft0,v1,fs1.dim(SamplerDim.D2).repeat(_loc6_).filter(_loc7_).mipmap(_loc8_).type(_loc9_)); sub(ft0.w,ft0,v1); kil(ft0.w); } frc(ft0,v0.z); sub(ft0.x,v0.z,ft0); mul(ft0.x,ft0,fc[0]); if(param1) { mov(ft1.zw,fc[0]); mov(ft1.xy,v0); nrm(ft1.xyz,ft1.xyz); mul(ft1.xy,ft1,fc[1]); add(ft1.xy,ft1,fc[1]); tex(ft2,ft1,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); mov(ft0.w,ft2.z); mul(ft1.xy,v0,v0); add(ft1.x,ft1,ft1.y); sqt(ft1.x,ft1); neg(ft1.y,v0.w); mul(ft1.xy,ft1,fc[1]); add(ft1.xy,ft1,fc[1]); tex(ft2,ft1,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); mov(ft0.z,ft2.z); } mov(oc,ft0); } } }
package alternativa.tanks.gui.shop.components.window { import alternativa.tanks.gui.shop.indicators.ShopIndicators; import alternativa.types.Long; import controls.base.DefaultButtonBase; import flash.display.Bitmap; public class ShopWindowJumpButton extends DefaultButtonBase { private var _categoryId:Long; private var _activeDiscounts:Boolean; public function ShopWindowJumpButton(param1:Long, param2:String) { super(); this._categoryId = param1; label = param2; } public function get categoryId() : Long { return this._categoryId; } public function get activeDiscounts() : Boolean { return this._activeDiscounts; } public function activateDiscountsIcon() : void { var local1:Bitmap = new Bitmap(ShopIndicators.discounts); local1.y = -5; local1.x = width - int(local1.width / 2) - 2; addChild(local1); this._activeDiscounts = true; } } }
package alternativa.tanks.models.battle.facilities { import alternativa.math.Vector3; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; public class ICommonFacilityEvents implements ICommonFacility { private var object:IGameObject; private var impl:Vector.<Object>; public function ICommonFacilityEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getPosition() : Vector3 { var result:Vector3 = null; var i:int = 0; var m:ICommonFacility = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ICommonFacility(this.impl[i]); result = m.getPosition(); i++; } } finally { Model.popObject(); } return result; } public function getCenter() : Vector3 { var result:Vector3 = null; var i:int = 0; var m:ICommonFacility = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ICommonFacility(this.impl[i]); result = m.getCenter(); i++; } } finally { Model.popObject(); } return result; } public function getTeam() : BattleTeam { var result:BattleTeam = null; var i:int = 0; var m:ICommonFacility = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ICommonFacility(this.impl[i]); result = m.getTeam(); i++; } } finally { Model.popObject(); } return result; } public function getOwner() : IGameObject { var result:IGameObject = null; var i:int = 0; var m:ICommonFacility = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ICommonFacility(this.impl[i]); result = m.getOwner(); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.engine3d.core { import flash.display.Sprite; public class Canvas extends Sprite { public function Canvas() { super(); } } }
package projects.tanks.client.battleselect.model.matchmaking.queue { public interface IMatchmakingQueueModelBase { } }