Exemplo n.º 1
0
        /// <summary>
        /// Initializes this spriteframe.
        /// </summary>
        /// <param name="Alpha">Does this spriteframe have an alpha-buffer? Only applicable for SPR2.</param>
        /// <param name="HasZBuffer">Does this spriteframe have a z-buffer? Only applicable for SPR2.</param>
        public void Init(bool Alpha, bool HasZBuffer)
        {
            m_HasAlpha = Alpha;

            if (m_Width > 0 && m_Height > 0)
            {
                m_BitmapData = new FastPixel(new Bitmap(m_Width, m_Height), Alpha);
                m_BitmapData.Lock();

                if (HasZBuffer)
                {
                    m_HasZBuffer = true;

                    m_ZBuffer = new FastPixel(new Bitmap(m_Width, m_Height), Alpha);
                    m_ZBuffer.Lock();
                }
            }
            else
            {
                m_BitmapData = new FastPixel(new Bitmap(1, 1), Alpha);
                m_BitmapData.Lock();

                if (HasZBuffer)
                {
                    m_HasZBuffer = true;

                    m_ZBuffer = new FastPixel(new Bitmap(1, 1), Alpha);
                    m_ZBuffer.Lock();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes this spriteframe.
        /// </summary>
        /// <param name="Alpha">Does this spriteframe have an alpha-buffer? Only applicable for SPR2.</param>
        /// <param name="HasZBuffer">Does this spriteframe have a z-buffer? Only applicable for SPR2.</param>
        public void Init(bool Alpha, bool HasZBuffer)
        {
            m_HasAlpha = Alpha;

            if (m_Width > 0 && m_Height > 0)
            {
                m_BitmapData = new FastPixel(new Bitmap(m_Width, m_Height), Alpha);
                m_BitmapData.Lock();

                if (HasZBuffer)
                {
                    m_HasZBuffer = true;

                    m_ZBuffer = new FastPixel(new Bitmap(m_Width, m_Height), Alpha);
                    m_ZBuffer.Lock();
                }
            }
            else
            {
                m_BitmapData = new FastPixel(new Bitmap(1, 1), Alpha);
                m_BitmapData.Lock();

                if (HasZBuffer)
                {
                    m_HasZBuffer = true;

                    m_ZBuffer = new FastPixel(new Bitmap(1, 1), Alpha);
                    m_ZBuffer.Lock();
                }
            }
        }
Exemplo n.º 3
0
 public void Init(bool Alpha)
 {
     if (m_Width > 0 && m_Height > 0)
     {
         m_BitmapData = new FastPixel(new Bitmap(m_Width, m_Height), Alpha);
         m_BitmapData.Lock();
     }
     else
     {
         m_BitmapData = new FastPixel(new Bitmap(1, 1), Alpha);
         m_BitmapData.Lock();
     }
 }