コード例 #1
0
        public bool Write(DAIIO io, bool skiplength = false)
        {
            try
            {
                if (!skiplength)
                {
                    io.WriteBits(Length, LengthBits);
                }
                //if(6 (<-????) > 5)
                //{
                io.WriteInt32(UserWaypoint_MapId);
                if (UserWaypoint_WorldPos == null)
                {
                    UserWaypoint_WorldPos = new byte[8];
                }
                for (int i = 0; i < 8; i++)
                {
                    io.WriteBits(UserWaypoint_WorldPos[i], 0x8);
                }
                FogArchive.Write(io);
                DynamicPinsMaps.Write(io);
                DiscoveredPins.Write(io);
                ExploredPins.Write(io);
                //}

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
コード例 #2
0
 public BWMapManager Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     //if(6 (<-????) > 5)
     //{
     UserWaypoint_MapId    = io.ReadInt32();
     UserWaypoint_WorldPos = new byte[8];
     for (int i = 0; i < 8; i++)
     {
         UserWaypoint_WorldPos[i] = (byte)io.ReadBit(0x8);
     }
     FogArchive      = new FogArchive().Read(io);
     DynamicPinsMaps = new DynamicPinsMaps().Read(io);
     DiscoveredPins  = new MapPins().Read(io);
     ExploredPins    = new MapPins().Read(io);
     //}
     return(this);
 }