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:
@@ -0,0 +1,59 @@
|
||||
package _codec.versions.version2.a3d.geometry
|
||||
{
|
||||
import alternativa.osgi.OSGi;
|
||||
import alternativa.osgi.service.clientlog.IClientLog;
|
||||
import alternativa.protocol.ICodec;
|
||||
import alternativa.protocol.IProtocol;
|
||||
import alternativa.protocol.ProtocolBuffer;
|
||||
import alternativa.protocol.info.TypeCodecInfo;
|
||||
import flash.utils.ByteArray;
|
||||
import versions.version2.a3d.geometry.A3D2IndexBuffer;
|
||||
|
||||
public class CodecA3D2IndexBuffer implements ICodec
|
||||
{
|
||||
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
|
||||
|
||||
private var §_-GN§:ICodec;
|
||||
|
||||
private var §_-2o§:ICodec;
|
||||
|
||||
private var §_-mz§:ICodec;
|
||||
|
||||
public function CodecA3D2IndexBuffer()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(protocol:IProtocol) : void
|
||||
{
|
||||
this.§_-GN§ = protocol.getCodec(new TypeCodecInfo(ByteArray,false));
|
||||
this.§_-2o§ = protocol.getCodec(new TypeCodecInfo(int,false));
|
||||
this.§_-mz§ = protocol.getCodec(new TypeCodecInfo(int,false));
|
||||
}
|
||||
|
||||
public function decode(protocolBuffer:ProtocolBuffer) : Object
|
||||
{
|
||||
log = IClientLog(OSGi.getInstance().getService(IClientLog));
|
||||
var value_byteBuffer:ByteArray = this.§_-GN§.decode(protocolBuffer) as ByteArray;
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.geometry.A3D2IndexBuffer","byteBuffer",value_byteBuffer);
|
||||
var value_id:int = int(this.§_-2o§.decode(protocolBuffer) as int);
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.geometry.A3D2IndexBuffer","id",value_id);
|
||||
var value_indexCount:int = int(this.§_-mz§.decode(protocolBuffer) as int);
|
||||
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.geometry.A3D2IndexBuffer","indexCount",value_indexCount);
|
||||
return new A3D2IndexBuffer(value_byteBuffer,value_id,value_indexCount);
|
||||
}
|
||||
|
||||
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
|
||||
{
|
||||
if(object == null)
|
||||
{
|
||||
throw new Error("Object is null. Use @ProtocolOptional annotation.");
|
||||
}
|
||||
var struct:A3D2IndexBuffer = A3D2IndexBuffer(object);
|
||||
this.§_-GN§.encode(protocolBuffer,struct.byteBuffer);
|
||||
this.§_-2o§.encode(protocolBuffer,struct.id);
|
||||
this.§_-mz§.encode(protocolBuffer,struct.indexCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user