LoadLand() private static method

private static LoadLand ( Stream stream, int length ) : Bitmap
stream System.IO.Stream
length int
return System.Drawing.Bitmap
Example #1
0
        public static Bitmap GetLand(int index)
        {
            index &= 16383;
            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.LoadLand(stream));
            }
        }
Example #2
0
        public static Bitmap GetLand(int index)
        {
            int  num;
            int  num1;
            bool flag;

            index = index & 16383;
            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.LoadLand(stream);
            Bitmap   bitmap1 = bitmap;

            mCache[index] = bitmap;
            return(bitmap1);
        }