code
stringlengths 57
237k
|
|---|
package _codec.projects.tanks.client.clans.clan.clanmembersdata {
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.clans.clan.clanmembersdata.ClanMembersCC;
public class VectorCodecClanMembersCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecClanMembersCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ClanMembersCC,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.<ClanMembersCC> = new Vector.<ClanMembersCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ClanMembersCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ClanMembersCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ClanMembersCC> = Vector.<ClanMembersCC>(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.events {
import flash.events.Event;
public class RegistrationFormEvent extends Event {
public static const CLICK_REGISTRATION_BUTTON:String = "RegistrationFormEvent.CLICK_REGISTRATION_BUTTON";
public function RegistrationFormEvent() {
super(CLICK_REGISTRATION_BUTTON,true);
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_hpLeftBgRedCls extends BitmapAsset
{
public function ProgressBarSkin_hpLeftBgRedCls()
{
super();
}
}
}
|
package projects.tanks.client.clans.clan.outgoing {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class ClanOutgoingModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ClanOutgoingModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.panel.model.shop.shopcategory {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class ShopCategoryModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ShopCategoryModelServer;
private var client:IShopCategoryModelBase = IShopCategoryModelBase(this);
private var modelId:Long = Long.getLong(1873836778,65983182);
public function ShopCategoryModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ShopCategoryModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ShopCategoryCC,false)));
}
protected function getInitParam() : ShopCategoryCC {
return ShopCategoryCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.tank.criticalhit
{
import alternativa.console.ConsoleVarFloat;
import alternativa.engine3d.objects.Mesh;
import alternativa.init.Main;
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.model.IModel;
import alternativa.model.IObjectLoadListener;
import alternativa.object.ClientObject;
import alternativa.physics.collision.types.RayIntersection;
import alternativa.service.IModelService;
import alternativa.tanks.engine3d.MaterialSequence;
import alternativa.tanks.engine3d.MaterialType;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.services.materialregistry.IMaterialRegistry;
import alternativa.tanks.services.objectpool.IObjectPoolService;
import alternativa.tanks.sfx.AnimatedPlaneEffect;
import alternativa.tanks.sfx.AnimatedSpriteEffectNew;
import alternativa.tanks.sfx.MovingObject3DPositionProvider;
import alternativa.tanks.sfx.StaticObject3DPositionProvider;
import alternativa.tanks.utils.GraphicsUtils;
import alternativa.tanks.utils.objectpool.ObjectPool;
import com.alternativaplatform.projects.tanks.client.models.tank.criticalhit.ITankCriticalHitModelBase;
import com.alternativaplatform.projects.tanks.client.models.tank.criticalhit.TankCriticalHitModelBase;
import flash.display.BitmapData;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
public class TankCriticalHitModel extends TankCriticalHitModelBase implements ITankCriticalHitModelBase, IObjectLoadListener, ITankCriticalHitModel
{
private const EXPLOSION_SIZE:Number = 800;
private const SMOKE_SIZE:Number = 400;
private const SHOCKWAVE_SIZE:Number = 1000;
private const BASE_DIAGONAL:Number = 600;
private const MIN_SMOKE_SPEED:Number = 800;
private const SMOKE_SPEED_DELTA:Number = 200;
private const SMOKE_ACCELERATION:Number = -2000;
private const EXPLOSION_FPS:Number = 25;
private const SMOKE_FPS:Number = 15;
private var objectPoolService:IObjectPoolService;
private var materialRegistry:IMaterialRegistry;
private var explosionSize:ConsoleVarFloat;
private var smokeSize:ConsoleVarFloat;
private var scaleModifier:ConsoleVarFloat;
private var shockWaveScaleSpeed:ConsoleVarFloat;
private var battlefieldModel:IBattleField;
private var rayHit:RayIntersection;
private var position:Vector3;
private var eulerAngles:Vector3;
private var velocity:Vector3;
private var matrix:Matrix3;
public function TankCriticalHitModel()
{
this.objectPoolService = IObjectPoolService(Main.osgi.getService(IObjectPoolService));
this.materialRegistry = IMaterialRegistry(Main.osgi.getService(IMaterialRegistry));
this.explosionSize = new ConsoleVarFloat("tankexpl_size",this.EXPLOSION_SIZE,1,500);
this.scaleModifier = new ConsoleVarFloat("tankexpl_scale",1,0,10);
this.rayHit = new RayIntersection();
this.position = new Vector3();
this.eulerAngles = new Vector3();
this.velocity = new Vector3();
this.matrix = new Matrix3();
super();
_interfaces.push(IModel,IObjectLoadListener,ITankCriticalHitModel);
}
public function initObject(clientObject:ClientObject, explosionTextureId:String, shockWaveTextureId:String, smokeTextureId:String) : void
{
var modelService:IModelService = null;
if(this.battlefieldModel == null)
{
modelService = IModelService(Main.osgi.getService(IModelService));
this.battlefieldModel = Main.osgi.getService(IBattleField) as IBattleField;
}
var explosionSequence:MaterialSequence = this.getMaterialSequence(explosionTextureId,this.EXPLOSION_SIZE);
var explData:TextureAnimation = GraphicsUtils.getTextureAnimation(null,ResourceUtil.getResource(ResourceType.IMAGE,"criticalHitTexture").bitmapData,200,200);
explData.fps = 25;
var explosionSFXData:ExplosionData = new ExplosionData(explosionSequence,null,null);
explosionSFXData.explosionData = explData;
clientObject.putParams(TankCriticalHitModel,explosionSFXData);
}
public function objectLoaded(object:ClientObject) : void
{
}
public function objectUnloaded(object:ClientObject) : void
{
this.getData(object).release();
}
public function createExplosionEffects(clientObject:ClientObject, tankData:TankData) : void
{
var explosionData:ExplosionData = null;
explosionData = null;
var effectScale:Number = NaN;
var size:Number = NaN;
var minTime:Number = NaN;
var angle:Number = NaN;
var speed:Number = NaN;
var smokeSize:Number = NaN;
explosionData = this.getData(clientObject);
var objectPool:ObjectPool = this.objectPoolService.objectPool;
var hullMesh:Mesh = tankData.tank.skin.hullMesh;
var dx:Number = hullMesh.boundMaxX - hullMesh.boundMinX;
var dy:Number = hullMesh.boundMaxY - hullMesh.boundMinY;
var dz:Number = hullMesh.boundMaxZ - hullMesh.boundMinZ;
var diagonal:Number = Math.sqrt(dx * dx + dy * dy + dz * dz);
effectScale = this.scaleModifier.value * diagonal / this.BASE_DIAGONAL;
var dir:Vector3 = new Vector3(0,0,-1);
this.position.vCopy(tankData.tank.state.pos);
this.position.z += 50;
var explosion:AnimatedSpriteEffectNew = AnimatedSpriteEffectNew(objectPool.getObject(AnimatedSpriteEffectNew));
var animaton:TextureAnimation = explosionData.explosionData;
var pos:StaticObject3DPositionProvider = StaticObject3DPositionProvider(objectPool.getObject(StaticObject3DPositionProvider));
pos.init(this.position,200);
var explosionSize:Number = this.explosionSize.value * effectScale;
var explosionSequence:MaterialSequence = explosionData.explosionSequence;
explosionSequence.mipMapResolution = explosionSize / explosionSequence.frameWidth;
explosion.init(400,400,animaton,Math.random() * 2 * Math.PI,pos);
this.battlefieldModel.addGraphicEffect(explosion);
}
private function getData(clientObject:ClientObject) : ExplosionData
{
return ExplosionData(clientObject.getParams(TankCriticalHitModel));
}
private function getMaterialSequence(textureId:String, size:Number) : MaterialSequence
{
var texture:BitmapData = ResourceUtil.getResource(ResourceType.IMAGE,textureId).bitmapData;
var frameSize:int = texture.height;
return this.materialRegistry.materialSequenceRegistry.getSequence(MaterialType.EFFECT,texture,frameSize,size / frameSize);
}
}
}
import alternativa.tanks.engine3d.MaterialSequence;
import alternativa.tanks.engine3d.TextureAnimation;
class ExplosionData
{
public var explosionSequence:MaterialSequence;
public var shockWaveSequence:MaterialSequence;
public var smokeSequence:MaterialSequence;
public var explosionData:TextureAnimation;
public var shockData:TextureAnimation;
public var smokeData:TextureAnimation;
function ExplosionData(explosionSequence:MaterialSequence, shockWaveSequence:MaterialSequence, smokeSequence:MaterialSequence)
{
super();
this.explosionSequence = explosionSequence;
this.shockWaveSequence = shockWaveSequence;
this.smokeSequence = smokeSequence;
}
public function release() : void
{
this.explosionSequence.release();
this.shockWaveSequence.release();
this.smokeSequence.release();
}
}
|
package projects.tanks.client.panel.model.personaldiscount {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import projects.tanks.client.panel.model.garage.GarageItemInfo;
public class PersonalDiscountModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PersonalDiscountModelServer;
private var client:IPersonalDiscountModelBase = IPersonalDiscountModelBase(this);
private var modelId:Long = Long.getLong(897429325,1733728636);
private var _showPersonalDiscountId:Long = Long.getLong(552793109,-485726833);
private var _showPersonalDiscount_itemInfoCodec:ICodec;
private var _showPersonalDiscount_totalDiscountInPercentCodec:ICodec;
private var _showPersonalDiscount_priceWithDiscountCodec:ICodec;
private var _showPersonalDiscount_durationInSecCodec:ICodec;
public function PersonalDiscountModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PersonalDiscountModelServer(IModel(this));
this._showPersonalDiscount_itemInfoCodec = this._protocol.getCodec(new TypeCodecInfo(GarageItemInfo,false));
this._showPersonalDiscount_totalDiscountInPercentCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._showPersonalDiscount_priceWithDiscountCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._showPersonalDiscount_durationInSecCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showPersonalDiscountId:
this.client.showPersonalDiscount(GarageItemInfo(this._showPersonalDiscount_itemInfoCodec.decode(param2)),int(this._showPersonalDiscount_totalDiscountInPercentCodec.decode(param2)),int(this._showPersonalDiscount_priceWithDiscountCodec.decode(param2)),int(this._showPersonalDiscount_durationInSecCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.engine3d.core {
public class ShadowMap {
public var mapSize:int;
public var nearDistance:Number;
public var farDistance:Number;
public var bias:Number = 0;
public var additionalSpace:Number = 0;
public var alphaThreshold:Number = 0.1;
public function ShadowMap(param1:int, param2:Number, param3:Number, param4:Number = 0, param5:Number = 0) {
super();
this.mapSize = param1;
this.nearDistance = param2;
this.farDistance = param3;
this.bias = param4;
this.additionalSpace = param5;
}
public function dispose() : void {
}
}
}
|
package alternativa.tanks.sound {
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.sfx.ISound3DEffect;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
public class DummySoundManager implements ISoundManager {
public function DummySoundManager() {
super();
}
public function set maxDistance(param1:Number) : void {
}
public function playSound(param1:Sound, param2:int = 0, param3:int = 0, param4:SoundTransform = null) : SoundChannel {
return null;
}
public function stopSound(param1:SoundChannel) : void {
}
public function stopAllSounds() : void {
}
public function addEffect(param1:ISound3DEffect) : void {
}
public function removeEffect(param1:ISound3DEffect) : void {
}
public function removeAllEffects() : void {
}
public function updateSoundEffects(param1:int, param2:GameCamera) : void {
}
public function setMute(param1:Boolean) : void {
}
}
}
|
package alternativa.tanks.models.weapon.terminator {
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponConst;
import alternativa.tanks.models.weapon.railgun.IRailgunSFXModel;
import alternativa.tanks.models.weapon.rocketlauncher.sfx.RocketLauncherEffects;
import alternativa.tanks.models.weapon.terminator.sfx.TerminatorEffects;
import alternativa.tanks.models.weapon.terminator.sfx.TerminatorSFX;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.terminator.TerminatorCC;
public class TerminatorCommonWeapon {
private var gunParams:AllGlobalGunParams;
private var _weaponObject:TerminatorObject;
private var weaponPlatform:WeaponPlatform;
private var _effects:TerminatorEffects;
private var _initParam:TerminatorCC;
private var _object:IGameObject;
private var _user:IGameObject;
public function TerminatorCommonWeapon(param1:IGameObject, param2:IGameObject, param3:TerminatorObject, param4:TerminatorCC) {
super();
this._weaponObject = param3;
this._initParam = param4;
this._object = param1;
this._user = param2;
}
public function init(param1:WeaponPlatform, param2:AllGlobalGunParams) : void {
this.weaponPlatform = param1;
this.gunParams = param2;
this._effects = new TerminatorEffects(this.weaponObject,TerminatorSFX(this.object.adapt(TerminatorSFX)).getSfxData(),param1.getTurret3D(),new RocketLauncherEffects(this.weaponObject.rocketLauncherObject.getSfxData(),param1.getTurret3D()),IRailgunSFXModel(this._object.adapt(IRailgunSFXModel)).getEffects());
}
public function resetEffects() : void {
if(this._effects != null) {
this._effects.reset();
}
}
public function get weaponObject() : TerminatorObject {
return this._weaponObject;
}
public function get effects() : TerminatorEffects {
return this._effects;
}
public function get object() : IGameObject {
return this._object;
}
public function get user() : IGameObject {
return this._user;
}
public function get initParam() : TerminatorCC {
return this._initParam;
}
public function createPrimaryChargeEffects(param1:int) : void {
this._effects.railgunEffects.createChargeEffect(this.weaponPlatform.getLocalMuzzlePosition(param1),this.weaponPlatform.getTurret3D(),this._initParam.primaryCC.chargingTimeMsec);
this.weaponPlatform.getAllGunParams(this.gunParams,param1);
this._effects.railgunEffects.createSoundEffect(this.gunParams.muzzlePosition,0);
}
public function createSecondaryShotEffects(param1:int) : void {
this.weaponPlatform.getBody().addWorldForceScaled(this.gunParams.muzzlePosition,this.gunParams.direction,-this._initParam.secondaryKickback * WeaponConst.BASE_IMPACT_FORCE.getNumber());
this.weaponPlatform.addDust();
this._effects.rocketLauncherEffects.playShotEffect(this.gunParams.muzzlePosition,param1);
}
public function destroy() : void {
this._effects.close();
this._weaponObject = null;
this._initParam = null;
this._effects = null;
this._object = null;
this._user = null;
}
}
}
|
package projects.tanks.client.panel.model.mobilequest.profile {
import alternativa.types.Long;
public class MobileQuestProfileCC {
private var _currentStep:int;
private var _eventMember:Boolean;
private var _remainingTimeInSec:Long;
public function MobileQuestProfileCC(param1:int = 0, param2:Boolean = false, param3:Long = null) {
super();
this._currentStep = param1;
this._eventMember = param2;
this._remainingTimeInSec = param3;
}
public function get currentStep() : int {
return this._currentStep;
}
public function set currentStep(param1:int) : void {
this._currentStep = param1;
}
public function get eventMember() : Boolean {
return this._eventMember;
}
public function set eventMember(param1:Boolean) : void {
this._eventMember = param1;
}
public function get remainingTimeInSec() : Long {
return this._remainingTimeInSec;
}
public function set remainingTimeInSec(param1:Long) : void {
this._remainingTimeInSec = param1;
}
public function toString() : String {
var local1:String = "MobileQuestProfileCC [";
local1 += "currentStep = " + this.currentStep + " ";
local1 += "eventMember = " + this.eventMember + " ";
local1 += "remainingTimeInSec = " + this.remainingTimeInSec + " ";
return local1 + "]";
}
}
}
|
package alternativa.engine3d.core {
import alternativa.gfx.agal.VertexShader;
public class ShadowReceiverVertexShader extends VertexShader {
public function ShadowReceiverVertexShader(param1:Boolean) {
super();
dp4(vt0.x,va0,vc[11]);
dp4(vt0.y,va0,vc[12]);
dp4(vt0.z,va0,vc[13]);
mov(vt0.w,va0);
dp4(vt1,vt0,vc[15]);
dp4(vt1.y,vt0,vc[16]);
mul(vt1.xy,vt1,vc[19]);
add(v0.xy,vt1,vc[20]);
dp4(v0.zw,vt0,vc[17]);
div(vt1.z,vc[14].w,vt0);
add(vt1.z,vt1,vc[14]);
mul(vt1.z,vt1,vc[14].x);
sub(vt1.z,vt1,vc[14].y);
div(vt1.z,vt1,vc[14].x);
sub(vt1.z,vt1,vc[14]);
div(vt1.z,vc[14].w,vt1);
mov(vt2,vc[20]);
nrm(vt2.xyz,vt0.xyz);
sub(vt1.z,vt0,vt1);
div(vt1.z,vt1,vt2);
mul(vt2,vt2,vt1.z);
sub(vt0,vt0,vt2);
if(param1) {
mul(vt0.xy,vt0,vc[18]);
mul(vt1.xy,vc[18].zw,vt0.z);
add(vt0.xy,vt0,vt1);
}
mov(op.xw,vt0.xz);
neg(op.y,vt0);
mul(vt0.z,vt0,vc[14]);
add(op.z,vt0,vc[14].w);
}
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.weakening
{
import scpacker.Base;
public class WeaponWeakeningModelBase extends Base
{
public function WeaponWeakeningModelBase()
{
super();
}
}
}
|
package projects.tanks.client.battlefield.models.user.suicide {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class SuicideModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:SuicideModelServer;
private var client:ISuicideModelBase = ISuicideModelBase(this);
private var modelId:Long = Long.getLong(528941690,1765829096);
private var _suicideId:Long = Long.getLong(1484172224,917467553);
private var _suicide_respawnDelayCodec:ICodec;
public function SuicideModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new SuicideModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SuicideCC,false)));
this._suicide_respawnDelayCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
protected function getInitParam() : SuicideCC {
return SuicideCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._suicideId:
this.client.suicide(int(this._suicide_respawnDelayCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package {
import flash.display.MovieClip;
[Embed(source="/_assets/assets.swf", symbol="symbol282")]
public dynamic class SliderTrack_disabledSkin extends MovieClip {
public function SliderTrack_disabledSkin() {
super();
}
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.gun
{
import scpacker.Base;
public class GunModelBase extends Base
{
public function GunModelBase()
{
super();
}
}
}
|
package alternativa.tanks.models.weapons.targeting.debug {
import alternativa.engine3d.primitives.Box;
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
public class TargetingVisualDebug {
[Inject]
public static var battleService:BattleService;
private static var targetingDebug:ConsoleVarInt = new ConsoleVarInt("targeting_debug",0,0,1);
private var boxes:Vector.<Box> = new Vector.<Box>();
private var xAxis:Vector3 = new Vector3();
private var zAxis:Vector3 = new Vector3();
private var rotationMatrix:Matrix3 = new Matrix3();
public function TargetingVisualDebug() {
super();
}
public function reset() : void {
}
public function addRay(param1:AllGlobalGunParams, param2:Vector3, param3:Number, param4:Vector3 = null) : void {
}
private function createBox(param1:Number, param2:Number, param3:Number, param4:uint = 65535) : Box {
return null;
}
}
}
|
package alternativa.resource
{
import alternativa.types.Long;
public class ResourceStatus
{
public static const QUEUED:String = "В очереди";
public static const INFO_REQUESTED:String = "Запрошен info.xml";
public static const INFO_LOADED:String = "info.xml загружен";
public static const REQUESTED:String = "Запрошен";
public static const LOADED:String = "Загружен";
public static const LOAD_ERROR:String = "Ошибка загрузки";
public static const UNLOADED:String = "Выгружен";
public var id:Long;
public var batchId:int;
public var typeName:String;
public var name:String;
public var status:String;
public function ResourceStatus(id:Long, batchId:int, typeName:String, name:String, status:String)
{
super();
this.id = id;
this.batchId = batchId;
this.typeName = typeName;
this.name = name;
this.status = status;
}
}
}
|
package alternativa.tanks.model.payment.modes.description {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PayModeBottomDescriptionInternalEvents implements PayModeBottomDescriptionInternal {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function PayModeBottomDescriptionInternalEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function setEnabled(param1:Boolean) : void {
var i:int = 0;
var m:PayModeBottomDescriptionInternal = null;
var enabled:Boolean = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PayModeBottomDescriptionInternal(this.impl[i]);
m.setEnabled(enabled);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.model.item.discount.proabonement {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ProAbonementRankDiscountEvents implements ProAbonementRankDiscount {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ProAbonementRankDiscountEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getRankDiscount() : int {
var result:int = 0;
var i:int = 0;
var m:ProAbonementRankDiscount = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ProAbonementRankDiscount(this.impl[i]);
result = int(m.getRankDiscount());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.gfx.agal {
import flash.utils.ByteArray;
import flash.utils.Endian;
public class Shader {
public static const v0:CommonRegister = new CommonRegister(0,4);
public static const v1:CommonRegister = new CommonRegister(1,4);
public static const v2:CommonRegister = new CommonRegister(2,4);
public static const v3:CommonRegister = new CommonRegister(3,4);
public static const v4:CommonRegister = new CommonRegister(4,4);
public static const v5:CommonRegister = new CommonRegister(5,4);
public static const v6:CommonRegister = new CommonRegister(6,4);
public static const v7:CommonRegister = new CommonRegister(7,4);
public static const cc:RelativeRegister = new RelativeRegister(0,1);
protected static const MOV:int = 0;
protected static const ADD:int = 1;
protected static const SUB:int = 2;
protected static const MUL:int = 3;
protected static const DIV:int = 4;
protected static const RCP:int = 5;
protected static const MIN:int = 6;
protected static const MAX:int = 7;
protected static const FRC:int = 8;
protected static const SQT:int = 9;
protected static const RSQ:int = 10;
protected static const POW:int = 11;
protected static const LOG:int = 12;
protected static const EXP:int = 13;
protected static const NRM:int = 14;
protected static const SIN:int = 15;
protected static const COS:int = 16;
protected static const CRS:int = 17;
protected static const DP3:int = 18;
protected static const DP4:int = 19;
protected static const ABS:int = 20;
protected static const NEG:int = 21;
protected static const SAT:int = 22;
protected static const M33:int = 23;
protected static const M44:int = 24;
protected static const M34:int = 25;
protected static const DDX:int = 26;
protected static const DDY:int = 27;
protected static const IFE:int = 28;
protected static const INE:int = 29;
protected static const IFG:int = 30;
protected static const IFL:int = 31;
protected static const ELS:int = 32;
protected static const EIF:int = 33;
protected static const TED:int = 38;
protected static const KIL:int = 39;
protected static const TEX:int = 40;
protected static const SGE:int = 41;
protected static const SLT:int = 42;
protected static const SGN:int = 43;
protected static const SEQ:int = 44;
protected static const SNE:int = 45;
protected var data:ByteArray;
public function Shader() {
super();
this.data = new ByteArray();
this.data.endian = Endian.LITTLE_ENDIAN;
this.data.writeByte(160);
this.data.writeUnsignedInt(1);
this.data.writeByte(161);
}
public function mov(param1:Register, param2:Register) : void {
this.op2(MOV,param1,param2);
}
public function add(param1:Register, param2:Register, param3:Register) : void {
this.op3(ADD,param1,param2,param3);
}
public function sub(param1:Register, param2:Register, param3:Register) : void {
this.op3(SUB,param1,param2,param3);
}
public function mul(param1:Register, param2:Register, param3:Register) : void {
this.op3(MUL,param1,param2,param3);
}
public function div(param1:Register, param2:Register, param3:Register) : void {
this.op3(DIV,param1,param2,param3);
}
public function rcp(param1:Register, param2:Register) : void {
this.op2(RCP,param1,param2);
}
public function min(param1:Register, param2:Register, param3:Register) : void {
this.op3(MIN,param1,param2,param3);
}
public function max(param1:Register, param2:Register, param3:Register) : void {
this.op3(MAX,param1,param2,param3);
}
public function frc(param1:Register, param2:Register) : void {
this.op2(FRC,param1,param2);
}
public function sqt(param1:Register, param2:Register) : void {
this.op2(SQT,param1,param2);
}
public function rsq(param1:Register, param2:Register) : void {
this.op2(RSQ,param1,param2);
}
public function pow(param1:Register, param2:Register, param3:Register) : void {
this.op3(POW,param1,param2,param3);
}
public function log(param1:Register, param2:Register) : void {
this.op2(LOG,param1,param2);
}
public function exp(param1:Register, param2:Register) : void {
this.op2(EXP,param1,param2);
}
public function nrm(param1:Register, param2:Register) : void {
this.op2(NRM,param1,param2);
}
public function sin(param1:Register, param2:Register) : void {
this.op2(SIN,param1,param2);
}
public function cos(param1:Register, param2:Register) : void {
this.op2(COS,param1,param2);
}
public function crs(param1:Register, param2:Register, param3:Register) : void {
this.op3(CRS,param1,param2,param3);
}
public function dp3(param1:Register, param2:Register, param3:Register) : void {
this.op3(DP3,param1,param2,param3);
}
public function dp4(param1:Register, param2:Register, param3:Register) : void {
this.op3(DP4,param1,param2,param3);
}
public function abs(param1:Register, param2:Register) : void {
this.op2(ABS,param1,param2);
}
public function neg(param1:Register, param2:Register) : void {
this.op2(NEG,param1,param2);
}
public function sat(param1:Register, param2:Register) : void {
this.op2(SAT,param1,param2);
}
public function m33(param1:Register, param2:Register, param3:Register) : void {
this.op3(M33,param1,param2,param3);
}
public function m44(param1:Register, param2:Register, param3:Register) : void {
this.op3(M44,param1,param2,param3);
}
public function m34(param1:Register, param2:Register, param3:Register) : void {
this.op3(M34,param1,param2,param3);
}
public function sge(param1:Register, param2:Register, param3:Register) : void {
this.op3(SGE,param1,param2,param3);
}
public function slt(param1:Register, param2:Register, param3:Register) : void {
this.op3(SLT,param1,param2,param3);
}
public function sgn(param1:Register, param2:Register, param3:Register) : void {
this.op3(SGN,param1,param2,param3);
}
public function seq(param1:Register, param2:Register, param3:Register) : void {
this.op3(SEQ,param1,param2,param3);
}
public function sne(param1:Register, param2:Register, param3:Register) : void {
this.op3(SNE,param1,param2,param3);
}
protected function op2(param1:int, param2:Register, param3:Register) : void {
this.data.writeUnsignedInt(param1);
param2.writeDest(this.data);
param3.writeSource(this.data);
this.data.writeUnsignedInt(0);
this.data.writeUnsignedInt(0);
}
protected function op3(param1:int, param2:Register, param3:Register, param4:Register) : void {
this.data.writeUnsignedInt(param1);
param2.writeDest(this.data);
param3.writeSource(this.data);
param4.writeSource(this.data);
}
public function get agalcode() : ByteArray {
return this.data;
}
}
}
|
package projects.tanks.client.chat.models.clanchat.clanchat {
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.registry.ModelRegistry;
import projects.tanks.client.chat.types.ChatMessage;
public class ClanChatModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanChatModelServer;
private var client:IClanChatModelBase = IClanChatModelBase(this);
private var modelId:Long = Long.getLong(207484105,-2003218757);
private var _receiveMessageId:Long = Long.getLong(1427006127,1489654476);
private var _receiveMessage_messageCodec:ICodec;
private var _showMessagesHistoryId:Long = Long.getLong(485375957,-1291947355);
private var _showMessagesHistory_chatMessagesCodec:ICodec;
public function ClanChatModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanChatModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ClanChatCC,false)));
this._receiveMessage_messageCodec = this._protocol.getCodec(new TypeCodecInfo(ChatMessage,false));
this._showMessagesHistory_chatMessagesCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(ChatMessage,false),false,1));
}
protected function getInitParam() : ClanChatCC {
return ClanChatCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._receiveMessageId:
this.client.receiveMessage(ChatMessage(this._receiveMessage_messageCodec.decode(param2)));
break;
case this._showMessagesHistoryId:
this.client.showMessagesHistory(this._showMessagesHistory_chatMessagesCodec.decode(param2) as Vector.<ChatMessage>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.scroller.blue {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.scroller.blue.ScrollSkinBlue_thumbMiddle.png")]
public class ScrollSkinBlue_thumbMiddle extends BitmapAsset {
public function ScrollSkinBlue_thumbMiddle() {
super();
}
}
}
|
package alternativa.engine3d.loaders.events {
import flash.events.ErrorEvent;
import flash.events.Event;
public class LoaderErrorEvent extends ErrorEvent {
public static const LOADER_ERROR:String = "loaderError";
private var _url:String;
public function LoaderErrorEvent(param1:String, param2:String, param3:String) {
super(param1);
this.text = param3;
this._url = param2;
}
public function get url() : String {
return this._url;
}
override public function clone() : Event {
return new LoaderErrorEvent(type,this._url,text);
}
override public function toString() : String {
return "[LoaderErrorEvent url=" + this._url + ", text=" + text + "]";
}
}
}
|
package alternativa.tanks.model.payment.modes.paygarden {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.panel.model.payment.modes.paygarden.PayGardenProductType;
public class PayGardenPaymentAdapt implements PayGardenPayment {
private var object:IGameObject;
private var impl:PayGardenPayment;
public function PayGardenPaymentAdapt(param1:IGameObject, param2:PayGardenPayment) {
super();
this.object = param1;
this.impl = param2;
}
public function getProductType() : PayGardenProductType {
var result:PayGardenProductType = null;
try {
Model.object = this.object;
result = this.impl.getProductType();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.sfx {
import alternativa.engine3d.core.Light3D;
import alternativa.engine3d.lights.OmniLight;
import alternativa.engine3d.lights.SpotLight;
import alternativa.engine3d.lights.TubeLight;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightEffectItem;
public final class LightAnimation {
private var frames:int;
private var time:Vector.<uint>;
private var intensity:Vector.<Number>;
private var color:Vector.<uint>;
private var attenuationBegin:Vector.<Number>;
private var attenuationEnd:Vector.<Number>;
public function LightAnimation(param1:Vector.<LightEffectItem>) {
var local3:LightEffectItem = null;
super();
this.frames = param1.length;
this.intensity = new Vector.<Number>(this.frames,true);
this.color = new Vector.<uint>(this.frames,true);
this.attenuationBegin = new Vector.<Number>(this.frames,true);
this.attenuationEnd = new Vector.<Number>(this.frames,true);
this.time = new Vector.<uint>(this.frames,true);
var local2:int = 0;
while(local2 < this.frames) {
local3 = param1[local2];
this.intensity[local2] = Number(local3.intensity);
this.color[local2] = uint(local3.color);
this.attenuationBegin[local2] = Number(local3.attenuationBegin);
this.attenuationEnd[local2] = Number(local3.attenuationEnd);
this.time[local2] = uint(local3.time);
local2++;
}
}
private static function lerpNumber(param1:Number, param2:Number, param3:Number) : Number {
return param1 + (param2 - param1) * param3;
}
private static function lerpColor(param1:uint, param2:uint, param3:Number) : uint {
var local4:Number = (param1 >> 16 & 0xFF) / 255;
var local5:Number = (param1 >> 8 & 0xFF) / 255;
var local6:Number = (param1 & 0xFF) / 255;
var local7:Number = (param2 >> 16 & 0xFF) / 255;
var local8:Number = (param2 >> 8 & 0xFF) / 255;
var local9:Number = (param2 & 0xFF) / 255;
var local10:int = lerpNumber(local4,local7,param3) * 255;
var local11:int = lerpNumber(local5,local8,param3) * 255;
var local12:int = lerpNumber(local6,local9,param3) * 255;
return local10 << 16 | local11 << 8 | local12;
}
private function getFrameByTime(param1:Number) : Number {
var local3:int = 0;
var local4:Number = NaN;
var local5:Number = NaN;
var local6:Number = NaN;
var local2:Number = 0;
if(param1 < this.time[this.frames - 1]) {
local3 = 0;
while(local3 < this.frames - 1) {
local4 = this.time[local3];
local5 = this.time[local3 + 1];
if(param1 >= local4 && param1 < local5) {
local6 = (param1 - local4) / (local5 - local4);
local2 = local3 + local6;
break;
}
local3++;
}
} else {
local2 = this.frames - 1;
}
return local2;
}
public function getFramesCount() : int {
return this.frames;
}
private function limitFrame(param1:int) : int {
return param1 < this.frames ? param1 : this.frames - 1;
}
private function updateSpotLight(param1:Number, param2:SpotLight) : void {
var local3:int = this.limitFrame(Math.floor(param1));
var local4:int = this.limitFrame(Math.ceil(param1));
var local5:Number = param1 - local3;
var local6:Number = this.intensity[local3];
var local7:Number = this.intensity[local4];
var local8:uint = this.color[local3];
var local9:uint = this.color[local4];
var local10:Number = this.attenuationBegin[local3];
var local11:Number = this.attenuationBegin[local4];
var local12:Number = this.attenuationEnd[local3];
var local13:Number = this.attenuationEnd[local4];
param2.intensity = lerpNumber(local6,local7,local5);
param2.color = lerpColor(local8,local9,local5);
param2.attenuationBegin = lerpNumber(local10,local11,local5);
param2.attenuationEnd = lerpNumber(local12,local13,local5);
}
private function updateOmniLight(param1:Number, param2:OmniLight) : void {
var local3:int = this.limitFrame(Math.floor(param1));
var local4:int = this.limitFrame(Math.ceil(param1));
var local5:Number = param1 - local3;
var local6:Number = this.intensity[local3];
var local7:Number = this.intensity[local4];
var local8:uint = this.color[local3];
var local9:uint = this.color[local4];
var local10:Number = this.attenuationBegin[local3];
var local11:Number = this.attenuationBegin[local4];
var local12:Number = this.attenuationEnd[local3];
var local13:Number = this.attenuationEnd[local4];
param2.intensity = lerpNumber(local6,local7,local5);
param2.color = lerpColor(local8,local9,local5);
param2.attenuationBegin = lerpNumber(local10,local11,local5);
param2.attenuationEnd = lerpNumber(local12,local13,local5);
}
private function updateTubeLight(param1:Number, param2:TubeLight) : void {
var local3:int = this.limitFrame(Math.floor(param1));
var local4:int = this.limitFrame(Math.ceil(param1));
var local5:Number = param1 - local3;
var local6:Number = this.intensity[local3];
var local7:Number = this.intensity[local4];
var local8:uint = this.color[local3];
var local9:uint = this.color[local4];
var local10:Number = this.attenuationBegin[local3];
var local11:Number = this.attenuationBegin[local4];
var local12:Number = this.attenuationEnd[local3];
var local13:Number = this.attenuationEnd[local4];
param2.intensity = lerpNumber(local6,local7,local5);
param2.color = lerpColor(local8,local9,local5);
param2.attenuationBegin = lerpNumber(local10,local11,local5);
param2.attenuationEnd = lerpNumber(local12,local13,local5);
}
public function updateByTime(param1:Light3D, param2:int, param3:int = -1) : void {
var local4:Number = 1;
if(param3 > 0 && this.frames > 0) {
local4 = this.time[this.frames - 1] / param3;
}
var local5:Number = this.getFrameByTime(param2 * local4);
this.updateByFrame(param1,local5);
}
private function updateByFrame(param1:Light3D, param2:Number) : void {
if(param1 is OmniLight) {
this.updateOmniLight(param2,OmniLight(param1));
} else if(param1 is SpotLight) {
this.updateSpotLight(param2,SpotLight(param1));
} else if(param1 is TubeLight) {
this.updateTubeLight(param2,TubeLight(param1));
}
param1.calculateBounds();
}
public function getLiveTime() : int {
return this.time[this.frames - 1];
}
}
}
|
package alternativa.tanks.models.weapon.splash {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class SplashEvents implements Splash {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function SplashEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function applySplashForce(param1:Vector3, param2:Number, param3:Body, param4:SplashParams = null) : Boolean {
var result:Boolean = false;
var i:int = 0;
var m:Splash = null;
var hitPoint:Vector3 = param1;
var impactCoeff:Number = param2;
var excludedTarget:Body = param3;
var splashParams:SplashParams = param4;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = Splash(this.impl[i]);
result = Boolean(m.applySplashForce(hitPoint,impactCoeff,excludedTarget,splashParams));
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.weapon.smoky {
import alternativa.math.Vector3;
import alternativa.physics.Body;
[ModelInterface]
public interface SmokyCallback {
function onShot(param1:int) : void;
function onShotStatic(param1:int, param2:Vector3) : void;
function onShotTarget(param1:int, param2:Vector3, param3:Body) : void;
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity {
import alternativa.types.Long;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.types.Vector3d;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CommonFacilityCC {
private var _facilityObject:Tanks3DSResource;
private var _facilityTeam:BattleTeam;
private var _facilityTexture:TextureResource;
private var _localCenter:Vector3d;
private var _ownerId:Long;
private var _position:Vector3d;
private var _rotation:Vector3d;
private var _useLight:Boolean;
private var _useShadows:Boolean;
public function CommonFacilityCC(param1:Tanks3DSResource = null, param2:BattleTeam = null, param3:TextureResource = null, param4:Vector3d = null, param5:Long = null, param6:Vector3d = null, param7:Vector3d = null, param8:Boolean = false, param9:Boolean = false) {
super();
this._facilityObject = param1;
this._facilityTeam = param2;
this._facilityTexture = param3;
this._localCenter = param4;
this._ownerId = param5;
this._position = param6;
this._rotation = param7;
this._useLight = param8;
this._useShadows = param9;
}
public function get facilityObject() : Tanks3DSResource {
return this._facilityObject;
}
public function set facilityObject(param1:Tanks3DSResource) : void {
this._facilityObject = param1;
}
public function get facilityTeam() : BattleTeam {
return this._facilityTeam;
}
public function set facilityTeam(param1:BattleTeam) : void {
this._facilityTeam = param1;
}
public function get facilityTexture() : TextureResource {
return this._facilityTexture;
}
public function set facilityTexture(param1:TextureResource) : void {
this._facilityTexture = param1;
}
public function get localCenter() : Vector3d {
return this._localCenter;
}
public function set localCenter(param1:Vector3d) : void {
this._localCenter = param1;
}
public function get ownerId() : Long {
return this._ownerId;
}
public function set ownerId(param1:Long) : void {
this._ownerId = param1;
}
public function get position() : Vector3d {
return this._position;
}
public function set position(param1:Vector3d) : void {
this._position = param1;
}
public function get rotation() : Vector3d {
return this._rotation;
}
public function set rotation(param1:Vector3d) : void {
this._rotation = param1;
}
public function get useLight() : Boolean {
return this._useLight;
}
public function set useLight(param1:Boolean) : void {
this._useLight = param1;
}
public function get useShadows() : Boolean {
return this._useShadows;
}
public function set useShadows(param1:Boolean) : void {
this._useShadows = param1;
}
public function toString() : String {
var local1:String = "CommonFacilityCC [";
local1 += "facilityObject = " + this.facilityObject + " ";
local1 += "facilityTeam = " + this.facilityTeam + " ";
local1 += "facilityTexture = " + this.facilityTexture + " ";
local1 += "localCenter = " + this.localCenter + " ";
local1 += "ownerId = " + this.ownerId + " ";
local1 += "position = " + this.position + " ";
local1 += "rotation = " + this.rotation + " ";
local1 += "useLight = " + this.useLight + " ";
local1 += "useShadows = " + this.useShadows + " ";
return local1 + "]";
}
}
}
|
package controls.buttons.h30px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h30px.GrayFrameMediumLabelSkin_middle.png")]
public class GrayFrameMediumLabelSkin_middle extends BitmapAsset {
public function GrayFrameMediumLabelSkin_middle() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank30.png")]
public class PremiumRankBitmaps_bitmapBigRank30 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapBigRank30() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.user.reloader {
public interface ITankReloaderModelBase {
function die(param1:int) : void;
function onDeathScheduled(param1:int) : void;
function onReload() : void;
}
}
|
package alternativa.tanks.models.battle.meteor.nuclear {
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Object3DContainer;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.engine3d.objects.Sprite3D;
import flash.display.BlendMode;
import flash.geom.Vector3D;
public class NuclearExplosion {
private static var flameMaterial:TextureMaterial = null;
private static var smokeMaterial:TextureMaterial = null;
private static var lightMaterial:TextureMaterial = null;
private static var waveMaterial:TextureMaterial = null;
private static const SIZE:Number = 550;
internal static const COUNT1:int = 20;
internal static const RADIUS1:Number = 1000;
internal static const HEIGHT1:Number = 2000;
internal static const COUNT2:int = 15;
internal static const RADIUS2:Number = 850;
internal static const HEIGHT2:Number = HEIGHT1 + SIZE * 0.6;
internal static const COUNT3:int = 11;
internal static const RADIUS3:Number = 650;
internal static const HEIGHT3:Number = HEIGHT2 + SIZE * 0.4;
internal static const COUNT4:int = 7;
internal static const RADIUS4:Number = 290;
internal static const HEIGHT4:Number = HEIGHT3 + SIZE * 0.3;
internal static const COUNT5:int = 12;
internal static const RADIUS5:Number = 800;
internal static const HEIGHT5:Number = HEIGHT1 + SIZE * 0.1;
internal static const COUNT6:int = 2;
internal static const RADIUS6:Number = 50;
internal static const HEIGHT6:Number = HEIGHT1 - SIZE * 0.5;
internal static const COUNT7:int = 3;
internal static const RADIUS7:Number = 120;
internal static const HEIGHT7:Number = HEIGHT6 - SIZE * 0.5;
internal static const COUNT8:int = 4;
internal static const RADIUS8:Number = 200;
internal static const HEIGHT8:Number = HEIGHT7 - SIZE * 0.5;
internal static const COUNT9:int = 4;
internal static const RADIUS9:Number = 160;
internal static const HEIGHT9:Number = HEIGHT8 - SIZE * 0.2;
internal static const COUNT10:int = 3;
internal static const RADIUS10:Number = 50;
internal static const HEIGHT10:Number = HEIGHT9 - SIZE * 0.6;
internal static const COUNT11:int = 6;
internal static const RADIUS11:Number = 150;
internal static const HEIGHT11:Number = HEIGHT10 - SIZE * 0.5;
internal static const COUNT12:int = 9;
internal static const RADIUS12:Number = 450;
internal static const HEIGHT12:Number = HEIGHT11 - SIZE * 0.4;
internal static const COUNT13:int = 10;
internal static const RADIUS13:Number = 550;
internal static const HEIGHT13:Number = HEIGHT12 - SIZE * 0.1;
internal static const KEY1:Number = 10 / 60;
internal static const KEY2:Number = 120 / 60;
internal static const END:Number = 160 / 60;
internal static const SPEED:Number = 90;
internal static const OFFSET:Number = RADIUS1 + SIZE;
private static const vector:Vector3D = new Vector3D();
private var container:Object3DContainer;
private var camera:Camera3D;
private var epicenter:Vector3D = new Vector3D();
private var sprites:Vector.<Sprite3D> = new Vector.<Sprite3D>();
private var directions:Vector.<Vector3D> = new Vector.<Vector3D>();
private var light:Sprite3D = new Sprite3D(5000,5000,lightMaterial);
private var wave:Mesh = new Mesh();
private var time:Number = 0;
public function NuclearExplosion(param1:Object3DContainer, param2:Camera3D, param3:Number, param4:Number, param5:Number) {
super();
this.container = param1;
this.camera = param2;
this.epicenter.x = param3;
this.epicenter.y = param4;
this.epicenter.z = param5;
this.createRound(COUNT1,RADIUS1,HEIGHT1,0.6,0,true);
this.createRound(COUNT2,RADIUS2,HEIGHT2,0.6,0,true);
this.createRound(COUNT3,RADIUS3,HEIGHT3,0.6,0,true);
this.createRound(COUNT4,RADIUS4,HEIGHT4,0.6,0,true);
this.createRound(COUNT5,RADIUS5,HEIGHT5,0.7,0.4,false);
this.createRound(COUNT6,RADIUS6,HEIGHT6,0.6,0,true);
this.createRound(COUNT7,RADIUS7,HEIGHT7,0.6,-0.4,true);
this.createRound(COUNT8,RADIUS8,HEIGHT8,0.6,0,true);
this.createRound(COUNT9,RADIUS9,HEIGHT9,0.7,-0.2,false);
this.createRound(COUNT10,RADIUS10,HEIGHT10,0.6,-0.3,true);
this.createRound(COUNT11,RADIUS11,HEIGHT11,0.6,0,true);
this.createRound(COUNT12,RADIUS12,HEIGHT12,0.6,0,true);
this.createRound(COUNT13,RADIUS13,HEIGHT13,0.7,-0.2,false);
this.light.useLight = false;
this.light.useShadowMap = false;
this.light.blendMode = BlendMode.ADD;
this.light.softAttenuation = 400;
param1.addChild(this.light);
var local6:Number = 2000;
var local7:Vertex = this.wave.addVertex(-local6,local6,0,0,0);
var local8:Vertex = this.wave.addVertex(-local6,-local6,0,0,1);
var local9:Vertex = this.wave.addVertex(local6,-local6,0,1,1);
var local10:Vertex = this.wave.addVertex(local6,local6,0,1,0);
this.wave.addQuadFace(local7,local8,local9,local10,waveMaterial);
this.wave.addQuadFace(local7,local10,local9,local8,waveMaterial);
this.wave.calculateFacesNormals();
this.wave.calculateBounds();
this.wave.useLight = false;
this.wave.useShadowMap = false;
this.wave.shadowMapAlphaThreshold = 2;
this.wave.depthMapAlphaThreshold = 2;
this.wave.blendMode = BlendMode.ADD;
this.wave.softAttenuation = 80;
param1.addChild(this.wave);
}
private function createRound(param1:int, param2:Number, param3:Number, param4:Number, param5:Number, param6:Boolean) : void {
var local9:Vector3D = null;
var local10:Number = NaN;
var local11:Sprite3D = null;
var local7:Number = Math.PI * 2 / param1;
var local8:int = 0;
while(local8 < param1) {
local9 = new Vector3D();
local9.x = Math.cos(local8 * local7) * param2;
local9.y = Math.sin(local8 * local7) * param2;
local9.z = param3 - 100;
local10 = 1 + Math.random() * param4 + param5;
local11 = new Sprite3D(SIZE * local10,SIZE * local10);
local11.rotation = -Math.PI / 2 + Math.random() * Math.PI;
local11.x = this.epicenter.x + local9.x;
local11.y = this.epicenter.y + local9.y;
local11.z = this.epicenter.z + local9.z;
local11.useLight = false;
local11.useShadowMap = false;
if(param6) {
local11.blendMode = BlendMode.ADD;
local11.material = flameMaterial;
} else {
local11.material = smokeMaterial;
}
local11.softAttenuation = 200;
this.container.addChild(local11);
this.sprites.push(local11);
local9.normalize();
local9.w = Math.random() > 0.5 ? 1 : -1;
this.directions.push(local9);
local8++;
}
}
public function update(param1:Number) : Boolean {
var local10:Sprite3D = null;
var local11:Vector3D = null;
this.time += param1;
vector.x = this.camera.x - this.epicenter.x;
vector.y = this.camera.y - this.epicenter.y;
vector.z = this.camera.z - this.epicenter.z - HEIGHT9;
vector.normalize();
this.light.x = this.epicenter.x + vector.x * OFFSET;
this.light.y = this.epicenter.y + vector.y * OFFSET;
this.light.z = this.epicenter.z + vector.z * OFFSET + HEIGHT9;
this.wave.x = this.epicenter.x;
this.wave.y = this.epicenter.y;
this.wave.z = this.epicenter.z + 80;
var local2:Boolean = false;
var local3:Number = 1;
if(this.time <= KEY1) {
local3 = this.time / KEY1;
local2 = true;
} else if(this.time <= KEY2) {
local3 = 1;
local2 = true;
} else if(this.time <= END) {
local3 = 1 - (this.time - KEY2) / (END - KEY2);
local2 = true;
}
var local4:Number = KEY1 / 3;
if(this.time <= local4) {
this.light.alpha = this.time / local4;
this.light.visible = true;
} else if(this.time <= KEY2) {
this.light.alpha = 1 - (this.time - local4) / (KEY2 - local4);
this.light.visible = true;
} else {
this.light.visible = false;
}
var local5:Number = 10 / 60;
var local6:Number = 20 / 60;
if(this.time <= local4) {
this.wave.alpha = this.time / local5;
this.wave.visible = true;
} else if(this.time <= local6) {
this.wave.alpha = 1 - (this.time - local5) / (local6 - local5);
this.wave.visible = true;
} else {
this.wave.visible = false;
}
var local7:Number = param1 * 6;
this.wave.scaleX += local7;
this.wave.scaleY += local7;
var local8:int = int(this.sprites.length);
var local9:int = 0;
while(local9 < local8) {
local10 = this.sprites[local9];
local11 = this.directions[local9];
local10.x += local11.x * param1 * SPEED;
local10.y += local11.y * param1 * SPEED;
local10.z += local11.z * param1 * SPEED * 2.4;
local10.rotation += local11.w * param1 * 0.3;
local10.alpha = local3;
local9++;
}
if(local3 > 1) {
local2 = false;
}
return local2;
}
public function destroy() : void {
var local1:int = int(this.sprites.length);
var local2:int = 0;
while(local2 < local1) {
this.container.removeChild(this.sprites[local2]);
local2++;
}
this.container.removeChild(this.light);
this.container.removeChild(this.wave);
this.camera = null;
this.container = null;
}
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class RegistrationFailedEvent extends Event {
public static const PASSWORD_IS_INCORRECT:String = "RegistrationFailedEvent.PASSWORD_IS_INCORRECT";
public function RegistrationFailedEvent(param1:String) {
super(param1);
}
}
}
|
package projects.tanks.client.achievements.model.panel {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.achievements.model.Achievement;
public class AchievementPanelModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:AchievementPanelModelServer;
private var client:IAchievementPanelModelBase = IAchievementPanelModelBase(this);
private var modelId:Long = Long.getLong(1524513374,287342893);
private var _activateAchievementId:Long = Long.getLong(623988280,-1549577978);
private var _activateAchievement_achievementCodec:ICodec;
private var _completeAchievementId:Long = Long.getLong(392903733,700779252);
private var _completeAchievement_achievementCodec:ICodec;
private var _completeAchievement_messageCodec:ICodec;
private var _completeAchievement_prizeCodec:ICodec;
public function AchievementPanelModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new AchievementPanelModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(AchievementCC,false)));
this._activateAchievement_achievementCodec = this._protocol.getCodec(new EnumCodecInfo(Achievement,false));
this._completeAchievement_achievementCodec = this._protocol.getCodec(new EnumCodecInfo(Achievement,false));
this._completeAchievement_messageCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._completeAchievement_prizeCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
protected function getInitParam() : AchievementCC {
return AchievementCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._activateAchievementId:
this.client.activateAchievement(Achievement(this._activateAchievement_achievementCodec.decode(param2)));
break;
case this._completeAchievementId:
this.client.completeAchievement(Achievement(this._completeAchievement_achievementCodec.decode(param2)),String(this._completeAchievement_messageCodec.decode(param2)),int(this._completeAchievement_prizeCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.battle.dm {
import alternativa.physics.Body;
import alternativa.tanks.models.battle.battlefield.CommonTargetEvaluatorConst;
import alternativa.tanks.models.weapon.shared.CommonTargetEvaluator;
public class DMCommonTargetEvaluator implements CommonTargetEvaluator {
public function DMCommonTargetEvaluator() {
super();
}
public function getTargetPriority(param1:Body, param2:Number, param3:Number, param4:Number, param5:Number) : Number {
if(param1.tank.health > 0) {
return CommonTargetEvaluatorConst.MAX_PRIORITY - (CommonTargetEvaluatorConst.DISTANCE_WEIGHT * param2 / param4 + (1 - CommonTargetEvaluatorConst.DISTANCE_WEIGHT) * Math.abs(param3) / param5);
}
return 0;
}
}
}
|
package controls.buttons.h30px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h30px.GrayFrameMediumLabelSkin_right.png")]
public class GrayFrameMediumLabelSkin_right extends BitmapAsset {
public function GrayFrameMediumLabelSkin_right() {
super();
}
}
}
|
package alternativa.tanks.utils.thirdparty {
public interface IURIResolver {
function resolve(param1:URI) : URI;
}
}
|
package org.osflash.signals.natives {
import org.osflash.signals.IPrioritySignal;
public interface INativeSignalOwner extends IPrioritySignal, INativeDispatcher {
function removeAll() : void;
}
}
|
package alternativa.tanks.battle.objects.tank.tankskin.terminator {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.tankskin.turret.*;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class TerminatorTurretSkin extends TurretSkin {
public function TerminatorTurretSkin(param1:Tanks3DSResource) {
super(param1);
setPosition(rootObject,Vector3.ZERO);
}
public function getBarrel3DByIndex(param1:int) : Object3D {
return turretMeshes[param1 == 0 ? 4 : 3];
}
public function getLeftBox3D() : Object3D {
return turretMeshes[1];
}
public function getRightBox3D() : Object3D {
return turretMeshes[2];
}
}
}
|
package controls.chat {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.chat.BattleChatInput_bitmapNC.png")]
public class BattleChatInput_bitmapNC extends BitmapAsset {
public function BattleChatInput_bitmapNC() {
super();
}
}
}
|
package alternativa.tanks.services.colortransform {
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.tanks.battle.Color;
import flash.display.BitmapData;
import flash.geom.ColorTransform;
import projects.tanks.client.battlefield.models.map.DynamicShadowParams;
import projects.tanks.clients.flash.commons.models.gpu.GPUCapabilities;
public class ColorTransformUtils {
public function ColorTransformUtils() {
super();
}
public static function transformBitmap(param1:BitmapData, param2:ColorTransform) : BitmapData {
var local3:BitmapData = param1.clone();
local3.colorTransform(local3.rect,param2);
return local3;
}
public static function equal(param1:ColorTransform, param2:ColorTransform) : Boolean {
if(param1 == param2) {
return true;
}
if(param1 == null || param2 == null) {
return false;
}
return param1.redMultiplier == param2.redMultiplier && param1.greenMultiplier == param2.greenMultiplier && param1.blueMultiplier == param2.blueMultiplier && param1.alphaMultiplier == param2.alphaMultiplier && param1.redOffset == param2.redOffset && param1.greenOffset == param2.greenOffset && param1.blueOffset == param2.blueOffset && param1.alphaOffset == param2.alphaOffset;
}
public static function clone(param1:ColorTransform) : ColorTransform {
if(param1 == null) {
return null;
}
return new ColorTransform(param1.redMultiplier,param1.greenMultiplier,param1.blueMultiplier,param1.alphaMultiplier,param1.redOffset,param1.greenOffset,param1.blueOffset,param1.alphaOffset);
}
public static function toString(param1:ColorTransform) : String {
if(param1 == null) {
return "null";
}
return param1.toString();
}
public static function calculateColorTransform(param1:DynamicShadowParams, param2:Number) : ColorTransform {
var local3:Color = null;
var local4:Color = null;
var local5:Matrix3 = null;
var local6:Vector3 = null;
var local7:Number = NaN;
var local8:Number = NaN;
var local9:Number = NaN;
var local10:Number = NaN;
var local11:Number = NaN;
var local12:Number = NaN;
var local13:Number = NaN;
var local14:ColorTransform = null;
if(!GPUCapabilities.gpuEnabled || Boolean(GPUCapabilities.constrained)) {
local3 = new Color(param1.lightColor);
local4 = new Color(param1.shadowColor);
local3.subtract(local4);
local5 = new Matrix3();
local5.setRotationMatrix(param1.angleX,0,param1.angleZ);
local6 = new Vector3(0,1,0);
local6.transform3(local5);
local6.normalize();
local7 = Math.abs(local6.z) * param2;
local8 = (local4.getColor() >> 16 & 0xFF) / 255;
local9 = (local4.getColor() >> 8 & 0xFF) / 255;
local10 = (local4.getColor() & 0xFF) / 255;
local11 = (local3.getColor() >> 16 & 0xFF) / 255;
local12 = (local3.getColor() >> 8 & 0xFF) / 255;
local13 = (local3.getColor() & 0xFF) / 255;
local14 = new ColorTransform();
local14.redMultiplier = 2 * (local8 + local11 * local7);
local14.greenMultiplier = 2 * (local9 + local12 * local7);
local14.blueMultiplier = 2 * (local10 + local13 * local7);
return local14;
}
return null;
}
}
}
|
package alternativa.osgi.service.dump {
import flash.utils.Dictionary;
public interface IDumpService {
function registerDumper(param1:IDumper) : void;
function unregisterDumper(param1:String) : void;
function dump(param1:String, param2:Array) : String;
function get dumpersByName() : Dictionary;
function get dumpersList() : Vector.<IDumper>;
}
}
|
package alternativa.tanks.gui.clanmanagement {
import alternativa.tanks.gui.clanmanagement.clanmemberlist.ContextMenuPermissionLabel;
import alternativa.types.Long;
import projects.tanks.client.clans.clan.permissions.ClanPermission;
public class PermissionLabel extends ContextMenuPermissionLabel {
public function PermissionLabel(param1:ClanPermission, param2:Object, param3:Long, param4:Long) {
super(param1);
this.data = param2;
this.id = param3;
this.currentUserId = param4;
this.contextItem = false;
ClanPermissionsManager.addPositionUpdateListener(this);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.effects.effectlevel {
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.effects.effectlevel.EffectLevelCC;
public class VectorCodecEffectLevelCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecEffectLevelCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(EffectLevelCC,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.<EffectLevelCC> = new Vector.<EffectLevelCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = EffectLevelCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:EffectLevelCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<EffectLevelCC> = Vector.<EffectLevelCC>(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 projects.tanks.client.panel.model.quest.weekly {
import projects.tanks.client.panel.model.quest.showing.QuestInfoWithLevel;
public class WeeklyQuestInfo extends QuestInfoWithLevel {
public function WeeklyQuestInfo() {
super();
}
override public function toString() : String {
var local1:String = "WeeklyQuestInfo [";
local1 += super.toString();
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapTurnSpeed.png")]
public class ItemInfoPanelBitmaps_bitmapTurnSpeed extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapTurnSpeed() {
super();
}
}
}
|
package alternativa.tanks.models.clan.incoming {
import alternativa.tanks.gui.clanmanagement.ClanIncomingRequestsDialog;
import alternativa.types.Long;
[ModelInterface]
public interface IClanIncomingModel {
function getUsers() : Vector.<Long>;
function setClanIncomingWindow(param1:ClanIncomingRequestsDialog) : void;
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.terminator.sfx {
import platform.client.fp10.core.resource.types.SoundResource;
public class TerminatorSFXCC {
private var _closedSound:SoundResource;
private var _openedSound:SoundResource;
private var _servoSound:SoundResource;
public function TerminatorSFXCC(param1:SoundResource = null, param2:SoundResource = null, param3:SoundResource = null) {
super();
this._closedSound = param1;
this._openedSound = param2;
this._servoSound = param3;
}
public function get closedSound() : SoundResource {
return this._closedSound;
}
public function set closedSound(param1:SoundResource) : void {
this._closedSound = param1;
}
public function get openedSound() : SoundResource {
return this._openedSound;
}
public function set openedSound(param1:SoundResource) : void {
this._openedSound = param1;
}
public function get servoSound() : SoundResource {
return this._servoSound;
}
public function set servoSound(param1:SoundResource) : void {
this._servoSound = param1;
}
public function toString() : String {
var local1:String = "TerminatorSFXCC [";
local1 += "closedSound = " + this.closedSound + " ";
local1 += "openedSound = " + this.openedSound + " ";
local1 += "servoSound = " + this.servoSound + " ";
return local1 + "]";
}
}
}
|
package assets.resultwindow {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.resultwindow.bres_BG_BLUE_TL.png")]
public dynamic class bres_BG_BLUE_TL extends BitmapData {
public function bres_BG_BLUE_TL(param1:int = 4, param2:int = 4) {
super(param1,param2);
}
}
}
|
package controls
{
import flash.display.GradientType;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.text.AntiAliasType;
import flash.text.GridFitType;
import flash.text.TextFieldAutoSize;
import flash.text.TextFieldType;
import flash.text.TextFormat;
public class TextArea extends Sprite
{
private var shadow:Shape;
private var bg:TankWindowInner;
private const format:TextFormat = new TextFormat("MyriadPro",12,16777215);
public var tf:TextFieldUtf8;
private var _width:int;
private var _height:int;
public function TextArea()
{
this.shadow = new Shape();
this.bg = new TankWindowInner(0);
this.tf = new TextFieldUtf8();
super();
addChild(this.shadow);
this.shadow.x = this.shadow.y = 1;
addChild(this.bg);
addChild(this.tf);
this.tf.defaultTextFormat = this.format;
this.tf.antiAliasType = AntiAliasType.ADVANCED;
this.tf.gridFitType = GridFitType.PIXEL;
this.tf.embedFonts = true;
this.tf.sharpness = -250;
this.tf.thickness = -200;
this.tf.x = this.tf.y = 5;
this.tf.multiline = true;
this.tf.wordWrap = true;
this.tf.type = TextFieldType.INPUT;
this.tf.selectable = true;
this.tf.autoSize = TextFieldAutoSize.NONE;
}
override public function set width(value:Number) : void
{
this._width = int(value);
this.bg.width = this._width;
this.tf.width = this._width - 10;
this.draw();
}
override public function get width() : Number
{
return this._width;
}
override public function set height(value:Number) : void
{
this._height = int(value);
this.bg.height = this._height;
this.tf.height = this._height - 10;
this.draw();
}
override public function get height() : Number
{
return this._height;
}
public function get text() : String
{
return this.tf.text;
}
public function set text(value:String) : void
{
this.tf.text = value;
}
private function draw() : void
{
var g:Graphics = this.shadow.graphics;
var matrix:Matrix = new Matrix();
matrix.createGradientBox(this._width - 2,this._height - 2,Math.PI * 0.5);
g.clear();
g.beginGradientFill(GradientType.LINEAR,[0,0],[0.8,0],[0,255],matrix);
g.drawRect(0,0,this._width - 2,this._height - 2);
g.endFill();
}
public function set maxChars(value:int) : void
{
this.tf.maxChars = value;
}
}
}
|
package projects.tanks.client.tanksservices.model.notifier.uid {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class UidNotifierModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function UidNotifierModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.commons.models.captcha {
public class CaptchaLocation {
public static const LOGIN_FORM:CaptchaLocation = new CaptchaLocation(0,"LOGIN_FORM");
public static const REGISTER_FORM:CaptchaLocation = new CaptchaLocation(1,"REGISTER_FORM");
public static const CLIENT_STARTUP:CaptchaLocation = new CaptchaLocation(2,"CLIENT_STARTUP");
public static const RESTORE_PASSWORD_FORM:CaptchaLocation = new CaptchaLocation(3,"RESTORE_PASSWORD_FORM");
public static const EMAIL_CHANGE_HASH:CaptchaLocation = new CaptchaLocation(4,"EMAIL_CHANGE_HASH");
public static const ACCOUNT_SETTINGS_FORM:CaptchaLocation = new CaptchaLocation(5,"ACCOUNT_SETTINGS_FORM");
private var _value:int;
private var _name:String;
public function CaptchaLocation(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<CaptchaLocation> {
var local1:Vector.<CaptchaLocation> = new Vector.<CaptchaLocation>();
local1.push(LOGIN_FORM);
local1.push(REGISTER_FORM);
local1.push(CLIENT_STARTUP);
local1.push(RESTORE_PASSWORD_FORM);
local1.push(EMAIL_CHANGE_HASH);
local1.push(ACCOUNT_SETTINGS_FORM);
return local1;
}
public function toString() : String {
return "CaptchaLocation [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package alternativa.tanks.models.weapon.gauss.sfx {
[ModelInterface]
public interface IGaussSFXModel {
function getSFXData() : GaussSFXData;
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.tank.commands {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.battlefield.models.user.tank.commands.TurretControlType;
public class CodecTurretControlType implements ICodec {
public function CodecTurretControlType() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TurretControlType = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = TurretControlType.ROTATION_DIRECTION;
break;
case 1:
local2 = TurretControlType.TARGET_ANGLE_LOCAL;
break;
case 2:
local2 = TurretControlType.TARGET_ANGLE_WORLD;
}
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.tanks.model.item.skins {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class MountSkinAdapt implements MountSkin {
private var object:IGameObject;
private var impl:MountSkin;
public function MountSkinAdapt(param1:IGameObject, param2:MountSkin) {
super();
this.object = param1;
this.impl = param2;
}
public function getMountedSkin() : IGameObject {
var result:IGameObject = null;
try {
Model.object = this.object;
result = this.impl.getMountedSkin();
}
finally {
Model.popObject();
}
return result;
}
public function mount(param1:IGameObject) : void {
var skin:IGameObject = param1;
try {
Model.object = this.object;
this.impl.mount(skin);
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.weapon.machinegun.sfx.sound {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.models.weapon.machinegun.sfx.MachineGunSFXData;
import alternativa.tanks.sfx.ISound3DEffect;
import alternativa.tanks.sfx.ISoundEffectDestructionListener;
import alternativa.tanks.sfx.MobileSound3DEffect;
import alternativa.tanks.sfx.Sound3D;
import flash.media.Sound;
public class MachineGunSoundManager implements ISoundEffectDestructionListener {
[Inject]
public static var battleService:BattleService;
private static const INACTIVE_STATE:int = 0;
private static const BEGIN_STATE:int = 1;
private static const SHOOT_STATE:int = 2;
private static const END_STATE:int = 3;
private static const END_FAIL_STATE:int = 4;
private static const VOLUME:Number = 0.7;
private static const START_SOUND_START_TIME:int = 115;
private static const BEGIN_SOUND_LENGTH:int = 3520;
private static const SHOOT_SOUND_START_TIME:int = 80;
private static const END_SOUND_START_TIME:int = 100;
private static const END_FAIL_SOUND_START_TIME:int = 27;
private var _currentState:int = 0;
private var _turret:Object3D;
private var _chainStartSound:Sound;
private var _turbineStartSound:Sound;
private var _shootSound:Sound;
private var _shootEndSound:Sound;
private var _longFailSound:Sound;
private var hitSound3d:Sound3D;
private var tankHitSound3d:Sound3D;
private var _currentSoundEffect:MobileSound3DEffect;
private var hitSoundEffect:MachineGunHitSoundEffect;
private var _barrelAccelTime:Number;
private var barrelTime:int;
public function MachineGunSoundManager(param1:Object3D, param2:MachineGunSFXData, param3:Number) {
super();
this._turret = param1;
this._chainStartSound = param2.chainStartSound;
this._turbineStartSound = param2.turbineStartSound;
this._shootSound = param2.shootSound;
this._shootEndSound = param2.shootEndSound;
this._longFailSound = param2.longFailSound;
this.hitSound3d = this.createSound3D(param2.hitSound);
this.tankHitSound3d = this.createSound3D(param2.tankHitSound);
this._barrelAccelTime = param3;
}
public function playBeginSound(param1:int) : void {
var local2:MobileSound3DEffect = null;
var local3:Sound3D = null;
if(this._currentState != BEGIN_STATE) {
this._currentState = BEGIN_STATE;
this.createSoundEffect(this._turbineStartSound,BEGIN_SOUND_LENGTH - this._barrelAccelTime);
local2 = MobileSound3DEffect(battleService.getObjectPool().getObject(MobileSound3DEffect));
local3 = Sound3D.create(this._chainStartSound,VOLUME);
local2.init(local3,this._turret,0,0,START_SOUND_START_TIME);
battleService.addSound3DEffect(local2);
}
this.barrelTime = param1;
}
public function playShootSound() : void {
if(this._currentState != SHOOT_STATE) {
this._currentState = SHOOT_STATE;
this.createSoundEffect(this._shootSound,SHOOT_SOUND_START_TIME,1000000);
}
}
public function playEndSound() : void {
if(this._currentState != END_STATE) {
this._currentState = END_STATE;
this.createSoundEffect(this._shootEndSound,END_SOUND_START_TIME);
}
}
public function playEndFailSound(param1:int) : void {
if(this._currentState != END_FAIL_STATE) {
this._currentState = END_FAIL_STATE;
this.createSoundEffect(this._longFailSound,this._barrelAccelTime - this.barrelTime + END_FAIL_SOUND_START_TIME,0,param1);
}
}
public function stopSound() : void {
if(this._currentState != INACTIVE_STATE) {
this._currentState = INACTIVE_STATE;
this.killCurrentSound();
}
}
private function createSoundEffect(param1:Sound, param2:int, param3:int = 0, param4:int = 0) : void {
this.killCurrentSound();
this._currentSoundEffect = MobileSound3DEffect(battleService.getObjectPool().getObject(MobileSound3DEffect));
var local5:Sound3D = this.createSound3D(param1);
this._currentSoundEffect.init(local5,this._turret,0,param3,param2,this);
battleService.addSound3DEffect(this._currentSoundEffect);
if(param4 > 0) {
this._currentSoundEffect.fade(param4);
}
}
public function playHitSound(param1:Vector3, param2:Boolean) : void {
if(this.hitSoundEffect == null) {
this.hitSoundEffect = MachineGunHitSoundEffect(battleService.getObjectPool().getObject(MachineGunHitSoundEffect));
this.hitSoundEffect.init(this.hitSound3d,this.tankHitSound3d);
battleService.addSound3DEffect(this.hitSoundEffect);
}
this.hitSoundEffect.setTarget(param1,param2);
}
public function destroy() : void {
this.killCurrentSound();
this.destroyHitSounds();
this._chainStartSound = null;
this._turbineStartSound = null;
this._shootSound = null;
this._shootEndSound = null;
this._longFailSound = null;
this._turret = null;
}
private function destroyHitSounds() : void {
this.stopHitSounds();
Sound3D.destroy(this.hitSound3d);
Sound3D.destroy(this.tankHitSound3d);
this.hitSound3d = null;
this.tankHitSound3d = null;
}
public function stopHitSounds() : void {
if(this.hitSoundEffect != null) {
this.hitSoundEffect.kill();
this.hitSoundEffect = null;
}
}
public function onSoundEffectDestroyed(param1:ISound3DEffect) : void {
if(this._currentSoundEffect == param1) {
this._currentSoundEffect = null;
}
}
private function createSound3D(param1:Sound) : Sound3D {
return Sound3D.create(param1,VOLUME);
}
private function killCurrentSound() : void {
if(this._currentSoundEffect != null) {
this._currentSoundEffect.kill();
this._currentSoundEffect = null;
}
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangIconNormal_p24 extends BitmapAsset
{
public function RangIconNormal_p24()
{
super();
}
}
}
|
package alternativa.tanks.model.challenge.server
{
public class ChallengeServerData
{
public var level:int;
public var target_progress:int;
public var progress:int;
public var id:String;
public var description:String;
public var prizes:Array;
public var completed:String;
public var changeCost:int;
public var specialChallenge:ChallengeServerData = null;
public function ChallengeServerData()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.resistance {
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.battlefield.models.user.resistance.TankResistance;
import projects.tanks.client.battlefield.models.user.resistance.TankResistancesCC;
public class CodecTankResistancesCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_resistances:ICodec;
public function CodecTankResistancesCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_resistances = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(TankResistance,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TankResistancesCC = new TankResistancesCC();
local2.resistances = this.codec_resistances.decode(param1) as Vector.<TankResistance>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TankResistancesCC = TankResistancesCC(param2);
this.codec_resistances.encode(param1,local3.resistances);
}
}
}
|
package forms.battlelist
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import assets.cellrenderer.battlelist.CellBlue;
import assets.cellrenderer.battlelist.CellNormalUp;
import assets.cellrenderer.battlelist.CellRed;
import controls.ButtonState;
import controls.Label;
import controls.rangicons.RangIconSmall;
import fl.controls.listClasses.CellRenderer;
import fl.controls.listClasses.ListData;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
public class TeamListRenderer extends CellRenderer
{
private var format:TextFormat;
private var nicon:DisplayObject;
private var greenStyle:ButtonState;
private var redStyle:ButtonState;
private var BlueStyle:ButtonState;
private var noNameText:String;
public function TeamListRenderer()
{
this.format = new TextFormat("MyriadPro",13);
this.greenStyle = new CellNormalUp();
this.redStyle = new CellRed();
this.BlueStyle = new CellBlue();
var localeService:ILocaleService = Main.osgi.getService(ILocaleService) as ILocaleService;
super();
this.format.color = 16777215;
setStyle("textFormat",this.format);
setStyle("embedFonts",true);
this.noNameText = localeService.getText(TextConst.BATTLEINFO_PANEL_NONAME_TEXT);
}
override public function set data(value:Object) : void
{
var currentStyle:ButtonState = null;
_data = value;
this.nicon = this.myIcon(_data);
switch(_data.style)
{
case "green":
currentStyle = this.greenStyle;
break;
case "red":
currentStyle = this.redStyle;
break;
case "blue":
currentStyle = this.BlueStyle;
}
setStyle("upSkin",currentStyle);
setStyle("downSkin",currentStyle);
setStyle("overSkin",currentStyle);
setStyle("selectedUpSkin",currentStyle);
setStyle("selectedOverSkin",currentStyle);
setStyle("selectedDownSkin",currentStyle);
}
private function myIcon(data:Object) : Sprite
{
var name:Label = null;
var kills:Label = null;
var rangIcon:RangIconSmall = null;
var bmp:BitmapData = new BitmapData(_width,20,true,0);
var cont:Sprite = new Sprite();
name = new Label();
name.autoSize = TextFieldAutoSize.NONE;
name.color = 16777215;
name.alpha = data.playerName == "" ? Number(0.5) : Number(1);
name.text = data.playerName == "" ? this.noNameText : data.playerName;
name.height = 20;
name.width = _width - 48;
name.x = 10;
name.y = 0;
kills = new Label();
kills.color = 16777215;
kills.autoSize = TextFieldAutoSize.NONE;
kills.align = TextFormatAlign.RIGHT;
kills.text = data.playerName == "" ? " " : String(data.kills);
kills.height = 20;
kills.width = 120;
kills.x = _width - 135;
kills.y = 0;
if(data.rang > 0)
{
rangIcon = new RangIconSmall(data.rang);
rangIcon.x = -2;
rangIcon.y = 2;
cont.addChild(rangIcon);
}
cont.addChild(name);
cont.addChild(kills);
return cont;
}
override public function set listData(value:ListData) : void
{
_listData = value;
label = "";
if(this.nicon != null)
{
setStyle("icon",this.nicon);
}
}
override protected function drawLayout() : void
{
super.drawLayout();
background.width = width - 4;
background.height = height;
}
override protected function drawIcon() : void
{
var oldIcon:DisplayObject = icon;
var styleName:String = !!enabled ? mouseState : "disabled";
if(selected)
{
styleName = "selected" + styleName.substr(0,1).toUpperCase() + styleName.substr(1);
}
styleName += "Icon";
var iconStyle:Object = getStyleValue(styleName);
if(iconStyle == null)
{
iconStyle = getStyleValue("icon");
}
if(iconStyle != null)
{
icon = getDisplayObjectInstance(iconStyle);
}
if(icon != null)
{
addChildAt(icon,1);
}
if(oldIcon != null && oldIcon != icon && oldIcon.parent == this)
{
removeChild(oldIcon);
}
}
}
}
|
package alternativa.osgi.service.clientlog {
public interface IClientLogBase {
function log(param1:String, param2:String, ... rest) : void;
}
}
|
package projects.tanks.client.battlefield.types {
public class DamageType {
public static const SMOKY:DamageType = new DamageType(0,"SMOKY");
public static const SMOKY_CRITICAL:DamageType = new DamageType(1,"SMOKY_CRITICAL");
public static const FIREBIRD:DamageType = new DamageType(2,"FIREBIRD");
public static const FIREBIRD_OVERHEAT:DamageType = new DamageType(3,"FIREBIRD_OVERHEAT");
public static const TWINS:DamageType = new DamageType(4,"TWINS");
public static const RAILGUN:DamageType = new DamageType(5,"RAILGUN");
public static const ISIS:DamageType = new DamageType(6,"ISIS");
public static const MINE:DamageType = new DamageType(7,"MINE");
public static const THUNDER:DamageType = new DamageType(8,"THUNDER");
public static const RICOCHET:DamageType = new DamageType(9,"RICOCHET");
public static const FREEZE:DamageType = new DamageType(10,"FREEZE");
public static const SHAFT:DamageType = new DamageType(11,"SHAFT");
public static const MACHINE_GUN:DamageType = new DamageType(12,"MACHINE_GUN");
public static const SHOTGUN:DamageType = new DamageType(13,"SHOTGUN");
public static const ROCKET:DamageType = new DamageType(14,"ROCKET");
public static const ARTILLERY:DamageType = new DamageType(15,"ARTILLERY");
public static const TERMINATOR:DamageType = new DamageType(16,"TERMINATOR");
public static const BOMB:DamageType = new DamageType(17,"BOMB");
public static const AT_FIELD:DamageType = new DamageType(18,"AT_FIELD");
public static const NUCLEAR:DamageType = new DamageType(19,"NUCLEAR");
public static const GAUSS:DamageType = new DamageType(20,"GAUSS");
private var _value:int;
private var _name:String;
public function DamageType(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<DamageType> {
var local1:Vector.<DamageType> = new Vector.<DamageType>();
local1.push(SMOKY);
local1.push(SMOKY_CRITICAL);
local1.push(FIREBIRD);
local1.push(FIREBIRD_OVERHEAT);
local1.push(TWINS);
local1.push(RAILGUN);
local1.push(ISIS);
local1.push(MINE);
local1.push(THUNDER);
local1.push(RICOCHET);
local1.push(FREEZE);
local1.push(SHAFT);
local1.push(MACHINE_GUN);
local1.push(SHOTGUN);
local1.push(ROCKET);
local1.push(ARTILLERY);
local1.push(TERMINATOR);
local1.push(BOMB);
local1.push(AT_FIELD);
local1.push(NUCLEAR);
local1.push(GAUSS);
return local1;
}
public function toString() : String {
return "DamageType [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package controls.resultassets {
import assets.resultwindow.bres_SELECTED_RED_PIXEL;
import assets.resultwindow.bres_SELECTED_RED_TL;
import controls.statassets.StatLineBase;
public class ResultWindowRedSelected extends StatLineBase {
public function ResultWindowRedSelected() {
super();
tl = new bres_SELECTED_RED_TL(1,1);
px = new bres_SELECTED_RED_PIXEL(1,1);
frameColor = 16673333;
}
}
}
|
package alternativa.tanks.gui.friends.list.renderer {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.friends.battleLink.BattleLink;
import alternativa.tanks.gui.friends.list.renderer.background.RendererBackGroundClanMembersList;
import controls.base.LabelBase;
import fl.controls.listClasses.CellRenderer;
import fl.controls.listClasses.ListData;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.MouseEvent;
import forms.ColorConstants;
import forms.Styles;
import forms.contextmenu.BattleInviteContextMenuLabel;
import forms.userlabel.UserLabel;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.IBattleInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.activator.IBattleLinkActivatorService;
import services.contextmenu.IContextMenuService;
public class ClanMembersListRenderer extends CellRenderer {
[Inject]
public static var battleLinkActivatorService:IBattleLinkActivatorService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var contextMenuService:IContextMenuService;
[Inject]
public static var battleInfoService:IBattleInfoService;
public static const ROW_HEIGHT:int = 18;
private static var gradientGreenIconClass:Class = ClanMembersListRenderer_gradientGreenIconClass;
private static var gradientGreenBitmapData:BitmapData = Bitmap(new gradientGreenIconClass()).bitmapData;
private static var gradientGreyIconClass:Class = ClanMembersListRenderer_gradientGreyIconClass;
private static var gradientGreyBitmapData:BitmapData = Bitmap(new gradientGreyIconClass()).bitmapData;
private var _labelsContainer:DisplayObject;
private var _userLabel:UserLabel;
private var _battleLink:BattleLink;
private var _isNewLabel:LabelBase;
private var _gradientGreen:Bitmap;
private var _gradientGrey:Bitmap;
private var _battleInviteIcon:Bitmap;
public function ClanMembersListRenderer() {
super();
}
override public function set data(param1:Object) : void {
_data = param1;
mouseEnabled = false;
mouseChildren = true;
buttonMode = useHandCursor = false;
this._labelsContainer = this.createLabels(_data);
var local2:DisplayObject = new RendererBackGroundClanMembersList(this._userLabel.online);
var local3:DisplayObject = new RendererBackGroundClanMembersList(this._userLabel.online,true);
setStyle(Styles.UP_SKIN,local2);
setStyle(Styles.DOWN_SKIN,local2);
setStyle(Styles.OVER_SKIN,local2);
setStyle(Styles.SELECTED_UP_SKIN,local3);
setStyle(Styles.SELECTED_OVER_SKIN,local3);
setStyle(Styles.SELECTED_DOWN_SKIN,local3);
}
private function createLabels(param1:Object) : Sprite {
var local2:Sprite = new Sprite();
if(param1.id != null) {
if(this._battleInviteIcon == null) {
this._battleInviteIcon = new Bitmap(BattleInviteContextMenuLabel.battleInviteBitmapData);
}
this._battleInviteIcon.x = 0;
this._battleInviteIcon.y = (ROW_HEIGHT - this._battleInviteIcon.height) / 2;
this._battleInviteIcon.visible = false;
local2.addChild(this._battleInviteIcon);
this._userLabel = new UserLabel(param1.id,false);
this._userLabel.inviteBattleEnable = true;
this._userLabel.showClanProfile = false;
this._userLabel.x = this._battleInviteIcon.x + this._battleInviteIcon.width + 4;
this._userLabel.y = 0;
local2.addChild(this._userLabel);
if(Boolean(param1.isNew)) {
if(this._userLabel.online) {
if(this._gradientGreen == null) {
this._gradientGreen = new Bitmap(gradientGreenBitmapData);
}
this._gradientGreen.visible = true;
local2.addChild(this._gradientGreen);
} else {
if(this._gradientGrey == null) {
this._gradientGrey = new Bitmap(gradientGreyBitmapData);
}
this._gradientGrey.visible = true;
local2.addChild(this._gradientGrey);
}
if(this._isNewLabel == null) {
this._isNewLabel = new LabelBase();
this._isNewLabel.text = localeService.getText(TanksLocale.TEXT_FRIENDS_NEW_FRIEND);
this._isNewLabel.color = ColorConstants.GREEN_LABEL;
this._isNewLabel.mouseEnabled = false;
}
this._isNewLabel.visible = true;
this._isNewLabel.x = 223 - this._isNewLabel.width;
this._isNewLabel.y = 0;
local2.addChild(this._isNewLabel);
if(this._gradientGreen != null) {
this._gradientGreen.x = this._isNewLabel.x - 7;
}
if(this._gradientGrey != null) {
this._gradientGrey.x = this._isNewLabel.x - 7;
}
} else {
if(this._isNewLabel != null) {
this._isNewLabel.visible = false;
}
if(this._gradientGreen != null) {
this._gradientGreen.visible = false;
}
if(this._gradientGrey != null) {
this._gradientGrey.visible = false;
}
}
if(this._battleLink != null) {
this._battleLink.removeEvents();
this._battleLink.labelCont.removeEventListener(MouseEvent.CLICK,this.onBattleLinkClick);
}
this._battleLink = new BattleLink(param1.id);
this._battleLink.labelCont.addEventListener(MouseEvent.CLICK,this.onBattleLinkClick,false,0,true);
local2.addChild(this._battleLink);
this._battleLink.x = 233;
this.updateStatusOnline();
this.addEventListener(MouseEvent.ROLL_OVER,this.onRollOver,false,0,true);
this.addEventListener(MouseEvent.ROLL_OUT,this.onRollOut,false,0,true);
}
return local2;
}
private function updateStatusOnline() : void {
_data.online = this._userLabel.online;
this._userLabel.setUidColor(this._userLabel.online ? ColorConstants.GREEN_LABEL : ColorConstants.ACCESS_LABEL,false);
this._battleInviteIcon.visible = this._userLabel.online && Boolean(_data.availableInvite);
}
private function onRollOver(param1:MouseEvent) : void {
if(Boolean(_data.isNew)) {
if(this._isNewLabel != null) {
this._isNewLabel.visible = false;
}
if(this._userLabel.online) {
if(this._gradientGreen != null) {
this._gradientGreen.visible = false;
}
} else if(this._gradientGrey != null) {
this._gradientGrey.visible = false;
}
}
super.selected = true;
}
private function onRollOut(param1:MouseEvent) : void {
if(Boolean(_data.isNew)) {
if(this._isNewLabel != null) {
this._isNewLabel.visible = true;
}
if(this._userLabel.online) {
if(this._gradientGreen != null) {
this._gradientGreen.visible = true;
}
} else if(this._gradientGrey != null) {
this._gradientGrey.visible = true;
}
}
super.selected = false;
}
private function onClickRemoveFriend(param1:MouseEvent) : void {
contextMenuService.removeFromFriends(this._userLabel.userId,this._userLabel.uid);
}
private function onBattleLinkClick(param1:MouseEvent) : void {
if(this._battleLink.hasData() && this._battleLink.data.isClickable()) {
battleLinkActivatorService.navigateToBattleUrl(this._battleLink.data.getBattleData());
}
}
override public function set listData(param1:ListData) : void {
_listData = param1;
label = _listData.label;
if(this._labelsContainer != null) {
setStyle("icon",this._labelsContainer);
}
}
override protected function drawBackground() : void {
var local1:String = enabled ? mouseState : "disabled";
if(selected) {
local1 = "selected" + local1.substr(0,1).toUpperCase() + local1.substr(1);
}
local1 += "Skin";
var local2:DisplayObject = background;
background = getDisplayObjectInstance(getStyleValue(local1));
addChildAt(background,0);
if(local2 != null && local2 != background) {
removeChild(local2);
}
}
override public function set selected(param1:Boolean) : void {
}
}
}
|
package alternativa.tanks.service {
public interface IPasswordParamsService {
function get forbiddenPasswords() : Array;
function set forbiddenPasswords(param1:Array) : void;
function get maxPasswordLength() : int;
function set maxPasswordLength(param1:int) : void;
function get minPasswordLength() : int;
function set minPasswordLength(param1:int) : void;
function isPasswordForbidden(param1:String) : Boolean;
}
}
|
package alternativa.tanks.model.item.discount {
public interface IDiscountCollector {
function addDiscount(param1:DiscountInfo) : void;
}
}
|
package alternativa.tanks.battle.scene3d {
public interface Renderer {
function render(param1:int, param2:int) : void;
}
}
|
package projects.tanks.client.commons.models.linkactivator {
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 LinkActivatorModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _activateBattleId:Long = Long.getLong(716811418,-639852363);
private var _activateBattle_battleIdCodec:ICodec;
private var _isAliveId:Long = Long.getLong(1185403596,1266905127);
private var _isAlive_battleIdCodec:ICodec;
private var model:IModel;
public function LinkActivatorModelServer(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._activateBattle_battleIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
this._isAlive_battleIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function activateBattle(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._activateBattle_battleIdCodec.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._activateBattleId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function isAlive(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._isAlive_battleIdCodec.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._isAliveId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p26 extends BitmapAsset
{
public function RangsIcon_p26()
{
super();
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.hornet {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class HornetUltimateModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:HornetUltimateModelServer;
private var client:IHornetUltimateModelBase = IHornetUltimateModelBase(this);
private var modelId:Long = Long.getLong(1679670805,-112284013);
private var _showUltimateRadarIsTurnedOffId:Long = Long.getLong(1886084416,1962413779);
private var _showUltimateRadarIsTurnedOnId:Long = Long.getLong(770442559,-63303675);
public function HornetUltimateModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new HornetUltimateModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(HornetUltimateCC,false)));
}
protected function getInitParam() : HornetUltimateCC {
return HornetUltimateCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showUltimateRadarIsTurnedOffId:
this.client.showUltimateRadarIsTurnedOff();
break;
case this._showUltimateRadarIsTurnedOnId:
this.client.showUltimateRadarIsTurnedOn();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.battlefield.effects.levelup.rangs
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class BigRangIcon_rang_1 extends BitmapAsset
{
public function BigRangIcon_rang_1()
{
super();
}
}
}
|
package forms.friends.list.renderer.background
{
import controls.cellrenderer.ButtonState;
import flash.display.DisplayObject;
import flash.display.Sprite;
public class RendererBackGroundIncomingList extends Sprite
{
private var _width:int = 100;
public function RendererBackGroundIncomingList(param1:Boolean)
{
var _loc2_:ButtonState = null;
super();
if(param1)
{
_loc2_ = new FriendCellSelected();
}
else
{
_loc2_ = new FriendCellNormal();
}
addChild(_loc2_);
this.resize();
}
protected function resize() : void
{
var _loc1_:DisplayObject = getChildAt(0);
_loc1_.width = this._width - 3;
_loc1_.height = 18;
}
override public function set width(param1:Number) : void
{
this._width = Math.floor(param1);
this.resize();
}
}
}
|
package projects.tanks.client.panel.model.shop.goldboxpackage {
public interface IGoldBoxPackageModelBase {
}
}
|
package alternativa.tanks.models.weapon.shaft.sfx {
import alternativa.engine3d.materials.Material;
import alternativa.math.Vector3;
import alternativa.tanks.sfx.GraphicEffect;
public interface ShaftTrailEffect extends GraphicEffect {
function init(param1:Vector3, param2:Vector3, param3:Number, param4:Number, param5:Material, param6:int) : void;
}
}
|
package alternativa.engine3d.core
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.lights.DirectionalLight;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.BSP;
import alternativa.engine3d.objects.Mesh;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.gfx.core.BitmapTextureResource;
import alternativa.gfx.core.Device;
import alternativa.gfx.core.IndexBufferResource;
import alternativa.gfx.core.ProgramResource;
import alternativa.gfx.core.RenderTargetTextureResource;
import alternativa.gfx.core.VertexBufferResource;
import flash.display.BitmapData;
import flash.display3D.Context3DProgramType;
import flash.display3D.Context3DVertexBufferFormat;
import flash.geom.Rectangle;
import flash.utils.ByteArray;
use namespace alternativa3d;
public class ShadowMap
{
private static const sizeLimit:int = 2048;
private static const bigValue:Number = 2048;
public static const numSamples:int = 6;
private var programs:Array;
private var spriteVertexBuffer:VertexBufferResource;
private var spriteIndexBuffer:IndexBufferResource;
alternativa3d var transform:Vector.<Number>;
alternativa3d var params:Vector.<Number>;
private var coords:Vector.<Number>;
private var fragment:Vector.<Number>;
private var alphaTestConst:Vector.<Number>;
private var scissor:Rectangle;
alternativa3d var map:RenderTargetTextureResource;
alternativa3d var noise:BitmapTextureResource;
private var noiseSize:int = 64;
private var noiseAngle:Number = 1.0471975511965976;
private var noiseRadius:Number = 1.3;
private var noiseRandom:Number = 0.3;
public var mapSize:int;
public var nearDistance:Number;
public var farDistance:Number;
public var bias:Number = 0;
public var biasMultiplier:Number = 30;
public var additionalSpace:Number = 0;
public var alphaThreshold:Number = 0.1;
private var defaultLight:DirectionalLight;
private var boundVertexList:Vertex;
private var light:DirectionalLight;
private var dirZ:Number;
private var planeX:Number;
private var planeY:Number;
private var planeSize:Number;
private var pixel:Number;
alternativa3d var boundMinX:Number;
alternativa3d var boundMinY:Number;
alternativa3d var boundMinZ:Number;
alternativa3d var boundMaxX:Number;
alternativa3d var boundMaxY:Number;
alternativa3d var boundMaxZ:Number;
public function ShadowMap(param1:int, param2:Number, param3:Number, param4:Number = 0, param5:Number = 0)
{
var _loc10_:int = 0;
var _loc11_:Number = NaN;
var _loc12_:int = 0;
var _loc13_:int = 0;
var _loc14_:int = 0;
this.programs = new Array();
this.spriteVertexBuffer = new VertexBufferResource(Vector.<Number>([0,2,4,6]),1);
this.spriteIndexBuffer = new IndexBufferResource(Vector.<uint>([0,1,3,1,2,3]));
this.transform = Vector.<Number>([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]);
this.params = Vector.<Number>([-255 * bigValue,-bigValue,bigValue,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1]);
this.coords = Vector.<Number>([0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1 / 255,1]);
this.fragment = Vector.<Number>([1 / 255,0,1,1]);
this.alphaTestConst = Vector.<Number>([0,0,0,1]);
this.scissor = new Rectangle();
this.defaultLight = new DirectionalLight(8355711);
this.boundVertexList = Vertex.createList(8);
super();
if(param1 > sizeLimit)
{
throw new Error("Value of mapSize too big.");
}
var _loc6_:Number = Math.log(param1) / Math.LN2;
if(_loc6_ != int(_loc6_))
{
throw new Error("Value of mapSize must be power of 2.");
}
this.mapSize = param1;
this.nearDistance = param2;
this.farDistance = param3;
this.bias = param4;
this.additionalSpace = param5;
this.defaultLight.rotationX = Math.PI;
this.map = new RenderTargetTextureResource(param1,param1);
var _loc7_:Vector.<uint> = new Vector.<uint>();
var _loc8_:int = 0;
var _loc9_:int = 0;
while(_loc9_ < this.noiseSize)
{
_loc10_ = 0;
while(_loc10_ < this.noiseSize)
{
_loc11_ = Math.random() * this.noiseAngle;
_loc12_ = Math.sin(_loc11_) * 255;
_loc13_ = Math.cos(_loc11_) * 255;
_loc14_ = (this.noiseRandom + Math.random() * (1 - this.noiseRandom)) * 255;
_loc7_[_loc8_] = _loc12_ << 16 | _loc13_ << 8 | _loc14_;
_loc8_++;
_loc10_++;
}
_loc9_++;
}
this.noise = new BitmapTextureResource(new BitmapData(this.noiseSize,this.noiseSize,false,0),false);
this.noise.bitmapData.setVector(this.noise.bitmapData.rect,_loc7_);
}
alternativa3d function calculateBounds(param1:Camera3D) : void
{
if(param1.directionalLight != null)
{
this.light = param1.directionalLight;
}
else
{
this.light = this.defaultLight;
}
this.light.composeMatrix();
this.dirZ = this.light.mk;
this.light.calculateInverseMatrix();
var _loc2_:Number = this.light.ima;
var _loc3_:Number = this.light.imb;
var _loc4_:Number = this.light.imc;
var _loc5_:Number = this.light.imd;
var _loc6_:Number = this.light.ime;
var _loc7_:Number = this.light.imf;
var _loc8_:Number = this.light.img;
var _loc9_:Number = this.light.imh;
var _loc10_:Number = this.light.imi;
var _loc11_:Number = this.light.imj;
var _loc12_:Number = this.light.imk;
var _loc13_:Number = this.light.iml;
this.light.ima = _loc2_ * param1.gma + _loc3_ * param1.gme + _loc4_ * param1.gmi;
this.light.imb = _loc2_ * param1.gmb + _loc3_ * param1.gmf + _loc4_ * param1.gmj;
this.light.imc = _loc2_ * param1.gmc + _loc3_ * param1.gmg + _loc4_ * param1.gmk;
this.light.imd = _loc2_ * param1.gmd + _loc3_ * param1.gmh + _loc4_ * param1.gml + _loc5_;
this.light.ime = _loc6_ * param1.gma + _loc7_ * param1.gme + _loc8_ * param1.gmi;
this.light.imf = _loc6_ * param1.gmb + _loc7_ * param1.gmf + _loc8_ * param1.gmj;
this.light.img = _loc6_ * param1.gmc + _loc7_ * param1.gmg + _loc8_ * param1.gmk;
this.light.imh = _loc6_ * param1.gmd + _loc7_ * param1.gmh + _loc8_ * param1.gml + _loc9_;
this.light.imi = _loc10_ * param1.gma + _loc11_ * param1.gme + _loc12_ * param1.gmi;
this.light.imj = _loc10_ * param1.gmb + _loc11_ * param1.gmf + _loc12_ * param1.gmj;
this.light.imk = _loc10_ * param1.gmc + _loc11_ * param1.gmg + _loc12_ * param1.gmk;
this.light.iml = _loc10_ * param1.gmd + _loc11_ * param1.gmh + _loc12_ * param1.gml + _loc13_;
var _loc14_:Vertex = this.boundVertexList;
_loc14_.x = -param1.nearClipping;
_loc14_.y = -param1.nearClipping;
_loc14_.z = param1.nearClipping;
_loc14_ = _loc14_.next;
_loc14_.x = -param1.nearClipping;
_loc14_.y = param1.nearClipping;
_loc14_.z = param1.nearClipping;
_loc14_ = _loc14_.next;
_loc14_.x = param1.nearClipping;
_loc14_.y = param1.nearClipping;
_loc14_.z = param1.nearClipping;
_loc14_ = _loc14_.next;
_loc14_.x = param1.nearClipping;
_loc14_.y = -param1.nearClipping;
_loc14_.z = param1.nearClipping;
_loc14_ = _loc14_.next;
_loc14_.x = -this.farDistance;
_loc14_.y = -this.farDistance;
_loc14_.z = this.farDistance;
_loc14_ = _loc14_.next;
_loc14_.x = -this.farDistance;
_loc14_.y = this.farDistance;
_loc14_.z = this.farDistance;
_loc14_ = _loc14_.next;
_loc14_.x = this.farDistance;
_loc14_.y = this.farDistance;
_loc14_.z = this.farDistance;
_loc14_ = _loc14_.next;
_loc14_.x = this.farDistance;
_loc14_.y = -this.farDistance;
_loc14_.z = this.farDistance;
this.light.boundMinX = 1e+22;
this.light.boundMinY = 1e+22;
this.light.boundMinZ = 1e+22;
this.light.boundMaxX = -1e+22;
this.light.boundMaxY = -1e+22;
this.light.boundMaxZ = -1e+22;
_loc14_ = this.boundVertexList;
while(_loc14_ != null)
{
_loc14_.cameraX = this.light.ima * _loc14_.x + this.light.imb * _loc14_.y + this.light.imc * _loc14_.z + this.light.imd;
_loc14_.cameraY = this.light.ime * _loc14_.x + this.light.imf * _loc14_.y + this.light.img * _loc14_.z + this.light.imh;
_loc14_.cameraZ = this.light.imi * _loc14_.x + this.light.imj * _loc14_.y + this.light.imk * _loc14_.z + this.light.iml;
if(_loc14_.cameraX < this.light.boundMinX)
{
this.light.boundMinX = _loc14_.cameraX;
}
if(_loc14_.cameraX > this.light.boundMaxX)
{
this.light.boundMaxX = _loc14_.cameraX;
}
if(_loc14_.cameraY < this.light.boundMinY)
{
this.light.boundMinY = _loc14_.cameraY;
}
if(_loc14_.cameraY > this.light.boundMaxY)
{
this.light.boundMaxY = _loc14_.cameraY;
}
if(_loc14_.cameraZ < this.light.boundMinZ)
{
this.light.boundMinZ = _loc14_.cameraZ;
}
if(_loc14_.cameraZ > this.light.boundMaxZ)
{
this.light.boundMaxZ = _loc14_.cameraZ;
}
_loc14_ = _loc14_.next;
}
var _loc15_:Vertex = this.boundVertexList;
var _loc16_:Vertex = this.boundVertexList.next.next.next.next.next.next;
var _loc17_:Vertex = this.boundVertexList.next.next.next.next;
var _loc18_:Number = _loc16_.cameraX - _loc15_.cameraX;
var _loc19_:Number = _loc16_.cameraY - _loc15_.cameraY;
var _loc20_:Number = _loc16_.cameraZ - _loc15_.cameraZ;
var _loc21_:Number = _loc17_.cameraX - _loc16_.cameraX;
var _loc22_:Number = _loc17_.cameraY - _loc16_.cameraY;
var _loc23_:Number = _loc17_.cameraZ - _loc16_.cameraZ;
var _loc24_:Number = _loc18_ * _loc18_ + _loc19_ * _loc19_ + _loc20_ * _loc20_;
var _loc25_:Number = _loc21_ * _loc21_ + _loc22_ * _loc22_ + _loc23_ * _loc23_;
var _loc26_:int = Math.ceil(this.noiseRadius);
this.planeSize = _loc24_ > _loc25_ ? Number(Number(Math.sqrt(_loc24_))) : Number(Number(Math.sqrt(_loc25_)));
this.pixel = this.planeSize / (this.mapSize - 1 - this.noiseRadius);
this.planeSize += _loc26_ * this.pixel * 2;
this.light.boundMinX -= _loc26_ * this.pixel;
this.light.boundMaxX += _loc26_ * this.pixel;
this.light.boundMinY -= _loc26_ * this.pixel;
this.light.boundMaxY += _loc26_ * this.pixel;
this.light.boundMinZ -= this.additionalSpace;
_loc14_ = this.boundVertexList;
_loc14_.x = this.light.boundMinX;
_loc14_.y = this.light.boundMinY;
_loc14_.z = this.light.boundMinZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMaxX;
_loc14_.y = this.light.boundMinY;
_loc14_.z = this.light.boundMinZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMinX;
_loc14_.y = this.light.boundMaxY;
_loc14_.z = this.light.boundMinZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMaxX;
_loc14_.y = this.light.boundMaxY;
_loc14_.z = this.light.boundMinZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMinX;
_loc14_.y = this.light.boundMinY;
_loc14_.z = this.light.boundMaxZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMaxX;
_loc14_.y = this.light.boundMinY;
_loc14_.z = this.light.boundMaxZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMinX;
_loc14_.y = this.light.boundMaxY;
_loc14_.z = this.light.boundMaxZ;
_loc14_ = _loc14_.next;
_loc14_.x = this.light.boundMaxX;
_loc14_.y = this.light.boundMaxY;
_loc14_.z = this.light.boundMaxZ;
this.boundMinX = 1e+22;
this.boundMinY = 1e+22;
this.boundMinZ = 1e+22;
this.boundMaxX = -1e+22;
this.boundMaxY = -1e+22;
this.boundMaxZ = -1e+22;
_loc14_ = this.boundVertexList;
while(_loc14_ != null)
{
_loc14_.cameraX = this.light.ma * _loc14_.x + this.light.mb * _loc14_.y + this.light.mc * _loc14_.z + this.light.md;
_loc14_.cameraY = this.light.me * _loc14_.x + this.light.mf * _loc14_.y + this.light.mg * _loc14_.z + this.light.mh;
_loc14_.cameraZ = this.light.mi * _loc14_.x + this.light.mj * _loc14_.y + this.light.mk * _loc14_.z + this.light.ml;
if(_loc14_.cameraX < this.boundMinX)
{
this.boundMinX = _loc14_.cameraX;
}
if(_loc14_.cameraX > this.boundMaxX)
{
this.boundMaxX = _loc14_.cameraX;
}
if(_loc14_.cameraY < this.boundMinY)
{
this.boundMinY = _loc14_.cameraY;
}
if(_loc14_.cameraY > this.boundMaxY)
{
this.boundMaxY = _loc14_.cameraY;
}
if(_loc14_.cameraZ < this.boundMinZ)
{
this.boundMinZ = _loc14_.cameraZ;
}
if(_loc14_.cameraZ > this.boundMaxZ)
{
this.boundMaxZ = _loc14_.cameraZ;
}
_loc14_ = _loc14_.next;
}
}
alternativa3d function render(param1:Camera3D, param2:Vector.<Object3D>, param3:int) : void
{
var _loc12_:Object3D = null;
var _loc13_:VertexBufferResource = null;
var _loc14_:IndexBufferResource = null;
var _loc15_:int = 0;
var _loc16_:Boolean = false;
var _loc17_:TextureMaterial = null;
var _loc18_:Sprite3D = null;
var _loc19_:Number = NaN;
var _loc20_:Number = NaN;
var _loc21_:Number = NaN;
var _loc22_:Number = NaN;
var _loc23_:Number = NaN;
var _loc24_:Number = NaN;
var _loc25_:Number = NaN;
var _loc26_:Number = NaN;
var _loc27_:Number = NaN;
var _loc28_:Number = NaN;
var _loc29_:Number = NaN;
var _loc30_:Number = NaN;
var _loc31_:Number = NaN;
var _loc32_:Number = NaN;
var _loc33_:Mesh = null;
var _loc34_:BSP = null;
var _loc4_:Device = param1.device;
this.planeX = Math.floor(this.light.boundMinX / this.pixel) * this.pixel;
this.planeY = Math.floor(this.light.boundMinY / this.pixel) * this.pixel;
this.scissor.width = Math.ceil(this.light.boundMaxX / this.pixel) - this.planeX / this.pixel;
this.scissor.height = Math.ceil(this.light.boundMaxY / this.pixel) - this.planeY / this.pixel;
var _loc5_:Number = 2 / this.planeSize;
var _loc6_:Number = -2 / this.planeSize;
var _loc7_:Number = 255 / (this.light.boundMaxZ - this.light.boundMinZ);
var _loc8_:Number = -(this.planeX + this.planeSize * 0.5) * _loc5_;
var _loc9_:Number = -(this.planeY + this.planeSize * 0.5) * _loc6_;
var _loc10_:Number = -this.light.boundMinZ * _loc7_;
if(this.mapSize != this.map.width)
{
this.map.dispose();
this.map = new RenderTargetTextureResource(this.mapSize,this.mapSize);
}
_loc4_.setRenderToTexture(this.map,true);
_loc4_.clear(1,0,0);
_loc4_.setScissorRectangle(this.scissor);
this.transform[14] = 1 / 255;
var _loc11_:int = 0;
while(_loc11_ < param3)
{
_loc12_ = param2[_loc11_];
_loc13_ = null;
_loc14_ = null;
_loc16_ = false;
if(_loc12_ is Sprite3D)
{
_loc18_ = Sprite3D(_loc12_);
_loc17_ = TextureMaterial(_loc18_.material);
_loc19_ = _loc18_.width;
_loc20_ = _loc18_.height;
if(_loc18_.autoSize)
{
_loc31_ = _loc18_.bottomRightU - _loc18_.topLeftU;
_loc32_ = _loc18_.bottomRightV - _loc18_.topLeftV;
_loc19_ = _loc17_.texture.width * _loc31_;
_loc20_ = _loc17_.texture.height * _loc32_;
}
_loc21_ = Math.tan(Math.asin(-this.dirZ));
_loc19_ *= _loc18_.scaleX;
_loc20_ *= _loc18_.scaleY;
_loc22_ = this.light.ima * _loc12_.md + this.light.imb * _loc12_.mh + this.light.imc * _loc12_.ml + this.light.imd;
_loc23_ = this.light.ime * _loc12_.md + this.light.imf * _loc12_.mh + this.light.img * _loc12_.ml + this.light.imh;
_loc24_ = this.light.imi * _loc12_.md + this.light.imj * _loc12_.mh + this.light.imk * _loc12_.ml + this.light.iml;
_loc23_ += Math.sin(-this.dirZ) * _loc20_ / 4;
_loc24_ -= Math.cos(-this.dirZ) * _loc20_ / 4;
_loc25_ = -_loc19_ * _loc18_.originX;
_loc26_ = -_loc20_ * _loc18_.originY;
_loc27_ = -_loc26_ / _loc21_;
_loc28_ = _loc25_ + _loc19_;
_loc29_ = _loc26_ + _loc20_;
_loc30_ = -_loc29_ / _loc21_;
_loc25_ = (_loc25_ + _loc22_) * _loc5_ + _loc8_;
_loc26_ = (_loc26_ + _loc23_) * _loc6_ + _loc9_;
_loc27_ = (_loc27_ + _loc24_) * _loc7_ + _loc10_;
_loc28_ = (_loc28_ + _loc22_) * _loc5_ + _loc8_;
_loc29_ = (_loc29_ + _loc23_) * _loc6_ + _loc9_;
_loc30_ = (_loc30_ + _loc24_) * _loc7_ + _loc10_;
_loc27_ -= this.bias * this.biasMultiplier * _loc7_ / _loc21_;
_loc30_ -= this.bias * this.biasMultiplier * _loc7_ / _loc21_;
this.coords[0] = _loc25_;
this.coords[1] = _loc26_;
this.coords[2] = _loc27_;
this.coords[4] = 0;
this.coords[5] = 0;
this.coords[8] = _loc25_;
this.coords[9] = _loc29_;
this.coords[10] = _loc30_;
this.coords[12] = 0;
this.coords[13] = 1;
this.coords[16] = _loc28_;
this.coords[17] = _loc29_;
this.coords[18] = _loc30_;
this.coords[20] = 1;
this.coords[21] = 1;
this.coords[24] = _loc28_;
this.coords[25] = _loc26_;
this.coords[26] = _loc27_;
this.coords[28] = 1;
this.coords[29] = 0;
_loc13_ = this.spriteVertexBuffer;
_loc14_ = this.spriteIndexBuffer;
_loc15_ = 2;
_loc16_ = true;
_loc4_.setProgram(this.getProgram(true,true));
_loc4_.setVertexBufferAt(0,_loc13_,0,Context3DVertexBufferFormat.FLOAT_1);
_loc4_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,this.coords,9,false);
}
else
{
this.transform[0] = (this.light.ima * _loc12_.ma + this.light.imb * _loc12_.me + this.light.imc * _loc12_.mi) * _loc5_;
this.transform[1] = (this.light.ima * _loc12_.mb + this.light.imb * _loc12_.mf + this.light.imc * _loc12_.mj) * _loc5_;
this.transform[2] = (this.light.ima * _loc12_.mc + this.light.imb * _loc12_.mg + this.light.imc * _loc12_.mk) * _loc5_;
this.transform[3] = (this.light.ima * _loc12_.md + this.light.imb * _loc12_.mh + this.light.imc * _loc12_.ml + this.light.imd) * _loc5_ + _loc8_;
this.transform[4] = (this.light.ime * _loc12_.ma + this.light.imf * _loc12_.me + this.light.img * _loc12_.mi) * _loc6_;
this.transform[5] = (this.light.ime * _loc12_.mb + this.light.imf * _loc12_.mf + this.light.img * _loc12_.mj) * _loc6_;
this.transform[6] = (this.light.ime * _loc12_.mc + this.light.imf * _loc12_.mg + this.light.img * _loc12_.mk) * _loc6_;
this.transform[7] = (this.light.ime * _loc12_.md + this.light.imf * _loc12_.mh + this.light.img * _loc12_.ml + this.light.imh) * _loc6_ + _loc9_;
this.transform[8] = (this.light.imi * _loc12_.ma + this.light.imj * _loc12_.me + this.light.imk * _loc12_.mi) * _loc7_;
this.transform[9] = (this.light.imi * _loc12_.mb + this.light.imj * _loc12_.mf + this.light.imk * _loc12_.mj) * _loc7_;
this.transform[10] = (this.light.imi * _loc12_.mc + this.light.imj * _loc12_.mg + this.light.imk * _loc12_.mk) * _loc7_;
this.transform[11] = (this.light.imi * _loc12_.md + this.light.imj * _loc12_.mh + this.light.imk * _loc12_.ml + this.light.iml) * _loc7_ + _loc10_;
if(_loc12_ is Mesh)
{
_loc33_ = Mesh(_loc12_);
_loc33_.prepareResources();
_loc13_ = _loc33_.vertexBuffer;
_loc14_ = _loc33_.indexBuffer;
_loc15_ = _loc33_.numTriangles;
_loc17_ = _loc33_.faceList.material as TextureMaterial;
}
else if(_loc12_ is BSP)
{
_loc34_ = BSP(_loc12_);
_loc34_.prepareResources();
_loc13_ = _loc34_.vertexBuffer;
_loc14_ = _loc34_.indexBuffer;
_loc15_ = _loc34_.numTriangles;
_loc17_ = _loc34_.faces[0].material as TextureMaterial;
}
else
{
_loc17_ = null;
}
if(_loc17_ != null && _loc17_.transparent)
{
_loc16_ = true;
_loc4_.setProgram(this.getProgram(true,false));
_loc4_.setVertexBufferAt(1,_loc13_,3,Context3DVertexBufferFormat.FLOAT_2);
}
else
{
_loc4_.setProgram(this.getProgram(false,false));
}
_loc4_.setVertexBufferAt(0,_loc13_,0,Context3DVertexBufferFormat.FLOAT_3);
_loc4_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,this.transform,4,false);
}
if(_loc13_ != null && _loc14_ != null)
{
_loc4_.setTextureAt(4,null);
_loc4_.setTextureAt(6,null);
if(_loc16_)
{
_loc4_.setTextureAt(0,_loc17_.textureResource);
this.alphaTestConst[0] = _loc17_.textureResource.correctionU;
this.alphaTestConst[1] = _loc17_.textureResource.correctionV;
this.alphaTestConst[3] = _loc12_ is Sprite3D ? Number(Number(0.99)) : Number(Number(this.alphaThreshold));
_loc4_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,10,this.alphaTestConst,1);
}
_loc4_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,this.fragment,1);
_loc4_.drawTriangles(_loc14_,0,_loc15_);
}
if(_loc16_)
{
_loc4_.setTextureAt(0,null);
_loc4_.setVertexBufferAt(1,null);
}
_loc11_++;
}
_loc4_.setScissorRectangle(null);
_loc5_ = 1 / this.planeSize;
_loc6_ = 1 / this.planeSize;
_loc8_ = -this.planeX * _loc5_;
_loc9_ = -this.planeY * _loc6_;
this.transform[0] = this.light.ima * _loc5_;
this.transform[1] = this.light.imb * _loc5_;
this.transform[2] = this.light.imc * _loc5_;
this.transform[3] = this.light.imd * _loc5_ + _loc8_;
this.transform[4] = this.light.ime * _loc6_;
this.transform[5] = this.light.imf * _loc6_;
this.transform[6] = this.light.img * _loc6_;
this.transform[7] = this.light.imh * _loc6_ + _loc9_;
this.transform[8] = this.light.imi * _loc7_;
this.transform[9] = this.light.imj * _loc7_;
this.transform[10] = this.light.imk * _loc7_;
this.transform[11] = this.light.iml * _loc7_ + _loc10_ - this.bias * this.biasMultiplier * _loc7_;
this.transform[12] = this.nearDistance;
this.transform[13] = this.farDistance - this.nearDistance;
this.transform[14] = -_loc7_;
this.params[4] = 0;
this.params[5] = 0;
this.params[6] = this.noiseRadius / this.mapSize;
this.params[7] = 1 / numSamples;
this.params[8] = param1.view._width / this.noiseSize;
this.params[9] = param1.view._height / this.noiseSize;
this.params[11] = param1.directionalLight != null ? Number(Number(param1.directionalLightStrength * param1.shadowMapStrength)) : Number(Number(0));
this.params[12] = Math.cos(this.noiseAngle);
this.params[13] = Math.sin(this.noiseAngle);
this.params[16] = -Math.sin(this.noiseAngle);
this.params[17] = Math.cos(this.noiseAngle);
}
public function dispose() : void
{
this.map.reset();
this.noise.reset();
}
private function getProgram(param1:Boolean, param2:Boolean) : ProgramResource
{
var _loc5_:ByteArray = null;
var _loc6_:ByteArray = null;
var _loc3_:int = int(param1) | int(param2) << 1;
var _loc4_:ProgramResource = this.programs[_loc3_];
if(_loc4_ == null)
{
_loc5_ = new ShadowMapVertexShader(param1,param2).agalcode;
_loc6_ = new ShadowMapFragmentShader(param1).agalcode;
_loc4_ = new ProgramResource(_loc5_,_loc6_);
this.programs[_loc3_] = _loc4_;
}
return _loc4_;
}
}
}
|
package alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengeCongratulationWindow_flowBitmap extends BitmapAsset
{
public function ChallengeCongratulationWindow_flowBitmap()
{
super();
}
}
}
|
package alternativa.tanks.sfx.floatingmessage {
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class Message extends TextField {
private static var poolSize:int;
private static const DEFAULT_TEXT_FORMAT:TextFormat = new TextFormat("Tahoma",12);
private static var pool:Vector.<Message> = new Vector.<Message>();
public var lifeTime:int;
public function Message() {
super();
autoSize = TextFieldAutoSize.LEFT;
defaultTextFormat = DEFAULT_TEXT_FORMAT;
background = true;
backgroundColor = 0;
}
public static function create() : Message {
if(poolSize == 0) {
return new Message();
}
return pool[--poolSize];
}
public function set color(param1:uint) : void {
var local2:TextFormat = defaultTextFormat;
local2.color = param1;
defaultTextFormat = local2;
}
public function destroy() : void {
if(parent != null) {
parent.removeChild(this);
}
text = "";
var local1:* = poolSize++;
pool[local1] = this;
}
}
}
|
package alternativa.tanks.model.garage.upgrade {
[ModelInterface]
public interface UpgradeGarageItem {
function isUpgradesEnabled() : Boolean;
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank12.png")]
public class PremiumRankBitmaps_bitmapBigRank12 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapBigRank12() {
super();
}
}
}
|
package projects.tanks.client.battleservice.model.createparams {
public class BattleLimits {
private var _scoreLimit:int;
private var _timeLimitInSec:int;
public function BattleLimits(param1:int = 0, param2:int = 0) {
super();
this._scoreLimit = param1;
this._timeLimitInSec = param2;
}
public function get scoreLimit() : int {
return this._scoreLimit;
}
public function set scoreLimit(param1:int) : void {
this._scoreLimit = param1;
}
public function get timeLimitInSec() : int {
return this._timeLimitInSec;
}
public function set timeLimitInSec(param1:int) : void {
this._timeLimitInSec = param1;
}
public function toString() : String {
var local1:String = "BattleLimits [";
local1 += "scoreLimit = " + this.scoreLimit + " ";
local1 += "timeLimitInSec = " + this.timeLimitInSec + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.candidates {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.clanmanagement.clanmemberlist.list.ClanMembersHeaderItem;
import base.DiscreteSprite;
import flash.text.TextFormatAlign;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class HeaderClanCandidateList extends DiscreteSprite {
[Inject]
public static var localeService:ILocaleService;
public static var HEADERS:Vector.<HeaderData>;
public static var tabs:Vector.<Number> = Vector.<Number>([1]);
private static const GAP:int = 2;
protected var _width:int = 800;
private var headerCells:Vector.<ClanMembersHeaderItem>;
public function HeaderClanCandidateList() {
var local1:ClanMembersHeaderItem = null;
this.headerCells = new Vector.<ClanMembersHeaderItem>();
super();
HEADERS = Vector.<HeaderData>([new HeaderData(localeService.getText(TanksLocale.TEXT_CLAN_MEMBER_NAME),TextFormatAlign.LEFT,2)]);
var local2:int = int(HEADERS.length);
var local3:int = 0;
while(local3 < local2) {
local1 = new ClanMembersHeaderItem(HEADERS[local3].align);
local1.label = HEADERS[local3].text;
local1.setLabelPosX(HEADERS[local3].posX);
local1.height = 18;
addChild(local1);
this.headerCells.push(local1);
local3++;
}
this.align();
}
protected function align() : void {
var local1:ClanMembersHeaderItem = null;
var local2:int = int(HEADERS.length);
var local3:Number = GAP - 1;
var local4:int = 0;
while(local4 < local2) {
local1 = this.headerCells[local4];
local1.width = tabs[local4] * (this._width + 2 - GAP * (tabs.length + 1));
local1.x = local3;
local1.y = 1;
if(local4 != local2 - 1) {
local3 += local1.width + GAP;
}
local4++;
}
this.headerCells[this.headerCells.length - 1].width = this._width + 3 - local3 - 2 * GAP;
}
override public function set width(param1:Number) : void {
this._width = Math.floor(param1);
this.align();
}
}
}
class HeaderData {
public var text:String;
public var align:String;
public var posX:int;
public function HeaderData(param1:String, param2:String, param3:int) {
super();
this.text = param1;
this.align = param2;
this.posX = param3;
}
}
|
package alternativa.tanks.service.impl {
import alternativa.startup.StartupSettings;
import alternativa.tanks.service.IExternalEntranceService;
import flash.system.Capabilities;
import flash.utils.Dictionary;
public class ExternalEntranceService implements IExternalEntranceService {
public static const VKONTAKTE:String = "vkontakte";
public static const FACEBOOK:String = "facebook";
public static const GOOGLE:String = "google";
private var _snEnabled:Dictionary = new Dictionary();
public function ExternalEntranceService() {
super();
}
public function get vkontakteEnabled() : Boolean {
if(Boolean(this._snEnabled[VKONTAKTE])) {
return this._snEnabled[VKONTAKTE];
}
return false;
}
public function get facebookEnabled() : Boolean {
if(Boolean(this._snEnabled[FACEBOOK])) {
return this._snEnabled[FACEBOOK];
}
return false;
}
public function get googleEnabled() : Boolean {
if(Boolean(this._snEnabled[GOOGLE])) {
return Boolean(this._snEnabled[GOOGLE]) && !StartupSettings.isDesktop && Capabilities.playerType != "StandAlone";
}
return false;
}
public function setEnabled(param1:String, param2:Boolean) : void {
this._snEnabled[param1] = param2;
}
}
}
|
package alternativa.tanks.service.temporaryitem {
import platform.client.fp10.core.type.IGameObject;
public interface ITemporaryItemService {
function getCurrentTimeRemainingMSec(param1:IGameObject) : Number;
function startItem(param1:IGameObject, param2:int) : void;
function stopItem(param1:IGameObject) : void;
}
}
|
package alternativa.tanks.display {
import flash.display.Sprite;
import utils.graphics.SectorMask;
public class SquareSectorIndicator extends Sprite {
private var size:Number;
private var ellipseWidth:Number;
private var sectorMask:SectorMask;
public function SquareSectorIndicator(param1:int, param2:Number, param3:uint, param4:Number) {
super();
this.size = param1;
this.ellipseWidth = param2;
this.drawShape(param3,param4);
this.sectorMask = new SectorMask(param1);
addChild(this.sectorMask);
mask = this.sectorMask;
}
private function drawShape(param1:uint, param2:Number) : void {
graphics.clear();
graphics.beginFill(param1,param2);
graphics.drawRoundRect(0,0,this.size,this.size,this.ellipseWidth);
graphics.endFill();
}
public function setProgress(param1:Number) : void {
this.sectorMask.setProgress(1 - param1,1);
}
public function setColor(param1:uint, param2:Number) : void {
this.drawShape(param1,param2);
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.referrals {
import alternativa.types.Long;
import flash.utils.Dictionary;
import projects.tanks.client.tanksservices.model.notifier.referrals.IReferralNotifierModelBase;
import projects.tanks.client.tanksservices.model.notifier.referrals.ReferralNotifierData;
import projects.tanks.client.tanksservices.model.notifier.referrals.ReferralNotifierModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.model.UserRefresh;
import projects.tanks.clients.fp10.libraries.tanksservices.model.listener.UserNotifier;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.UserInfoConsumer;
[ModelInfo]
public class ReferralNotifierModel extends ReferralNotifierModelBase implements IReferralNotifierModelBase, UserRefresh {
private var data:Dictionary = new Dictionary();
public function ReferralNotifierModel() {
super();
}
public function setIsReferral(param1:Vector.<ReferralNotifierData>) : void {
var local2:ReferralNotifierData = null;
for each(local2 in param1) {
this.setAndUpdateConsumer(local2);
}
}
private function setAndUpdateConsumer(param1:ReferralNotifierData) : void {
var local4:UserInfoConsumer = null;
var local2:Long = param1.userId;
this.data[local2] = param1.referral;
var local3:UserNotifier = UserNotifier(object.adapt(UserNotifier));
if(local3.hasDataConsumer(local2)) {
local4 = local3.getDataConsumer(local2);
local4.setIsReferral(param1.referral);
}
}
public function refresh(param1:Long, param2:UserInfoConsumer) : void {
if(param1 in this.data) {
param2.setIsReferral(this.data[param1]);
}
}
public function remove(param1:Long) : void {
delete this.data[param1];
}
}
}
|
package alternativa.tanks.models.battlefield.effects.graffiti
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GraffitiMenu_rightLockBitmap extends BitmapAsset
{
public function GraffitiMenu_rightLockBitmap()
{
super();
}
}
}
|
package projects.tanks.client.tanksservices.model.reconnect {
public interface IReconnectModelBase {
function reconnectFast(param1:RemoteEndpointData) : void;
function serverReadyToReconnect() : void;
function setSingleEntranceHash(param1:String) : void;
}
}
|
package alternativa.tanks.view.mainview {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.mainview.BattleTypesPanel_quickBtnClass.png")]
public class BattleTypesPanel_quickBtnClass extends BitmapAsset {
public function BattleTypesPanel_quickBtnClass() {
super();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.facebook {
public interface IFacebookEntranceModelBase {
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.tank {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Short;
import projects.tanks.client.battlefield.models.user.tank.TankCC;
import projects.tanks.client.battlefield.models.user.tank.TankLogicState;
import projects.tanks.client.battlefield.types.TankState;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class CodecTankCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_health:ICodec;
private var codec_local:ICodec;
private var codec_logicState:ICodec;
private var codec_movementDistanceBorderUntilTankCorrection:ICodec;
private var codec_movementTimeoutUntilTankCorrection:ICodec;
private var codec_tankState:ICodec;
private var codec_team:ICodec;
public function CodecTankCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_health = param1.getCodec(new TypeCodecInfo(Short,false));
this.codec_local = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_logicState = param1.getCodec(new EnumCodecInfo(TankLogicState,false));
this.codec_movementDistanceBorderUntilTankCorrection = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_movementTimeoutUntilTankCorrection = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_tankState = param1.getCodec(new TypeCodecInfo(TankState,true));
this.codec_team = param1.getCodec(new EnumCodecInfo(BattleTeam,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TankCC = new TankCC();
local2.health = this.codec_health.decode(param1) as int;
local2.local = this.codec_local.decode(param1) as Boolean;
local2.logicState = this.codec_logicState.decode(param1) as TankLogicState;
local2.movementDistanceBorderUntilTankCorrection = this.codec_movementDistanceBorderUntilTankCorrection.decode(param1) as int;
local2.movementTimeoutUntilTankCorrection = this.codec_movementTimeoutUntilTankCorrection.decode(param1) as int;
local2.tankState = this.codec_tankState.decode(param1) as TankState;
local2.team = this.codec_team.decode(param1) as BattleTeam;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TankCC = TankCC(param2);
this.codec_health.encode(param1,local3.health);
this.codec_local.encode(param1,local3.local);
this.codec_logicState.encode(param1,local3.logicState);
this.codec_movementDistanceBorderUntilTankCorrection.encode(param1,local3.movementDistanceBorderUntilTankCorrection);
this.codec_movementTimeoutUntilTankCorrection.encode(param1,local3.movementTimeoutUntilTankCorrection);
this.codec_tankState.encode(param1,local3.tankState);
this.codec_team.encode(param1,local3.team);
}
}
}
|
package forms.userlabel {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.userlabel.ChatUserLabel_goldStatusIconClass.png")]
public class ChatUserLabel_goldStatusIconClass extends BitmapAsset {
public function ChatUserLabel_goldStatusIconClass() {
super();
}
}
}
|
package controls.lifeindicator {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.lifeindicator.LineCharge_bitmapRight.png")]
public class LineCharge_bitmapRight extends BitmapAsset {
public function LineCharge_bitmapRight() {
super();
}
}
}
|
package platform.client.fp10.core.resource {
import flash.display.DisplayObjectContainer;
import flash.display.LoaderInfo;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.utils.ByteArray;
import flash.utils.Dictionary;
import flash.utils.setTimeout;
public class BatchMovieConstructor extends EventDispatcher {
public var movies:Vector.<DisplayObjectContainer>;
private var movieBytes:Vector.<ByteArray>;
private var loaders:Dictionary = new Dictionary();
private var maxParallelThreads:int;
private var numRunningLoaders:int;
private var lastMovieIndex:int;
private var isRunning:Boolean;
private var numCreatedImages:int;
public function BatchMovieConstructor() {
super();
}
public function buildMovies(param1:Vector.<ByteArray>, param2:int) : void {
if(this.isRunning) {
throw new Error("Already running");
}
if(param1 == null) {
throw new ArgumentError("Parameter imageDatas is null");
}
this.movieBytes = param1;
this.maxParallelThreads = param2;
this.isRunning = true;
this.movies = new Vector.<DisplayObjectContainer>(param1.length);
this.numCreatedImages = 0;
this.numRunningLoaders = 0;
this.lastMovieIndex = 0;
if(param1.length > 0) {
this.runLoaders();
} else {
setTimeout(this.complete,0);
}
}
private function runLoaders() : void {
var local1:MovieLoader = null;
while(this.numRunningLoaders < this.maxParallelThreads && this.lastMovieIndex < this.movieBytes.length) {
local1 = this.createLoader(this.lastMovieIndex);
this.loaders[local1] = true;
++this.numRunningLoaders;
++this.lastMovieIndex;
}
}
private function onMovieComplete(param1:Event) : void {
var local2:MovieLoader = MovieLoader(LoaderInfo(param1.target).loader);
--this.numRunningLoaders;
++this.numCreatedImages;
delete this.loaders[local2];
this.movies[local2.index] = local2;
if(this.numCreatedImages == this.movieBytes.length) {
this.complete();
} else {
this.runLoaders();
}
}
private function createLoader(param1:int) : MovieLoader {
var local2:MovieLoader = new MovieLoader(param1);
local2.contentLoaderInfo.addEventListener(Event.COMPLETE,this.onMovieComplete);
local2.loadBytes(this.movieBytes[this.lastMovieIndex]);
return local2;
}
private function complete() : void {
this.isRunning = false;
this.movieBytes = null;
dispatchEvent(new Event(Event.COMPLETE));
}
}
}
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.display.Loader;
import flash.events.EventDispatcher;
class MovieLoader extends Loader {
public var index:int;
public function MovieLoader(param1:int) {
super();
this.index = param1;
}
}
|
package alternativa.tanks.services.tankregistry {
import alternativa.tanks.models.tank.ITankModel;
import alternativa.types.Long;
import flash.utils.Dictionary;
import platform.client.fp10.core.type.IGameObject;
public class TankUsersRegistryServiceImpl implements TankUsersRegistry {
private const users:Dictionary = new Dictionary();
private var userList:Vector.<IGameObject>;
private var userCount:int;
private var localUser:IGameObject;
public function TankUsersRegistryServiceImpl() {
super();
}
public function addUser(param1:IGameObject) : void {
this.userList = null;
if(!this.users[param1.id]) {
this.users[param1.id] = param1;
++this.userCount;
}
if(ITankModel(param1.adapt(ITankModel)).isLocal()) {
this.localUser = param1;
}
}
public function removeUser(param1:IGameObject) : void {
this.userList = null;
if(Boolean(this.users[param1.id])) {
delete this.users[param1.id];
--this.userCount;
}
if(ITankModel(param1.adapt(ITankModel)).isLocal()) {
this.localUser = null;
}
}
public function getUserCount() : int {
return this.userCount;
}
public function getUsers() : Vector.<IGameObject> {
var local1:IGameObject = null;
if(this.userList == null) {
this.userList = new Vector.<IGameObject>();
for each(local1 in this.users) {
this.userList.push(local1);
}
}
return this.userList;
}
public function getUser(param1:Long) : IGameObject {
return this.users[param1];
}
public function getLocalUser() : IGameObject {
return this.localUser;
}
public function existLocalUser() : Boolean {
return this.localUser != null;
}
}
}
|
package alternativa.tanks.models.dom.cp
{
import alternativa.math.Vector3;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.models.dom.Point;
public class ControlPointMarkers
{
public var sprite:ControlPointSprite;
private var point:Point;
public function ControlPointMarkers(battlefieldModel:BattlefieldModel, pos:Vector3, keypoint:Point)
{
super();
this.point = keypoint;
this.sprite = new ControlPointSprite(keypoint.id);
ControlPointSprite.init();
this.sprite.redraw();
this.sprite.x = pos.x;
this.sprite.y = pos.y;
this.sprite.z = pos.z;
battlefieldModel.getBattlefieldData().viewport.getMapContainer().addChild(this.sprite);
}
public function tick() : void
{
this.sprite.progress = this.point.clientProgress;
this.sprite.redraw();
}
public function destroy() : void
{
this.sprite.destroy();
this.sprite = null;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.friend {
import alternativa.types.Long;
import flash.events.EventDispatcher;
import flash.utils.Dictionary;
import platform.client.fp10.core.network.connection.ConnectionCloseStatus;
import platform.client.fp10.core.network.handler.OnConnectionClosedServiceListener;
import projects.tanks.clients.fp10.libraries.tanksservices.model.friends.FriendInfoConsumer;
import projects.tanks.clients.fp10.libraries.tanksservices.model.friends.FriendState;
import projects.tanks.clients.fp10.libraries.tanksservices.service.TimeOutTruncateConsumers;
public class FriendInfoService extends EventDispatcher implements IFriendInfoService, OnConnectionClosedServiceListener {
private var consumers:Dictionary = new Dictionary();
private var friends:Dictionary = new Dictionary();
private var newAcceptedFriends:Dictionary = new Dictionary();
private var newIncomingFriends:Dictionary = new Dictionary();
private var truncateConsumers:TimeOutTruncateConsumers;
public function FriendInfoService() {
super();
this.truncateConsumers = new TimeOutTruncateConsumers();
this.truncateConsumers.consumers = this.consumers;
this.truncateConsumers.truncateFunction = this.unSubscribe;
}
private static function getDictionaryLengthByValue(param1:Dictionary, param2:Object = null) : int {
var local4:Object = null;
var local3:int = 0;
for each(local4 in param1) {
if(param2 != null) {
if(local4 == param2) {
local3++;
}
} else {
local3++;
}
}
return local3;
}
public function onConnectionClosed(param1:ConnectionCloseStatus) : void {
this.consumers = new Dictionary();
this.friends = new Dictionary();
this.newAcceptedFriends = new Dictionary();
this.newIncomingFriends = new Dictionary();
}
private function subscribe(param1:Long, param2:FriendInfoConsumer) : void {
this.consumers[param1] = param2;
if(param1 in this.friends) {
this.notifyConsumer(param1,this.friends[param1]);
}
}
private function unSubscribe(param1:Vector.<Long>) : void {
var local2:Long = null;
for each(local2 in param1) {
delete this.consumers[local2];
}
}
public function setFriendState(param1:Long, param2:FriendState) : void {
var local3:FriendState = this.getFriendState(param1);
this.friends[param1] = param2;
this.notifyConsumer(param1,param2);
dispatchEvent(new FriendStateChangeEvent(FriendStateChangeEvent.CHANGE,param1,param2,local3));
}
public function getFriendsIdByState(param1:FriendState) : Vector.<Long> {
var local3:* = undefined;
var local2:Vector.<Long> = new Vector.<Long>();
for(local3 in this.friends) {
if(this.friends[local3] == param1) {
local2.push(local3);
}
}
return local2;
}
public function deleteFriend(param1:Long, param2:FriendState) : void {
var local3:FriendState = null;
if(this.isFriendsInState(param1,param2)) {
local3 = this.getFriendState(param1);
delete this.friends[param1];
this.notifyConsumer(param1,FriendState.UNKNOWN);
dispatchEvent(new FriendStateChangeEvent(FriendStateChangeEvent.CHANGE,param1,FriendState.UNKNOWN,local3));
}
}
public function getConsumer(param1:Long) : FriendInfoConsumer {
return this.consumers[param1];
}
private function notifyConsumer(param1:Long, param2:FriendState) : void {
if(param1 in this.consumers) {
this.getConsumer(param1).setFriendState(param2);
}
}
public function getOrCreateUpdater(param1:Long) : IFriendsInfoLabelUpdater {
var local2:FriendsInfoLabelUpdater = null;
this.truncateConsumers.updateLastAccessTime(param1);
if(param1 in this.consumers) {
local2 = this.consumers[param1];
} else {
local2 = new FriendsInfoLabelUpdater();
this.consumers[param1] = local2;
this.subscribe(param1,local2);
}
local2.updateLastAccessTime();
return local2;
}
public function isFriendsInState(param1:Long, param2:FriendState) : Boolean {
return this.friends[param1] == param2;
}
public function getFriendState(param1:Long) : FriendState {
if(param1 in this.friends) {
return this.friends[param1];
}
return FriendState.UNKNOWN;
}
public function get acceptedFriendsLength() : int {
return getDictionaryLengthByValue(this.friends,FriendState.ACCEPTED);
}
public function get incomingFriendsLength() : int {
return getDictionaryLengthByValue(this.friends,FriendState.INCOMING);
}
public function onAddNewAcceptedFriend(param1:Long) : void {
this.newAcceptedFriends[param1] = true;
this.dispatchChangeNewAcceptedFriend(param1);
}
public function onRemoveNewAcceptedFriend(param1:Long) : void {
delete this.newAcceptedFriends[param1];
this.dispatchChangeNewAcceptedFriend(param1);
}
public function removeNewAcceptedFriend(param1:Long) : void {
dispatchEvent(new NewFriendRemoveEvent(NewFriendRemoveEvent.ACCEPTED,param1));
}
public function isNewAcceptedFriend(param1:Long) : Boolean {
return param1 in this.newAcceptedFriends;
}
public function get newAcceptedFriendsLength() : int {
return getDictionaryLengthByValue(this.newAcceptedFriends);
}
private function dispatchChangeNewAcceptedFriend(param1:Long) : void {
dispatchEvent(new NewFriendEvent(NewFriendEvent.ACCEPTED_CHANGE,param1));
}
public function onAddNewIncomingFriend(param1:Long) : void {
this.newIncomingFriends[param1] = true;
this.dispatchChangeNewIncommingFriend(param1);
}
public function onRemoveNewIncomingFriend(param1:Long) : void {
delete this.newIncomingFriends[param1];
this.dispatchChangeNewIncommingFriend(param1);
}
public function removeNewIncomingFriend(param1:Long) : void {
dispatchEvent(new NewFriendRemoveEvent(NewFriendRemoveEvent.INCOMING,param1));
}
public function isNewIncomingFriend(param1:Long) : Boolean {
return param1 in this.newIncomingFriends;
}
public function get newIncomingFriendsLength() : int {
return getDictionaryLengthByValue(this.newIncomingFriends);
}
private function dispatchChangeNewIncommingFriend(param1:Long) : void {
dispatchEvent(new NewFriendEvent(NewFriendEvent.INCOMING_CHANGE,param1));
}
public function isNewFriend(param1:Long) : Boolean {
return this.isNewAcceptedFriend(param1) || this.isNewIncomingFriend(param1);
}
}
}
|
package alternativa.tanks.models.weapon.laser {
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.Tank;
[ModelInterface]
public interface LaserPointer {
function updateDirection(param1:Vector3) : void;
function aimAtTank(param1:Tank, param2:Vector3) : void;
function hideLaser() : void;
function getLaserPointerBlueColor() : uint;
function getLaserPointerRedColor() : uint;
}
}
|
package alternativa.engine3d.loaders.collada {
import alternativa.engine3d.materials.Material;
use namespace collada;
public class DaeMaterial extends DaeElement {
public var material:Material;
public var diffuseTexCoords:String;
public var used:Boolean = false;
public function DaeMaterial(param1:XML, param2:DaeDocument) {
super(param1,param2);
}
private function parseSetParams() : Object {
var local3:XML = null;
var local4:DaeParam = null;
var local1:Object = new Object();
var local2:XMLList = data.instance_effect.setparam;
for each(local3 in local2) {
local4 = new DaeParam(local3,document);
local1[local4.ref] = local4;
}
return local1;
}
private function get effectURL() : XML {
return data.instance_effect.@url[0];
}
override protected function parseImplementation() : Boolean {
var local1:DaeEffect = document.findEffect(this.effectURL);
if(local1 != null) {
local1.parse();
this.material = local1.getMaterial(this.parseSetParams());
this.diffuseTexCoords = local1.diffuseTexCoords;
if(this.material != null) {
this.material.name = name;
}
return true;
}
return false;
}
}
}
|
package alternativa.tanks.models.battle.gui.markers {
import alternativa.math.Vector3;
public interface PointIndicatorStateProvider {
function getIndicatorPosition() : Vector3;
function isIndicatorActive(param1:Vector3 = null) : Boolean;
function zOffset() : Number;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.