code
stringlengths
57
237k
package alternativa.init { import alternativa.osgi.bundle.IBundleActivator; import alternativa.osgi.service.storage.IStorageService; import alternativa.tanks.model.panel.IBattleSettings; import alternativa.tanks.models.tank.ITankEventDispatcher; import alternativa.tanks.models.tank.TankEventDispatcher; import alternativa.tanks.services.materialregistry.IMaterialRegistry; import alternativa.tanks.services.materialregistry.impl.DebugMaterialRegistry; import alternativa.tanks.services.materialregistry.impl.MaterialRegistry; import alternativa.tanks.services.objectpool.IObjectPoolService; import alternativa.tanks.services.objectpool.impl.ObjectPoolService; import flash.net.SharedObject; public class BattlefieldSharedActivator implements IBundleActivator { public function BattlefieldSharedActivator() { super(); } public function start(osgi:OSGi) : void { var materialRegistry:IMaterialRegistry = null; var storage:SharedObject = IStorageService(osgi.getService(IStorageService)).getStorage(); if(storage.data.textureDebug) { materialRegistry = new DebugMaterialRegistry(); } else { materialRegistry = new MaterialRegistry(osgi); } var battleSettings:IBattleSettings = IBattleSettings(osgi.getService(IBattleSettings)); materialRegistry.useMipMapping = battleSettings.enableMipMapping; osgi.registerService(IMaterialRegistry,materialRegistry); osgi.registerService(IObjectPoolService,new ObjectPoolService()); osgi.registerService(ITankEventDispatcher,new TankEventDispatcher()); } public function stop(osgi:OSGi) : void { osgi.unregisterService(IMaterialRegistry); osgi.unregisterService(IObjectPoolService); osgi.unregisterService(ITankEventDispatcher); } } }
package alternativa.tanks.models.weapon.railgun { import flash.display.BitmapData; import flash.display.BlendMode; import flash.geom.ColorTransform; import flash.geom.Matrix; import platform.client.fp10.core.resource.types.TextureResource; public class ChargingTextureRegistry { private static const CHARGE_FRAME_SIZE:int = 210; private static const NUM_FRAMES:int = 30; private const cache:Object = {}; public function ChargingTextureRegistry() { super(); } private static function getKey(param1:TextureResource, param2:TextureResource, param3:TextureResource) : String { return param1.id.toString() + "_" + param2.id.toString() + "_" + param3.id.toString(); } private static function createTexture(param1:TextureResource, param2:TextureResource, param3:TextureResource) : BitmapData { var local4:BitmapData = param1.data; var local5:BitmapData = param2.data; var local6:BitmapData = param3.data; var local7:BitmapData = new BitmapData(CHARGE_FRAME_SIZE * NUM_FRAMES,CHARGE_FRAME_SIZE,true,0); var local8:String = BlendMode.NORMAL; var local9:int = 0; while(local9 < NUM_FRAMES) { drawPart1(local4,local7,local9,CHARGE_FRAME_SIZE,local8); drawPart2(local5,local7,local9,CHARGE_FRAME_SIZE,local8); drawPart3(local6,local7,local9,CHARGE_FRAME_SIZE,local8); local9++; } return local7; } private static function drawPart1(param1:BitmapData, param2:BitmapData, param3:int, param4:int, param5:String) : void { var local6:ColorTransform = new ColorTransform(); if(param3 < 14) { local6.alphaMultiplier = param3 / 14; } else if(param3 < 25) { local6.alphaMultiplier = 1; } else { local6.alphaMultiplier = 1 - (param3 - 24) / 5; } var local7:Matrix = new Matrix(); local7.tx = param3 * param4 + 0.5 * (param4 - param1.width); local7.ty = 0.5 * (param4 - param1.height); param2.draw(param1,local7,local6,param5,null,true); } private static function drawPart2(param1:BitmapData, param2:BitmapData, param3:int, param4:int, param5:String) : void { var local6:ColorTransform = new ColorTransform(); if(param3 < 5) { local6.alphaMultiplier = param3 / 5; } else if(param3 < 25) { local6.alphaMultiplier = 1; } else { local6.alphaMultiplier = 1 - (param3 - 24) / 5; } var local7:Matrix = new Matrix(); local7.translate(-0.5 * param1.width,-0.5 * param1.height); local7.rotate(2 * param3 * Math.PI / 180); local7.translate(param3 * param4 + 0.5 * param4,0.5 * param4); param2.draw(param1,local7,local6,param5,null,true); } private static function drawPart3(param1:BitmapData, param2:BitmapData, param3:int, param4:int, param5:String) : void { var local7:Number = NaN; var local8:Number = NaN; var local6:ColorTransform = new ColorTransform(); if(param3 < 24) { local7 = param3 / 24; local6.alphaMultiplier = local7; local8 = 0.4 + 0.6 * local7; } else if(param3 < 25) { local6.alphaMultiplier = 1; local8 = 1; } else { local7 = 1 - (param3 - 24) / 5; local6.alphaMultiplier = local7; local8 = 0.2 + 0.8 * local7; } var local9:Matrix = new Matrix(); local9.translate(-0.5 * param1.width,-0.5 * param1.height); local9.scale(local8,local8); local9.rotate(2 * -param3 * Math.PI / 180); local9.translate(param3 * param4 + 0.5 * param4,0.5 * param4); param2.draw(param1,local9,local6,param5,null,true); } public function getTexture(param1:TextureResource, param2:TextureResource, param3:TextureResource) : BitmapData { var local4:ChargingTextureEntry = this.getEntry(param1,param2,param3); ++local4.referenceCount; return local4.texture; } public function releaseTexture(param1:TextureResource, param2:TextureResource, param3:TextureResource) : void { var local4:String = getKey(param1,param2,param3); var local5:ChargingTextureEntry = this.cache[local4]; if(local5 != null) { --local5.referenceCount; if(local5.referenceCount == 0) { local5.texture.dispose(); delete this.cache[local4]; } } } private function getEntry(param1:TextureResource, param2:TextureResource, param3:TextureResource) : ChargingTextureEntry { var local4:String = getKey(param1,param2,param3); var local5:ChargingTextureEntry = this.cache[local4]; if(local5 == null) { local5 = new ChargingTextureEntry(); local5.texture = createTexture(param1,param2,param3); this.cache[local4] = local5; } return local5; } } }
package _codec.projects.tanks.client.panel.model.battleinvite { 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.panel.model.battleinvite.BattleInviteMessage; public class VectorCodecBattleInviteMessageLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecBattleInviteMessageLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(BattleInviteMessage,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<BattleInviteMessage> = new Vector.<BattleInviteMessage>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = BattleInviteMessage(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:BattleInviteMessage = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<BattleInviteMessage> = Vector.<BattleInviteMessage>(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.model.quest.common.gui.window { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.model.quest.challenge.gui.ChallengesTab; import alternativa.tanks.model.quest.common.MissionsWindowsService; import alternativa.tanks.model.quest.common.gui.CommonQuestTab; import alternativa.tanks.model.quest.common.gui.window.events.QuestWindowCloseEvent; import alternativa.tanks.model.quest.common.gui.window.navigatepanel.QuestTabButtonsList; import alternativa.tanks.model.quest.common.gui.window.navigatepanel.SelectTabEvent; import alternativa.tanks.model.quest.daily.gui.DailyQuestTab; import alternativa.tanks.model.quest.weekly.gui.WeeklyQuestTab; import controls.base.DefaultButtonBase; import flash.events.MouseEvent; import flash.utils.Dictionary; import forms.TankWindowWithHeader; import forms.events.MainButtonBarEvents; import projects.tanks.client.panel.model.quest.QuestTypeEnum; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow; import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.gamescreen.UserChangeGameScreenService; import services.buttonbar.IButtonBarService; public class QuestWindow extends DialogWindow implements MissionsWindowsService { [Inject] public static var localeService:ILocaleService; [Inject] public static var userChangeGameScreenService:UserChangeGameScreenService; [Inject] public static var buttonBarService:IButtonBarService; public static const WINDOW_HEIGHT:int = 460 + INNER_MARGIN; public static const WINDOW_WIDTH:int = 868 + INNER_MARGIN; public static const BORDER_MARGIN:int = 12; public static const INNER_MARGIN:int = 8; private var isOpened:Boolean; private var window:TankWindowWithHeader; private var navigateTabPanel:QuestTabButtonsList; private var closeButton:DefaultButtonBase; private var tabViews:Dictionary = new Dictionary(); private var currentTab:QuestsTabView = null; private var inited:Boolean = false; public function QuestWindow() { super(); this.createTabs(); } public function initWindow() : void { if(!this.inited) { buttonBarService.addEventListener(MainButtonBarEvents.PANEL_BUTTON_PRESSED,this.onButtonBarButtonClick); this.addWindow(); this.addNavigatePanel(); this.addCloseButton(); this.inited = true; } } private function createTabs() : void { this.createDailyTab(); this.createWeeklyTab(); this.createChallengeTab(); } private function onButtonBarButtonClick(param1:MainButtonBarEvents) : void { if(param1.typeButton == MainButtonBarEvents.QUESTS) { this.openInTab(QuestTypeEnum.DAILY); } } private function addNavigatePanel() : void { var local1:QuestsTabView = null; this.navigateTabPanel = new QuestTabButtonsList(); this.navigateTabPanel.addCategoryButton(QuestTypeEnum.MAIN); this.navigateTabPanel.addCategoryButton(QuestTypeEnum.DAILY); this.navigateTabPanel.addCategoryButton(QuestTypeEnum.WEEKLY); this.navigateTabPanel.addCategoryButton(QuestTypeEnum.CHALLENGE); this.navigateTabPanel.x = BORDER_MARGIN; this.navigateTabPanel.y = BORDER_MARGIN; addChild(this.navigateTabPanel); this.navigateTabPanel.selectTabButton(QuestTypeEnum.DAILY); for each(local1 in this.tabViews) { this.alignTabByNavPanel(local1); } } private function addWindow() : void { this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_MISSIONS,WINDOW_WIDTH,WINDOW_HEIGHT); addChild(this.window); } private function addCloseButton() : void { this.closeButton = new DefaultButtonBase(); this.closeButton.label = localeService.getText(TanksLocale.TEXT_CLOSE_LABEL); this.closeButton.x = WINDOW_WIDTH - this.closeButton.width - BORDER_MARGIN; this.closeButton.y = WINDOW_HEIGHT - this.closeButton.height - BORDER_MARGIN; this.window.addChild(this.closeButton); } private function createDailyTab() : void { var local1:DailyQuestTab = new DailyQuestTab(); this.tabViews[QuestTypeEnum.DAILY] = local1; } private function createWeeklyTab() : void { var local1:WeeklyQuestTab = new WeeklyQuestTab(); this.tabViews[QuestTypeEnum.WEEKLY] = local1; } private function createChallengeTab() : void { var local1:ChallengesTab = new ChallengesTab(); this.tabViews[QuestTypeEnum.CHALLENGE] = local1; } private function alignTabByNavPanel(param1:QuestsTabView) : void { param1.x = BORDER_MARGIN; param1.y = this.navigateTabPanel.y + this.navigateTabPanel.height + INNER_MARGIN; } private function tabSelected(param1:SelectTabEvent) : void { this.selectTab(param1.selectedType); } private function selectTab(param1:QuestTypeEnum) : void { if(this.currentTab != null && this.window.contains(this.currentTab)) { this.currentTab.hide(); this.window.removeChild(this.currentTab); } var local2:QuestsTabView = this.tabViews[param1]; if(local2 != null) { this.currentTab = local2; this.window.addChild(this.currentTab); this.currentTab.show(); } } private function onCloseButtonClick(param1:MouseEvent = null) : void { this.closeWindow(); } public function closeWindow() : void { var local1:QuestsTabView = null; if(!this.isOpened) { return; } this.removeListeners(); dispatchEvent(new QuestWindowCloseEvent(QuestWindowCloseEvent.QUEST_WINDOW_CLOSE)); userChangeGameScreenService.questWindowClosed(); this.clearCurrentTab(); for each(local1 in this.tabViews) { local1.close(); } dialogService.removeDialog(this); this.isOpened = false; } private function clearCurrentTab() : void { if(this.currentTab != null && this.window.contains(this.currentTab)) { this.window.removeChild(this.currentTab); } this.currentTab = null; } private function removeListeners() : void { this.navigateTabPanel.removeEventListener(SelectTabEvent.SELECT_QUESTS_TAB,this.tabSelected); this.closeButton.removeEventListener(MouseEvent.CLICK,this.onCloseButtonClick); } override protected function cancelKeyPressed() : void { this.closeWindow(); } override protected function confirmationKeyPressed() : void { this.closeWindow(); } override public function get width() : Number { return this.window.width; } public function getQuestTab(param1:QuestTypeEnum) : CommonQuestTab { return this.tabViews[param1]; } public function getDailyQuestsTab() : DailyQuestTab { return this.tabViews[QuestTypeEnum.DAILY]; } public function getWeeklyQuestsTab() : WeeklyQuestTab { return this.tabViews[QuestTypeEnum.WEEKLY]; } public function getChallengesTab() : ChallengesTab { return this.tabViews[QuestTypeEnum.CHALLENGE]; } public function openInTab(param1:QuestTypeEnum) : void { if(this.isOpened) { return; } this.isOpened = true; userChangeGameScreenService.questWindowOpened(); this.navigateTabPanel.selectTabButton(param1); this.selectTab(param1); this.prepareToOpen(); dialogService.enqueueDialog(this); } private function prepareToOpen() : void { this.navigateTabPanel.addEventListener(SelectTabEvent.SELECT_QUESTS_TAB,this.tabSelected); this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseButtonClick); } public function isWindowOpen() : Boolean { return this.isOpened; } } }
package projects.tanks.client.garage.models.item.delaymount { public interface IDelayMountCategoryModelBase { } }
package controls.buttons { public class FixedHeightButtonSkin { private var _up:FixedHeightRectangleSkin; private var _over:FixedHeightRectangleSkin; private var _down:FixedHeightRectangleSkin; private var _disabled:FixedHeightRectangleSkin; public function FixedHeightButtonSkin(param1:FixedHeightRectangleSkin, param2:FixedHeightRectangleSkin, param3:FixedHeightRectangleSkin, param4:FixedHeightRectangleSkin) { super(); this._up = param1; this._over = param2; this._down = param3; this._disabled = param4; } public function get up() : FixedHeightRectangleSkin { return this._up; } public function get over() : FixedHeightRectangleSkin { return this._over; } public function get down() : FixedHeightRectangleSkin { return this._down; } public function get disabled() : FixedHeightRectangleSkin { return this._disabled; } } }
package alternativa.tanks.model.item.upgradable { import alternativa.tanks.model.item.properties.ItemProperties; import alternativa.tanks.model.item.properties.ItemPropertyValue; import alternativa.tanks.service.item.ItemService; import controls.timer.CountDownTimer; import projects.tanks.client.garage.models.item.upgradeable.IUpgradeableParamsConstructorModelBase; import projects.tanks.client.garage.models.item.upgradeable.UpgradeParamsCC; import projects.tanks.client.garage.models.item.upgradeable.UpgradeableParamsConstructorModelBase; [ModelInfo] public class UpgradeParamsModel extends UpgradeableParamsConstructorModelBase implements IUpgradeableParamsConstructorModelBase, UpgradableItem, ItemProperties { [Inject] public static var itemService:ItemService; public function UpgradeParamsModel() { super(); } public function getUpgradableItem() : UpgradableItemParams { return this.data(); } public function getProperties() : Vector.<ItemPropertyValue> { return Vector.<ItemPropertyValue>(this.data().properties); } public function getPropertiesForInfoWindow() : Vector.<ItemPropertyValue> { return Vector.<ItemPropertyValue>(this.data().visibleProperties); } public function getUpgradableProperties() : Vector.<UpgradableItemPropertyValue> { return this.data().properties; } public function getVisibleUpgradableProperties() : Vector.<UpgradableItemPropertyValue> { return this.data().visibleProperties; } public function isUpgrading() : Boolean { return this.data().isUpgrading(); } public function speedUp() : void { return this.data().speedUp(); } public function getCountDownTimer() : CountDownTimer { return this.data().timer; } public function traceUpgrades() : void { var local1:String = null; if(this.data().getLevelsCount() > 0) { local1 = itemService.getName(object); this.data().traceUpgrades(); } } private function data() : UpgradableItemParams { var local2:UpgradeParamsCC = null; var local1:UpgradableItemParams = UpgradableItemParams(getData(UpgradableItemParams)); if(local1 == null) { local2 = getInitParam(); local1 = new UpgradableItemParams(local2,object); putData(UpgradableItemParams,local1); } return local1; } public function hasUpgradeDiscount() : Boolean { var local1:UpgradeParamsCC = getInitParam(); return local1.timeDiscount > 0 || local1.upgradeDiscount > 0; } public function hasSpeedUpDiscount() : Boolean { return getInitParam().speedUpDiscount > 0; } } }
package alternativa.tanks.gui.communication.tabs.clanchat { import flash.events.IEventDispatcher; public interface IClanChatView extends IEventDispatcher { function setClanChat(param1:ClanChatTab) : void; function getClanChat() : ClanChatTab; function clear() : void; function updateClanChatView() : void; } }
package alternativa.tanks.view.battlelist.modefilter { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.battlelist.modefilter.BattleModeCheckBox_pressedStateClass.png")] public class BattleModeCheckBox_pressedStateClass extends BitmapAsset { public function BattleModeCheckBox_pressedStateClass() { super(); } } }
package projects.tanks.client.panel.model.shop.renameshopitem { public class RenameShopItemCC { private var _name:String; public function RenameShopItemCC(param1:String = null) { super(); this._name = param1; } public function get name() : String { return this._name; } public function set name(param1:String) : void { this._name = param1; } public function toString() : String { var local1:String = "RenameShopItemCC ["; local1 += "name = " + this.name + " "; return local1 + "]"; } } }
package controls.cellrenderer { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.cellrenderer.CellNormal_normalRight.png")] public class CellNormal_normalRight extends BitmapAsset { public function CellNormal_normalRight() { super(); } } }
package alternativa.tanks.model.item.upgradable.calculators { public interface PropertyCalculator { function getValue(param1:int) : String; function getPrecision() : int; function getDelta(param1:int) : String; } }
package projects.tanks.client.panel.model.payment.modes.description { import platform.client.fp10.core.resource.types.ImageResource; public class BottomDescriptionCC { private var _description:String; private var _images:Vector.<ImageResource>; public function BottomDescriptionCC(param1:String = null, param2:Vector.<ImageResource> = null) { super(); this._description = param1; this._images = param2; } public function get description() : String { return this._description; } public function set description(param1:String) : void { this._description = param1; } public function get images() : Vector.<ImageResource> { return this._images; } public function set images(param1:Vector.<ImageResource>) : void { this._images = param1; } public function toString() : String { var local1:String = "BottomDescriptionCC ["; local1 += "description = " + this.description + " "; local1 += "images = " + this.images + " "; return local1 + "]"; } } }
package projects.tanks.client.tanksservices.model.ads { public interface IAdShowModelBase { } }
package controls.cellrenderer { import mx.core.BitmapAsset; [ExcludeClass] public class CellUnavailable_normalLeft extends BitmapAsset { public function CellUnavailable_normalLeft() { super(); } } }
package alternativa.engine3d.core { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.materials.Material; import flash.geom.Point; import flash.geom.Vector3D; use namespace alternativa3d; public class Face { alternativa3d static var collector:Face; public var material:Material; public var smoothingGroups:uint = 0; alternativa3d var normalX:Number; alternativa3d var normalY:Number; alternativa3d var normalZ:Number; alternativa3d var offset:Number; alternativa3d var wrapper:Wrapper; alternativa3d var next:Face; alternativa3d var processNext:Face; alternativa3d var processNegative:Face; alternativa3d var processPositive:Face; alternativa3d var distance:Number; alternativa3d var geometry:VG; public var id:Object; public function Face() { super(); } alternativa3d static function create() : Face { var _loc1_:Face = null; if(collector != null) { _loc1_ = collector; collector = _loc1_.next; _loc1_.next = null; return _loc1_; } return new Face(); } alternativa3d function create() : Face { var _loc1_:Face = null; if(collector != null) { _loc1_ = collector; collector = _loc1_.next; _loc1_.next = null; return _loc1_; } return new Face(); } public function get normal() : Vector3D { var _loc1_:Wrapper = this.wrapper; var _loc2_:Vertex = _loc1_.vertex; _loc1_ = _loc1_.next; var _loc3_:Vertex = _loc1_.vertex; _loc1_ = _loc1_.next; var _loc4_:Vertex = _loc1_.vertex; var _loc5_:Number = _loc3_.x - _loc2_.x; var _loc6_:Number = _loc3_.y - _loc2_.y; var _loc7_:Number = _loc3_.z - _loc2_.z; var _loc8_:Number = _loc4_.x - _loc2_.x; var _loc9_:Number = _loc4_.y - _loc2_.y; var _loc10_:Number = _loc4_.z - _loc2_.z; var _loc11_:Number = _loc10_ * _loc6_ - _loc9_ * _loc7_; var _loc12_:Number = _loc8_ * _loc7_ - _loc10_ * _loc5_; var _loc13_:Number = _loc9_ * _loc5_ - _loc8_ * _loc6_; var _loc14_:Number = _loc11_ * _loc11_ + _loc12_ * _loc12_ + _loc13_ * _loc13_; if(_loc14_ > 0.001) { _loc14_ = 1 / Math.sqrt(_loc14_); _loc11_ *= _loc14_; _loc12_ *= _loc14_; _loc13_ *= _loc14_; } return new Vector3D(_loc11_,_loc12_,_loc13_,_loc2_.x * _loc11_ + _loc2_.y * _loc12_ + _loc2_.z * _loc13_); } public function get vertices() : Vector.<Vertex> { var _loc1_:Vector.<Vertex> = new Vector.<Vertex>(); var _loc2_:int = 0; var _loc3_:Wrapper = this.wrapper; while(_loc3_ != null) { _loc1_[_loc2_] = _loc3_.vertex; _loc2_++; _loc3_ = _loc3_.next; } return _loc1_; } public function getUV(param1:Vector3D) : Point { var _loc2_:Vertex = this.wrapper.vertex; var _loc3_:Vertex = this.wrapper.next.vertex; var _loc4_:Vertex = this.wrapper.next.next.vertex; var _loc5_:Number = _loc3_.x - _loc2_.x; var _loc6_:Number = _loc3_.y - _loc2_.y; var _loc7_:Number = _loc3_.z - _loc2_.z; var _loc8_:Number = _loc3_.u - _loc2_.u; var _loc9_:Number = _loc3_.v - _loc2_.v; var _loc10_:Number = _loc4_.x - _loc2_.x; var _loc11_:Number = _loc4_.y - _loc2_.y; var _loc12_:Number = _loc4_.z - _loc2_.z; var _loc13_:Number = _loc4_.u - _loc2_.u; var _loc14_:Number = _loc4_.v - _loc2_.v; var _loc15_:Number = -this.normalX * _loc11_ * _loc7_ + _loc10_ * this.normalY * _loc7_ + this.normalX * _loc6_ * _loc12_ - _loc5_ * this.normalY * _loc12_ - _loc10_ * _loc6_ * this.normalZ + _loc5_ * _loc11_ * this.normalZ; var _loc16_:Number = (-this.normalY * _loc12_ + _loc11_ * this.normalZ) / _loc15_; var _loc17_:Number = (this.normalX * _loc12_ - _loc10_ * this.normalZ) / _loc15_; var _loc18_:Number = (-this.normalX * _loc11_ + _loc10_ * this.normalY) / _loc15_; var _loc19_:Number = (_loc2_.x * this.normalY * _loc12_ - this.normalX * _loc2_.y * _loc12_ - _loc2_.x * _loc11_ * this.normalZ + _loc10_ * _loc2_.y * this.normalZ + this.normalX * _loc11_ * _loc2_.z - _loc10_ * this.normalY * _loc2_.z) / _loc15_; var _loc20_:Number = (this.normalY * _loc7_ - _loc6_ * this.normalZ) / _loc15_; var _loc21_:Number = (-this.normalX * _loc7_ + _loc5_ * this.normalZ) / _loc15_; var _loc22_:Number = (this.normalX * _loc6_ - _loc5_ * this.normalY) / _loc15_; var _loc23_:Number = (this.normalX * _loc2_.y * _loc7_ - _loc2_.x * this.normalY * _loc7_ + _loc2_.x * _loc6_ * this.normalZ - _loc5_ * _loc2_.y * this.normalZ - this.normalX * _loc6_ * _loc2_.z + _loc5_ * this.normalY * _loc2_.z) / _loc15_; var _loc24_:Number = _loc8_ * _loc16_ + _loc13_ * _loc20_; var _loc25_:Number = _loc8_ * _loc17_ + _loc13_ * _loc21_; var _loc26_:Number = _loc8_ * _loc18_ + _loc13_ * _loc22_; var _loc27_:Number = _loc8_ * _loc19_ + _loc13_ * _loc23_ + _loc2_.u; var _loc28_:Number = _loc9_ * _loc16_ + _loc14_ * _loc20_; var _loc29_:Number = _loc9_ * _loc17_ + _loc14_ * _loc21_; var _loc30_:Number = _loc9_ * _loc18_ + _loc14_ * _loc22_; var _loc31_:Number = _loc9_ * _loc19_ + _loc14_ * _loc23_ + _loc2_.v; return new Point(_loc24_ * param1.x + _loc25_ * param1.y + _loc26_ * param1.z + _loc27_,_loc28_ * param1.x + _loc29_ * param1.y + _loc30_ * param1.z + _loc31_); } public function toString() : String { return "[Face " + this.id + "]"; } alternativa3d function calculateBestSequenceAndNormal() : void { var _loc1_:Wrapper = null; var _loc2_:Vertex = null; var _loc3_:Vertex = null; var _loc4_:Vertex = null; var _loc5_:Number = NaN; var _loc6_:Number = NaN; var _loc7_:Number = NaN; var _loc8_:Number = NaN; var _loc9_:Number = NaN; 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_:Wrapper = null; var _loc17_:Wrapper = null; var _loc18_:Wrapper = null; var _loc19_:Wrapper = null; var _loc20_:Wrapper = null; if(this.wrapper.next.next.next != null) { _loc15_ = -1e+22; _loc1_ = this.wrapper; while(_loc1_ != null) { _loc19_ = _loc1_.next != null ? _loc1_.next : this.wrapper; _loc20_ = _loc19_.next != null ? _loc19_.next : this.wrapper; _loc2_ = _loc1_.vertex; _loc3_ = _loc19_.vertex; _loc4_ = _loc20_.vertex; _loc5_ = _loc3_.x - _loc2_.x; _loc6_ = _loc3_.y - _loc2_.y; _loc7_ = _loc3_.z - _loc2_.z; _loc8_ = _loc4_.x - _loc2_.x; _loc9_ = _loc4_.y - _loc2_.y; _loc10_ = _loc4_.z - _loc2_.z; _loc11_ = _loc10_ * _loc6_ - _loc9_ * _loc7_; _loc12_ = _loc8_ * _loc7_ - _loc10_ * _loc5_; _loc13_ = _loc9_ * _loc5_ - _loc8_ * _loc6_; _loc14_ = _loc11_ * _loc11_ + _loc12_ * _loc12_ + _loc13_ * _loc13_; if(_loc14_ > _loc15_) { _loc15_ = _loc14_; _loc16_ = _loc1_; } _loc1_ = _loc1_.next; } if(_loc16_ != this.wrapper) { _loc17_ = this.wrapper.next.next.next; while(_loc17_.next != null) { _loc17_ = _loc17_.next; } _loc18_ = this.wrapper; while(_loc18_.next != _loc16_ && _loc18_.next != null) { _loc18_ = _loc18_.next; } _loc17_.next = this.wrapper; _loc18_.next = null; this.wrapper = _loc16_; } } _loc1_ = this.wrapper; _loc2_ = _loc1_.vertex; _loc1_ = _loc1_.next; _loc3_ = _loc1_.vertex; _loc1_ = _loc1_.next; _loc4_ = _loc1_.vertex; _loc5_ = _loc3_.x - _loc2_.x; _loc6_ = _loc3_.y - _loc2_.y; _loc7_ = _loc3_.z - _loc2_.z; _loc8_ = _loc4_.x - _loc2_.x; _loc9_ = _loc4_.y - _loc2_.y; _loc10_ = _loc4_.z - _loc2_.z; _loc11_ = _loc10_ * _loc6_ - _loc9_ * _loc7_; _loc12_ = _loc8_ * _loc7_ - _loc10_ * _loc5_; _loc13_ = _loc9_ * _loc5_ - _loc8_ * _loc6_; _loc14_ = _loc11_ * _loc11_ + _loc12_ * _loc12_ + _loc13_ * _loc13_; if(_loc14_ > 0) { _loc14_ = 1 / Math.sqrt(_loc14_); _loc11_ *= _loc14_; _loc12_ *= _loc14_; _loc13_ *= _loc14_; this.normalX = _loc11_; this.normalY = _loc12_; this.normalZ = _loc13_; } this.offset = _loc2_.x * _loc11_ + _loc2_.y * _loc12_ + _loc2_.z * _loc13_; } public function destroy() : void { this.material = null; if(this.wrapper != null) { this.wrapper.destroy(); this.wrapper = null; } if(this.geometry != null) { this.geometry.destroy(); this.geometry = null; } } } }
package projects.tanks.client.panel.model.referrals { public class ReferralsModelCC { private var _inviteLink:String; public function ReferralsModelCC(param1:String = null) { super(); this._inviteLink = param1; } public function get inviteLink() : String { return this._inviteLink; } public function set inviteLink(param1:String) : void { this._inviteLink = param1; } public function toString() : String { var local1:String = "ReferralsModelCC ["; local1 += "inviteLink = " + this.inviteLink + " "; return local1 + "]"; } } }
package alternativa.tanks.model.payment.modes.leogaming { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class LeogamingPaymentModeAdapt implements LeogamingPaymentMode { private var object:IGameObject; private var impl:LeogamingPaymentMode; public function LeogamingPaymentModeAdapt(param1:IGameObject, param2:LeogamingPaymentMode) { super(); this.object = param1; this.impl = param2; } public function sendPhone(param1:String) : void { var phone:String = param1; try { Model.object = this.object; this.impl.sendPhone(phone); } finally { Model.popObject(); } } public function sendCode(param1:String) : void { var code:String = param1; try { Model.object = this.object; this.impl.sendCode(code); } finally { Model.popObject(); } } } }
package alternativa.engine3d.loaders.collada { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.animation.keys.NumberKey; import alternativa.engine3d.animation.keys.NumberTrack; import alternativa.engine3d.animation.keys.Track; use namespace alternativa3d; public class DaeChannel extends DaeElement { public static const PARAM_UNDEFINED:String = "undefined"; public static const PARAM_TRANSLATE_X:String = "x"; public static const PARAM_TRANSLATE_Y:String = "y"; public static const PARAM_TRANSLATE_Z:String = "z"; public static const PARAM_SCALE_X:String = "scaleX"; public static const PARAM_SCALE_Y:String = "scaleY"; public static const PARAM_SCALE_Z:String = "scaleZ"; public static const PARAM_ROTATION_X:String = "rotationX"; public static const PARAM_ROTATION_Y:String = "rotationY"; public static const PARAM_ROTATION_Z:String = "rotationZ"; public static const PARAM_TRANSLATE:String = "translate"; public static const PARAM_SCALE:String = "scale"; public static const PARAM_MATRIX:String = "matrix"; public var tracks:Vector.<Track>; public var animatedParam:String = "undefined"; public var animName:String; public function DaeChannel(param1:XML, param2:DaeDocument) { super(param1,param2); } public function get node() : DaeNode { var local2:Array = null; var local3:DaeNode = null; var local4:int = 0; var local5:int = 0; var local6:String = null; var local1:XML = data.@target[0]; if(local1 != null) { local2 = local1.toString().split("/"); local3 = document.findNodeByID(local2[0]); if(local3 != null) { local2.pop(); local4 = 1; local5 = int(local2.length); while(local4 < local5) { local6 = local2[local4]; local3 = local3.getNodeBySid(local6); if(local3 == null) { return null; } local4++; } return local3; } } return null; } override protected function parseImplementation() : Boolean { this.parseTransformationType(); this.parseSampler(); return true; } private function parseTransformationType() : void { var local6:XML = null; var local12:XML = null; var local13:XML = null; var local14:String = null; var local15:Array = null; var local1:XML = data.@target[0]; if(local1 == null) { return; } var local2:Array = local1.toString().split("/"); var local3:String = local2.pop(); var local4:Array = local3.split("."); var local5:int = int(local4.length); var local7:DaeNode = this.node; if(local7 == null) { return; } this.animName = local7.animName; var local8:XMLList = local7.data.children(); var local9:int = 0; var local10:int = int(local8.length()); while(local9 < local10) { local12 = local8[local9]; local13 = local12.@sid[0]; if(local13 != null && local13.toString() == local4[0]) { local6 = local12; break; } local9++; } var local11:String = local6 != null ? local6.localName() as String : null; if(local5 > 1) { local14 = local4[1]; switch(local11) { case "translate": switch(local14) { case "X": this.animatedParam = PARAM_TRANSLATE_X; break; case "Y": this.animatedParam = PARAM_TRANSLATE_Y; break; case "Z": this.animatedParam = PARAM_TRANSLATE_Z; } break; case "rotate": local15 = parseNumbersArray(local6); switch(local15.indexOf(1)) { case 0: this.animatedParam = PARAM_ROTATION_X; break; case 1: this.animatedParam = PARAM_ROTATION_Y; break; case 2: this.animatedParam = PARAM_ROTATION_Z; } break; case "scale": switch(local14) { case "X": this.animatedParam = PARAM_SCALE_X; break; case "Y": this.animatedParam = PARAM_SCALE_Y; break; case "Z": this.animatedParam = PARAM_SCALE_Z; } } } else { switch(local11) { case "translate": this.animatedParam = PARAM_TRANSLATE; break; case "scale": this.animatedParam = PARAM_SCALE; break; case "matrix": this.animatedParam = PARAM_MATRIX; } } } private function parseSampler() : void { var local2:NumberTrack = null; var local3:Number = NaN; var local4:NumberKey = null; var local1:DaeSampler = document.findSampler(data.@source[0]); if(local1 != null) { local1.parse(); if(this.animatedParam == PARAM_MATRIX) { this.tracks = Vector.<Track>([local1.parseTransformationTrack(this.animName)]); return; } if(this.animatedParam == PARAM_TRANSLATE) { this.tracks = local1.parsePointsTracks(this.animName,"x","y","z"); return; } if(this.animatedParam == PARAM_SCALE) { this.tracks = local1.parsePointsTracks(this.animName,"scaleX","scaleY","scaleZ"); return; } if(this.animatedParam == PARAM_ROTATION_X || this.animatedParam == PARAM_ROTATION_Y || this.animatedParam == PARAM_ROTATION_Z) { local2 = local1.parseNumbersTrack(this.animName,this.animatedParam); local3 = Math.PI / 180; local4 = local2.alternativa3d::keyList; while(local4 != null) { local4.alternativa3d::_value *= local3; local4 = local4.alternativa3d::next; } this.tracks = Vector.<Track>([local2]); return; } if(this.animatedParam == PARAM_TRANSLATE_X || this.animatedParam == PARAM_TRANSLATE_Y || this.animatedParam == PARAM_TRANSLATE_Z || this.animatedParam == PARAM_SCALE_X || this.animatedParam == PARAM_SCALE_Y || this.animatedParam == PARAM_SCALE_Z) { this.tracks = Vector.<Track>([local1.parseNumbersTrack(this.animName,this.animatedParam)]); } } else { document.logger.logNotFoundError(data.@source[0]); } } } }
package projects.tanks.client.garage.models.item.itempersonaldiscount { public class DiscountData { private var _discountForPercent:Number; private var _duration:int; public function DiscountData(param1:Number = 0, param2:int = 0) { super(); this._discountForPercent = param1; this._duration = param2; } public function get discountForPercent() : Number { return this._discountForPercent; } public function set discountForPercent(param1:Number) : void { this._discountForPercent = param1; } public function get duration() : int { return this._duration; } public function set duration(param1:int) : void { this._duration = param1; } public function toString() : String { var local1:String = "DiscountData ["; local1 += "discountForPercent = " + this.discountForPercent + " "; local1 += "duration = " + this.duration + " "; return local1 + "]"; } } }
package com.alternativaplatform.projects.tanks.client.commons.types { import alternativa.math.Vector3; public class Vector3d { public var x:Number; public var y:Number; public var z:Number; public function Vector3d(x:Number, y:Number, z:Number) { super(); this.x = x; this.y = y; this.z = z; } public function toVector3() : Vector3 { return new Vector3(this.x,this.y,this.z); } public function toString() : String { return "Vector3d(" + this.x + " , " + this.y + " , " + this.z + ")"; } } }
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.shaft { public interface IShaftShootSFXModelBase { } }
package alternativa.tanks.model.challenge.greenpanel.black { import mx.core.BitmapAsset; [ExcludeClass] public class BlackPack_top_line extends BitmapAsset { public function BlackPack_top_line() { super(); } } }
package alternativa.tanks.model.item.skins { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class AvailableShotSkinsEvents implements AvailableShotSkins { private var object:IGameObject; private var impl:Vector.<Object>; public function AvailableShotSkinsEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getSkins() : Vector.<IGameObject> { var result:Vector.<IGameObject> = null; var i:int = 0; var m:AvailableShotSkins = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = AvailableShotSkins(this.impl[i]); result = m.getSkins(); i++; } } finally { Model.popObject(); } return result; } } }
package projects.tanks.clients.fp10.libraries.tanksservices.service.clan { import alternativa.types.Long; public interface ClanFunctionsService { function invite(param1:Long) : void; function leave() : void; function exclude(param1:Long) : void; function revokeRequest(param1:Long) : void; function acceptRequest(param1:Long) : void; function rejectRequest(param1:Long) : void; function rejectAllRequests() : void; } }
package alternativa.tanks.model.payment.shop.cashpackage { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class CashPackageEvents implements CashPackage { private var object:IGameObject; private var impl:Vector.<Object>; public function CashPackageEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getAmount() : int { var result:int = 0; var i:int = 0; var m:CashPackage = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = CashPackage(this.impl[i]); result = int(m.getAmount()); i++; } } finally { Model.popObject(); } return result; } public function getBonusAmount() : int { var result:int = 0; var i:int = 0; var m:CashPackage = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = CashPackage(this.impl[i]); result = int(m.getBonusAmount()); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.models.weapon.ricochet { import alternativa.engine3d.core.Object3D; import alternativa.math.Vector3; import alternativa.tanks.battle.BattleService; import alternativa.tanks.sfx.AnimatedLightEffect; import alternativa.tanks.sfx.MuzzlePositionProvider; import alternativa.tanks.sfx.PlaneMuzzleFlashEffect; import alternativa.tanks.sfx.Sound3D; import alternativa.tanks.sfx.Sound3DEffect; public class RicochetEffects { public static const MUZZLE_FLASH_SIZE:Number = 150; private static const MUZZLE_FLASH_DURATION:int = 100; private var battleService:BattleService; private var sfxData:RicochetSFXData; public function RicochetEffects(param1:BattleService, param2:RicochetSFXData) { super(); this.battleService = param1; this.sfxData = param2; } public function createShotEffects(param1:Object3D, param2:Vector3, param3:Vector3) : void { var local5:Number = NaN; var local6:Sound3D = null; var local7:Sound3DEffect = null; var local4:PlaneMuzzleFlashEffect = PlaneMuzzleFlashEffect(this.battleService.getObjectPool().getObject(PlaneMuzzleFlashEffect)); local4.init(param2,param1,this.sfxData.muzzleFlashMaterial,MUZZLE_FLASH_DURATION,MUZZLE_FLASH_SIZE,MUZZLE_FLASH_SIZE); this.battleService.addGraphicEffect(local4); if(this.sfxData.shotSound != null) { local5 = 0.8; local6 = Sound3D.create(this.sfxData.shotSound,local5); local7 = Sound3DEffect.create(param3,local6); this.battleService.addSound3DEffect(local7); } } public function createLightEffect(param1:Object3D, param2:Vector3) : void { var local3:AnimatedLightEffect = AnimatedLightEffect(this.battleService.getObjectPool().getObject(AnimatedLightEffect)); var local4:MuzzlePositionProvider = MuzzlePositionProvider(this.battleService.getObjectPool().getObject(MuzzlePositionProvider)); local4.init(param1,param2); local3.init(local4,this.sfxData.shotLightAnimation); this.battleService.addGraphicEffect(local3); } } }
package alternativa.tanks.models.battlefield.decals { public class QueueItem { private static var poolTop:QueueItem; public var next:QueueItem; public var data; public function QueueItem(param1:*) { super(); this.data = param1; } public static function create(param1:*) : QueueItem { if(poolTop == null) { return new QueueItem(param1); } var _loc2_:QueueItem = poolTop; poolTop = poolTop.next; _loc2_.data = param1; return _loc2_; } public function destroy() : void { this.data = null; this.next = poolTop; poolTop = this; } } }
package controls { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.TankWindowInner_rightClass.png")] public class TankWindowInner_rightClass extends BitmapAsset { public function TankWindowInner_rightClass() { super(); } } }
package alternativa.tanks.models.weapon.twins { import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.BattleUtils; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventSupport; import alternativa.tanks.battle.events.StateCorrectionEvent; import alternativa.tanks.battle.events.TankUnloadedEvent; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.battle.objects.tank.Weapon; import alternativa.tanks.models.tank.ITankModel; import alternativa.tanks.models.tank.ultimate.hunter.stun.UltimateStunListener; import alternativa.tanks.models.weapon.IWeaponModel; import alternativa.tanks.models.weapon.common.IWeaponCommonModel; import alternativa.tanks.models.weapon.common.WeaponBuffListener; import alternativa.tanks.models.weapon.shared.shot.WeaponReloadTimeChangedListener; import flash.utils.Dictionary; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.tankparts.weapon.twins.ITwinsModelBase; import projects.tanks.client.battlefield.models.tankparts.weapon.twins.TwinsCC; import projects.tanks.client.battlefield.models.tankparts.weapon.twins.TwinsModelBase; import projects.tanks.client.battlefield.types.Vector3d; [ModelInfo] public class TwinsModel extends TwinsModelBase implements ITwinsModelBase, ObjectLoadListener, IWeaponModel, TwinsWeaponCallback, WeaponBuffListener, WeaponReloadTimeChangedListener, UltimateStunListener { [Inject] public static var battleService:BattleService; [Inject] public static var battleEventDispatcher:BattleEventDispatcher; private var weapons:Dictionary = new Dictionary(); private var battleEventSupport:BattleEventSupport; public function TwinsModel() { super(); this.battleEventSupport = new BattleEventSupport(battleEventDispatcher); this.battleEventSupport.addEventHandler(TankUnloadedEvent,this.onTankUnloaded); this.battleEventSupport.activateHandlers(); } [Obfuscation(rename="false")] public function objectLoaded() : void { var local1:TwinsCC = getInitParam(); local1.speed = BattleUtils.toClientScale(local1.speed); local1.shellRadius = BattleUtils.toClientScale(local1.shellRadius); } [Obfuscation(rename="false")] public function fire(param1:IGameObject, param2:int, param3:int, param4:Vector3d) : void { var local5:RemoteTwinsWeapon = null; if(battleService.isBattleActive()) { local5 = this.weapons[param1]; if(local5 != null) { local5.fire(param2,param3,BattleUtils.getVector3(param4)); } } } [Obfuscation(rename="false")] public function fireDummy(param1:IGameObject, param2:int) : void { var local3:RemoteTwinsWeapon = null; if(battleService.isBattleActive()) { local3 = this.weapons[param1]; if(local3 != null) { local3.fireDummy(param2); } } } public function createLocalWeapon(param1:IGameObject) : Weapon { var local2:Weapon = new TwinsWeapon(param1,object,getInitParam()); this.weapons[param1] = local2; return local2; } public function createRemoteWeapon(param1:IGameObject) : Weapon { var local2:Weapon = new RemoteTwinsWeapon(object,getInitParam()); this.weapons[param1] = local2; return local2; } public function onShot(param1:int, param2:int, param3:int, param4:Vector3) : void { if(battleService.isBattleActive()) { this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE); server.fireCommand(param1,param3,param2,BattleUtils.getVector3d(param4)); } } public function onDummyShot(param1:int, param2:int) : void { if(battleService.isBattleActive()) { this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE); server.fireDummyCommand(param1,param2); } } public function onTargetHit(param1:int, param2:Body, param3:Vector3) : void { var local4:Tank = null; var local5:IGameObject = null; var local6:Vector3d = null; if(battleService.isBattleActive()) { local4 = param2.tank; local5 = local4.getUser(); local6 = BattleUtils.getVector3d(param2.state.position); server.hitTargetCommand(battleService.getPhysicsTime(),param1,local5,local6,BattleUtils.getVector3d(param3)); } } private function onTankUnloaded(param1:TankUnloadedEvent) : void { delete this.weapons[param1.tank.getUser()]; } public function onStaticHit(param1:int, param2:Vector3) : void { if(battleService.isBattleActive()) { server.hitStaticCommand(battleService.getPhysicsTime(),param1,BattleUtils.getVector3d(param2)); } } public function weaponReloadTimeChanged(param1:int, param2:int) : void { var local3:Tank = null; if(this.isLocalWeapon()) { local3 = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank(); Weapon(this.weapons[local3.user]).weaponReloadTimeChanged(param1,param2); } } public function weaponBuffStateChanged(param1:IGameObject, param2:Boolean, param3:Number) : void { var local4:Weapon = this.weapons[param1]; if(local4 != null) { local4.updateRecoilForce(param3); if(!param2) { local4.fullyRecharge(); } } } private function isLocalWeapon() : Boolean { var local1:Tank = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank(); return ITankModel(local1.user.adapt(ITankModel)).isLocal(); } public function onStun(param1:Tank, param2:Boolean) : void { if(param2) { Weapon(this.weapons[param1.user]).stun(); } } public function onCalm(param1:Tank, param2:Boolean, param3:int) : void { if(param2) { Weapon(this.weapons[param1.user]).calm(param3); } } } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank20.png")] public class DefaultRanksBitmaps_bitmapBigRank20 extends BitmapAsset { public function DefaultRanksBitmaps_bitmapBigRank20() { super(); } } }
package projects.tanks.client.tanksservices.model.notifier.referrals { import projects.tanks.client.tanksservices.model.notifier.AbstractNotifier; public class ReferralNotifierData extends AbstractNotifier { private var _referral:Boolean; public function ReferralNotifierData(param1:Boolean = false) { super(); this._referral = param1; } public function get referral() : Boolean { return this._referral; } public function set referral(param1:Boolean) : void { this._referral = param1; } override public function toString() : String { var local1:String = "ReferralNotifierData ["; local1 += "referral = " + this.referral + " "; local1 += super.toString(); return local1 + "]"; } } }
package forms.garage { import alternativa.console.IConsole; import alternativa.init.Main; import alternativa.model.IResourceLoadListener; import alternativa.tanks.model.GarageModel; import alternativa.tanks.model.IGarage; import alternativa.types.Long; import assets.Diamond; import assets.icons.GarageItemBackground; import assets.icons.IconGarageMod; import assets.icons.InputCheckIcon; import assets.scroller.color.ScrollThumbSkinGreen; import assets.scroller.color.ScrollTrackGreen; import controls.InventoryIcon; import controls.Label; import controls.rangicons.RangIconNormal; import fl.controls.LabelButton; import fl.controls.ScrollBar; import fl.controls.ScrollBarDirection; import fl.controls.TileList; import fl.data.DataProvider; import fl.events.ListEvent; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.DisplayObject; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.geom.Rectangle; import flash.system.Capabilities; import flash.text.TextFieldAutoSize; import flash.text.TextFormatAlign; import flash.utils.getTimer; import forms.RegisterForm; import forms.events.PartsListEvent; import scpacker.resource.images.ImageResource; public class PartsList extends Sprite implements IResourceLoadListener { private static const MIN_POSIBLE_SPEED:Number = 70; private static const MAX_DELTA_FOR_SELECT:Number = 7; private static const ADDITIONAL_SCROLL_AREA_HEIGHT:Number = 3; private static var _discountImage:Class = PartsList__discountImage; private static var discountBitmap:BitmapData = new _discountImage().bitmapData; public static const NOT_TANK_PART:int = 4; public static const WEAPON:int = 1; public static const ARMOR:int = 2; public static const COLOR:int = 3; public static const PLUGIN:int = 5; public static const KIT:int = 6; private var list:TileList; private var silentList:TileList; private var dp:DataProvider; private var silentdp:DataProvider; private var typeSort:Array; private var sumDragWay:Number; private var previousTime:int; private var currentTime:int; private var scrollSpeed:Number = 0; private var lastItemIndex:int; private var previousPositionX:Number; private var currrentPositionX:Number; private var _selectedItemID:Object = null; private var ID:String; private var model:GarageModel; private var _width:int; private var _height:int; public function PartsList(id:String = null) { this.typeSort = [0,2,3,4,1,0,1]; super(); this.ID = id; this.dp = new DataProvider(); this.silentdp = new DataProvider(); this.silentList = new TileList(); this.silentList.dataProvider = this.silentdp; this.list = new TileList(); this.list.dataProvider = this.dp; this.list.addEventListener(ListEvent.ITEM_CLICK,this.selectItem); this.list.addEventListener(ListEvent.ITEM_DOUBLE_CLICK,this.selectItem); this.list.rowCount = 1; this.list.rowHeight = 130; this.list.columnWidth = 203; this.list.setStyle("cellRenderer",PartsListRenderer); this.list.direction = ScrollBarDirection.HORIZONTAL; this.list.focusEnabled = false; this.list.horizontalScrollBar.focusEnabled = false; addChild(this.list); addEventListener(MouseEvent.MOUSE_WHEEL,this.scrollList); this.list.horizontalScrollBar.addEventListener(Event.ENTER_FRAME,this.updateScrollOnEnterFrame); addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown); this.confScroll(); addEventListener(Event.REMOVED_FROM_STAGE,this.killLists); } public function get selectedItemID() : Object { return this._selectedItemID; } override public function set width(value:Number) : void { this._width = int(value); this.list.width = this._width; } override public function get width() : Number { return this._width; } override public function set height(value:Number) : void { this._height = int(value); this.list.height = this._height; } override public function get height() : Number { return this._height; } public function resourceLoaded(resource:Object) : void { var i:int = 0; var item:Object = null; try { for(i = 0; i < this.dp.length; i++) { item = this.dp.getItemAt(i); if(resource.id.split("_preview")[0] == item.dat.id) { this.update(item.dat.id,"preview",resource as ImageResource); break; } } this.model = GarageModel(Main.osgi.getService(IGarage)); } catch(e:Error) { (Main.osgi.getService(IConsole) as IConsole).addLine(e.getStackTrace()); } } public function resourceUnloaded(resourceId:Long) : void { } private function updateScrollOnEnterFrame(param1:Event) : void { var _loc4_:Sprite = null; var _loc5_:Sprite = null; var _loc2_:ScrollBar = this.list.horizontalScrollBar; var _loc3_:int = 0; while(_loc3_ < _loc2_.numChildren) { _loc4_ = Sprite(_loc2_.getChildAt(_loc3_)); if(_loc4_.hitArea != null) { _loc5_ = _loc4_.hitArea; _loc5_.graphics.clear(); } else { _loc5_ = new Sprite(); _loc5_.mouseEnabled = false; _loc4_.hitArea = _loc5_; this.list.addChild(_loc5_); } _loc5_.graphics.beginFill(0,0); if(_loc4_ is LabelButton) { _loc5_.graphics.drawRect(_loc4_.y - 14,_loc2_.y - ADDITIONAL_SCROLL_AREA_HEIGHT,_loc4_.height + 28,_loc4_.width + ADDITIONAL_SCROLL_AREA_HEIGHT); } else { _loc5_.graphics.drawRect(_loc4_.y,_loc2_.y - ADDITIONAL_SCROLL_AREA_HEIGHT,_loc4_.height,_loc4_.width + ADDITIONAL_SCROLL_AREA_HEIGHT); } _loc5_.graphics.endFill(); _loc3_++; } } private function killLists(e:Event) : void { this.list.removeEventListener(ListEvent.ITEM_CLICK,this.selectItem); removeEventListener(MouseEvent.MOUSE_WHEEL,this.scrollList); this.list.horizontalScrollBar.removeEventListener(Event.ENTER_FRAME,this.updateScrollOnEnterFrame); removeEventListener(MouseEvent.MOUSE_WHEEL,this.scrollList); removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown); stage.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp); stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove); this.list.removeAll(); this.dp.removeAll(); this.silentList.removeAll(); this.silentdp.removeAll(); this.list = null; this.dp = null; this.silentList = null; this.silentdp = null; } public function addItem(id:Object, name:String, type:int, sort:int, crystalPrice:int, discount:int, rang:int, installed:Boolean, garageElement:Boolean, count:int, preview:ImageResource, modification:int = 0) : void { var iNormal:DisplayObject = null; var iSelected:DisplayObject = null; var data:Object = {}; var access:Boolean = rang < 1 && !garageElement; data.id = id; data.name = name; data.type = type; data.typeSort = this.typeSort[type]; data.mod = modification; data.crystalPrice = crystalPrice; data.discount = discount; data.rang = !!garageElement ? -1 : rang; data.installed = installed; data.garageElement = garageElement; data.count = count; data.preview = preview; data.sort = sort; iNormal = this.myIcon(data,false); iSelected = this.myIcon(data,true); if(String(id).indexOf("HD_") != -1) { this.silentdp.addItem({ "iconNormal":iNormal, "iconSelected":iSelected, "dat":data, "accessable":access, "rang":data.rang, "type":type, "typesort":data.typeSort, "sort":sort }); } else { this.dp.addItem({ "iconNormal":iNormal, "iconSelected":iSelected, "dat":data, "accessable":access, "rang":data.rang, "type":type, "typesort":data.typeSort, "sort":sort }); this.dp.sortOn(["accessable","rang","typesort","sort"],[Array.DESCENDING,Array.NUMERIC,Array.NUMERIC,Array.NUMERIC]); } } private function update(id:Object, param:String, value:* = null) : void { var obj:Object = null; var iNormal:DisplayObject = null; var iSelected:DisplayObject = null; var HD:Boolean = String(id).indexOf("HD_") != -1; var M3:Boolean = id.indexOf("_m3") != -1 && (id.indexOf("dictator") != -1 || id.indexOf("railgun") != -1); if(HD) { id = id.replace("HD_",""); } var index:int = this.indexById(id); if(M3 && HD) { if(index != -1) { obj = this.silentdp.getItemAt(this.indexById("HD_" + id,true)); this.silentdp.addItem(this.dp.getItemAt(index)); } else { obj = this.silentdp.getItemAt(this.indexById(id,true)); index = this.indexById("HD_" + id); } } else if(index != -1) { obj = this.dp.getItemAt(index); } else { index = this.indexById("HD_" + id); obj = this.dp.getItemAt(index); } var data:Object = obj.dat; data[param] = value; iNormal = this.myIcon(data,false); iSelected = this.myIcon(data,true); obj.dat = data; obj.iconNormal = iNormal; obj.iconSelected = iSelected; this.dp.replaceItemAt(obj,index); this.dp.sortOn(["accessable","rang","typesort","sort"],[Array.DESCENDING,Array.NUMERIC,Array.NUMERIC,Array.NUMERIC]); this.dp.invalidateItemAt(index); } public function lock(id:Object) : void { this.update(id,"accessable",true); } public function unlock(id:Object) : void { this.update(id,"accessable",false); } public function mount(id:Object) : void { this.update(id,"installed",true); } public function unmount(id:Object) : void { this.update(id,"installed",false); } public function updateCondition(id:Object, value:int) : void { this.update(id,"condition",value); } public function updateCount(id:Object, value:int) : void { this.update(id,"count",value); } public function updateModification(id:Object, value:int) : void { this.update(id,"mod",value); } public function deleteItem(id:Object) : void { var index:int = this.indexById(id); if(index == -1) { return; } var obj:Object = this.dp.getItemAt(index); if(this.list.selectedIndex == index) { this._selectedItemID = null; this.list.selectedItem = null; } this.dp.removeItem(obj); } public function select(id:Object) : void { var index:int = this.indexById(id); this.list.selectedIndex = index; this._selectedItemID = id; dispatchEvent(new PartsListEvent(PartsListEvent.SELECT_PARTS_LIST_ITEM)); } public function selectByIndex(index:uint) : void { var obj:Object = (this.dp.getItemAt(index) as Object).dat; this.list.selectedIndex = index; this._selectedItemID = obj.id; dispatchEvent(new PartsListEvent(PartsListEvent.SELECT_PARTS_LIST_ITEM)); } public function scrollTo(id:Object) : void { var index:int = this.indexById(id); this.list.scrollToIndex(index); } public function unselect() : void { this._selectedItemID = null; this.list.selectedItem = null; } private function myIcon(data:Object, select:Boolean) : DisplayObject { var bmp:BitmapData = null; var bg:GarageItemBackground = null; var itemName:String = null; var prv:Bitmap = null; var rangIcon:RangIconNormal = null; var icon:Sprite = new Sprite(); var cont:Sprite = new Sprite(); var discountLabel:Bitmap = null; var label:Label = null; var name:Label = new Label(); var c_price:Label = new Label(); var count:Label = new Label(); var diamond:Diamond = new Diamond(); var iconMod:IconGarageMod = new IconGarageMod(data.mod); var iconInventory:InventoryIcon = new InventoryIcon(data.sort,true); var iconCheck:InputCheckIcon = new InputCheckIcon(); var imageResource:ImageResource = data.preview; if(imageResource == null) { cont.addChild(iconCheck); iconCheck.x = 200 - iconCheck.width >> 1; iconCheck.y = 130 - iconCheck.height >> 1; iconCheck.gotoAndStop(RegisterForm.CALLSIGN_STATE_INVALID); } else if(imageResource.loaded()) { prv = new Bitmap(imageResource.bitmapData as BitmapData); prv.x = 19; prv.y = 18; cont.addChild(prv); } else if(imageResource != null && !imageResource.loaded()) { cont.addChild(iconCheck); iconCheck.x = 200 - iconCheck.width >> 1; iconCheck.y = 130 - iconCheck.height >> 1; iconCheck.gotoAndStop(RegisterForm.CALLSIGN_STATE_PROGRESS); imageResource.completeLoadListener = this; imageResource.load(); } if(data.rang > 0 && !data.garageElement || data.accessable) { rangIcon = new RangIconNormal(data.rang); itemName = "OFF"; data.installed = false; rangIcon.x = 135; rangIcon.y = 60; if(data.type != PLUGIN) { cont.addChild(rangIcon); } count.color = c_price.color = name.color = 12632256; } else { count.color = c_price.color = name.color = 5898034; switch(data.type) { case WEAPON: if(data.garageElement) { cont.addChild(iconMod); iconMod.x = 159; iconMod.y = 7; if(data.installed) { name.color = 8693863; } } itemName = "GUN"; break; case ARMOR: if(data.garageElement) { cont.addChild(iconMod); iconMod.x = 159; iconMod.y = 7; if(data.installed) { name.color = 9411748; } } itemName = "SHIELD"; break; case COLOR: itemName = "COLOR"; if(data.installed) { name.color = 11049390; } break; case NOT_TANK_PART: itemName = "ENGINE"; data.installed = false; cont.addChild(count); count.x = 90; count.y = 100; if(data.id != "1000_scores_m0") { cont.addChild(iconInventory); iconInventory.x = 6; iconInventory.y = 84; } count.autoSize = TextFieldAutoSize.NONE; count.size = 16; count.align = TextFormatAlign.RIGHT; count.width = 100; count.height = 25; count.text = data.count == 0 ? " " : "×" + String(data.count); break; case PLUGIN: itemName = "PLUGIN"; case KIT: itemName = "PLUGIN"; } } itemName += (Boolean(data.installed) ? "_INSTALLED" : "_NORMAL") + (!!select ? "_SELECTED" : ""); bg = new GarageItemBackground(GarageItemBackground.idByName(itemName)); name.text = data.name; if(!data.garageElement || data.type == NOT_TANK_PART) { if(data.crystalPrice > 0) { c_price.text = String(data.crystalPrice); c_price.x = 181 - c_price.textWidth; c_price.y = 2; cont.addChild(diamond); cont.addChild(c_price); diamond.x = 186; diamond.y = 6; } } name.y = 2; name.x = 3; cont.addChildAt(bg,0); cont.addChild(name); var needShowSales:Boolean = false; if(data.garageElement) { if((data.type == WEAPON || data.type == ARMOR) && data.maxModification > 1 && data.mod != 3) { needShowSales = true; } if(data.type == NOT_TANK_PART) { needShowSales = true; } } else { needShowSales = true; } if(data.discount > 0 && needShowSales) { discountLabel = new Bitmap(discountBitmap); discountLabel.x = 0; discountLabel.y = bg.height - discountLabel.height; cont.addChild(discountLabel); label = new Label(); label.color = 16777215; label.align = TextFormatAlign.LEFT; label.text = "-" + data.discount + "%"; label.height = 35; label.width = 100; label.thickness = 0; label.autoSize = TextFieldAutoSize.NONE; label.size = 16; label.x = 10; label.y = 90; label.rotation = 45; cont.addChild(label); } bmp = new BitmapData(cont.width,cont.height,true,0); bmp.draw(cont); icon.addChildAt(new Bitmap(bmp),0); return icon; } private function confScroll() : void { this.list.setStyle("downArrowUpSkin",ScrollArrowDownGreen); this.list.setStyle("downArrowDownSkin",ScrollArrowDownGreen); this.list.setStyle("downArrowOverSkin",ScrollArrowDownGreen); this.list.setStyle("downArrowDisabledSkin",ScrollArrowDownGreen); this.list.setStyle("upArrowUpSkin",ScrollArrowUpGreen); this.list.setStyle("upArrowDownSkin",ScrollArrowUpGreen); this.list.setStyle("upArrowOverSkin",ScrollArrowUpGreen); this.list.setStyle("upArrowDisabledSkin",ScrollArrowUpGreen); this.list.setStyle("trackUpSkin",ScrollTrackGreen); this.list.setStyle("trackDownSkin",ScrollTrackGreen); this.list.setStyle("trackOverSkin",ScrollTrackGreen); this.list.setStyle("trackDisabledSkin",ScrollTrackGreen); this.list.setStyle("thumbUpSkin",ScrollThumbSkinGreen); this.list.setStyle("thumbDownSkin",ScrollThumbSkinGreen); this.list.setStyle("thumbOverSkin",ScrollThumbSkinGreen); this.list.setStyle("thumbDisabledSkin",ScrollThumbSkinGreen); } private function indexById(param1:Object, param2:Boolean = false) : int { var _loc3_:Object = null; var _loc4_:int = 0; if(!param2) { for(_loc4_ = 0; _loc4_ < this.dp.length; _loc4_++) { _loc3_ = this.dp.getItemAt(_loc4_); if(_loc3_.dat.id == param1) { return _loc4_; } } } else { for(_loc4_ = 0; _loc4_ < this.silentdp.length; _loc4_++) { _loc3_ = this.silentdp.getItemAt(_loc4_); if(_loc3_.dat.id == param1) { return _loc4_; } } } return -1; } private function selectItem(e:ListEvent) : void { var obj:Object = null; obj = e.item; this._selectedItemID = obj.dat.id; this.list.selectedItem = obj; this.list.scrollToSelected(); dispatchEvent(new PartsListEvent(PartsListEvent.SELECT_PARTS_LIST_ITEM)); if(e.type == ListEvent.ITEM_DOUBLE_CLICK && this.model) { if(this.ID == "warehouse") { this.model.tryMountItem(null,String(this._selectedItemID)); } else if(this.model.garageWindow.itemInfoPanel.buttonBuy.enable) { this.model.buyRequest(String(this._selectedItemID)); } } } private function scrollList(e:MouseEvent) : void { this.list.horizontalScrollPosition -= e.delta * (!!Boolean(Capabilities.os.search("Linux") != -1) ? 50 : 10); } private function onMouseDown(param1:MouseEvent) : void { this.scrollSpeed = 0; var _loc2_:Rectangle = this.list.horizontalScrollBar.getBounds(stage); _loc2_.top -= ADDITIONAL_SCROLL_AREA_HEIGHT; if(!_loc2_.contains(param1.stageX,param1.stageY)) { this.sumDragWay = 0; this.previousPositionX = this.currrentPositionX = param1.stageX; this.currentTime = this.previousTime = getTimer(); this.lastItemIndex = this.list.selectedIndex; stage.addEventListener(MouseEvent.MOUSE_UP,this.onMouseUp); stage.addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove); } } private function onMouseMove(param1:MouseEvent) : void { this.previousPositionX = this.currrentPositionX; this.currrentPositionX = param1.stageX; this.previousTime = this.currentTime; this.currentTime = getTimer(); var _loc2_:Number = this.currrentPositionX - this.previousPositionX; this.sumDragWay += Math.abs(_loc2_); if(this.sumDragWay > MAX_DELTA_FOR_SELECT) { this.list.horizontalScrollPosition -= _loc2_; } param1.updateAfterEvent(); } private function onMouseUp(param1:MouseEvent) : void { stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove); stage.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp); var _loc2_:Number = (getTimer() - this.previousTime) / 1000; if(_loc2_ == 0) { _loc2_ = 0.1; } var _loc3_:Number = param1.stageX - this.previousPositionX; this.scrollSpeed = _loc3_ / _loc2_; this.previousTime = this.currentTime; this.currentTime = getTimer(); addEventListener(Event.ENTER_FRAME,this.onEnterFrame); } private function onEnterFrame(param1:Event) : void { this.previousTime = this.currentTime; this.currentTime = getTimer(); var _loc2_:Number = (this.currentTime - this.previousTime) / 1000; this.list.horizontalScrollPosition -= this.scrollSpeed * _loc2_; var _loc3_:Number = this.list.horizontalScrollPosition; var _loc4_:Number = this.list.maxHorizontalScrollPosition; if(Math.abs(this.scrollSpeed) > MIN_POSIBLE_SPEED && 0 < _loc3_ && _loc3_ < _loc4_) { this.scrollSpeed *= Math.exp(-1.5 * _loc2_); } else { this.scrollSpeed = 0; removeEventListener(Event.ENTER_FRAME,this.onEnterFrame); } } } }
package alternativa.engine3d.objects { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Vertex; use namespace alternativa3d; public class VertexBinding { alternativa3d var next:VertexBinding; alternativa3d var vertex:Vertex; alternativa3d var weight:Number = 0; public function VertexBinding() { super(); } } }
package assets.stat { import flash.display.BitmapData; [Embed(source="/_assets/assets.stat.hall_HEADER.png")] public dynamic class hall_HEADER extends BitmapData { public function hall_HEADER(param1:int = 4, param2:int = 4) { super(param1,param2); } } }
package alternativa.tanks.sfx { import alternativa.engine3d.core.Object3D; import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.physics.collision.CollisionDetector; import alternativa.physics.collision.types.RayHit; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.utils.objectpool.Pool; import alternativa.tanks.utils.objectpool.PooledObject; public class CollisionObject3DPositionProvider extends PooledObject implements Object3DPositionProvider { private static const turretMatrix:Matrix4 = new Matrix4(); private static const barrelOrigin:Vector3 = new Vector3(); private static const direction:Vector3 = new Vector3(); private static const turretAxisX:Vector3 = new Vector3(); private static const globalMuzzlePosition:Vector3 = new Vector3(); private static const intersection:RayHit = new RayHit(); private static const MIN_DISTANCE:Number = 20; private static const SMOOTH:Number = 0.2; private var maxDistance:Number; private var collisionDetector:CollisionDetector; private var localMuzzlePosition:Vector3 = new Vector3(); private var turret:Object3D; private var coeff:Number; private var currentDistance:Number = 0; public function CollisionObject3DPositionProvider(param1:Pool) { super(param1); } private function calculateParameters() : void { turretMatrix.setMatrix(this.turret.x,this.turret.y,this.turret.z,this.turret.rotationX,this.turret.rotationY,this.turret.rotationZ); turretAxisX.x = turretMatrix.m00; turretAxisX.y = turretMatrix.m10; turretAxisX.z = turretMatrix.m20; direction.x = turretMatrix.m01; direction.y = turretMatrix.m11; direction.z = turretMatrix.m21; turretMatrix.transformVector(this.localMuzzlePosition,globalMuzzlePosition); var local1:Number = this.localMuzzlePosition.y; barrelOrigin.x = globalMuzzlePosition.x - local1 * direction.x; barrelOrigin.y = globalMuzzlePosition.y - local1 * direction.y; barrelOrigin.z = globalMuzzlePosition.z - local1 * direction.z; } public function init(param1:Object3D, param2:Vector3, param3:CollisionDetector, param4:Number, param5:Number = 0.5) : void { this.turret = param1; this.localMuzzlePosition = param2; this.collisionDetector = param3; this.maxDistance = param4; this.coeff = param5; this.currentDistance = 0; } public function initPosition(param1:Object3D) : void { this.calculateParameters(); var local2:Number = this.maxDistance * this.coeff; if(this.collisionDetector.raycastStatic(barrelOrigin,direction,CollisionGroup.STATIC,this.maxDistance,null,intersection)) { local2 = Vector3.distanceBetween(barrelOrigin,intersection.position) * this.coeff; } var local3:Number = local2 - this.currentDistance; if(Math.abs(local3) <= MIN_DISTANCE) { this.currentDistance = local2; } else { this.currentDistance += local3 * SMOOTH; } param1.x = barrelOrigin.x + direction.x * this.currentDistance; param1.y = barrelOrigin.y + direction.y * this.currentDistance; param1.z = barrelOrigin.z + direction.z * this.currentDistance; } public function updateObjectPosition(param1:Object3D, param2:GameCamera, param3:int) : void { this.initPosition(param1); } public function destroy() : void { this.turret = null; this.collisionDetector = null; recycle(); } } }
package alternativa.tanks.models.battle.battlefield.mine { import alternativa.math.Vector3; import alternativa.types.Long; [ModelInterface] public interface IBattleMinesModel { function getMinDistanceFromBase() : Number; function getMinePosition(param1:Long) : Vector3; } }
package projects.tanks.client.entrance.model.entrance.vkontakte { 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 VkontakteEntranceModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _loginId:Long = Long.getLong(2145019096,1993064500); private var _login_idTokenCodec:ICodec; private var model:IModel; public function VkontakteEntranceModelServer(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._login_idTokenCodec = this.protocol.getCodec(new TypeCodecInfo(String,false)); } public function login(param1:String) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._login_idTokenCodec.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._loginId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } } }
package alternativa.tanks.models.battlefield.effects.graffiti { import mx.core.BitmapAsset; [ExcludeClass] public class TexturesManager_graffiti_fart extends BitmapAsset { public function TexturesManager_graffiti_fart() { super(); } } }
package alternativa.physics { public class QuickUnionFind { private var items:Vector.<int>; private var size:Vector.<int>; public function QuickUnionFind() { super(); this.items = new Vector.<int>(1); this.size = new Vector.<int>(1); } public function init(param1:int) : void { this.items.length = param1; this.size.length = param1; var local2:int = 0; while(local2 < param1) { this.items[local2] = local2; this.size[local2] = 1; local2++; } } public function union(param1:int, param2:int) : void { var local3:int = 0; var local4:int = 0; var local5:int = 0; var local6:int = 0; if(!this.connected(param1,param2)) { local3 = this.root(param1); local4 = this.root(param2); local5 = this.size[local3]; local6 = this.size[local4]; if(local5 > local6) { this.items[local4] = local3; this.size[local3] += local6; } else { this.items[local3] = local4; this.size[local4] += local5; } } } public function connected(param1:int, param2:int) : Boolean { return this.root(param1) == this.root(param2); } public function root(param1:int) : int { var local2:int = param1; while(this.items[local2] != local2) { local2 = this.items[local2]; } return local2; } } }
package alternativa.protocol.info { import alternativa.protocol.ICodecInfo; public class CodecInfo implements ICodecInfo { private var optional:Boolean; public function CodecInfo(param1:Boolean) { super(); this.optional = param1; } public function isOptional() : Boolean { return this.optional; } public function toString() : String { return "[CodecInfo optional = " + this.optional + "]"; } } }
package forms.friends { import mx.core.BitmapAsset; [ExcludeClass] public class FriendActionIndicator_noIconClass extends BitmapAsset { public function FriendActionIndicator_noIconClass() { super(); } } }
package projects.tanks.client.garage.models.item.availabledevices { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.CollectionCodecInfo; 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.type.IGameObject; public class AvailableDevicesModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:AvailableDevicesModelServer; private var client:IAvailableDevicesModelBase = IAvailableDevicesModelBase(this); private var modelId:Long = Long.getLong(104346758,-1948098183); private var _devicesLoadedId:Long = Long.getLong(1773038483,1761949850); private var _devicesLoaded_devicesCodec:ICodec; private var _devicesLoaded_mountedDeviceCodec:ICodec; public function AvailableDevicesModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new AvailableDevicesModelServer(IModel(this)); this._devicesLoaded_devicesCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); this._devicesLoaded_mountedDeviceCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,true)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._devicesLoadedId: this.client.devicesLoaded(this._devicesLoaded_devicesCodec.decode(param2) as Vector.<IGameObject>,IGameObject(this._devicesLoaded_mountedDeviceCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package alternativa.tanks.controllers { import alternativa.tanks.controllers.battlelist.BattleListItemParams; import alternativa.types.Long; import projects.tanks.client.battleselect.model.battle.entrance.user.BattleInfoUser; public class BattleSelectVectorUtil { public function BattleSelectVectorUtil() { super(); } public static function getUsersById(param1:Vector.<BattleInfoUser>, param2:Long) : BattleInfoUser { var local3:BattleInfoUser = null; var local4:int = int(param1.length); var local5:int = 0; while(local5 < local4) { if(param1[local5].user == param2) { local3 = param1[local5]; break; } local5++; } return local3; } public static function deleteElementInUsersVector(param1:Vector.<BattleInfoUser>, param2:Long) : void { var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { if(param1[local4].user == param2) { while(local4 + 1 < local3) { param1[local4] = param1[local4 + 1]; local4++; } param1.pop(); break; } local4++; } } public static function deleteElementInLongsVector(param1:Vector.<Long>, param2:Long) : void { var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { if(param1[local4] == param2) { param1[local4] = param1[local3 - 1]; param1.pop(); break; } local4++; } } public static function deleteElementInVector(param1:Vector.<BattleListItemParams>, param2:Long) : void { var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { if(param1[local4].id == param2) { param1[local4] = param1[local3 - 1]; param1.pop(); break; } local4++; } } public static function deleteElementInArray(param1:Array, param2:Long) : void { var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { if(param1[local4].id == param2) { param1[local4] = param1[local3 - 1]; param1.pop(); break; } local4++; } } public static function findElementInVector(param1:Vector.<BattleListItemParams>, param2:Long) : BattleListItemParams { var local3:BattleListItemParams = null; var local4:int = int(param1.length); var local5:int = 0; while(local5 < local4) { if(param1[local5].id == param2) { local3 = param1[local5]; break; } local5++; } return local3; } public static function containsElementInVector(param1:Vector.<Long>, param2:Long) : Boolean { var local3:Long = null; var local4:int = int(param1.length); var local5:int = 0; while(local5 < local4) { if(param1[local5] == param2) { return true; } local5++; } return false; } } }
package alternativa.tanks.models.battlefield.effects.graffiti { import mx.core.BitmapAsset; [ExcludeClass] public class TexturesManager_graffiti_subwaytank extends BitmapAsset { public function TexturesManager_graffiti_subwaytank() { super(); } } }
package projects.tanks.client.garage.models.item.videoads { public class VideoAdsItemUpgradeCC { private var _cooldownTimeInSec:int; private var _timeToReduceUpdateInMin:int; public function VideoAdsItemUpgradeCC(param1:int = 0, param2:int = 0) { super(); this._cooldownTimeInSec = param1; this._timeToReduceUpdateInMin = param2; } public function get cooldownTimeInSec() : int { return this._cooldownTimeInSec; } public function set cooldownTimeInSec(param1:int) : void { this._cooldownTimeInSec = param1; } public function get timeToReduceUpdateInMin() : int { return this._timeToReduceUpdateInMin; } public function set timeToReduceUpdateInMin(param1:int) : void { this._timeToReduceUpdateInMin = param1; } public function toString() : String { var local1:String = "VideoAdsItemUpgradeCC ["; local1 += "cooldownTimeInSec = " + this.cooldownTimeInSec + " "; local1 += "timeToReduceUpdateInMin = " + this.timeToReduceUpdateInMin + " "; return local1 + "]"; } } }
package alternativa.tanks.battle { import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.PerformanceController; import alternativa.tanks.services.performance.PerformanceDataService; import flash.display.Stage; import flash.events.Event; public class PerformanceControllerWithThrottling extends PerformanceController { [Inject] public static var performanceDataService:PerformanceDataService; private var stage:Stage; private var inited:Boolean = false; public function PerformanceControllerWithThrottling() { super(); } private function init() : void { if(!this.inited) { addFeature(PerformanceController.SHADOWS,performanceDataService.getQualityVisualizationSpeed(),true); addFeature(PerformanceController.SHADOW_MAP,performanceDataService.getQualityVisualizationSpeed(),false); addFeature(PerformanceController.DEFERRED_LIGHTING,performanceDataService.getQualityVisualizationSpeed(),false); addFeature(PerformanceController.FOG,performanceDataService.getQualityVisualizationSpeed(),true); addFeature(PerformanceController.SOFT_TRANSPARENCY,performanceDataService.getQualityVisualizationSpeed(),false); addFeature(PerformanceController.SSAO,performanceDataService.getQualityVisualizationSpeed(),false); addFeature(PerformanceController.ANTI_ALIAS,performanceDataService.getQualityVisualizationSpeed(),false); this.inited = true; } } public function start1(param1:Stage, param2:Camera3D, param3:String) : void { this.init(); this.stage = param1; param1.addEventListener(Event.ACTIVATE,this.onActivate); param1.addEventListener(Event.DEACTIVATE,this.onDeactivate); start(param1,param2,performanceDataService.getQualityFPSThreshold(),performanceDataService.getQualityRatioThreshold(),performanceDataService.getQualityIdleTime(),performanceDataService.getQualityTestTime(),performanceDataService.getQualityMaxAttempts(),param3); } private function onActivate(param1:Event) : void { block = false; } private function onDeactivate(param1:Event) : void { block = true; } [Obfuscation(rename="false")] override public function stop() : void { super.stop(); this.stage.removeEventListener(Event.ACTIVATE,this.onActivate); this.stage.removeEventListener(Event.DEACTIVATE,this.onDeactivate); this.stage = null; } } }
package alternativa.tanks.view.timeleftindicator { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.timeleftindicator.BigWhiteTimeLeftIndicator_fullMarkerClass.png")] public class BigWhiteTimeLeftIndicator_fullMarkerClass extends BitmapAsset { public function BigWhiteTimeLeftIndicator_fullMarkerClass() { super(); } } }
package _codec.projects.tanks.client.panel.model.shop.shopitemcategory { 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.panel.model.shop.shopitemcategory.ShopItemCategoryCC; public class VectorCodecShopItemCategoryCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecShopItemCategoryCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ShopItemCategoryCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<ShopItemCategoryCC> = new Vector.<ShopItemCategoryCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ShopItemCategoryCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ShopItemCategoryCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ShopItemCategoryCC> = Vector.<ShopItemCategoryCC>(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.terminator { import alternativa.tanks.models.weapon.rocketlauncher.weapon.IRocketLauncherWeapon; public interface ITerminatorWeapon extends IRocketLauncherWeapon { function getPrimaryNextChargeTime() : int; function getPrimaryNextShotTime() : int; function secondaryOpen(param1:int) : void; function secondaryHide(param1:int) : void; function isShooting() : Boolean; function switchToSecondaryState(param1:int) : void; function shootPrimary(param1:int) : void; function startCharging(param1:int) : void; function resetPrimaryNextShotTime() : void; } }
package _codec.projects.tanks.client.panel.model.challenge.rewarding { 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.panel.model.challenge.rewarding.TierItem; public class VectorCodecTierItemLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecTierItemLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(TierItem,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<TierItem> = new Vector.<TierItem>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = TierItem(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:TierItem = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<TierItem> = Vector.<TierItem>(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.view.mainview.button { import controls.buttons.FixedHeightRectangleSkin; public class DisabledButtonSkin extends FixedHeightRectangleSkin { private static const leftClass:Class = DisabledButtonSkin_leftClass; private static const middleClass:Class = DisabledButtonSkin_middleClass; private static const rightClass:Class = DisabledButtonSkin_rightClass; public function DisabledButtonSkin() { super(leftClass,middleClass,rightClass); } } }
package controls { import flash.display.Bitmap; import flash.display.BitmapData; public class GoogleButton extends DefaultIconButton { private static const releaseBitmapGoogle:Class = GoogleButton_releaseBitmapGoogle; private static const releaseGoogle:BitmapData = (new releaseBitmapGoogle() as Bitmap).bitmapData; private static const pressedBitmapGoogle:Class = GoogleButton_pressedBitmapGoogle; private static const pressedGoogle:BitmapData = (new pressedBitmapGoogle() as Bitmap).bitmapData; private static const hoveredBitmapGoogle:Class = GoogleButton_hoveredBitmapGoogle; private static const hoveredGoogle:BitmapData = (new hoveredBitmapGoogle() as Bitmap).bitmapData; public function GoogleButton() { super(releaseGoogle,hoveredGoogle,pressedGoogle); } } }
package alternativa.tanks.models.battlefield { import mx.core.BitmapAsset; [ExcludeClass] public class ViewportBorder_bmpClassBorderBottom extends BitmapAsset { public function ViewportBorder_bmpClassBorderBottom() { super(); } } }
package alternativa.tanks.models.tank.ultimate.hornet { import alternativa.tanks.utils.objectpool.Pool; public class RadarEffectBig extends RadarEffect { public function RadarEffectBig(param1:Pool) { super(param1,600); } } }
package alternativa.gfx.core { import alternativa.gfx.alternativagfx; import flash.display3D.Context3D; import flash.display3D.IndexBuffer3D; use namespace alternativagfx; public class IndexBufferResource extends Resource { alternativagfx var buffer:IndexBuffer3D; private var _indices:Vector.<uint>; private var _numIndices:int; public function IndexBufferResource(param1:Vector.<uint>) { super(); this._indices = param1; this._numIndices = this._indices.length; } public function get indices() : Vector.<uint> { return this._indices; } override public function dispose() : void { super.dispose(); if(this.alternativagfx::buffer != null) { this.alternativagfx::buffer.dispose(); this.alternativagfx::buffer = null; } this._indices = null; } override public function reset() : void { super.reset(); if(this.alternativagfx::buffer != null) { this.alternativagfx::buffer.dispose(); this.alternativagfx::buffer = null; } } override public function get available() : Boolean { return this._indices != null; } override alternativagfx function create(param1:Context3D) : void { super.alternativagfx::create(param1); this.alternativagfx::buffer = param1.createIndexBuffer(this._numIndices); } override alternativagfx function upload() : void { super.alternativagfx::upload(); this.alternativagfx::buffer.uploadFromVector(this._indices,0,this._numIndices); } } }
package alternativa.tanks.models.battle.gui.inventory { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_goldColorIconClass.png")] public class HudInventoryIcon_goldColorIconClass extends BitmapAsset { public function HudInventoryIcon_goldColorIconClass() { super(); } } }
package alternativa.physics.collision.primitives { import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.physics.PhysicsMaterial; import alternativa.physics.collision.CollisionShape; import alternativa.physics.collision.types.AABB; public class CollisionSphere extends CollisionShape { public var r:Number = 0; public function CollisionSphere(param1:Number, param2:int, param3:PhysicsMaterial) { super(SPHERE,param2,param3); this.r = param1; } override public function calculateAABB() : AABB { var local1:AABB = null; var local2:Matrix4 = null; local1 = this.aabb; local2 = this.transform; local1.maxX = local2.m03 + this.r; local1.minX = local2.m03 - this.r; local1.maxY = local2.m13 + this.r; local1.minY = local2.m13 - this.r; local1.maxZ = local2.m23 + this.r; local1.minZ = local2.m23 - this.r; return local1; } override public function raycast(param1:Vector3, param2:Vector3, param3:Number, param4:Vector3) : Number { var local5:Matrix4 = this.transform; var local6:Number = param1.x - local5.m03; var local7:Number = param1.y - local5.m13; var local8:Number = param1.z - local5.m23; var local9:Number = param2.x * local6 + param2.y * local7 + param2.z * local8; if(local9 > 0) { return -1; } var local10:Number = param2.x * param2.x + param2.y * param2.y + param2.z * param2.z; var local11:Number = local9 * local9 - local10 * (local6 * local6 + local7 * local7 + local8 * local8 - this.r * this.r); if(local11 < 0) { return -1; } return -(local9 + Math.sqrt(local11)) / local10; } override public function copyFrom(param1:CollisionShape) : CollisionShape { var local2:CollisionSphere = param1 as CollisionSphere; if(local2 == null) { return this; } super.copyFrom(local2); this.r = local2.r; return this; } override protected function createPrimitive() : CollisionShape { return new CollisionSphere(this.r,collisionGroup,material); } } }
package alternativa.tanks.models.weapon.shared { import alternativa.physics.Body; import alternativa.service.IModelService; import alternativa.tanks.models.battlefield.IBattleField; import alternativa.tanks.models.ctf.ICTFModel; import alternativa.tanks.models.tank.TankData; import alternativa.tanks.models.weapon.shared.shot.ShotData; import alternativa.tanks.models.weapon.weakening.IWeaponWeakeningModel; import alternativa.tanks.vehicles.tanks.Tank; import projects.tanks.client.battleservice.model.team.BattleTeamType; public class CommonTargetEvaluator implements ICommonTargetEvaluator { private static const DISTANCE_WEIGHT:Number = 0.65; private static const MAX_PRIORITY:Number = 1000; private var localTankData:TankData; private var ctfModel:ICTFModel; private var fullDamageDistance:Number; private var maxAngle:Number; public function CommonTargetEvaluator(localTankData:TankData, ctfModel:ICTFModel, fullDamageDistance:Number, maxAngle:Number) { super(); this.localTankData = localTankData; this.ctfModel = ctfModel; this.fullDamageDistance = fullDamageDistance; this.maxAngle = maxAngle; } public static function create(localTankData:TankData, localShotData:ShotData, battlefieldModel:IBattleField, weaponWeakeningModel:IWeaponWeakeningModel, modelService:IModelService) : CommonTargetEvaluator { var baseDistance:Number = NaN; if(weaponWeakeningModel != null) { baseDistance = weaponWeakeningModel.getFullDamageRadius(localTankData.turret); } else { baseDistance = 10000; } var maxAngle:Number = localShotData.autoAimingAngleUp.value > localShotData.autoAimingAngleDown.value ? Number(localShotData.autoAimingAngleUp.value) : Number(localShotData.autoAimingAngleDown.value); return new CommonTargetEvaluator(localTankData,null,baseDistance,maxAngle); } public function getTargetPriority(target:Body, distance:Number, angle:Number) : Number { var targetTank:Tank = target as Tank; if(targetTank == null) { return 0; } if(targetTank.tankData.health == 0) { return 0; } var targetTeamType:BattleTeamType = targetTank.tankData.teamType; if(targetTeamType == BattleTeamType.NONE) { return this.getPriority(distance,angle); } if(targetTeamType == this.localTankData.teamType) { return 0; } var priority:Number = this.getPriority(distance,angle); if(this.ctfModel != null && this.ctfModel.isFlagCarrier(targetTank.tankData)) { priority += MAX_PRIORITY; } return priority; } private function getPriority(distance:Number, angle:Number) : Number { return MAX_PRIORITY - (DISTANCE_WEIGHT * distance / this.fullDamageDistance + (1 - DISTANCE_WEIGHT) * angle / this.maxAngle); } } }
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.weakening { 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.Float; import projects.tanks.client.battlefield.models.tankparts.weapon.weakening.WeaponWeakeningCC; public class CodecWeaponWeakeningCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_maximumDamageRadius:ICodec; private var codec_minimumDamagePercent:ICodec; private var codec_minimumDamageRadius:ICodec; public function CodecWeaponWeakeningCC() { super(); } public function init(param1:IProtocol) : void { this.codec_maximumDamageRadius = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_minimumDamagePercent = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_minimumDamageRadius = param1.getCodec(new TypeCodecInfo(Float,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:WeaponWeakeningCC = new WeaponWeakeningCC(); local2.maximumDamageRadius = this.codec_maximumDamageRadius.decode(param1) as Number; local2.minimumDamagePercent = this.codec_minimumDamagePercent.decode(param1) as Number; local2.minimumDamageRadius = this.codec_minimumDamageRadius.decode(param1) as Number; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:WeaponWeakeningCC = WeaponWeakeningCC(param2); this.codec_maximumDamageRadius.encode(param1,local3.maximumDamageRadius); this.codec_minimumDamagePercent.encode(param1,local3.minimumDamagePercent); this.codec_minimumDamageRadius.encode(param1,local3.minimumDamageRadius); } } }
package controls { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.TankWindowInner_topClass.png")] public class TankWindowInner_topClass extends BitmapAsset { public function TankWindowInner_topClass() { super(); } } }
package utils.tweener.easing { public class Sine { private static const _HALF_PI:Number = Math.PI * 0.5; public function Sine() { super(); } public static function easeIn(param1:Number, param2:Number, param3:Number, param4:Number) : Number { return -param3 * Math.cos(param1 / param4 * _HALF_PI) + param3 + param2; } public static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number { return param3 * Math.sin(param1 / param4 * _HALF_PI) + param2; } public static function easeInOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number { return -param3 * 0.5 * (Math.cos(Math.PI * param1 / param4) - 1) + param2; } } }
package _codec.projects.tanks.client.battleselect.model.battle.dm { 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 projects.tanks.client.battleselect.model.battle.dm.BattleDMInfoCC; import projects.tanks.client.battleselect.model.battle.entrance.user.BattleInfoUser; public class CodecBattleDMInfoCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_users:ICodec; public function CodecBattleDMInfoCC() { super(); } public function init(param1:IProtocol) : void { this.codec_users = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(BattleInfoUser,false),false,1)); } public function decode(param1:ProtocolBuffer) : Object { var local2:BattleDMInfoCC = new BattleDMInfoCC(); local2.users = this.codec_users.decode(param1) as Vector.<BattleInfoUser>; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:BattleDMInfoCC = BattleDMInfoCC(param2); this.codec_users.encode(param1,local3.users); } } }
package alternativa.tanks.models.controlpoints.sound { import alternativa.math.Vector3; import alternativa.tanks.battle.BattleService; import flash.media.Sound; public class KeyPointSoundEffects { private var battleService:BattleService; private var activationSound:Sound; private var deactivationSound:Sound; private var activationSoundEffect:KeyPointSoundEffect; private var deactivationSoundEffect:KeyPointSoundEffect; public function KeyPointSoundEffects(param1:BattleService, param2:Sound, param3:Sound) { super(); this.battleService = param1; this.activationSound = param2; this.deactivationSound = param3; } public function playActivationSound(param1:Vector3) : void { this.stopDeactivationSoundEffect(); if(this.activationSoundEffect == null) { this.activationSoundEffect = KeyPointSoundEffect(this.battleService.getObjectPool().getObject(KeyPointSoundEffect)); this.activationSoundEffect.init(this.activationSound,param1); this.battleService.getBattleRunner().getSoundManager().addEffect(this.activationSoundEffect); } } public function playDeactivationSound(param1:Vector3) : void { this.stopActivationSoundEffect(); if(this.deactivationSoundEffect == null) { this.deactivationSoundEffect = KeyPointSoundEffect(this.battleService.getObjectPool().getObject(KeyPointSoundEffect)); this.deactivationSoundEffect.init(this.deactivationSound,param1); this.battleService.getBattleRunner().getSoundManager().addEffect(this.deactivationSoundEffect); } } public function stopSound() : void { this.stopActivationSoundEffect(); this.stopDeactivationSoundEffect(); } private function stopDeactivationSoundEffect() : void { if(this.deactivationSoundEffect != null) { this.deactivationSoundEffect.kill(); this.deactivationSoundEffect = null; } } private function stopActivationSoundEffect() : void { if(this.activationSoundEffect != null) { this.activationSoundEffect.kill(); this.activationSoundEffect = null; } } } }
package alternativa.physics { import alternativa.math.Vector3; import alternativa.physics.collision.CollisionDetector; import alternativa.physics.contactislands.ContactIsland; import alternativa.physics.contactislands.IslandsGenerator; import alternativa.tanks.utils.EncryptedInt; import alternativa.tanks.utils.EncryptedIntImpl; public class PhysicsScene { private static const thousandth:EncryptedInt = new EncryptedIntImpl(1000); public var penetrationErrorCorrection:Number = 0.7; public var maxCorrectablePenetration:Number = 10; public var allowedPenetration:Number = 0.01; public var collisionIterations:int = 4; public var contactIterations:int = 4; public var freezeSteps:int = 10; public var linSpeedFreezeLimit:Number = 5; public var angSpeedFreezeLimit:Number = 0.05; public const gravity:Vector3 = new Vector3(0,0,-9.8); public var collisionDetector:CollisionDetector; public var bodies:Vector.<Body> = new Vector.<Body>(); public var timeStamp:int; public var time:int; public var dt:Number; private const bodyContacts:Vector.<BodyContact> = new Vector.<BodyContact>(); private var islandsGenerator:IslandsGenerator; public function PhysicsScene() { super(); this.islandsGenerator = new IslandsGenerator(this); } public function addBody(param1:Body) : void { param1.scene = this; param1.id = this.bodies.length; this.bodies.push(param1); } public function removeBody(param1:Body) : void { var local3:int = 0; var local4:Body = null; var local2:int = int(this.bodies.indexOf(param1)); if(local2 > -1) { local3 = this.bodies.length - 1; local4 = this.bodies[local3]; this.bodies[local2] = local4; local4.id = local2; this.bodies.length = local3; param1.scene = null; } } public function update(param1:int) : void { ++this.timeStamp; this.time += param1; this.dt = param1 / thousandth.getInt(); this.applyForces(); this.detectCollisions(); this.prepareBodyContacts(this.bodyContacts,this.dt); this.islandsGenerator.generate(this.bodyContacts,this.bodies.length); this.resolveCollisions(this.islandsGenerator.contactIslands); this.intergateVelocities(this.dt); this.resolveContacts(this.islandsGenerator.contactIslands); this.islandsGenerator.clear(); this.disposeBodyContacts(this.bodyContacts); this.integratePositions(this.dt); this.postPhysics(); } private function applyForces() : void { var local3:Body = null; var local1:int = int(this.bodies.length); var local2:int = 0; while(local2 < local1) { local3 = this.bodies[local2]; local3.calcAccelerations(); if(local3.movable && !local3.frozen) { local3.acceleration.x += this.gravity.x; local3.acceleration.y += this.gravity.y; local3.acceleration.z += this.gravity.z; } local2++; } } private function detectCollisions() : void { this.calculateBodiesDerivedData(); this.collisionDetector.getBodyContacts(this.bodyContacts); } private function calculateBodiesDerivedData() : void { var local3:Body = null; var local1:int = int(this.bodies.length); var local2:int = 0; while(local2 < local1) { local3 = this.bodies[local2]; if(!local3.frozen) { local3.saveState(); local3.calcDerivedData(); } local2++; } } private function prepareBodyContacts(param1:Vector.<BodyContact>, param2:Number) : void { var local5:BodyContact = null; var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { local5 = param1[local4]; this.prepareShapeContacts(local5.shapeContacts,param2); local4++; } } private function prepareShapeContacts(param1:Vector.<ShapeContact>, param2:Number) : void { var local5:ShapeContact = null; var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { local5 = param1[local4]; local5.calculatePersistentFrameData(); local5.calcualteDynamicFrameData(this.allowedPenetration,this.penetrationErrorCorrection,this.maxCorrectablePenetration,param2); local4++; } } private function resolveCollisions(param1:Vector.<ContactIsland>) : void { var local4:ContactIsland = null; var local2:int = int(param1.length); var local3:int = 0; while(local3 < local2) { local4 = param1[local3]; local4.collisionPhase(this.collisionIterations); local3++; } } private function resolveContacts(param1:Vector.<ContactIsland>) : void { var local4:ContactIsland = null; var local2:int = int(param1.length); var local3:int = 0; while(local3 < local2) { local4 = param1[local3]; local4.contactPhase(this.contactIterations); local3++; } } private function intergateVelocities(param1:Number) : void { var local4:Body = null; var local2:int = int(this.bodies.length); var local3:int = 0; while(local3 < local2) { local4 = this.bodies[local3]; local4.integrateVelocity(param1); local3++; } } private function integratePositions(param1:Number) : void { var local4:Body = null; var local2:int = int(this.bodies.length); var local3:int = 0; while(local3 < local2) { local4 = this.bodies[local3]; if(local4.movable && !local4.frozen) { local4.integratePosition(param1); local4.integratePseudoVelocity(param1); } local3++; } } private function postPhysics() : void { var local3:Body = null; var local4:BodyState = null; var local1:int = int(this.bodies.length); var local2:int = 0; while(local2 < local1) { local3 = this.bodies[local2]; local3.clearAccumulators(); local3.calcDerivedData(); if(local3.canFreeze && !local3.frozen) { local4 = local3.state; if(local4.velocity.length() < this.linSpeedFreezeLimit && local4.angularVelocity.length() < this.angSpeedFreezeLimit) { ++local3.freezeCounter; if(local3.freezeCounter >= this.freezeSteps) { local3.frozen = true; } } else { local3.freezeCounter = 0; local3.frozen = false; } } local2++; } } private function disposeBodyContacts(param1:Vector.<BodyContact>) : void { var local4:BodyContact = null; var local2:int = int(param1.length); var local3:int = 0; while(local3 < local2) { local4 = param1[local3]; local4.dispose(); local3++; } param1.length = 0; } } }
package alternativa.physics.collision.colliders { import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.physics.ShapeContact; import alternativa.physics.collision.Collider; import alternativa.physics.collision.CollisionShape; import alternativa.physics.collision.primitives.CollisionBox; import alternativa.physics.collision.primitives.CollisionTriangle; public class BoxTriangleCollider implements Collider { public var epsilon:Number; private var minOverlap:Number; private const toBox:Vector3 = new Vector3(); private const axis:Vector3 = new Vector3(); private const axis10:Vector3 = new Vector3(); private const axis11:Vector3 = new Vector3(); private const axis12:Vector3 = new Vector3(); private const axis20:Vector3 = new Vector3(); private const axis21:Vector3 = new Vector3(); private const axis22:Vector3 = new Vector3(); private const minOverlapAxis:Vector3 = new Vector3(); private const _basisMatrix:Matrix4 = new Matrix4(); private const boxFaceVertices:Vector.<Vertex> = Vector.<Vertex>([new Vertex(),new Vertex(),new Vertex(),new Vertex()]); private const triFaceVertices:Vector.<Vertex> = Vector.<Vertex>([new Vertex(),new Vertex(),new Vertex()]); public function BoxTriangleCollider(param1:Number) { super(); this.epsilon = param1; } public function getContacts(param1:CollisionShape, param2:CollisionShape, param3:Vector.<ShapeContact>) : void { var local4:CollisionTriangle = null; var local5:CollisionBox = null; if(!this.haveCollision(param1,param2)) { return; } if(param1 is CollisionBox) { local5 = CollisionBox(param1); local4 = CollisionTriangle(param2); } else { local5 = CollisionBox(param2); local4 = CollisionTriangle(param1); } this.findContacts(local5,local4,this.minOverlapAxis,param3); } public function haveCollision(param1:CollisionShape, param2:CollisionShape) : Boolean { var local3:CollisionTriangle = null; var local4:CollisionBox = null; var local5:Matrix4 = null; var local6:Matrix4 = null; var local7:Vector3 = null; if(param1 is CollisionBox) { local4 = CollisionBox(param1); local3 = CollisionTriangle(param2); } else { local4 = CollisionBox(param2); local3 = CollisionTriangle(param1); } local5 = local4.transform; local6 = local3.transform; this.toBox.x = local5.m03 - local6.m03; this.toBox.y = local5.m13 - local6.m13; this.toBox.z = local5.m23 - local6.m23; this.minOverlap = 10000000000; this.axis.x = local6.m02; this.axis.y = local6.m12; this.axis.z = local6.m22; if(!this.testOverlapOnMainAxis(local4,local3,this.axis,this.toBox)) { return false; } this.axis10.x = local5.m00; this.axis10.y = local5.m10; this.axis10.z = local5.m20; if(!this.testOverlapOnMainAxis(local4,local3,this.axis10,this.toBox)) { return false; } this.axis11.x = local5.m01; this.axis11.y = local5.m11; this.axis11.z = local5.m21; if(!this.testOverlapOnMainAxis(local4,local3,this.axis11,this.toBox)) { return false; } this.axis12.x = local5.m02; this.axis12.y = local5.m12; this.axis12.z = local5.m22; if(!this.testOverlapOnMainAxis(local4,local3,this.axis12,this.toBox)) { return false; } local7 = local3.e0; this.axis20.x = local6.m00 * local7.x + local6.m01 * local7.y + local6.m02 * local7.z; this.axis20.y = local6.m10 * local7.x + local6.m11 * local7.y + local6.m12 * local7.z; this.axis20.z = local6.m20 * local7.x + local6.m21 * local7.y + local6.m22 * local7.z; if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis10,this.axis20,this.toBox)) { return false; } if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis11,this.axis20,this.toBox)) { return false; } if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis12,this.axis20,this.toBox)) { return false; } local7 = local3.e1; this.axis21.x = local6.m00 * local7.x + local6.m01 * local7.y + local6.m02 * local7.z; this.axis21.y = local6.m10 * local7.x + local6.m11 * local7.y + local6.m12 * local7.z; this.axis21.z = local6.m20 * local7.x + local6.m21 * local7.y + local6.m22 * local7.z; if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis10,this.axis21,this.toBox)) { return false; } if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis11,this.axis21,this.toBox)) { return false; } if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis12,this.axis21,this.toBox)) { return false; } local7 = local3.e2; this.axis22.x = local6.m00 * local7.x + local6.m01 * local7.y + local6.m02 * local7.z; this.axis22.y = local6.m10 * local7.x + local6.m11 * local7.y + local6.m12 * local7.z; this.axis22.z = local6.m20 * local7.x + local6.m21 * local7.y + local6.m22 * local7.z; if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis10,this.axis22,this.toBox)) { return false; } if(!this.testOverlapOnDerivedAxis(local4,local3,this.axis11,this.axis22,this.toBox)) { return false; } return this.testOverlapOnDerivedAxis(local4,local3,this.axis12,this.axis22,this.toBox); } private function testOverlapOnMainAxis(param1:CollisionBox, param2:CollisionTriangle, param3:Vector3, param4:Vector3) : Boolean { var local5:Number = this.getOverlapOnAxis(param1,param2,param3,param4); return this.registerOverlap(local5,param3); } private function registerOverlap(param1:Number, param2:Vector3) : Boolean { if(param1 < this.epsilon) { return false; } if(param1 + this.epsilon < this.minOverlap) { this.minOverlap = param1; this.minOverlapAxis.x = param2.x; this.minOverlapAxis.y = param2.y; this.minOverlapAxis.z = param2.z; } return true; } private function testOverlapOnDerivedAxis(param1:CollisionBox, param2:CollisionTriangle, param3:Vector3, param4:Vector3, param5:Vector3) : Boolean { var local7:Number = NaN; this.axis.x = param3.y * param4.z - param3.z * param4.y; this.axis.y = param3.z * param4.x - param3.x * param4.z; this.axis.z = param3.x * param4.y - param3.y * param4.x; var local6:Number = this.axis.x * this.axis.x + this.axis.y * this.axis.y + this.axis.z * this.axis.z; if(local6 < 1e-10) { return true; } local7 = 1 / Math.sqrt(local6); this.axis.x *= local7; this.axis.y *= local7; this.axis.z *= local7; var local8:Number = this.getOverlapOnAxis(param1,param2,this.axis,param5); return this.registerOverlap(local8,this.axis); } private function getOverlapOnAxis(param1:CollisionBox, param2:CollisionTriangle, param3:Vector3, param4:Vector3) : Number { var local8:Number = NaN; var local5:Matrix4 = param1.transform; var local6:Vector3 = param1.hs; var local7:Number = 0; local8 = (local5.m00 * param3.x + local5.m10 * param3.y + local5.m20 * param3.z) * local6.x; if(local8 < 0) { local7 -= local8; } else { local7 += local8; } local8 = (local5.m01 * param3.x + local5.m11 * param3.y + local5.m21 * param3.z) * local6.y; if(local8 < 0) { local7 -= local8; } else { local7 += local8; } local8 = (local5.m02 * param3.x + local5.m12 * param3.y + local5.m22 * param3.z) * local6.z; if(local8 < 0) { local7 -= local8; } else { local7 += local8; } var local9:Number = param4.x * param3.x + param4.y * param3.y + param4.z * param3.z; var local10:Matrix4 = param2.transform; var local11:Number = local10.m00 * param3.x + local10.m10 * param3.y + local10.m20 * param3.z; var local12:Number = local10.m01 * param3.x + local10.m11 * param3.y + local10.m21 * param3.z; var local13:Number = local10.m02 * param3.x + local10.m12 * param3.y + local10.m22 * param3.z; var local14:Number = 0; var local15:Vector3 = param2.v0; var local16:Vector3 = param2.v1; var local17:Vector3 = param2.v2; if(local9 < 0) { local9 = -local9; local8 = local15.x * local11 + local15.y * local12 + local15.z * local13; if(local8 < local14) { local14 = local8; } local8 = local16.x * local11 + local16.y * local12 + local16.z * local13; if(local8 < local14) { local14 = local8; } local8 = local17.x * local11 + local17.y * local12 + local17.z * local13; if(local8 < local14) { local14 = local8; } local14 = -local14; } else { local8 = local15.x * local11 + local15.y * local12 + local15.z * local13; if(local8 > local14) { local14 = local8; } local8 = local16.x * local11 + local16.y * local12 + local16.z * local13; if(local8 > local14) { local14 = local8; } local8 = local17.x * local11 + local17.y * local12 + local17.z * local13; if(local8 > local14) { local14 = local8; } } return local7 + local14 - local9; } private function findContacts(param1:CollisionBox, param2:CollisionTriangle, param3:Vector3, param4:Vector.<ShapeContact>) : void { var local6:Matrix4 = null; var local7:Vector3 = null; var local12:ShapeContact = null; var local13:Vector3 = null; var local14:Number = NaN; var local15:Number = NaN; var local16:Number = NaN; var local5:Matrix4 = param1.transform; local6 = param2.transform; local7 = this.toBox; local7.x = local5.m03 - local6.m03; local7.y = local5.m13 - local6.m13; local7.z = local5.m23 - local6.m23; if(param3.x * local7.x + param3.y * local7.y + param3.z * local7.z < 0) { param3.x = -param3.x; param3.y = -param3.y; param3.z = -param3.z; } var local8:Matrix4 = this._basisMatrix; ColliderUtils.buildContactBasis(param3,local5,local6,local8); ColliderUtils.getBoxFaceVerticesInCCWOrder(param1,param3,FaceSide.BACK,this.boxFaceVertices); ColliderUtils.getTriangleFaceInCCWOrder(param2,param3,this.triFaceVertices); ColliderUtils.transformFaceToReferenceSpace(local8,local5,this.boxFaceVertices,4); ColliderUtils.transformFaceToReferenceSpace(local8,local6,this.triFaceVertices,3); var local9:int = int(param4.length); PolygonsIntersectionUtils.findContacts(param1,this.boxFaceVertices,4,param2,this.triFaceVertices,3,local8,param4); var local10:int = int(param4.length); var local11:int = local9; while(local11 < local10) { local12 = param4[local11]; local13 = local12.normal; local14 = local6.m02; local15 = local6.m12; local16 = local6.m22; if(local13.x * local14 + local13.y * local15 + local13.z * local16 < 0) { local12.dispose(); local10--; param4[local11] = param4[local10]; param4[local10] = null; local11--; } local11++; } if(local10 < param4.length) { param4.length = local10; } } } }
package alternativa.tanks.gui.shop.shopitems.item.crystalitem { import alternativa.tanks.gui.shop.shopitems.item.cashpackage.CashPackageButton; import alternativa.tanks.model.payment.shop.crystal.CrystalPackage; import controls.base.LabelBase; import flash.display.Bitmap; import flash.text.TextFieldAutoSize; import forms.ColorConstants; import platform.client.fp10.core.type.IGameObject; public class CrystalPackageButton extends CashPackageButton { private var premiumLabel:LabelBase; private var premiumIcon:Bitmap; public function CrystalPackageButton(param1:IGameObject) { super(param1); } private function get hasPremium() : Boolean { return this.crystalPackage.getPremiumDurationInDays() != 0; } private function get crystalPackage() : CrystalPackage { return CrystalPackage(item.adapt(CrystalPackage)); } override protected function initLabels() : void { super.initLabels(); if(this.hasPremium) { this.initPackageWithPremium(); } } override protected function align() : void { super.align(); if(this.hasPremium) { this.premiumLabel.x = LEFT_PADDING; this.premiumIcon.x = this.premiumLabel.x + this.premiumLabel.width + 5; this.premiumIcon.y = HEIGHT - BOTTOM_PADDING - this.premiumIcon.height; this.premiumLabel.y = this.premiumIcon.y + 4; } if(hasDiscount()) { if(this.hasPremium) { cashLabel.y -= 5; cashIcon.y -= 5; priceLabel.y -= 5; this.premiumIcon.y += 5; this.premiumLabel.y += 5; } } } private function getPremiumLabelSize() : int { switch(localeService.language) { case "fa": return 16; default: return 20; } } private function initPackageWithPremium() : void { this.premiumLabel = new LabelBase(); this.premiumLabel.text = "+" + this.crystalPackage.getPremiumDurationInDays() + " " + timeUnitService.getLocalizedShortDaysName(this.crystalPackage.getPremiumDurationInDays()); this.premiumLabel.color = ColorConstants.WHITE; this.premiumLabel.autoSize = TextFieldAutoSize.LEFT; this.premiumLabel.size = this.getPremiumLabelSize(); this.premiumLabel.mouseEnabled = false; this.premiumLabel.bold = true; addChild(this.premiumLabel); this.premiumIcon = new Bitmap(CrystalPackageItemIcons.premium); addChild(this.premiumIcon); } } }
package alternativa.tanks.gui.payment.forms.platbox { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.gui.payment.forms.PayModeForm; import alternativa.tanks.gui.payment.forms.paymentstatus.PaymentStatusForm; import platform.client.fp10.core.type.IGameObject; public class PlatBoxForm extends PayModeForm { [Inject] public static var localeService:ILocaleService; public static const WIDTH:int = 270; public static const HEIGHT:int = 70; private var phoneForm:PlatboxPhoneNumberForm; private var statusForm:PaymentStatusForm; public function PlatBoxForm(param1:IGameObject) { super(param1); this.phoneForm = new PlatboxPhoneNumberForm(param1); this.phoneForm.addEventListener(ProceedPaymentEvent.PROCEED,this.onProceed); addChild(this.phoneForm); this.statusForm = new PaymentStatusForm("Отправка СМС для подтверждения платежа"); this.statusForm.visible = false; addChild(this.statusForm); } private function onProceed(param1:ProceedPaymentEvent) : void { logProceedAction(); } public function showPaymentProgress() : void { this.phoneForm.visible = false; this.statusForm.visible = true; this.statusForm.showProgressWorking(); } public function showPaymentInitialized() : void { this.statusForm.showProgressDone(); } override public function activate() : void { this.phoneForm.visible = true; this.statusForm.visible = false; this.phoneForm.reset(); } public function phoneNumber() : String { return this.phoneForm.phoneNumber; } override public function get width() : Number { return WIDTH; } override public function get height() : Number { return HEIGHT; } override public function destroy() : void { super.destroy(); this.phoneForm.removeEventListener(ProceedPaymentEvent.PROCEED,this.onProceed); } public function showPhoneIsInvalid(param1:String) : void { this.phoneForm.showPhoneIsInvalid(param1); } public function showPhoneIsValid(param1:String) : void { this.phoneForm.showPhoneIsValid(param1); } } }
package alternativa.tanks.services.lightingeffects { import alternativa.tanks.models.teamlight.ModeLight; import flash.geom.ColorTransform; import projects.tanks.client.battleservice.BattleMode; public interface ILightingEffectsService { function setLightForMode(param1:BattleMode, param2:ModeLight) : void; function getLightForMode(param1:BattleMode) : ModeLight; function setBonusLighting(param1:Number, param2:ColorTransform, param3:ColorTransform) : void; function getBonusLightIntensity() : Number; function getBonusColorAdjust() : ColorTransform; } }
package projects.tanks.client.entrance.model.entrance.registration { import platform.client.fp10.core.resource.types.ImageResource; public class RegistrationModelCC { private var _bgResource:ImageResource; private var _enableRequiredEmail:Boolean; private var _maxPasswordLength:int; private var _minPasswordLength:int; public function RegistrationModelCC(param1:ImageResource = null, param2:Boolean = false, param3:int = 0, param4:int = 0) { super(); this._bgResource = param1; this._enableRequiredEmail = param2; this._maxPasswordLength = param3; this._minPasswordLength = param4; } public function get bgResource() : ImageResource { return this._bgResource; } public function set bgResource(param1:ImageResource) : void { this._bgResource = param1; } public function get enableRequiredEmail() : Boolean { return this._enableRequiredEmail; } public function set enableRequiredEmail(param1:Boolean) : void { this._enableRequiredEmail = param1; } public function get maxPasswordLength() : int { return this._maxPasswordLength; } public function set maxPasswordLength(param1:int) : void { this._maxPasswordLength = param1; } public function get minPasswordLength() : int { return this._minPasswordLength; } public function set minPasswordLength(param1:int) : void { this._minPasswordLength = param1; } public function toString() : String { var local1:String = "RegistrationModelCC ["; local1 += "bgResource = " + this.bgResource + " "; local1 += "enableRequiredEmail = " + this.enableRequiredEmail + " "; local1 += "maxPasswordLength = " + this.maxPasswordLength + " "; local1 += "minPasswordLength = " + this.minPasswordLength + " "; return local1 + "]"; } } }
package _codec.projects.tanks.client.panel.model.shop.androidspecialoffer.offers { 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.panel.model.shop.androidspecialoffer.offers.AndroidSpecialOfferModelCC; public class VectorCodecAndroidSpecialOfferModelCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecAndroidSpecialOfferModelCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(AndroidSpecialOfferModelCC,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<AndroidSpecialOfferModelCC> = new Vector.<AndroidSpecialOfferModelCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = AndroidSpecialOfferModelCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:AndroidSpecialOfferModelCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<AndroidSpecialOfferModelCC> = Vector.<AndroidSpecialOfferModelCC>(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.battlefield.models.user.suicide { 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.battlefield.models.user.suicide.SuicideCC; public class CodecSuicideCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_suicideDelayMS:ICodec; public function CodecSuicideCC() { super(); } public function init(param1:IProtocol) : void { this.codec_suicideDelayMS = param1.getCodec(new TypeCodecInfo(int,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:SuicideCC = new SuicideCC(); local2.suicideDelayMS = this.codec_suicideDelayMS.decode(param1) as int; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:SuicideCC = SuicideCC(param2); this.codec_suicideDelayMS.encode(param1,local3.suicideDelayMS); } } }
package alternativa.tanks.model.captcha { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import controls.Label; import controls.TankInput; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.filters.BlurFilter; import flash.filters.DropShadowFilter; public class CaptchaForm extends Sprite { private var captchaImage:Bitmap; private var captchaContainer:Bitmap; public var refreshBtn:CaptchaRefreshButton; private var label:Label; public var input:TankInput; private var _space:int = 10; private var localeService:ILocaleService; public function CaptchaForm() { super(); this.localeService = ILocaleService(Main.osgi.getService(ILocaleService)); this.input = new TankInput(); this.input.tabIndex = 5; this.input.restrict = ".0-9a-zA-z_\\-"; addChild(this.input); this.label = new Label(); this.label.multiline = true; this.label.wordWrap = true; this.label.text = this.localeService.getText(TextConst.CHECK_PASSWORD_FORM_CAPTCHA); this.label.y = -8; addChild(this.label); this.captchaContainer = new Bitmap(new BitmapData(285,50,true,0)); this.captchaContainer.filters = [new BlurFilter(2,2),new DropShadowFilter(0,45,0,1,4,4,2)]; addChild(this.captchaContainer); this.refreshBtn = new CaptchaRefreshButton(); this.refreshBtn.useHandCursor = true; this.refreshBtn.buttonMode = true; addChild(this.refreshBtn); if(stage != null) { stage.focus = this.input.textField; } this.width = 275; } override public function get height() : Number { return this.input.y + this.input.height; } override public function set width(value:Number) : void { this.label.width = value - this.label.x; this.captchaContainer.width = value; this.input.width = value - 4; this.refreshBtn.x = this.captchaContainer.x + this.captchaContainer.width - this.refreshBtn.width - 11; this.captchaContainer.y = this.label.y + this.label.height + this._space; this.input.y = this.captchaContainer.y + this.captchaContainer.height + this._space; this.refreshBtn.y = this.captchaContainer.y + this._space + 5; } public function moveY(value:Number) : void { this.label.y += value; this.input.y += value; this.refreshBtn.y += value; this.captchaContainer.y += value; } public function captcha(param1:Bitmap) : void { this.captchaImage = param1; this.captchaContainer.bitmapData = this.captchaImage.bitmapData; this.input.value = ""; } public function setEnabled(param1:Boolean) : void { this.input.visible = param1; this.refreshBtn.doubleClickEnabled = param1; this.refreshBtn.mouseEnabled = param1; } } }
package alternativa.tanks.models.battle.gui.gui.statistics.field.score { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.field.score.RugbyScoreIndicator_redScoreClass.png")] public class RugbyScoreIndicator_redScoreClass extends BitmapAsset { public function RugbyScoreIndicator_redScoreClass() { super(); } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.streamweapon { public interface IStreamWeaponModelBase { function reconfigureWeapon(param1:Number) : void; } }
package scpacker.gui { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import controls.BlueButton; import controls.RedButton; import controls.TankInput; import controls.TankWindow; import controls.TankWindowHeader; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.events.Event; import flash.events.FocusEvent; import flash.events.MouseEvent; import flash.filters.BitmapFilter; import flash.filters.BitmapFilterQuality; import flash.filters.BlurFilter; public class RecoveryWindow extends Sprite { private var window:TankWindow; private var passInput:TankInput; private var pass2Input:TankInput; private var emailInput:TankInput; private var saveBtn:BlueButton; private var cancelBtn:RedButton; private var bg:Sprite; private var bmp:Bitmap; private var callback:Function; private var email:String; private var localeService:ILocaleService; public function RecoveryWindow(callback:Function, email:String) { this.window = new TankWindow(); this.passInput = new TankInput(); this.pass2Input = new TankInput(); this.emailInput = new TankInput(); this.saveBtn = new BlueButton(); this.cancelBtn = new RedButton(); this.bg = new Sprite(); this.bmp = new Bitmap(); super(); this.callback = callback; this.email = email; this.localeService = Main.osgi.getService(ILocaleService) as ILocaleService; this.window.headerLang = this.localeService.getText(TextConst.GUI_LANG); this.window.header = TankWindowHeader.CHANGEPASSWORD; addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage); } private function draw() : void { addChild(this.bg); this.drawBg(); addChild(this.window); this.window.width = 435; this.window.height = 169 - 11; this.window.addChild(this.passInput); this.passInput.x = 35 + 77; this.passInput.y = 20; this.passInput.width = 120; this.passInput.label = this.localeService.getText(TextConst.ACCOUNT_RECOVERY_FORM_NEW_PASSWORD); this.window.addChild(this.pass2Input); this.pass2Input.x = this.passInput.x + this.passInput.width - 30; this.pass2Input.y = 20; this.pass2Input.width = 120; this.pass2Input.label = this.localeService.getText(TextConst.REGISTER_FORM_REPEAT_PASSWORD_INPUT_LABEL_TEXT); this.window.addChild(this.emailInput); this.emailInput.x = 63; this.emailInput.y = this.pass2Input.y + this.emailInput.height + 11; this.emailInput.width = 352; this.emailInput.label = this.localeService.getText(TextConst.REGISTER_FORM_EMAIL_LABEL_TEXT); this.emailInput.value = this.email; this.window.addChild(this.saveBtn); this.saveBtn.x = this.window.width - this.saveBtn.width - 20; this.saveBtn.y = this.window.height - this.saveBtn.height - 24; this.saveBtn.label = this.localeService.getText(TextConst.ACCOUNT_RECOVERY_FORM_SAVE); this.window.addChild(this.cancelBtn); this.cancelBtn.x = this.window.width - this.cancelBtn.width * 2 - 34; this.cancelBtn.y = this.window.height - this.cancelBtn.height - 24; this.cancelBtn.label = this.localeService.getText(TextConst.ACCOUNT_RECOVERY_FORM_CANCEL); this.cancelBtn.addEventListener(MouseEvent.CLICK,this.close); this.saveBtn.addEventListener(MouseEvent.CLICK,this.onSave); this.pass2Input.addEventListener(FocusEvent.FOCUS_OUT,this.checkPass); } private function onSave(e:Event) : void { this.callback.call(null,this.pass2Input.value,this.emailInput.value); this.close(null); } private function checkPass(e:FocusEvent) : void { if(this.pass2Input.value == null || this.pass2Input.value == "") { return; } if(this.pass2Input.value != this.passInput.value) { this.pass2Input.validValue = false; } else { this.pass2Input.validValue = true; } } private function close(e:Event) : void { this.cancelBtn.removeEventListener(MouseEvent.CLICK,this.close); this.pass2Input.removeEventListener(FocusEvent.FOCUS_OUT,this.checkPass); stage.removeEventListener(Event.RESIZE,this.resize); removeChildren(0,numChildren - 1); } private function drawBg() : void { var data:BitmapData = null; var filter:BitmapFilter = new BlurFilter(5,5,BitmapFilterQuality.HIGH); var myFilters:Array = new Array(); myFilters.push(filter); data = new BitmapData(stage.stageWidth,stage.stageHeight,true,0); this.bmp.visible = false; data.draw(stage); this.bmp.visible = true; this.bmp.filters = myFilters; this.bmp.bitmapData = data; this.bg.addChild(this.bmp); } private function onAddedToStage(event:Event) : void { this.draw(); stage.addEventListener(Event.RESIZE,this.resize); this.resize(null); removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage); } private function resize(event:Event) : void { this.window.x = stage.stageWidth / 2 - this.window.width / 2; this.window.y = stage.stageHeight / 2 - this.window.height / 2; this.drawBg(); } } }
package alternativa.init { import alternativa.osgi.OSGi; import alternativa.osgi.bundle.IBundleActivator; import alternativa.osgi.service.command.CommandService; import alternativa.osgi.service.command.FormattedOutput; import alternativa.osgi.service.display.IDisplay; import alternativa.protocol.IProtocol; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventDispatcherImpl; import alternativa.tanks.battle.events.BattleEventListener; import alternativa.tanks.battle.objects.tank.skintexturesregistry.DefaultTankSkinTextureRegistry; import alternativa.tanks.battle.objects.tank.skintexturesregistry.TankSkinTextureRegistry; import alternativa.tanks.battle.objects.tank.tankskin.TankSkinTextureRegistryCleaner; import alternativa.tanks.engine3d.ColorCorrectedTextureRegistry; import alternativa.tanks.engine3d.DefaultColorCorrectedTextureRegistry; import alternativa.tanks.engine3d.DefaultEffectsMaterialRegistry; import alternativa.tanks.engine3d.DefaultTextureMaterialFactory; import alternativa.tanks.engine3d.EffectsMaterialRegistry; import alternativa.tanks.engine3d.MutableTextureMaterialRegistry; import alternativa.tanks.engine3d.MutableTextureRegistryCleaner; import alternativa.tanks.engine3d.TextureMaterialRegistryBase; import alternativa.tanks.engine3d.TextureMaterialRegistryCleaner; import alternativa.tanks.models.battle.battlefield.BattleUnloadEvent; import alternativa.tanks.models.tank.codec.MoveCommandCodec; import alternativa.tanks.service.settings.keybinding.KeysBindingService; import alternativa.tanks.services.battlegui.BattleGUIService; import alternativa.tanks.services.battlegui.BattleGUIServiceImpl; import alternativa.tanks.services.battleinput.BattleInputService; import alternativa.tanks.services.battleinput.BattleInputServiceImpl; import alternativa.tanks.services.battlereadiness.BattleReadinessService; import alternativa.tanks.services.battlereadiness.BattleReadinessServiceImpl; import alternativa.tanks.services.bonusregion.BonusRegionService; import alternativa.tanks.services.bonusregion.IBonusRegionService; import alternativa.tanks.services.colortransform.ColorTransformService; import alternativa.tanks.services.colortransform.impl.HardwareColorTransformService; import alternativa.tanks.services.colortransform.impl.SoftwareColorTransformService; import alternativa.tanks.services.initialeffects.IInitialEffectsService; import alternativa.tanks.services.initialeffects.InitialEffectsService; import alternativa.tanks.services.lightingeffects.ILightingEffectsService; import alternativa.tanks.services.lightingeffects.LightingEffectsService; import alternativa.tanks.services.memoryleakguard.MemoryLeakTrackerService; import alternativa.tanks.services.mipmapping.MipMappingService; import alternativa.tanks.services.mipmapping.impl.DefaultMipMappingService; import alternativa.tanks.services.performance.PerformanceDataService; import alternativa.tanks.services.performance.PerformanceDataServiceImpl; import alternativa.tanks.services.ping.PingService; import alternativa.tanks.services.ping.PingServiceImpl; import alternativa.tanks.services.spectatorservice.SpectatorService; import alternativa.tanks.services.spectatorservice.SpectatorServiceImpl; import alternativa.tanks.services.tankregistry.TankUsersRegistry; import alternativa.tanks.services.tankregistry.TankUsersRegistryServiceImpl; import alternativa.tanks.utils.DataValidator; import alternativa.tanks.utils.DataValidatorImpl; import alternativa.utils.TextureMaterialRegistry; import projects.tanks.client.battlefield.models.user.tank.commands.MoveCommand; import projects.tanks.clients.flash.commons.models.gpu.GPUCapabilities; [Obfuscation(rename="false")] public class BattlefieldModelActivator implements IBundleActivator { private var osgi:OSGi; public function BattlefieldModelActivator() { super(); } private static function bytesToMegabytes(param1:Number) : int { return param1 / (1024 * 1024); } [Obfuscation(rename="false")] public function start(param1:OSGi) : void { this.osgi = param1; param1.registerService(MemoryLeakTrackerService,new MemoryLeakTrackerService(param1)); var local2:BattleEventDispatcher = new BattleEventDispatcherImpl(); param1.registerService(BattleEventDispatcher,local2); param1.registerService(BattleReadinessService,new BattleReadinessServiceImpl()); var local3:IDisplay = IDisplay(param1.getService(IDisplay)); var local4:KeysBindingService = KeysBindingService(param1.getService(KeysBindingService)); param1.registerService(BattleInputService,new BattleInputServiceImpl(local3.stage,local4)); param1.registerService(SpectatorService,new SpectatorServiceImpl()); param1.registerService(BattleGUIService,new BattleGUIServiceImpl()); param1.registerService(PingService,new PingServiceImpl()); param1.registerService(PerformanceDataService,new PerformanceDataServiceImpl()); param1.registerService(TankUsersRegistry,new TankUsersRegistryServiceImpl()); param1.registerService(IBonusRegionService,new BonusRegionService(local2)); param1.registerService(ILightingEffectsService,new LightingEffectsService()); this.registerMipMappingService(); this.registerColorTransformService(); this.registerEffectsMaterialService(); this.registerColorCorrectedTextureService(); this.registerTextureMaterialService(); this.registerTankSkinTextureService(); param1.registerService(DataValidator,new DataValidatorImpl(param1)); param1.registerService(IInitialEffectsService,new InitialEffectsService()); this.registerMoveCommandCodec(); } private function registerMipMappingService() : void { this.osgi.registerService(MipMappingService,new DefaultMipMappingService()); } private function registerColorTransformService() : void { if(!GPUCapabilities.gpuEnabled || Boolean(GPUCapabilities.constrained)) { this.osgi.registerService(ColorTransformService,new SoftwareColorTransformService()); } else { this.osgi.registerService(ColorTransformService,new HardwareColorTransformService()); } } private function registerEffectsMaterialService() : void { var local1:DefaultEffectsMaterialRegistry = new DefaultEffectsMaterialRegistry(); this.osgi.registerService(EffectsMaterialRegistry,local1); this.enableMipMappingControl(local1); this.registerBattleEventListener(BattleUnloadEvent,new TextureMaterialRegistryCleaner(local1)); } private function _showMaterialRegistryStat(param1:TextureMaterialRegistryBase) : Function { var materialRegistry:TextureMaterialRegistryBase = param1; return function(param1:FormattedOutput):void { }; } private function getCommandService() : CommandService { return CommandService(this.osgi.getService(CommandService)); } private function registerColorCorrectedTextureService() : void { var local1:ColorCorrectedTextureRegistry = new DefaultColorCorrectedTextureRegistry(); this.osgi.registerService(ColorCorrectedTextureRegistry,local1); this.registerBattleEventListener(BattleUnloadEvent,new MutableTextureRegistryCleaner(local1)); var local2:ColorTransformService = ColorTransformService(this.osgi.getService(ColorTransformService)); local2.addColorTransformer(local1); } private function registerTextureMaterialService() : void { var local1:ColorCorrectedTextureRegistry = ColorCorrectedTextureRegistry(this.osgi.getService(ColorCorrectedTextureRegistry)); var local2:MutableTextureMaterialRegistry = new MutableTextureMaterialRegistry(new DefaultTextureMaterialFactory(),local1); this.osgi.registerService(TextureMaterialRegistry,local2); this.enableMipMappingControl(local2); this.registerBattleEventListener(BattleUnloadEvent,new TextureMaterialRegistryCleaner(local2)); } private function registerTankSkinTextureService() : void { var local1:TankSkinTextureRegistry = new DefaultTankSkinTextureRegistry(); this.osgi.registerService(TankSkinTextureRegistry,local1); this.registerBattleEventListener(BattleUnloadEvent,new TankSkinTextureRegistryCleaner(local1)); } private function registerBattleEventListener(param1:Class, param2:BattleEventListener) : void { var local3:BattleEventDispatcher = BattleEventDispatcher(this.osgi.getService(BattleEventDispatcher)); local3.addBattleEventListener(param1,param2); } private function enableMipMappingControl(param1:TextureMaterialRegistry) : void { var local2:MipMappingService = MipMappingService(this.osgi.getService(MipMappingService)); local2.addMaterialRegistry(param1); } private function registerMoveCommandCodec() : void { var local1:IProtocol = IProtocol(this.osgi.getService(IProtocol)); local1.registerCodecForType(MoveCommand,new MoveCommandCodec()); } private function traceMemory() : void { } [Obfuscation(rename="false")] public function stop(param1:OSGi) : void { } } }
package alternativa.tanks.models.weapon.railgun { import alternativa.engine3d.materials.TextureMaterial; import alternativa.tanks.battle.BattleService; import alternativa.tanks.engine3d.EffectsMaterialRegistry; import alternativa.tanks.engine3d.TextureAnimation; import alternativa.tanks.models.sfx.lighting.LightingSfx; import alternativa.tanks.utils.GraphicsUtils; import flash.display.BitmapData; import platform.client.fp10.core.model.ObjectLoadPostListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.resource.types.MultiframeTextureResource; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.client.battlefield.models.tankparts.sfx.shoot.railgun.IRailgunShootSFXModelBase; import projects.tanks.client.battlefield.models.tankparts.sfx.shoot.railgun.RailgunShootSFXCC; import projects.tanks.client.battlefield.models.tankparts.sfx.shoot.railgun.RailgunShootSFXModelBase; [ModelInfo] public class RailgunSFXModel extends RailgunShootSFXModelBase implements IRailgunShootSFXModelBase, IRailgunSFXModel, ObjectLoadPostListener, ObjectUnloadListener { [Inject] public static var materialRegistry:EffectsMaterialRegistry; [Inject] public static var battleService:BattleService; private const chargingTextureRegistry:ChargingTextureRegistry = new ChargingTextureRegistry(); public function RailgunSFXModel() { super(); } private static function getTextureAnimation(param1:MultiframeTextureResource, param2:Number) : TextureAnimation { var local3:TextureAnimation = GraphicsUtils.getTextureAnimationFromResource(materialRegistry,param1); local3.material.resolution = param2 / param1.frameWidth; return local3; } private static function getTrailMaterial(param1:BitmapData) : TextureMaterial { var local2:TextureMaterial = materialRegistry.getMaterial(param1); local2.repeat = true; local2.mipMapping = 0; return local2; } [Obfuscation(rename="false")] public function objectLoadedPost() : void { var local1:RailgunShootSFXCC = getInitParam(); var local2:RailgunSFXData = new RailgunSFXData(); local2.trailMaterial = getTrailMaterial(local1.trailImage.data); local2.smokeMaterial = getTrailMaterial(local1.smokeImage.data); local2.hitMarkMaterial = materialRegistry.getMaterial(local1.hitMarkTexture.data); local2.chargingAnimation = this.getChargingAnimation(local1.chargingPart1,local1.chargingPart2,local1.chargingPart3); local2.ringsAnimation = getTextureAnimation(local1.ringsTexture,RailgunEffects.RINGS_SIZE); local2.sphereAnimation = getTextureAnimation(local1.sphereTexture,RailgunEffects.SPHERE_SIZE); local2.powAnimation = getTextureAnimation(local1.powTexture,RailgunEffects.POW_WIDTH); local2.sound = local1.shotSound.sound; var local3:LightingSfx = new LightingSfx(getInitParam().lightingSFXEntity); local2.chargeLightAnimation = local3.createAnimation("charge"); local2.shotLightAnimation = local3.createAnimation("shot"); local2.hitLightAnimation = local3.createAnimation("hit"); local2.railLightAnimation = local3.createAnimation("rail"); putData(RailgunSFXData,local2); } private function getChargingAnimation(param1:TextureResource, param2:TextureResource, param3:TextureResource) : TextureAnimation { var local4:BitmapData = this.chargingTextureRegistry.getTexture(param1,param2,param3); var local5:int = local4.height; var local6:TextureAnimation = GraphicsUtils.getTextureAnimation(materialRegistry,local4,local5,local5); local6.material.resolution = RailgunEffects.CHARGE_EFFECT_SIZE / local5; return local6; } [Obfuscation(rename="false")] public function objectUnloaded() : void { var local1:RailgunSFXData = RailgunSFXData(getData(RailgunSFXData)); materialRegistry.releaseMaterial(local1.trailMaterial); materialRegistry.releaseMaterial(local1.smokeMaterial); materialRegistry.releaseMaterial(local1.chargingAnimation.material); materialRegistry.releaseMaterial(local1.hitMarkMaterial); materialRegistry.releaseMaterial(local1.ringsAnimation.material); materialRegistry.releaseMaterial(local1.sphereAnimation.material); materialRegistry.releaseMaterial(local1.powAnimation.material); } public function getEffects() : IRailgunEffects { return new RailgunEffects(RailgunSFXData(getData(RailgunSFXData)),battleService); } } }
package _codec.projects.tanks.client.battlefield.models.tankparts.sfx.firebird { 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.sfx.firebird.FlameThrowingSFXCC; public class VectorCodecFlameThrowingSFXCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecFlameThrowingSFXCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(FlameThrowingSFXCC,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.<FlameThrowingSFXCC> = new Vector.<FlameThrowingSFXCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = FlameThrowingSFXCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:FlameThrowingSFXCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<FlameThrowingSFXCC> = Vector.<FlameThrowingSFXCC>(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.view.icons { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.icons.BattleParamsBattleInfoIcons_friendlyFireClass.png")] public class BattleParamsBattleInfoIcons_friendlyFireClass extends BitmapAsset { public function BattleParamsBattleInfoIcons_friendlyFireClass() { super(); } } }
package alternativa.tanks.models.latency { import projects.tanks.client.battleservice.model.latency.ILatencyModelBase; import projects.tanks.client.battleservice.model.latency.LatencyModelBase; [ModelInfo] public class LatencyModel extends LatencyModelBase implements ILatencyModelBase { public function LatencyModel() { super(); } [Obfuscation(rename="false")] public function ping() : void { server.pong(); } } }
package alternativa.tanks.view.mainview.button { import alternativa.tanks.gui.frames.FrameBase; import alternativa.tanks.gui.frames.GreenFrame; import base.DiscreteSprite; import controls.BigButton; import controls.base.LabelBase; import flash.display.Bitmap; import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; import forms.ColorConstants; public class MainViewButton extends DiscreteSprite { protected static const PADDING:int = 14; protected static const IMAGE_SIZE:int = 80; protected static const FRAME_HEIGHT:int = IMAGE_SIZE + 2 * PADDING; protected var image:Bitmap; protected var nameLabel:LabelBase = new LabelBase(); protected var descriptionLabel:LabelBase = new LabelBase(); protected var frame:FrameBase; protected var button:LockedByRankButton; private var spectatorButton:BigButton; public function MainViewButton(param1:String, param2:String, param3:Bitmap, param4:int, param5:FrameBase = null) { super(); this.frame = param5 != null ? param5 : new GreenFrame(100,FRAME_HEIGHT); this.frame.x = PADDING; this.frame.y = PADDING; addChild(this.frame); this.image = param3; var local6:Sprite = new Sprite(); local6.x = PADDING; local6.y = (this.frame.height - param3.height) / 2; local6.addChild(param3); this.frame.addChild(local6); this.nameLabel.color = ColorConstants.GREEN_LABEL; this.nameLabel.size = 18; this.nameLabel.text = param1; this.nameLabel.x = PADDING * 2 + this.image.width; this.nameLabel.y = 10; this.frame.addChild(this.nameLabel); this.descriptionLabel.autoSize = TextFieldAutoSize.NONE; this.descriptionLabel.color = ColorConstants.GREEN_LABEL; this.descriptionLabel.size = 14; this.descriptionLabel.text = param2; this.descriptionLabel.wordWrap = true; this.descriptionLabel.x = this.nameLabel.x; this.descriptionLabel.y = 40; this.frame.addChild(this.descriptionLabel); this.button = new LockedByRankButton(param4); this.button.y = FRAME_HEIGHT - this.button.height >> 1; this.button.x = this.frame.width - this.button.width - this.button.y; this.frame.addChild(this.button); this.button.addEventListener(MouseEvent.CLICK,this.onClick); this.spectatorButton = new BigButton(); this.spectatorButton.label = "Spectator"; this.spectatorButton.y = FRAME_HEIGHT - this.spectatorButton.height >> 1; this.spectatorButton.x = this.frame.width - this.spectatorButton.width - this.spectatorButton.y - this.button.width - 10; this.frame.addChild(this.spectatorButton); this.spectatorButton.addEventListener(MouseEvent.CLICK,this.onSpectatorClick); this.spectatorButton.visible = false; graphics.drawRect(0,0,0,this.frame.height); } protected function onClick(param1:MouseEvent) : void { } protected function onSpectatorClick(param1:MouseEvent) : void { } public function resize(param1:int) : void { var local2:int = param1 - 2 * PADDING - 8; this.frame.setWidth(local2); this.descriptionLabel.width = local2 - this.nameLabel.x - this.button.width - 3 * PADDING; this.descriptionLabel.height = 70; this.button.x = local2 - this.button.width - this.button.y; this.spectatorButton.x = local2 - this.spectatorButton.width - this.spectatorButton.y - this.button.width - 10; } public function lockButton() : void { this.button.enabled = false; } public function unlockIfPossible() : void { this.button.unlockIfPossible(); } public function setSpectatorsButtonVisible(param1:Boolean) : void { this.spectatorButton.visible = param1; } } }
package alternativa.osgi.service.dump { public interface IDumper { function dump(param1:Array) : String; function get dumperName() : String; } }
package alternativa.tanks.display.usertitle { import mx.core.BitmapAsset; [ExcludeClass] public class EffectIndicator_iconHealthCls extends BitmapAsset { public function EffectIndicator_iconHealthCls() { super(); } } }
package alternativa.tanks.model.payment.shop.kitviewresource { import alternativa.tanks.gui.shop.shopitems.item.base.ButtonItemSkin; import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemButton; import flash.display.BitmapData; import platform.client.fp10.core.type.IGameObject; public class BundleButtonWithPrice extends ShopItemButton { private static const SIDE_PADDING:int = 25; private static const PRICE_BOTTOM_PADDING:int = 56; private var WIDTH:int; private var HEIGHT:int; public function BundleButtonWithPrice(param1:IGameObject, param2:BitmapData, param3:BitmapData) { var local4:ButtonItemSkin = null; local4 = new ButtonItemSkin(); local4.normalState = param2; local4.overState = param3; this.WIDTH = param2.width; this.HEIGHT = param2.height; super(param1,local4); } override protected function initOldPriceParams() : void { super.initOldPriceParams(); strikeoutLineThickness = 3; oldPriceLabelSize = this.getPriceLabelSize(); } override protected function initLabels() : void { addPriceLabel(); priceLabel.size = this.getPriceLabelSize(); priceLabel.x = SIDE_PADDING; priceLabel.y = this.HEIGHT - PRICE_BOTTOM_PADDING; } private function getPriceLabelSize() : int { switch(localeService.language) { case "fa": return 25; default: return 35; } } override public function get widthInCells() : int { return 3; } override protected function initPreview() : void { } override protected function setPreview() : void { } override public function get width() : Number { return this.WIDTH; } override public function get height() : Number { return this.HEIGHT; } override protected function align() : void { if(hasDiscount()) { oldPriceSprite.x = SIDE_PADDING; priceLabel.x = oldPriceSprite.x + oldPriceSprite.width + 10; oldPriceSprite.y = priceLabel.y; } } } }
package projects.tanks.client.battleservice.model.latency { 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 LatencyModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:LatencyModelServer; private var client:ILatencyModelBase = ILatencyModelBase(this); private var modelId:Long = Long.getLong(121770418,618912707); private var _pingId:Long = Long.getLong(335434599,-27161610); public function LatencyModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new LatencyModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._pingId: this.client.ping(); } } override public function get id() : Long { return this.modelId; } } }
package controls.base { import controls.ValidationIcon; import flash.events.FocusEvent; import flash.events.TimerEvent; import flash.utils.Timer; import forms.ColorConstants; import forms.events.LoginFormEvent; public class TankInputBox extends TankInputBase { private const CHECK_CALLSIGN_DELAY:int = 500; private var checkTimer:Timer; private var validateCheckIcon:ValidationIcon; private var labelBase:LabelBase = new LabelBase(); private var _validateFunction:Function; private var validatorVisible:Boolean; private var _isValid:Boolean = false; private var _isEnabled:Boolean = false; private var _isValidating:Boolean = false; public function TankInputBox(param1:String, param2:Boolean = false) { super(); this.validatorVisible = param2; this.labelBase.text = param1; this.labelBase.mouseEnabled = false; this.labelBase.color = ColorConstants.LIST_LABEL_HINT; addChild(this.labelBase); if(this.validatorVisible) { this.validateCheckIcon = new ValidationIcon(); addChild(this.validateCheckIcon); this.checkTimer = new Timer(this.CHECK_CALLSIGN_DELAY,1); this.checkTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onCheckTimerComplete); } addEventListener(FocusEvent.FOCUS_IN,this.onFocusInInput); addEventListener(FocusEvent.FOCUS_OUT,this.onFocusOutInput); addEventListener(LoginFormEvent.TEXT_CHANGED,this.onInputChanged); this.resize(); } public function isValid() : Boolean { return this._isValid; } private function resize() : void { this.labelBase.x = 3; this.labelBase.y = 7; if(this.validatorVisible) { this.validateCheckIcon.x = width - 33; this.validateCheckIcon.y = 7; } } private function onFocusInInput(param1:FocusEvent) : void { this.labelBase.visible = false; } private function onFocusOutInput(param1:FocusEvent) : void { if(value.length == 0) { this.labelBase.visible = true; } } private function onInputChanged(param1:LoginFormEvent) : void { if(!this.validatorVisible) { return; } if(value.length == 0) { this.validateCheckIcon.turnOff(); } this.checkTimer.reset(); this.checkTimer.start(); this._isValidating = true; } public function valid() : void { this._isValidating = false; if(this.validatorVisible) { this._isValid = true; validValue = true; this.validateCheckIcon.markAsValid(); } } public function get isValidating() : Boolean { return this._isValidating; } public function invalid() : void { this._isValidating = false; if(this.validatorVisible) { this._isValid = false; validValue = false; this.validateCheckIcon.markAsInvalid(); } } private function onCheckTimerComplete(param1:TimerEvent) : void { if(value.length > 0) { this.validateCheckIcon.startProgress(); if(this.validateFunction != null) { this.validateFunction.call(this); } } } public function set validateFunction(param1:Function) : void { this._validateFunction = param1; } public function get validateFunction() : Function { return this._validateFunction; } override public function set width(param1:Number) : void { super.width = param1; this.resize(); } override public function set enable(param1:Boolean) : void { super.enable = param1; this._isEnabled = param1; } public function isEnabled() : Boolean { return this._isEnabled; } } }
package alternativa.tanks.models.dom.server { import alternativa.math.Vector3; public class DOMPointData { public var pos:Vector3; public var id:int; public var radius:Number; public var score:Number; public var occupatedUsers:Vector.<String>; public function DOMPointData() { super(); } } }
package alternativa.tanks.model.item.rename { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.model.item.rename.RenameForm_enterEmailReminderBitmapDataClass.png")] public class RenameForm_enterEmailReminderBitmapDataClass extends BitmapAsset { public function RenameForm_enterEmailReminderBitmapDataClass() { super(); } } }
package alternativa.tanks.models.user.acceptednotificator { import alternativa.tanks.models.user.IClanUserModel; import alternativa.tanks.service.clan.ClanPanelNotificationService; import alternativa.types.Long; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import projects.tanks.client.clans.user.acceptednotificator.ClanUserAcceptedNotificatorModelBase; import projects.tanks.client.clans.user.acceptednotificator.IClanUserAcceptedNotificatorModelBase; import projects.tanks.client.commons.models.layout.LayoutState; import projects.tanks.clients.flash.commons.services.layout.event.LobbyLayoutServiceEvent; import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService; [ModelInfo] public class ClanUserAcceptedNotificatorModel extends ClanUserAcceptedNotificatorModelBase implements IClanUserAcceptedNotificatorModelBase, ObjectLoadListener, ObjectUnloadListener { [Inject] public static var lobbyLayoutService:ILobbyLayoutService; [Inject] public static var clanPanelNotificationService:ClanPanelNotificationService; private var clanId:Long; public function ClanUserAcceptedNotificatorModel() { super(); } public function onAdding(param1:Long) : void { this.clanId = param1; clanPanelNotificationService.add(); } public function onRemoved(param1:Long) : void { this.clanId = null; clanPanelNotificationService.remove(); } public function objectLoaded() : void { if(!this.isServiceSpace()) { return; } lobbyLayoutService.addEventListener(LobbyLayoutServiceEvent.END_LAYOUT_SWITCH,getFunctionWrapper(this.onLoadedLayout)); if(getInitParam().objects.length > 0) { this.clanId = getInitParam().objects[0]; } } private function removeNotification() : void { if(this.clanId != null) { server.removeNotification(this.clanId); } } private function onLoadedLayout(param1:LobbyLayoutServiceEvent) : void { if(param1.state == LayoutState.CLAN) { this.removeNotification(); } } private function isServiceSpace() : Boolean { return IClanUserModel(object.adapt(IClanUserModel)).loadingInServiceSpace(); } public function objectUnloaded() : void { if(!this.isServiceSpace()) { return; } lobbyLayoutService.removeEventListener(LobbyLayoutServiceEvent.END_LAYOUT_SWITCH,getFunctionWrapper(this.onLoadedLayout)); } } }
package controls.buttons.h30px { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.buttons.h30px.H30ButtonSkin_disableMiddleClass.png")] public class H30ButtonSkin_disableMiddleClass extends BitmapAsset { public function H30ButtonSkin_disableMiddleClass() { super(); } } }
package projects.tanks.clients.fp10.Prelauncher.makeup { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_buttonGreen.png")] public class MakeUp_buttonGreen extends BitmapAsset { public function MakeUp_buttonGreen() { super(); } } }
package alternativa.tanks.models.battlefield.decals { public class Queue { private var head:QueueItem; private var tail:QueueItem; private var size:int; public function Queue() { super(); } public function put(param1:*) : void { ++this.size; var _loc2_:QueueItem = QueueItem.create(param1); if(this.tail == null) { this.head = _loc2_; this.tail = _loc2_; } else { this.tail.next = _loc2_; this.tail = _loc2_; } } public function pop() : * { if(this.head == null) { return null; } --this.size; var _loc1_:* = this.head.data; var _loc2_:QueueItem = this.head; this.head = this.head.next; _loc2_.destroy(); return _loc1_; } public function getSize() : int { return this.size; } } }
package alternativa.model.description { [ModelInterface] public interface IDescription { function getName() : String; function getDescription() : String; } }
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.flag { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.battlefield.models.battle.pointbased.flag.FlagState; public class CodecFlagState implements ICodec { public function CodecFlagState() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:FlagState = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = FlagState.AT_BASE; break; case 1: local2 = FlagState.DROPPED; break; case 2: local2 = FlagState.CARRIED; break; case 3: local2 = FlagState.EXILED; break; case 4: local2 = FlagState.FLYING; } 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.containers { 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.Object3DContainer; import alternativa.engine3d.core.RayIntersectionData; import alternativa.engine3d.core.ShadowAtlas; import alternativa.engine3d.core.VG; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.materials.Material; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.BSP; import alternativa.engine3d.objects.Decal; import alternativa.engine3d.objects.Mesh; import alternativa.engine3d.objects.Occluder; import alternativa.engine3d.objects.Sprite3D; import alternativa.gfx.core.Device; import alternativa.gfx.core.IndexBufferResource; import alternativa.gfx.core.VertexBufferResource; 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; private var materials:Dictionary = new Dictionary(); private var opaqueList:Object3D; private var transparent:Vector.<Object3D> = new Vector.<Object3D>(); private var transparentLength:int = 0; private var receiversVertexBuffers:Vector.<VertexBufferResource> = new Vector.<VertexBufferResource>(); private var receiversIndexBuffers:Vector.<IndexBufferResource> = new Vector.<IndexBufferResource>(); private var isCreated:Boolean = false; 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; var local12:Material = null; var local14:Number = NaN; var local15:Number = NaN; var local16:Number = NaN; var local17:Number = NaN; var local18:Number = NaN; var local19:Number = NaN; var local20:Number = NaN; var local21:Number = NaN; var local22:Number = NaN; var local23:Number = NaN; var local24:Number = NaN; var local25:Number = NaN; var local26:Vertex = null; var local27:Face = null; var local28:Vertex = null; var local29:Mesh = null; var local30:Mesh = null; var local31:BSP = null; var local32:Vector.<Vector.<Number>> = null; var local33:Vector.<Vector.<uint>> = null; this.destroyTree(); var local6:int = int(param1.length); var local7:int = param2 != null ? int(param2.length) : 0; var local13:Dictionary = new Dictionary(); local3 = 0; while(local3 < local6) { local4 = param1[local3]; local12 = local4 is Mesh ? (local4 as Mesh).alternativa3d::faceList.material : (local4 is BSP ? (local4 as BSP).alternativa3d::faces[0].material : null); if(local12 != null) { this.materials[local12] = true; if(local12.alternativa3d::transparent) { this.transparent[this.transparentLength] = local4; ++this.transparentLength; } else { local29 = local13[local12]; if(local29 == null) { local29 = new Mesh(); local13[local12] = local29; local29.alternativa3d::next = this.opaqueList; this.opaqueList = local29; local29.alternativa3d::setParent(this); } local4 = local4.clone(); local4.alternativa3d::composeMatrix(); if(local4 is Mesh) { local30 = local4 as Mesh; if(local30.alternativa3d::faceList != null) { local26 = local30.alternativa3d::vertexList; while(local26 != null) { local20 = local26.x; local21 = local26.y; local22 = local26.z; local26.x = local4.alternativa3d::ma * local20 + local4.alternativa3d::mb * local21 + local4.alternativa3d::mc * local22 + local4.alternativa3d::md; local26.y = local4.alternativa3d::me * local20 + local4.alternativa3d::mf * local21 + local4.alternativa3d::mg * local22 + local4.alternativa3d::mh; local26.z = local4.alternativa3d::mi * local20 + local4.alternativa3d::mj * local21 + local4.alternativa3d::mk * local22 + local4.alternativa3d::ml; local23 = local26.normalX; local24 = local26.normalY; local25 = local26.normalZ; local26.normalX = local4.alternativa3d::ma * local23 + local4.alternativa3d::mb * local24 + local4.alternativa3d::mc * local25; local26.normalY = local4.alternativa3d::me * local23 + local4.alternativa3d::mf * local24 + local4.alternativa3d::mg * local25; local26.normalZ = local4.alternativa3d::mi * local23 + local4.alternativa3d::mj * local24 + local4.alternativa3d::mk * local25; local26.alternativa3d::transformId = 0; if(local26.alternativa3d::next == null) { local28 = local26; } local26 = local26.alternativa3d::next; } local28.alternativa3d::next = local29.alternativa3d::vertexList; local29.alternativa3d::vertexList = local30.alternativa3d::vertexList; local30.alternativa3d::vertexList = null; local27 = local30.alternativa3d::faceList; while(local27.alternativa3d::next != null) { local27 = local27.alternativa3d::next; } local27.alternativa3d::next = local29.alternativa3d::faceList; local29.alternativa3d::faceList = local30.alternativa3d::faceList; local30.alternativa3d::faceList = null; } } else if(local4 is BSP) { local31 = local4 as BSP; if(local31.alternativa3d::root != null) { local26 = local31.alternativa3d::vertexList; while(local26 != null) { local20 = local26.x; local21 = local26.y; local22 = local26.z; local26.x = local4.alternativa3d::ma * local20 + local4.alternativa3d::mb * local21 + local4.alternativa3d::mc * local22 + local4.alternativa3d::md; local26.y = local4.alternativa3d::me * local20 + local4.alternativa3d::mf * local21 + local4.alternativa3d::mg * local22 + local4.alternativa3d::mh; local26.z = local4.alternativa3d::mi * local20 + local4.alternativa3d::mj * local21 + local4.alternativa3d::mk * local22 + local4.alternativa3d::ml; local23 = local26.normalX; local24 = local26.normalY; local25 = local26.normalZ; local26.normalX = local4.alternativa3d::ma * local23 + local4.alternativa3d::mb * local24 + local4.alternativa3d::mc * local25; local26.normalY = local4.alternativa3d::me * local23 + local4.alternativa3d::mf * local24 + local4.alternativa3d::mg * local25; local26.normalZ = local4.alternativa3d::mi * local23 + local4.alternativa3d::mj * local24 + local4.alternativa3d::mk * local25; local26.alternativa3d::transformId = 0; if(local26.alternativa3d::next == null) { local28 = local26; } local26 = local26.alternativa3d::next; } local28.alternativa3d::next = local29.alternativa3d::vertexList; local29.alternativa3d::vertexList = local31.alternativa3d::vertexList; local31.alternativa3d::vertexList = null; for each(local27 in local31.alternativa3d::faces) { local27.alternativa3d::next = local29.alternativa3d::faceList; local29.alternativa3d::faceList = local27; } local31.alternativa3d::faces.length = 0; local31.alternativa3d::root = null; } } } } local3++; } for each(local29 in local13) { local29.calculateFacesNormals(true); local29.calculateBounds(); } local14 = 1e+22; local15 = 1e+22; local16 = 1e+22; local17 = -1e+22; local18 = -1e+22; local19 = -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 < local14) { local14 = local5.boundMinX; } if(local5.boundMaxX > local17) { local17 = local5.boundMaxX; } if(local5.boundMinY < local15) { local15 = local5.boundMinY; } if(local5.boundMaxY > local18) { local18 = local5.boundMaxY; } if(local5.boundMinZ < local16) { local16 = local5.boundMinZ; } if(local5.boundMaxZ > local19) { local19 = local5.boundMaxZ; } } local3++; } local3 = 0; while(local3 < local7) { local4 = param2[local3]; local5 = this.createObjectBounds(local4); if(local5.boundMinX <= local5.boundMaxX) { if(!(local5.boundMinX < local14 || local5.boundMaxX > local17 || local5.boundMinY < local15 || local5.boundMaxY > local18 || local5.boundMinZ < local16 || local5.boundMaxZ > local19)) { 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,local14,local15,local16,local17,local18,local19); local32 = new Vector.<Vector.<Number>>(); local33 = new Vector.<Vector.<uint>>(); local32[0] = new Vector.<Number>(); local33[0] = new Vector.<uint>(); this.alternativa3d::root.createReceivers(local32,local33); local3 = 0; while(local3 < local32.length) { this.receiversVertexBuffers[local3] = new VertexBufferResource(local32[local3],3); this.receiversIndexBuffers[local3] = new IndexBufferResource(local33[local3]); local3++; } } } public function destroyTree() : void { var local1:int = 0; var local2:* = undefined; var local3:Object3D = null; var local4:Mesh = null; var local5:BSP = null; var local6:TextureMaterial = null; for(local2 in this.materials) { local6 = local2 as TextureMaterial; if(local6.texture != null) { local6.alternativa3d::textureResource.reset(); } if(local6.alternativa3d::_textureATF != null) { local6.alternativa3d::textureATFResource.reset(); } if(local6.alternativa3d::_textureATFAlpha != null) { local6.alternativa3d::textureATFAlphaResource.reset(); } } local3 = this.opaqueList; while(local3 != null) { if(local3 is Mesh) { local4 = local3 as Mesh; if(local4.alternativa3d::vertexBuffer != null) { local4.alternativa3d::vertexBuffer.reset(); } if(local4.alternativa3d::indexBuffer != null) { local4.alternativa3d::indexBuffer.reset(); } } else if(local3 is BSP) { local5 = local3 as BSP; if(local5.alternativa3d::vertexBuffer != null) { local5.alternativa3d::vertexBuffer.reset(); } if(local5.alternativa3d::indexBuffer != null) { local5.alternativa3d::indexBuffer.reset(); } } local3 = local3.alternativa3d::next; } local1 = 0; while(local1 < this.transparentLength) { local3 = this.transparent[local1]; if(local3 is Mesh) { local4 = local3 as Mesh; if(local4.alternativa3d::vertexBuffer != null) { local4.alternativa3d::vertexBuffer.reset(); } if(local4.alternativa3d::indexBuffer != null) { local4.alternativa3d::indexBuffer.reset(); } } else if(local3 is BSP) { local5 = local3 as BSP; if(local5.alternativa3d::vertexBuffer != null) { local5.alternativa3d::vertexBuffer.reset(); } if(local5.alternativa3d::indexBuffer != null) { local5.alternativa3d::indexBuffer.reset(); } } local1++; } this.materials = new Dictionary(); this.opaqueList = null; this.transparent.length = 0; this.transparentLength = 0; if(this.alternativa3d::root != null) { this.destroyNode(this.alternativa3d::root); this.alternativa3d::root = null; } local1 = 0; while(local1 < this.receiversVertexBuffers.length) { VertexBufferResource(this.receiversVertexBuffers[local1]).dispose(); IndexBufferResource(this.receiversIndexBuffers[local1]).dispose(); local1++; } this.receiversVertexBuffers.length = 0; this.receiversIndexBuffers.length = 0; this.isCreated = false; } 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) : void { var local2:int = 0; var local3:Object3D = null; var local4:VG = null; var local5:VG = null; var local7:Boolean = false; var local8:Object3D = null; var local9:VG = null; var local10:int = 0; var local11:Vertex = null; var local12:Vertex = null; var local13:ShadowAtlas = null; this.uploadResources(param1.alternativa3d::device); alternativa3d::calculateInverseMatrix(); var local6:int = param1.debug ? int(param1.alternativa3d::checkInDebug(this)) : 0; if(Boolean(local6 & Debug.BOUNDS)) { Debug.alternativa3d::drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ); } if(this.batched) { local7 = param1.debug; if(Boolean(local6) && Boolean(local6 & Debug.NODES)) { param1.debug = false; } local3 = this.opaqueList; while(local3 != null) { local3.alternativa3d::ma = alternativa3d::ma; local3.alternativa3d::mb = alternativa3d::mb; local3.alternativa3d::mc = alternativa3d::mc; local3.alternativa3d::md = alternativa3d::md; local3.alternativa3d::me = alternativa3d::me; local3.alternativa3d::mf = alternativa3d::mf; local3.alternativa3d::mg = alternativa3d::mg; local3.alternativa3d::mh = alternativa3d::mh; local3.alternativa3d::mi = alternativa3d::mi; local3.alternativa3d::mj = alternativa3d::mj; local3.alternativa3d::mk = alternativa3d::mk; local3.alternativa3d::ml = alternativa3d::ml; local3.alternativa3d::concat(this); local3.alternativa3d::draw(param1); if(!param1.view.alternativa3d::constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && local3.alternativa3d::concatenatedAlpha >= local3.shadowMapAlphaThreshold) { param1.alternativa3d::casterObjects[param1.alternativa3d::casterCount] = local3; ++param1.alternativa3d::casterCount; } local3 = local3.alternativa3d::next; } param1.debug = local7; local5 = super.alternativa3d::getVG(param1); if(!param1.view.alternativa3d::constrained && param1.shadowMap != null && param1.shadowMapStrength > 0) { local3 = alternativa3d::childrenList; while(local3 != null) { if(local3.visible) { if(local3 is Mesh || local3 is BSP || local3 is Sprite3D) { if(local3.alternativa3d::concatenatedAlpha >= local3.shadowMapAlphaThreshold) { param1.alternativa3d::casterObjects[param1.alternativa3d::casterCount] = local3; ++param1.alternativa3d::casterCount; } } else if(local3 is Object3DContainer) { local8 = Object3DContainer(local3).alternativa3d::childrenList; while(local8 != null) { if((local8 is Mesh || local8 is BSP || local8 is Sprite3D) && local8.alternativa3d::concatenatedAlpha >= local8.shadowMapAlphaThreshold) { param1.alternativa3d::casterObjects[param1.alternativa3d::casterCount] = local8; ++param1.alternativa3d::casterCount; } local8 = local8.alternativa3d::next; } } } local3 = local3.alternativa3d::next; } } local2 = 0; while(local2 < this.transparentLength) { local3 = this.transparent[local2]; local3.alternativa3d::composeAndAppend(this); if(local3.alternativa3d::cullingInCamera(param1,alternativa3d::culling) >= 0) { local3.alternativa3d::concat(this); local9 = local3.alternativa3d::getVG(param1); if(local9 != null) { local9.alternativa3d::next = local5; local5 = local9; } } if(!param1.view.alternativa3d::constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && local3.alternativa3d::concatenatedAlpha >= local3.shadowMapAlphaThreshold) { param1.alternativa3d::casterObjects[param1.alternativa3d::casterCount] = local3; ++param1.alternativa3d::casterCount; } local2++; } if(local5 != null) { if(local5.alternativa3d::next != null) { if(resolveByAABB) { local4 = local5; while(local4 != null) { local4.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); local4 = local4.alternativa3d::next; } alternativa3d::drawAABBGeometry(param1,local5); } else if(resolveByOOBB) { local4 = local5; while(local4 != null) { local4.alternativa3d::calculateOOBB(this); local4 = local4.alternativa3d::next; } alternativa3d::drawOOBBGeometry(param1,local5); } else { alternativa3d::drawConflictGeometry(param1,local5); } } else { local5.alternativa3d::draw(param1,threshold,this); local5.alternativa3d::destroy(); } } } else if(this.alternativa3d::root != null) { this.calculateCameraPlanes(param1.nearClipping,param1.farClipping); local10 = 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(local10 >= 0) { this.numOccluders = 0; if(param1.alternativa3d::numOccluders > 0) { this.updateOccluders(param1); } local5 = super.alternativa3d::getVG(param1); local4 = local5; while(local4 != null) { local4.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); local4 = local4.alternativa3d::next; } this.drawNode(this.alternativa3d::root,local10,param1,local5); local2 = 0; while(local2 < this.numOccluders) { local11 = this.occluders[local2]; local12 = local11; while(local12.alternativa3d::next != null) { local12 = local12.alternativa3d::next; } local12.alternativa3d::next = Vertex.alternativa3d::collector; Vertex.alternativa3d::collector = local11; this.occluders[local2] = null; local2++; } this.numOccluders = 0; } else { super.alternativa3d::draw(param1); } } else { super.alternativa3d::draw(param1); } if(this.alternativa3d::root != null && Boolean(local6 & Debug.NODES)) { this.debugNode(this.alternativa3d::root,local10,param1,1); Debug.alternativa3d::drawBounds(param1,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(this.alternativa3d::root != null) { param1.alternativa3d::receiversVertexBuffers = this.receiversVertexBuffers; param1.alternativa3d::receiversIndexBuffers = this.receiversIndexBuffers; for each(local13 in param1.alternativa3d::shadowAtlases) { local2 = 0; while(local2 < local13.alternativa3d::shadowsCount) { this.alternativa3d::root.collectReceivers(local13.alternativa3d::shadows[local2]); local2++; } } } } override alternativa3d function getVG(param1:Camera3D) : VG { var local3:int = 0; var local2:VG = super.alternativa3d::getVG(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); } } 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); local7.alternativa3d::concat(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; } private function uploadResources(param1:Device) : void { var local2:* = undefined; var local3:Object3D = null; var local4:Mesh = null; var local5:BSP = null; var local7:TextureMaterial = null; if(this.isCreated) { return; } this.isCreated = true; for(local2 in this.materials) { local7 = local2 as TextureMaterial; if(local7.texture != null) { param1.uploadResource(local7.alternativa3d::textureResource); } if(local7.alternativa3d::_textureATF != null) { param1.uploadResource(local7.alternativa3d::textureATFResource); } if(local7.alternativa3d::_textureATFAlpha != null) { param1.uploadResource(local7.alternativa3d::textureATFAlphaResource); } } local3 = this.opaqueList; while(local3 != null) { if(local3 is Mesh) { local4 = local3 as Mesh; local4.alternativa3d::prepareResources(); param1.uploadResource(local4.alternativa3d::vertexBuffer); param1.uploadResource(local4.alternativa3d::indexBuffer); } else if(local3 is BSP) { local5 = local3 as BSP; local5.alternativa3d::prepareResources(); param1.uploadResource(local5.alternativa3d::vertexBuffer); param1.uploadResource(local5.alternativa3d::indexBuffer); } local3 = local3.alternativa3d::next; } var local6:int = 0; while(local6 < this.transparentLength) { local3 = this.transparent[local6]; if(local3 is Mesh) { local4 = local3 as Mesh; local4.alternativa3d::prepareResources(); param1.uploadResource(local4.alternativa3d::vertexBuffer); param1.uploadResource(local4.alternativa3d::indexBuffer); } else if(local3 is BSP) { local5 = local3 as BSP; local5.alternativa3d::prepareResources(); param1.uploadResource(local5.alternativa3d::vertexBuffer); param1.uploadResource(local5.alternativa3d::indexBuffer); } local6++; } local6 = 0; while(local6 < this.receiversVertexBuffers.length) { param1.uploadResource(this.receiversVertexBuffers[local6]); param1.uploadResource(this.receiversIndexBuffers[local6]); local6++; } } 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:Number) : void { var local5:int = 0; var local6:int = 0; if(param1 != null && param1.negative != null) { local5 = param2 > 0 ? this.cullingInContainer(param2,param1.negative.boundMinX,param1.negative.boundMinY,param1.negative.boundMinZ,param1.negative.boundMaxX,param1.negative.boundMaxY,param1.negative.boundMaxZ) : 0; local6 = 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(local5 >= 0) { this.debugNode(param1.negative,local5,param3,param4 * this.debugAlphaFade); } Debug.alternativa3d::drawKDNode(param3,this,param1.axis,param1.coord,param1.boundMinX,param1.boundMinY,param1.boundMinZ,param1.boundMaxX,param1.boundMaxY,param1.boundMaxZ,param4); if(local6 >= 0) { this.debugNode(param1.positive,local6,param3,param4 * this.debugAlphaFade); } } } private function drawNode(param1:KDNode, param2:int, param3:Camera3D, param4:VG) : void { var local5:int = 0; var local6:VG = null; var local7:VG = null; var local8:VG = null; var local9:VG = null; var local10:Object3D = null; var local11:Object3D = null; var local12:int = 0; var local13:int = 0; var local14:Boolean = false; var local15:Boolean = false; var local16:Number = NaN; var local17:Number = NaN; if(param3.alternativa3d::occludedAll) { while(param4 != null) { local6 = param4.alternativa3d::next; param4.alternativa3d::destroy(); param4 = local6; } return; } if(param1.negative != null) { local12 = 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; local13 = 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; local14 = param1.axis == 0; local15 = param1.axis == 1; if(local12 >= 0 && local13 >= 0) { while(param4 != null) { local6 = param4.alternativa3d::next; if(param4.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param4)) { param4.alternativa3d::destroy(); } else { local16 = local14 ? Number(param4.alternativa3d::boundMinX) : (local15 ? Number(param4.alternativa3d::boundMinY) : Number(param4.alternativa3d::boundMinZ)); local17 = local14 ? Number(param4.alternativa3d::boundMaxX) : (local15 ? Number(param4.alternativa3d::boundMaxY) : Number(param4.alternativa3d::boundMaxZ)); if(local17 <= param1.maxCoord) { if(local16 < param1.minCoord) { param4.alternativa3d::next = local7; local7 = param4; } else { param4.alternativa3d::next = local8; local8 = param4; } } else if(local16 >= param1.minCoord) { param4.alternativa3d::next = local9; local9 = param4; } else { param4.alternativa3d::split(param3,param1.axis == 0 ? 1 : 0,param1.axis == 1 ? 1 : 0,param1.axis == 2 ? 1 : 0,param1.coord,threshold); if(param4.alternativa3d::next != null) { param4.alternativa3d::next.alternativa3d::next = local7; local7 = param4.alternativa3d::next; } if(param4.alternativa3d::faceStruct != null) { param4.alternativa3d::next = local9; local9 = param4; } else { param4.alternativa3d::destroy(); } } } param4 = local6; } if(local14 && alternativa3d::imd > param1.coord || local15 && alternativa3d::imh > param1.coord || !local14 && !local15 && alternativa3d::iml > param1.coord) { this.drawNode(param1.positive,local13,param3,local9); while(local8 != null) { local6 = local8.alternativa3d::next; if(local8.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,local8)) { local8.alternativa3d::draw(param3,threshold,this); } local8.alternativa3d::destroy(); local8 = local6; } local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } local10 = param1.occluderList; local11 = param1.occluderBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(param1.occluderList != null) { this.updateOccluders(param3); } this.drawNode(param1.negative,local12,param3,local7); } else { this.drawNode(param1.negative,local12,param3,local7); while(local8 != null) { local6 = local8.alternativa3d::next; if(local8.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,local8)) { local8.alternativa3d::draw(param3,threshold,this); } local8.alternativa3d::destroy(); local8 = local6; } local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } local10 = param1.occluderList; local11 = param1.occluderBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(param1.occluderList != null) { this.updateOccluders(param3); } this.drawNode(param1.positive,local13,param3,local9); } } else if(local12 >= 0) { while(param4 != null) { local6 = param4.alternativa3d::next; if(param4.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param4)) { param4.alternativa3d::destroy(); } else { local16 = local14 ? Number(param4.alternativa3d::boundMinX) : (local15 ? Number(param4.alternativa3d::boundMinY) : Number(param4.alternativa3d::boundMinZ)); local17 = local14 ? Number(param4.alternativa3d::boundMaxX) : (local15 ? Number(param4.alternativa3d::boundMaxY) : Number(param4.alternativa3d::boundMaxZ)); if(local17 <= param1.maxCoord) { param4.alternativa3d::next = local7; local7 = param4; } else if(local16 >= param1.minCoord) { param4.alternativa3d::destroy(); } else { param4.alternativa3d::crop(param3,param1.axis == 0 ? -1 : 0,param1.axis == 1 ? -1 : 0,param1.axis == 2 ? -1 : 0,-param1.coord,threshold); if(param4.alternativa3d::faceStruct != null) { param4.alternativa3d::next = local7; local7 = param4; } else { param4.alternativa3d::destroy(); } } } param4 = local6; } this.drawNode(param1.negative,local12,param3,local7); } else if(local13 >= 0) { while(param4 != null) { local6 = param4.alternativa3d::next; if(param4.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param4)) { param4.alternativa3d::destroy(); } else { local16 = local14 ? Number(param4.alternativa3d::boundMinX) : (local15 ? Number(param4.alternativa3d::boundMinY) : Number(param4.alternativa3d::boundMinZ)); local17 = local14 ? Number(param4.alternativa3d::boundMaxX) : (local15 ? Number(param4.alternativa3d::boundMaxY) : Number(param4.alternativa3d::boundMaxZ)); if(local17 <= param1.maxCoord) { param4.alternativa3d::destroy(); } else if(local16 >= param1.minCoord) { param4.alternativa3d::next = local9; local9 = param4; } else { param4.alternativa3d::crop(param3,param1.axis == 0 ? 1 : 0,param1.axis == 1 ? 1 : 0,param1.axis == 2 ? 1 : 0,param1.coord,threshold); if(param4.alternativa3d::faceStruct != null) { param4.alternativa3d::next = local9; local9 = param4; } else { param4.alternativa3d::destroy(); } } } param4 = local6; } this.drawNode(param1.positive,local13,param3,local9); } else { while(param4 != null) { local6 = param4.alternativa3d::next; param4.alternativa3d::destroy(); param4 = local6; } } } else { if(param1.objectList != null) { if(param1.objectList.alternativa3d::next != null || param4 != null) { while(param4 != null) { local6 = param4.alternativa3d::next; if(param4.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param4)) { param4.alternativa3d::destroy(); } else { param4.alternativa3d::next = local8; local8 = param4; } param4 = local6; } local10 = param1.objectList; local11 = param1.objectBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); param4 = local10.alternativa3d::getVG(param3); while(param4 != null) { local6 = param4.alternativa3d::next; param4.alternativa3d::next = local8; local8 = param4; param4 = local6; } } local10 = local10.alternativa3d::next; local11 = local11.alternativa3d::next; } if(local8 != null) { if(local8.alternativa3d::next != null) { alternativa3d::drawConflictGeometry(param3,local8); } else { local8.alternativa3d::draw(param3,threshold,this); local8.alternativa3d::destroy(); } } } else { local10 = param1.objectList; if(local10.visible) { local10.alternativa3d::copyAndAppend(param1.objectBoundList,this); local10.alternativa3d::culling = param2; local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } } } else if(param4 != null) { if(param4.alternativa3d::next != null) { if(this.numOccluders > 0) { while(param4 != null) { local6 = param4.alternativa3d::next; if(param4.alternativa3d::numOccluders < this.numOccluders && this.occludeGeometry(param3,param4)) { param4.alternativa3d::destroy(); } else { param4.alternativa3d::next = local8; local8 = param4; } param4 = local6; } if(local8 != null) { if(local8.alternativa3d::next != null) { if(resolveByAABB) { alternativa3d::drawAABBGeometry(param3,local8); } else if(resolveByOOBB) { param4 = local8; while(param4 != null) { param4.alternativa3d::calculateOOBB(this); param4 = param4.alternativa3d::next; } alternativa3d::drawOOBBGeometry(param3,local8); } else { alternativa3d::drawConflictGeometry(param3,local8); } } else { local8.alternativa3d::draw(param3,threshold,this); local8.alternativa3d::destroy(); } } } else { local8 = param4; if(resolveByAABB) { alternativa3d::drawAABBGeometry(param3,local8); } else if(resolveByOOBB) { param4 = local8; while(param4 != null) { param4.alternativa3d::calculateOOBB(this); param4 = param4.alternativa3d::next; } alternativa3d::drawOOBBGeometry(param3,local8); } else { alternativa3d::drawConflictGeometry(param3,local8); } } } else { if(param4.alternativa3d::numOccluders >= this.numOccluders || !this.occludeGeometry(param3,param4)) { param4.alternativa3d::draw(param3,threshold,this); } param4.alternativa3d::destroy(); } } local10 = param1.occluderList; local11 = param1.occluderBoundList; while(local10 != null) { if(local10.visible && ((local10.alternativa3d::culling = param2) == 0 && this.numOccluders == 0 || (local10.alternativa3d::culling = this.cullingInContainer(param2,local11.boundMinX,local11.boundMinY,local11.boundMinZ,local11.boundMaxX,local11.boundMaxY,local11.boundMaxZ)) >= 0)) { local10.alternativa3d::copyAndAppend(local11,this); local10.alternativa3d::concat(this); local10.alternativa3d::draw(param3); } local10 = local10.alternativa3d::next; local11 = local11.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); local2.alternativa3d::ma = param1.alternativa3d::ma; local2.alternativa3d::mb = param1.alternativa3d::mb; local2.alternativa3d::mc = param1.alternativa3d::mc; local2.alternativa3d::md = param1.alternativa3d::md; local2.alternativa3d::me = param1.alternativa3d::me; local2.alternativa3d::mf = param1.alternativa3d::mf; local2.alternativa3d::mg = param1.alternativa3d::mg; local2.alternativa3d::mh = param1.alternativa3d::mh; local2.alternativa3d::mi = param1.alternativa3d::mi; local2.alternativa3d::mj = param1.alternativa3d::mj; local2.alternativa3d::mk = param1.alternativa3d::mk; local2.alternativa3d::ml = param1.alternativa3d::ml; 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; var local5:Receiver = 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; } var local4:Receiver = param1.receiverList; while(local4 != null) { local5 = local4.next; local4.next = null; local4 = local5; } param1.objectList = null; param1.objectBoundList = null; param1.occluderList = null; param1.occluderBoundList = null; param1.receiverList = 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.Shadow; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.core.Wrapper; import alternativa.engine3d.materials.TextureMaterial; 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 var receiverList:Receiver; public function KDNode() { super(); } public function createReceivers(param1:Vector.<Vector.<Number>>, param2:Vector.<Vector.<uint>>) : void { var local3:Receiver = null; var local5:Receiver = null; var local6:Vertex = null; var local7:Vertex = null; var local8:Vector.<Face> = null; var local9:int = 0; var local10:TextureMaterial = null; var local11:int = 0; var local12:int = 0; var local13:Vector.<Number> = null; var local14:Vector.<uint> = null; var local15:int = 0; var local16:int = 0; var local17:int = 0; var local18:int = 0; var local19:Face = null; var local20:Wrapper = null; var local21:uint = 0; var local22:uint = 0; var local23:uint = 0; this.receiverList = null; var local4:Object3D = this.objectList; while(local4 != null) { local4.alternativa3d::composeMatrix(); local5 = new Receiver(); if(local3 != null) { local3.next = local5; } else { this.receiverList = local5; } local3 = local5; if(local4 is Mesh) { local7 = (local4 as Mesh).alternativa3d::vertexList; local8 = (local4 as Mesh).faces; } else if(local4 is BSP) { local7 = (local4 as BSP).alternativa3d::vertexList; local8 = (local4 as BSP).alternativa3d::faces; } local9 = int(local8.length); local10 = local8[0].material as TextureMaterial; if(local9 > 0 && local10 != null) { local11 = 0; local6 = local7; while(local6 != null) { local11++; local6 = local6.alternativa3d::next; } local12 = param1.length - 1; local13 = param1[local12]; if(local13.length / 3 + local11 > 65535) { local12++; param1[local12] = new Vector.<Number>(); param2[local12] = new Vector.<uint>(); local13 = param1[local12]; } local14 = param2[local12]; local15 = int(local13.length); local16 = local15 / 3; local17 = int(local14.length); local5.buffer = local12; local5.firstIndex = local17; local5.transparent = local10.alternativa3d::transparent; local6 = local7; while(local6 != null) { local13[local15] = local6.x * local4.alternativa3d::ma + local6.y * local4.alternativa3d::mb + local6.z * local4.alternativa3d::mc + local4.alternativa3d::md; local15++; local13[local15] = local6.x * local4.alternativa3d::me + local6.y * local4.alternativa3d::mf + local6.z * local4.alternativa3d::mg + local4.alternativa3d::mh; local15++; local13[local15] = local6.x * local4.alternativa3d::mi + local6.y * local4.alternativa3d::mj + local6.z * local4.alternativa3d::mk + local4.alternativa3d::ml; local15++; local6.alternativa3d::index = local16; local16++; local6 = local6.alternativa3d::next; } local18 = 0; while(local18 < local9) { local19 = local8[local18]; if(local19.alternativa3d::normalX * local4.alternativa3d::mi + local19.alternativa3d::normalY * local4.alternativa3d::mj + local19.alternativa3d::normalZ * local4.alternativa3d::mk >= -0.5) { local20 = local19.alternativa3d::wrapper; local21 = uint(local20.alternativa3d::vertex.alternativa3d::index); local20 = local20.alternativa3d::next; local22 = uint(local20.alternativa3d::vertex.alternativa3d::index); local20 = local20.alternativa3d::next; while(local20 != null) { local23 = uint(local20.alternativa3d::vertex.alternativa3d::index); local14[local17] = local21; local17++; local14[local17] = local22; local17++; local14[local17] = local23; local17++; ++local5.numTriangles; local22 = local23; local20 = local20.alternativa3d::next; } } local18++; } } local4 = local4.alternativa3d::next; } if(this.negative != null) { this.negative.createReceivers(param1,param2); } if(this.positive != null) { this.positive.createReceivers(param1,param2); } } public function collectReceivers(param1:Shadow) : void { var local2:Object3D = null; var local3:Object3D = null; var local4:Receiver = null; var local5:Boolean = false; var local6:Boolean = false; var local7:Number = NaN; var local8:Number = NaN; if(this.negative != null) { local5 = this.axis == 0; local6 = this.axis == 1; local7 = local5 ? Number(param1.alternativa3d::boundMinX) : (local6 ? Number(param1.alternativa3d::boundMinY) : Number(param1.alternativa3d::boundMinZ)); local8 = local5 ? Number(param1.alternativa3d::boundMaxX) : (local6 ? Number(param1.alternativa3d::boundMaxY) : Number(param1.alternativa3d::boundMaxZ)); if(local8 <= this.maxCoord) { this.negative.collectReceivers(param1); } else if(local7 >= this.minCoord) { this.positive.collectReceivers(param1); } else { if(local5) { local3 = this.objectBoundList; local2 = this.objectList; local4 = this.receiverList; while(local3 != null) { if(local4.numTriangles > 0 && param1.alternativa3d::boundMinY < local3.boundMaxY && param1.alternativa3d::boundMaxY > local3.boundMinY && param1.alternativa3d::boundMinZ < local3.boundMaxZ && param1.alternativa3d::boundMaxZ > local3.boundMinZ) { if(!local4.transparent) { param1.alternativa3d::receiversBuffers[param1.alternativa3d::receiversCount] = local4.buffer; param1.alternativa3d::receiversFirstIndexes[param1.alternativa3d::receiversCount] = local4.firstIndex; param1.alternativa3d::receiversNumsTriangles[param1.alternativa3d::receiversCount] = local4.numTriangles; ++param1.alternativa3d::receiversCount; } } local3 = local3.alternativa3d::next; local2 = local2.alternativa3d::next; local4 = local4.next; } } else if(local6) { local3 = this.objectBoundList; local2 = this.objectList; local4 = this.receiverList; while(local3 != null) { if(local4.numTriangles > 0 && param1.alternativa3d::boundMinX < local3.boundMaxX && param1.alternativa3d::boundMaxX > local3.boundMinX && param1.alternativa3d::boundMinZ < local3.boundMaxZ && param1.alternativa3d::boundMaxZ > local3.boundMinZ) { if(!local4.transparent) { param1.alternativa3d::receiversBuffers[param1.alternativa3d::receiversCount] = local4.buffer; param1.alternativa3d::receiversFirstIndexes[param1.alternativa3d::receiversCount] = local4.firstIndex; param1.alternativa3d::receiversNumsTriangles[param1.alternativa3d::receiversCount] = local4.numTriangles; ++param1.alternativa3d::receiversCount; } } local3 = local3.alternativa3d::next; local2 = local2.alternativa3d::next; local4 = local4.next; } } else { local3 = this.objectBoundList; local2 = this.objectList; local4 = this.receiverList; while(local3 != null) { if(local4.numTriangles > 0 && param1.alternativa3d::boundMinX < local3.boundMaxX && param1.alternativa3d::boundMaxX > local3.boundMinX && param1.alternativa3d::boundMinY < local3.boundMaxY && param1.alternativa3d::boundMaxY > local3.boundMinY) { if(!local4.transparent) { param1.alternativa3d::receiversBuffers[param1.alternativa3d::receiversCount] = local4.buffer; param1.alternativa3d::receiversFirstIndexes[param1.alternativa3d::receiversCount] = local4.firstIndex; param1.alternativa3d::receiversNumsTriangles[param1.alternativa3d::receiversCount] = local4.numTriangles; ++param1.alternativa3d::receiversCount; } } local3 = local3.alternativa3d::next; local2 = local2.alternativa3d::next; local4 = local4.next; } } this.negative.collectReceivers(param1); this.positive.collectReceivers(param1); } } else { local2 = this.objectList; local4 = this.receiverList; while(local4 != null) { if(local4.numTriangles > 0) { if(!local4.transparent) { param1.alternativa3d::receiversBuffers[param1.alternativa3d::receiversCount] = local4.buffer; param1.alternativa3d::receiversFirstIndexes[param1.alternativa3d::receiversCount] = local4.firstIndex; param1.alternativa3d::receiversNumsTriangles[param1.alternativa3d::receiversCount] = local4.numTriangles; ++param1.alternativa3d::receiversCount; } } local2 = local2.alternativa3d::next; local4 = local4.next; } } } 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 local10:int = 0; var local11:int = 0; 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; local10 = int(local9.length); local11 = 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++; } } } class Receiver { public var next:Receiver; public var transparent:Boolean = false; public var buffer:int = -1; public var firstIndex:int = -1; public var numTriangles:int = 0; public function Receiver() { super(); } }
package alternativa.tanks.service.socialnetwork.vk { public class SNFriendsServiceData { private var friends:String; public function SNFriendsServiceData(param1:String) { super(); this.friends = param1; } public function areFriends(param1:String) : Boolean { return this.friends.indexOf(param1) > -1; } } }
package alternativa.tanks.materials { import flash.display.BitmapData; public class AnimatedPaintMaterial extends PaintMaterial { public function AnimatedPaintMaterial(param1:BitmapData, param2:BitmapData, param3:BitmapData, param4:int, param5:int, param6:int, param7:int, param8:int = 0) { super(param1,param2,param3,param8); } public function update() : void { } } }
package { import flash.display.BitmapData; [Embed(source="/_assets/goldButtonCenter.png")] public dynamic class goldButtonCenter extends BitmapData { public function goldButtonCenter(param1:int = 32, param2:int = 29) { super(param1,param2); } } }
package _codec.platform.client.fp10.core.type { 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 platform.client.fp10.core.type.IGameObject; public class VectorCodecIGameObjectLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecIGameObjectLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(IGameObject,false)); if(this.optionalElement) { this.elementCodec = new OptionalCodecDecorator(this.elementCodec); } } public function decode(param1:ProtocolBuffer) : Object { var local2:int = LengthCodecHelper.decodeLength(param1); var local3:Vector.<IGameObject> = new Vector.<IGameObject>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = IGameObject(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:IGameObject = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<IGameObject> = Vector.<IGameObject>(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++; } } } }