package_1 alternativa.osgi.service.console.variables

This commit is contained in:
Pyogenics
2025-01-26 10:28:25 +00:00
parent 6ba701b0a9
commit 98d9fbb377
14 changed files with 111 additions and 109 deletions

1
packages.txt Normal file
View File

@@ -0,0 +1 @@
package_1 alternativa/osgi/service/console/variables

View File

@@ -11,10 +11,10 @@ package
import flash.events.FullScreenEvent;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import package_1.name_1;
import package_1.name_12;
import package_1.name_13;
import package_1.name_22;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import alternativa.osgi.service.console.variables.ConsoleVarString;
import alternativa.osgi.service.console.variables.ConsoleVar;
import package_10.name_17;
import package_11.name_16;
import package_12.name_15;
@@ -65,49 +65,50 @@ package
super();
mouseEnabled = false;
mouseChildren = false;
this.method_7();
this.method_16();
this.method_6();
this.method_11();
this.initStage();
this.initClient();
this.initConsole();
this.initOptionsSupport();
name_2.fadeRadius = 7000;
name_2.spotAngle = 140 * Math.PI / 180;
name_2.fallofAngle = 170 * Math.PI / 180;
this.stage3D = stage.stage3Ds[0];
this.stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.method_10);
this.stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.onContextCreate);
this.stage3D.requestContext3D();
}
private function method_10(param1:Event) : void
private function onContextCreate(param1:Event) : void
{
switch(name_28.name_35(this.stage3D.context3D))
{
case name_6.DXT1:
this.method_3("cfg.dxt1.xml");
this.loadConfig("cfg.dxt1.xml");
break;
case name_6.ETC1:
this.method_3("cfg.etc1.xml");
this.loadConfig("cfg.etc1.xml");
break;
case name_6.PVRTC:
this.method_3("cfg.pvrtc.xml");
}
this.loadConfig("cfg.pvrtc.xml");
} }
}
private function method_11() : void
private function initOptionsSupport() : void
{
new name_12("fog_mode",0,0,3,this.method_1);
new name_1("fog_near",0,0,1000000,this.method_1);
new name_1("fog_far",5000,0,1000000,this.method_1);
new name_1("fog_density",1,0,1,this.method_1);
new name_1("horizon_offset",0,-1000000,1000000,this.method_1);
new name_1("horizon_size",5000,0,1000000,this.method_1);
new name_13("fog_color","0x0",this.method_1);
new ConsoleVarInt("fog_mode",0,0,3,this.onFogSettingsChange);
new ConsoleVarFloat("fog_near",0,0,1000000,this.onFogSettingsChange);
new ConsoleVarFloat("fog_far",5000,0,1000000,this.onFogSettingsChange);
new ConsoleVarFloat("fog_density",1,0,1,this.onFogSettingsChange);
new ConsoleVarFloat("horizon_offset",0,-1000000,1000000,this.onFogSettingsChange);
new ConsoleVarFloat("horizon_size",5000,0,1000000,this.onFogSettingsChange);
new ConsoleVarString("fog_color","0x0",this.onFogSettingsChange);
var _loc1_:name_4 = name_4(name_3.name_8().name_30(name_4));
_loc1_.name_45("fog_texture",this.method_18);
new name_1("beam_distance",7000,0,1000000,this.method_2);
new name_1("beam_spot",140,0,180,this.method_2);
new name_1("beam_fallof",170,0,180,this.method_2);
new name_1("beam_fallof",170,0,180,this.method_2);
new name_1("camera_smoothing",20,0,200,this.method_17);
_loc1_.name_45("fog_texture",this.onFogTextureChange);
new ConsoleVarFloat("beam_distance",7000,0,1000000,this.onLightSettingsChange);
new ConsoleVarFloat("beam_spot",140,0,180,this.onLightSettingsChange);
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
new ConsoleVarFloat("camera_smoothing",20,0,200,this.onControllerSettingsChange);
name_9.fogMode = name_9.DISABLED;
name_10.fogMode = name_10.DISABLED;
name_7.fogMode = name_7.DISABLED;
@@ -116,27 +117,27 @@ package
name_33.fogMode = name_11.DISABLED;
}
private function method_17(param1:name_1) : void
private function onControllerSettingsChange(param1:ConsoleVarFloat) : void
{
name_20.smoothing = param1.value;
}
private function method_2(param1:name_22) : void
private function onLightSettingsChange(param1:ConsoleVar) : void
{
switch(param1.name_32())
{
case "beam_distance":
name_2.fadeRadius = name_1(param1).value;
name_2.fadeRadius = ConsoleVarFloat(param1).value;
break;
case "beam_spot":
name_2.spotAngle = name_1(param1).value * Math.PI / 180;
name_2.spotAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
break;
case "beam_fallof":
name_2.fallofAngle = name_1(param1).value * Math.PI / 180;
name_2.fallofAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
}
}
private function method_1(param1:name_22) : void
private function onFogSettingsChange(param1:ConsoleVar) : void
{
var _loc3_:Number = NaN;
var _loc4_:Number = NaN;
@@ -145,41 +146,41 @@ package
switch(param1.name_32())
{
case "fog_mode":
_loc6_.name_41(name_12(param1).value);
_loc6_.name_41(ConsoleVarInt(param1).value);
break;
case "fog_near":
_loc6_.name_47(name_1(param1).value);
_loc6_.name_47(ConsoleVarFloat(param1).value);
break;
case "fog_far":
_loc6_.name_48(name_1(param1).value);
_loc6_.name_48(ConsoleVarFloat(param1).value);
break;
case "fog_density":
_loc6_.name_49(name_1(param1).value);
_loc6_.name_49(ConsoleVarFloat(param1).value);
break;
case "horizon_size":
_loc6_.name_38(name_1(param1).value);
_loc6_.name_38(ConsoleVarFloat(param1).value);
break;
case "horizon_offset":
_loc6_.name_34(name_1(param1).value);
_loc6_.name_34(ConsoleVarFloat(param1).value);
break;
case "fog_color":
_loc6_.name_40(parseInt(name_13(param1).value,16));
_loc6_.name_40(parseInt(ConsoleVarString(param1).value,16));
}
}
private function method_18(param1:name_4, param2:Array) : void
private function onFogTextureChange(param1:name_4, param2:Array) : void
{
this.gameKernel.name_5().name_36(param2.join(" "));
}
private function method_7() : void
private function initStage() : void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.LOW;
}
private function method_16() : void
private function initClient() : void
{
new name_3();
this.var_2 = new name_16();
@@ -189,7 +190,7 @@ package
new package_14.name_21().start(name_3.name_8());
}
private function method_6() : void
private function initConsole() : void
{
var _loc1_:name_4 = name_4(name_3.name_8().name_30(name_4));
_loc1_.width = 100;
@@ -197,36 +198,36 @@ package
_loc1_.height = 30;
}
private function method_3(param1:String) : void
private function loadConfig(param1:String) : void
{
addChild(this.preloader);
this.config = new name_18();
this.config.addEventListener(Event.COMPLETE,this.method_14);
this.config.addEventListener(Event.COMPLETE,this.onConfigLoadingComplete);
this.config.load(param1,this.preloader);
}
private function method_14(param1:Event) : void
private function onConfigLoadingComplete(param1:Event) : void
{
this.method_8();
this.method_13();
this.initGame();
this.initHUD();
}
private function method_13() : void
private function initHUD() : void
{
this.var_1 = new name_15();
stage.addChild(this.var_1);
this.var_1.mouseChildren = true;
this.var_1.mouseEnabled = true;
this.var_1.addEventListener("CLICK_FULL_SCREEN_BUTTON",this.method_19);
this.var_1.addEventListener("CLICK_NEXT_TANK_BUTTON",this.method_9);
this.var_1.addEventListener("CLICK_FULL_SCREEN_BUTTON",this.onClickFullScreenButton);
this.var_1.addEventListener("CLICK_NEXT_TANK_BUTTON",this.onClickNextTankButton);
stage.addChild(this.preloader);
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.method_15);
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
this.gameKernel.name_5().name_27().diagramVerticalMargin = 85;
this.gameKernel.name_5().name_27().diagramHorizontalMargin = 12;
this.method_4(null);
this.onResize(null);
}
private function method_15(param1:KeyboardEvent) : void
private function onKeyDown(param1:KeyboardEvent) : void
{
var _loc2_:DisplayObject = null;
if(param1.keyCode == Keyboard.G)
@@ -243,19 +244,19 @@ package
}
}
private function method_19(param1:Event) : void
private function onClickFullScreenButton(param1:Event) : void
{
stage.displayState = this.var_1.name_31 ? StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
stage.addEventListener(FullScreenEvent.FULL_SCREEN,this.method_5);
stage.addEventListener(FullScreenEvent.FULL_SCREEN,this.onFullScreenChange);
}
private function method_5(param1:Event) : void
private function onFullScreenChange(param1:Event) : void
{
stage.removeEventListener(FullScreenEvent.FULL_SCREEN,this.method_5);
stage.removeEventListener(FullScreenEvent.FULL_SCREEN,this.onFullScreenChange);
this.var_1.name_31 = stage.displayState != StageDisplayState.NORMAL;
}
private function method_9(param1:Event) : void
private function onClickNextTankButton(param1:Event) : void
{
if(testTask != null)
{
@@ -263,23 +264,23 @@ package
}
}
private function method_8() : void
private function initGame() : void
{
this.gameKernel = new name_17(stage,this.config.options);
this.gameKernel.name_5().name_37(this.stage3D);
var _loc1_:name_14 = new name_14(this.gameKernel,this.config,this,this.preloader);
this.gameKernel.addTask(_loc1_);
stage.addEventListener(Event.RESIZE,this.method_4);
this.method_4(null);
stage.addEventListener(Event.ENTER_FRAME,this.method_12);
stage.addEventListener(Event.RESIZE,this.onResize);
this.onResize(null);
stage.addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
}
private function method_12(param1:Event) : void
private function onEnterFrame(param1:Event) : void
{
this.gameKernel.name_51();
}
private function method_4(param1:Event) : void
private function onResize(param1:Event) : void
{
var _loc2_:name_23 = null;
if(this.gameKernel != null)

View File

@@ -1,15 +1,15 @@
package package_1
package alternativa.osgi.service.console.variables
{
import package_5.name_3;
import package_6.name_4;
public class name_22
public class ConsoleVar
{
protected var varName:String;
protected var inputListener:Function;
public function name_22(varName:String, inputListener:Function = null)
public function ConsoleVar(varName:String, inputListener:Function = null)
{
super();
this.varName = varName;

View File

@@ -1,6 +1,6 @@
package package_1
package alternativa.osgi.service.console.variables
{
public class name_1 extends name_22
public class ConsoleVarFloat extends ConsoleVar
{
public var value:Number;
@@ -8,7 +8,7 @@ package package_1
private var maxValue:Number;
public function name_1(consoleVarName:String, initialValue:Number, minValue:Number, maxValue:Number, changeListener:Function = null)
public function ConsoleVarFloat(consoleVarName:String, initialValue:Number, minValue:Number, maxValue:Number, changeListener:Function = null)
{
super(consoleVarName,changeListener);
this.value = initialValue;

View File

@@ -1,6 +1,6 @@
package package_1
package alternativa.osgi.service.console.variables
{
public class name_12 extends name_22
public class ConsoleVarInt extends ConsoleVar
{
public var value:int;
@@ -8,7 +8,7 @@ package package_1
private var maxValue:int;
public function name_12(consoleVarName:String, initialValue:int, minValue:int, maxValue:int, inputListener:Function = null)
public function ConsoleVarInt(consoleVarName:String, initialValue:int, minValue:int, maxValue:int, inputListener:Function = null)
{
super(consoleVarName,inputListener);
this.value = initialValue;

View File

@@ -1,10 +1,10 @@
package package_1
package alternativa.osgi.service.console.variables
{
public class name_13 extends name_22
public class ConsoleVarString extends ConsoleVar
{
public var value:String;
public function name_13(consoleVarName:String, initialValue:String, inputListener:Function = null)
public function ConsoleVarString(consoleVarName:String, initialValue:String, inputListener:Function = null)
{
super(consoleVarName,inputListener);
this.value = initialValue;

View File

@@ -13,7 +13,7 @@ package package_6
import flash.text.TextFormat;
import flash.ui.Keyboard;
import flash.utils.setTimeout;
import package_1.name_22;
import alternativa.osgi.service.console.variables.ConsoleVar;
import package_15.name_632;
import package_15.name_634;
import package_15.name_635;
@@ -111,7 +111,7 @@ package package_6
this.name_45("varlistv",this.method_579);
}
public function name_147(variable:name_22) : void
public function name_147(variable:ConsoleVar) : void
{
this.var_536[variable.name_32()] = variable;
}
@@ -303,7 +303,7 @@ package package_6
this.var_531 = len + 1;
var tokens:Array = text.match(TOKENIZER);
var commandName:String = tokens.shift();
var variable:name_22 = this.var_536[commandName];
var variable:ConsoleVar = this.var_536[commandName];
if(variable != null)
{
variable.method_77(this,tokens);
@@ -813,7 +813,7 @@ package package_6
private function method_562(start:String, showValues:Boolean) : void
{
var name:String = null;
var variable:name_22 = null;
var variable:ConsoleVar = null;
var s:String = null;
var vars:Array = [];
for(name in this.var_536)

View File

@@ -1,6 +1,6 @@
package package_6
{
import package_1.name_22;
import alternativa.osgi.service.console.variables.ConsoleVar;
public interface name_4
{
@@ -46,7 +46,7 @@ package package_6
function method_139(param1:String) : void;
function name_147(param1:name_22) : void;
function name_147(param1:ConsoleVar) : void;
function name_146(param1:String) : void;
}

View File

@@ -6,8 +6,8 @@ package package_7
import flash.geom.ColorTransform;
import flash.geom.Vector3D;
import flash.ui.Keyboard;
import package_1.name_1;
import package_1.name_12;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import package_10.class_1;
import package_10.name_17;
import package_10.name_54;
@@ -114,13 +114,13 @@ package package_7
{
private static const DEAD_TEXTURE_ID:String = "dead";
private static var conShockSize:name_1 = new name_1("shock_size",1200,0,2000);
private static var conShockSize:ConsoleVarFloat = new ConsoleVarFloat("shock_size",1200,0,2000);
private static var conShockSizeGrow:name_1 = new name_1("shock_size_grow",200,0,2000);
private static var conShockSizeGrow:ConsoleVarFloat = new ConsoleVarFloat("shock_size_grow",200,0,2000);
private static var conPysicsDebug:name_12 = new name_12("physics_debug",0,0,1);
private static var conPysicsDebug:ConsoleVarInt = new ConsoleVarInt("physics_debug",0,0,1);
private static var conMaxSpeed:name_1 = new name_1("max_speed",800,0,2000);
private static var conMaxSpeed:ConsoleVarFloat = new ConsoleVarFloat("max_speed",800,0,2000);
private static var log:name_160 = name_160(name_3.name_8().name_30(name_160));

View File

@@ -1,7 +1,7 @@
package package_71
{
import flash.ui.Keyboard;
import package_1.name_12;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import package_10.class_17;
import package_10.name_17;
import package_10.name_57;
@@ -19,7 +19,7 @@ package package_71
private static const KEY_RIGHT:uint = Keyboard.RIGHT;
private static var conReverseBackTurn:name_12 = new name_12("reverse_back_turn",1,0,1);
private static var conReverseBackTurn:ConsoleVarInt = new ConsoleVarInt("reverse_back_turn",1,0,1);
private static const SYNC_INTERVAL:int = 4000;

View File

@@ -1,6 +1,6 @@
package package_77
{
import package_1.name_1;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import package_27.name_501;
import package_46.Matrix4;
import package_46.name_194;
@@ -9,7 +9,7 @@ package package_77
public class name_515
{
private static var conSpeedDamping:name_1 = new name_1("track_damping",0,0,1000);
private static var conSpeedDamping:ConsoleVarFloat = new ConsoleVarFloat("track_damping",0,0,1000);
public var chassisBody:name_271;

View File

@@ -1,7 +1,7 @@
package package_81
{
import flash.geom.Vector3D;
import package_1.name_1;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import package_18.name_44;
import package_18.name_85;
import package_18.name_90;
@@ -26,7 +26,7 @@ package package_81
private static const BARREL_INDEX:Number = 0;
private static var particleBaseSize:name_1 = new name_1("flame_base_size",100,1,1000);
private static var particleBaseSize:ConsoleVarFloat = new ConsoleVarFloat("flame_base_size",100,1,1000);
private static var matrix:Matrix3 = new Matrix3();

View File

@@ -2,8 +2,8 @@ package package_9
{
import flash.ui.Keyboard;
import flash.utils.getTimer;
import package_1.name_1;
import package_1.name_12;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import package_10.name_54;
import package_18.name_102;
import package_18.name_90;
@@ -31,13 +31,13 @@ package package_9
private static var camSpeedThreshold:Number = 10;
private static var fixedPitch:name_1 = new name_1("cam_fixedpitch",10 * Math.PI / 180,-1,1);
private static var fixedPitch:ConsoleVarFloat = new ConsoleVarFloat("cam_fixedpitch",10 * Math.PI / 180,-1,1);
private static var noPitchCorrection:name_12 = new name_12("cam_nopitchcorrection",1,0,1);
private static var noPitchCorrection:ConsoleVarInt = new ConsoleVarInt("cam_nopitchcorrection",1,0,1);
private static var pitchCorrectionCoeff:name_1 = new name_1("cam_pitchcorrectioncoeff",1,0,10);
private static var pitchCorrectionCoeff:ConsoleVarFloat = new ConsoleVarFloat("cam_pitchcorrectioncoeff",1,0,10);
private static var reboundDelay:name_12 = new name_12("cam_rebound",1000,0,2000);
private static var reboundDelay:ConsoleVarInt = new ConsoleVarInt("cam_rebound",1000,0,2000);
private static var elevationAngles:Vector.<Number> = new Vector.<Number>(1,true);

View File

@@ -2,8 +2,8 @@ package package_9
{
import flash.ui.Keyboard;
import flash.utils.getTimer;
import package_1.name_1;
import package_1.name_12;
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
import alternativa.osgi.service.console.variables.ConsoleVarInt;
import package_10.name_54;
import package_18.name_102;
import package_18.name_90;
@@ -31,13 +31,13 @@ package package_9
public static var camSpeedThreshold:Number = 10;
private static var fixedPitch:name_1 = new name_1("cam_fixedpitch",10 * Math.PI / 180,-1,1);
private static var fixedPitch:ConsoleVarFloat = new ConsoleVarFloat("cam_fixedpitch",10 * Math.PI / 180,-1,1);
private static var noPitchCorrection:name_12 = new name_12("cam_nopitchcorrection",1,0,1);
private static var noPitchCorrection:ConsoleVarInt = new ConsoleVarInt("cam_nopitchcorrection",1,0,1);
private static var pitchCorrectionCoeff:name_1 = new name_1("cam_pitchcorrectioncoeff",1,0,10);
private static var pitchCorrectionCoeff:ConsoleVarFloat = new ConsoleVarFloat("cam_pitchcorrectioncoeff",1,0,10);
private static var reboundDelay:name_12 = new name_12("cam_rebound",1000,0,2000);
private static var reboundDelay:ConsoleVarInt = new ConsoleVarInt("cam_rebound",1000,0,2000);
private static var elevationAngles:Vector.<Number> = new Vector.<Number>(1,true);