mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-27 18:39:10 -07:00
Initial commit
This commit is contained in:
119
src/package_59/VectorCodecA3DMapLevel3.as
Normal file
119
src/package_59/VectorCodecA3DMapLevel3.as
Normal file
@@ -0,0 +1,119 @@
|
||||
package package_59
|
||||
{
|
||||
import package_32.name_148;
|
||||
import package_34.name_150;
|
||||
import package_36.name_152;
|
||||
import package_36.name_163;
|
||||
import package_36.name_442;
|
||||
import package_38.name_443;
|
||||
import package_53.A3DMap;
|
||||
|
||||
public class VectorCodecA3DMapLevel3 implements name_152
|
||||
{
|
||||
private var elementCodec:name_152;
|
||||
|
||||
private var optionalElement:Boolean;
|
||||
|
||||
public function VectorCodecA3DMapLevel3(optionalElement:Boolean)
|
||||
{
|
||||
super();
|
||||
this.optionalElement = optionalElement;
|
||||
}
|
||||
|
||||
public function init(protocol:name_163) : void
|
||||
{
|
||||
this.elementCodec = protocol.name_448(new name_148(A3DMap,false));
|
||||
if(this.optionalElement)
|
||||
{
|
||||
this.elementCodec = new name_150(this.elementCodec);
|
||||
}
|
||||
}
|
||||
|
||||
public function method_296(protocolBuffer:name_442) : Object
|
||||
{
|
||||
var length2:int = 0;
|
||||
var items2:Vector.<Vector.<A3DMap>> = null;
|
||||
var i2:int = 0;
|
||||
var length3:int = 0;
|
||||
var items3:Vector.<A3DMap> = null;
|
||||
var i3:int = 0;
|
||||
var length1:int = name_443.name_445(protocolBuffer);
|
||||
var result:Vector.<Vector.<Vector.<A3DMap>>> = new Vector.<Vector.<Vector.<A3DMap>>>(length1,true);
|
||||
for(var i1:int = 0; i1 < length1; )
|
||||
{
|
||||
if(!protocolBuffer.optionalMap.name_447())
|
||||
{
|
||||
length2 = name_443.name_445(protocolBuffer);
|
||||
items2 = new Vector.<Vector.<A3DMap>>(length2,true);
|
||||
result[i1] = items2;
|
||||
for(i2 = 0; i2 < length2; )
|
||||
{
|
||||
if(!protocolBuffer.optionalMap.name_447())
|
||||
{
|
||||
length3 = name_443.name_445(protocolBuffer);
|
||||
items3 = new Vector.<A3DMap>(length3,true);
|
||||
items2[i2] = items3;
|
||||
for(i3 = 0; i3 < length3; i3++)
|
||||
{
|
||||
items3[i3] = A3DMap(this.elementCodec.method_296(protocolBuffer));
|
||||
}
|
||||
}
|
||||
i2++;
|
||||
}
|
||||
}
|
||||
i1++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public function method_295(protocolBuffer:name_442, object:Object) : void
|
||||
{
|
||||
var items2:Vector.<Vector.<A3DMap>> = null;
|
||||
var length2:int = 0;
|
||||
var i2:int = 0;
|
||||
var items3:Vector.<A3DMap> = null;
|
||||
var length3:int = 0;
|
||||
var i3:int = 0;
|
||||
if(object == null)
|
||||
{
|
||||
throw new Error("Object is null. Use @ProtocolOptional annotation.");
|
||||
}
|
||||
var data:Vector.<Vector.<Vector.<A3DMap>>> = Vector.<Vector.<Vector.<A3DMap>>>(object);
|
||||
var length1:int = int(data.length);
|
||||
name_443.name_446(protocolBuffer,length1);
|
||||
for(var i1:int = 0; i1 < length1; i1++)
|
||||
{
|
||||
items2 = data[i1];
|
||||
if(items2 != null)
|
||||
{
|
||||
protocolBuffer.optionalMap.name_444(false);
|
||||
length2 = int(items2.length);
|
||||
name_443.name_446(protocolBuffer,length2);
|
||||
for(i2 = 0; i2 < length2; i2++)
|
||||
{
|
||||
items3 = items2[i1];
|
||||
if(items3 != null)
|
||||
{
|
||||
protocolBuffer.optionalMap.name_444(false);
|
||||
length3 = int(items3.length);
|
||||
name_443.name_446(protocolBuffer,length3);
|
||||
for(i3 = 0; i3 < length3; i3++)
|
||||
{
|
||||
this.elementCodec.method_295(protocolBuffer,items3[i3]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
protocolBuffer.optionalMap.name_444(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
protocolBuffer.optionalMap.name_444(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user