Exemplo n.º 1
0
            public static void skip_read(adata.zero_copy_buffer stream, ref quest value)
            {
                int offset = stream.read_length();
                  UInt64 tag = 0;
                  adata.stream.read(stream,ref tag);
                  if(stream.error()){return;}
                  Int32 len_tag = 0;
                  adata.stream.read(stream,ref len_tag);
                  if(stream.error()){return;}

                  if((tag&1)>0)      {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("id",-1);return;}}}
                  if((tag&2)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                stream.skip_read(len3);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                  }
                  if((tag&4)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("description",-1);return;}}
                stream.skip_read(len3);
                {if(stream.error()){stream.trace_error("description",-1);return;}}
                  }
                  if(len_tag >= 0)
                  {
                UInt32 read_len = (UInt32)(stream.read_length() - offset);
                UInt32 len = (UInt32)len_tag;
                if(len > read_len) stream.skip_read(len - read_len);
                  }
            }
Exemplo n.º 2
0
        public static void skip_read(adata.zero_copy_buffer stream, ref vec3 value)
        {
            int offset = stream.read_length();
              UInt64 tag = 0;
              adata.stream.read(stream,ref tag);
              if(stream.error()){return;}
              Int32 len_tag = 0;
              adata.stream.read(stream,ref len_tag);
              if(stream.error()){return;}

              if((tag&1)>0)      {float dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("x",-1);return;}}}
              if((tag&2)>0)      {float dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("y",-1);return;}}}
              if((tag&4)>0)      {float dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("z",-1);return;}}}
              if(len_tag >= 0)
              {
            UInt32 read_len = (UInt32)(stream.read_length() - offset);
            UInt32 len = (UInt32)len_tag;
            if(len > read_len) stream.skip_read(len - read_len);
              }
        }
Exemplo n.º 3
0
            public static void read(adata.zero_copy_buffer stream, ref item value)
            {
                int offset = stream.read_length();
                  UInt64 tag = 0;
                  adata.stream.read(stream,ref tag);
                  if(stream.error()){return;}
                  Int32 len_tag = 0;
                  adata.stream.read(stream,ref len_tag);
                  if(stream.error()){return;}

                  if((tag&1)>0)      {adata.stream.read(stream,ref value.id);{if(stream.error()){stream.trace_error("id",-1);return;}}}
                  if((tag&2)>0)      {adata.stream.read(stream,ref value.type);{if(stream.error()){stream.trace_error("type",-1);return;}}}
                  if((tag&4)>0)      {adata.stream.read(stream,ref value.level);{if(stream.error()){stream.trace_error("level",-1);return;}}}
                  if(len_tag >= 0)
                  {
                UInt32 read_len = (UInt32)(stream.read_length() - offset);
                UInt32 len = (UInt32)len_tag;
                if(len > read_len) stream.skip_read(len - read_len);
                  }
            }
Exemplo n.º 4
0
            public static void skip_read(adata.zero_copy_buffer stream, ref player_v2 value)
            {
                int offset = stream.read_length();
                  UInt64 tag = 0;
                  adata.stream.read(stream,ref tag);
                  if(stream.error()){return;}
                  Int32 len_tag = 0;
                  adata.stream.read(stream,ref len_tag);
                  if(stream.error()){return;}

                  if((tag&1)>0)      {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("id",-1);return;}}}
                  if((tag&2)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream,30);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                stream.skip_read(len3);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                  }
                  if((tag&4)>0)      {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("age",-1);return;}}}
                  if((tag&8)>0)      {util.vec3 dummy_value = null;util.vec3_stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("pos",-1);return;}}}
                  if((tag&16)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("inventory",-1);return;}}
                for (int i = 0 ; i < len3 ; ++i)
                {
                  {item dummy_value = null;skip_read(stream,ref dummy_value);}
                  {if(stream.error()){stream.trace_error("inventory",(int)i);return;}}
                }
                  }
                  if((tag&32)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("quests",-1);return;}}
                for (int i = 0 ; i < len3 ; ++i)
                {
                  {my.game.quest dummy_value = null;my.game.quest_stream.skip_read(stream,ref dummy_value);}
                  {if(stream.error()){stream.trace_error("quests",(int)i);return;}}
                }
                  }
                  if((tag&64)>0)      {float dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("factor",-1);return;}}}
                  if((tag&128)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("friends",-1);return;}}
                for (int i = 0 ; i < len3 ; ++i)
                {
                  {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);}
                  {if(stream.error()){stream.trace_error("friends",(int)i);return;}}
                }
                  }
                  if(len_tag >= 0)
                  {
                UInt32 read_len = (UInt32)(stream.read_length() - offset);
                UInt32 len = (UInt32)len_tag;
                if(len > read_len) stream.skip_read(len - read_len);
                  }
            }
Exemplo n.º 5
0
            public static void read(adata.zero_copy_buffer stream, ref player_v1 value)
            {
                int offset = stream.read_length();
                  UInt64 tag = 0;
                  adata.stream.read(stream,ref tag);
                  if(stream.error()){return;}
                  Int32 len_tag = 0;
                  adata.stream.read(stream,ref len_tag);
                  if(stream.error()){return;}

                  if((tag&1)>0)      {adata.stream.read(stream,ref value.id);{if(stream.error()){stream.trace_error("id",-1);return;}}}
                  if((tag&2)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream,30);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                adata.stream.read(stream,ref value.name,len3);
                {if(stream.error()){stream.trace_error("name",-1);return;}}
                  }
                  if((tag&4)>0)      {adata.stream.read(stream,ref value.age);{if(stream.error()){stream.trace_error("age",-1);return;}}}
                  if((tag&8)>0)      {util.vec3_stream.read(stream,ref value.pos);{if(stream.error()){stream.trace_error("pos",-1);return;}}}
                  if((tag&16)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("inventory",-1);return;}}
                for (int i = 0 ; i < len3 ; ++i)
                {
                  item element= new item();
                  {read(stream,ref element);}
                  value.inventory.Add(element);
                  {if(stream.error()){stream.trace_error("inventory",(int)i);return;}}
                }
                  }
                  if((tag&32)>0)
                  {
                UInt32 len3 = adata.stream.check_read_size(stream);
                {if(stream.error()){stream.trace_error("quests",-1);return;}}
                for (int i = 0 ; i < len3 ; ++i)
                {
                  my.game.quest element= new my.game.quest();
                  {my.game.quest_stream.read(stream,ref element);}
                  value.quests.Add(element);
                  {if(stream.error()){stream.trace_error("quests",(int)i);return;}}
                }
                  }
                  if((tag&64)>0)      {adata.stream.read(stream,ref value.factor);{if(stream.error()){stream.trace_error("factor",-1);return;}}}
                  if(len_tag >= 0)
                  {
                UInt32 read_len = (UInt32)(stream.read_length() - offset);
                UInt32 len = (UInt32)len_tag;
                if(len > read_len) stream.skip_read(len - read_len);
                  }
            }