Exemplo n.º 1
0
 public void Read(hsStream s)
 {
     Parse(s.Version, s.ReadUInt());
     if (s.Version.IsPlasma21)
         fFlags = (LocFlags)s.ReadByte();
     else
         fFlags = (LocFlags)s.ReadShort();
 }
Exemplo n.º 2
0
 public plLocation(int seqPrefix, int page)
 {
     fSeqPrefix = seqPrefix;
     fPageNum = page;
     fFlags = (LocFlags)0;
 }
Exemplo n.º 3
0
        public void Parse(plVersion v, uint id)
        {
            if (id == UInt32.MaxValue) {
                fFlags = (LocFlags)0;
                fSeqPrefix = Int32.MaxValue;
                fPageNum = Int32.MaxValue;
                return;
            } else if (id == 0)
                return;

            if ((id & 0x80000000) != 0) {
                id -= (v.IsUruLive ? 0xFF000001 : 0xFFFF0001);
                fSeqPrefix = (int)(id >> (v.IsUruLive ? 16 : 8));
                fPageNum = (int)(id - (fSeqPrefix << (v.IsUruLive ? 16 : 8)));
                fSeqPrefix = -fSeqPrefix;
            } else {
                id -= 33;
                fSeqPrefix = (int)(id >> (v.IsUruLive ? 16 : 8));
                fPageNum = (int)(id - (fSeqPrefix << (v.IsUruLive ? 16 : 8)));
            }
        }