Exemplo n.º 1
0
        private void CheckImage(int index)
        {
            if (!_initialized)
            {
                Initialize();
            }

            if (Images == null || index < 0 || index >= Images.Count)
            {
                return;
            }

            if (Images[index] == null)
            {
                _stream.Position = IndexList[index];
                Images[index]    = new MImage(_reader);
            }

            if (!Load)
            {
                return;
            }

            MImage mi = Images[index];

            if (!mi.TextureValid)
            {
                _stream.Seek(IndexList[index] + 12, SeekOrigin.Begin);
                mi.CreateTexture(_reader);
            }
        }