LoadStatic() private static method

private static LoadStatic ( Stream stream, int length ) : Bitmap
stream System.IO.Stream
length int
return System.Drawing.Bitmap
示例#1
0
        public static Bitmap GetStatic(int index)
        {
            int  num;
            int  num1;
            bool flag;

            index = index + 16384;
            index = index & 65535;
            if (Art.m_Cache[index] != null)
            {
                return(Art.m_Cache[index]);
            }
            Stream stream = Art.m_FileIndex.Seek(index, out num, out num1, out flag);

            if (stream == null)
            {
                return(null);
            }
            Bitmap[] mCache  = Art.m_Cache;
            Bitmap   bitmap  = Art.LoadStatic(stream);
            Bitmap   bitmap1 = bitmap;

            mCache[index] = bitmap;
            return(bitmap1);
        }
示例#2
0
        public static Bitmap GetStatic(int index)
        {
            index += 16384;
            index &= (int)ushort.MaxValue;
            if (Art.m_Cache[index] != null)
            {
                return(Art.m_Cache[index]);
            }
            int    length;
            int    extra;
            bool   patched;
            Stream stream = Art.m_FileIndex.Seek(index, out length, out extra, out patched);

            if (stream == null)
            {
                return((Bitmap)null);
            }
            else
            {
                return(Art.m_Cache[index] = Art.LoadStatic(stream));
            }
        }