Example #1
0
        public void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                m_Hue = reader.ReadInt();
                goto case 0;
            }

            case 0:
            {
                m_Name = reader.ReadString();

                m_Locations = new List <PGLocation>();

                for (int i = reader.ReadInt(); i > 0; i--)
                {
                    m_Locations.Add(new PGLocation(reader));
                }

                m_Flags = (EntryFlag)reader.ReadInt();
                m_Cost  = reader.ReadInt();
                break;
            }
            }
        }
Example #2
0
		public PGCategory( string name, EntryFlag flags, int cost )
		{
			m_Name      = name;
			m_Locations = new List<PGLocation>();
			m_Flags     = flags;
			m_Cost      = cost;
		}
Example #3
0
 public PGCategory(string name, EntryFlag flags, int cost)
 {
     m_Name      = name;
     m_Locations = new List <PGLocation>();
     m_Flags     = flags;
     m_Cost      = cost;
 }
Example #4
0
 public PGLocation(string name, EntryFlag flags, Point3D location, Map map, int hue, int cost)
 {
     m_Name     = name;
     m_Flags    = flags;
     m_Location = location;
     m_Map      = map;
     m_Hue      = hue;
     m_Cost     = cost;
 }
Example #5
0
 private void SetFlag(EntryFlag flag, bool value)
 {
     if (value)
     {
         Flags |= flag;
     }
     else
     {
         Flags &= ~flag;
     }
 }
Example #6
0
        public void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_Name     = reader.ReadString();
            m_Flags    = (EntryFlag)reader.ReadInt();
            m_Location = reader.ReadPoint3D();
            m_Map      = reader.ReadMap();
            m_Hue      = reader.ReadInt();
            m_Cost     = reader.ReadInt();
        }
Example #7
0
		public void Deserialize( GenericReader reader )
		{
			int version = reader.ReadInt();

			m_Name = reader.ReadString();

			m_Locations = new List<PGLocation>();

            for (int i = reader.ReadInt(); i >0; i--)
			{
				m_Locations.Add( new PGLocation( reader ) );
			}

			m_Flags = (EntryFlag)reader.ReadInt();
			m_Cost = reader.ReadInt();
		}
Example #8
0
        public void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_Name = reader.ReadString();

            m_Locations = new List <PGLocation>();

            for (int i = reader.ReadInt(); i > 0; i--)
            {
                m_Locations.Add(new PGLocation(reader));
            }

            m_Flags = (EntryFlag)reader.ReadInt();
            m_Cost  = reader.ReadInt();
        }
Example #9
0
 public PGCategory(string name, EntryFlag flags, int cost) : this(name, flags, cost, 1153)
 {
 }
Example #10
0
		public bool GetFlag( EntryFlag flag ){ return( (m_Flags & flag) != 0 ); }
Example #11
0
		private void SetFlag( EntryFlag flag, bool value )
		{
			if( value )
				EFlags |= flag;
			else EFlags &= ~flag;
		}
Example #12
0
		public PGCategory( string name, EntryFlag flags ) : this( name, flags, 0 )
		{
		}
Example #13
0
		public void Deserialize( GenericReader reader )
		{
			int version = reader.ReadInt();

			m_Name = reader.ReadString();
			m_Flags = (EntryFlag)reader.ReadInt();
			m_Location = reader.ReadPoint3D();
			m_Map = reader.ReadMap();
			m_Hue = reader.ReadInt();
			m_Cost = reader.ReadInt();
		}
Example #14
0
		public PGLocation( string name, EntryFlag flags, Point3D location, Map map, int hue, int cost )
		{
			m_Name = name;
			m_Flags = flags;
			m_Location = location;
			m_Map = map;
			m_Hue = hue;
			m_Cost = cost;
		}
Example #15
0
		public PGLocation( string name, EntryFlag flags, Point3D location, Map map, int hue ) : this( name, flags, location, map, hue, 0 )
		{
		}
Example #16
0
 public virtual bool Deserialize(BinaryReader stream)
 {
     _flags=(EntryFlag)stream.ReadUInt16();
     _dataoffset=stream.ReadUInt64();
     _datasize=stream.ReadUInt32();
     return DeserializeUserspace(stream);
 }
Example #17
0
 public PGCategory(string name, EntryFlag flags) : this(name, flags, 0, 1153)
 {
 }
Example #18
0
 public bool GetFlag(EntryFlag flag)
 {
     return((m_Flags & flag) != 0);
 }
Example #19
0
 public PGLocation(string name, EntryFlag flags, Point3D location, Map map, int hue) : this(name, flags, location, map, hue, 0)
 {
 }