mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 09:59:07 -07:00
Add mostly deobfuscated package, class and function name source
This commit is contained in:
83
src/_codec/versions/version1/a3d/CodecA3D.as
Normal file
83
src/_codec/versions/version1/a3d/CodecA3D.as
Normal file
@@ -0,0 +1,83 @@
|
||||
package _codec.versions.version1.a3d
|
||||
{
|
||||
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 versions.version1.a3d.A3D;
|
||||
import versions.version1.a3d.geometry.A3DGeometry;
|
||||
import versions.version1.a3d.materials.A3DImage;
|
||||
import versions.version1.a3d.materials.A3DMap;
|
||||
import versions.version1.a3d.materials.A3DMaterial;
|
||||
import versions.version1.a3d.objects.A3DBox;
|
||||
import versions.version1.a3d.objects.A3DObject;
|
||||
|
||||
public class CodecA3D implements ICodec
|
||||
{
|
||||
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
|
||||
|
||||
private var §_-EA§:ICodec;
|
||||
|
||||
private var §_-PA§:ICodec;
|
||||
|
||||
private var §_-Sd§:ICodec;
|
||||
|
||||
private var §_-dB§:ICodec;
|
||||
|
||||
private var §_-77§:ICodec;
|
||||
|
||||
private var §_-1x§:ICodec;
|
||||
|
||||
public function CodecA3D()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(protocol:IProtocol) : void
|
||||
{
|
||||
this.§_-EA§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DBox,false),true,1));
|
||||
this.§_-PA§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DGeometry,false),true,1));
|
||||
this.§_-Sd§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DImage,false),true,1));
|
||||
this.§_-dB§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DMap,false),true,1));
|
||||
this.§_-77§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DMaterial,false),true,1));
|
||||
this.§_-1x§ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DObject,false),true,1));
|
||||
}
|
||||
|
||||
public function decode(protocolBuffer:ProtocolBuffer) : Object
|
||||
{
|
||||
log = IClientLog(OSGi.getInstance().getService(IClientLog));
|
||||
var value_boxes:Vector.<A3DBox> = this.§_-EA§.decode(protocolBuffer) as Vector.<A3DBox>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","boxes",value_boxes);
|
||||
var value_geometries:Vector.<A3DGeometry> = this.§_-PA§.decode(protocolBuffer) as Vector.<A3DGeometry>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","geometries",value_geometries);
|
||||
var value_images:Vector.<A3DImage> = this.§_-Sd§.decode(protocolBuffer) as Vector.<A3DImage>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","images",value_images);
|
||||
var value_maps:Vector.<A3DMap> = this.§_-dB§.decode(protocolBuffer) as Vector.<A3DMap>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","maps",value_maps);
|
||||
var value_materials:Vector.<A3DMaterial> = this.§_-77§.decode(protocolBuffer) as Vector.<A3DMaterial>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","materials",value_materials);
|
||||
var value_objects:Vector.<A3DObject> = this.§_-1x§.decode(protocolBuffer) as Vector.<A3DObject>;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","objects",value_objects);
|
||||
return new A3D(value_boxes,value_geometries,value_images,value_maps,value_materials,value_objects);
|
||||
}
|
||||
|
||||
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
|
||||
{
|
||||
if(object == null)
|
||||
{
|
||||
throw new Error("Object is null. Use @ProtocolOptional annotation.");
|
||||
}
|
||||
var struct:A3D = A3D(object);
|
||||
this.§_-EA§.encode(protocolBuffer,struct.boxes);
|
||||
this.§_-PA§.encode(protocolBuffer,struct.geometries);
|
||||
this.§_-Sd§.encode(protocolBuffer,struct.images);
|
||||
this.§_-dB§.encode(protocolBuffer,struct.maps);
|
||||
this.§_-77§.encode(protocolBuffer,struct.materials);
|
||||
this.§_-1x§.encode(protocolBuffer,struct.objects);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user