Esempio n. 1
0
        public static bool SetFileIndex(string idxPath, string mulPath)
        {
            if (!File.Exists(idxPath) || !File.Exists(mulPath))
            {
                return(false);
            }

            int length = IsUOHS(idxPath) ? 0x14000 : IsUOSA(idxPath) ? 0xC000 : 0x8000;

            m_FileIndex = new Ultima.Secondary.FileIndex(idxPath, mulPath, length);
            m_Cache     = new Bitmap[length];
            return(true);
        }
Esempio n. 2
0
 public static void Dispose()
 {
     Validbuffer = null;
     m_StreamBuffer = null;
     if (m_FileIndex != null)
         m_FileIndex.Dispose();
     m_FileIndex = null;
     if (m_Cache != null)
     {
         for (int i = 0; i < m_Cache.Length; ++i)
             if(m_Cache[i] != null)
             {
                 m_Cache[i].Dispose();
                 m_Cache[i] = null;
             }
         m_Cache = null;
     }
 }
Esempio n. 3
0
 public static void Dispose()
 {
     Validbuffer    = null;
     m_StreamBuffer = null;
     if (m_FileIndex != null)
     {
         m_FileIndex.Dispose();
     }
     m_FileIndex = null;
     if (m_Cache != null)
     {
         for (int i = 0; i < m_Cache.Length; ++i)
         {
             if (m_Cache[i] != null)
             {
                 m_Cache[i].Dispose();
                 m_Cache[i] = null;
             }
         }
         m_Cache = null;
     }
 }
Esempio n. 4
0
        public static bool SetFileIndex(string idxPath, string mulPath)
        {
            if (!File.Exists(idxPath) || !File.Exists(mulPath))
                return false;

            int length = IsUOHS(idxPath) ? 0x14000 : IsUOSA(idxPath) ? 0xC000 : 0x8000;
            m_FileIndex = new Ultima.Secondary.FileIndex(idxPath, mulPath, length);
            m_Cache = new Bitmap[length];
            return true;
        }