CSPspEmu.Core.Utils.PixelFormatDecoder.Encode C# (CSharp) Method

Encode() public static method

public static Encode ( GuPixelFormats GuPixelFormat, CSPspEmu.Core.Utils.OutputPixel Input, byte _Output, int Count ) : void
GuPixelFormat GuPixelFormats
Input CSPspEmu.Core.Utils.OutputPixel
_Output byte
Count int
return void
        public static void Encode(GuPixelFormats GuPixelFormat, OutputPixel* Input, byte* _Output, int Count)
        {
            switch (GuPixelFormat)
            {
                case GuPixelFormats.RGBA_8888: { var Output = (uint*)_Output; for (int n = 0; n < Count; n++) *Output++ = Encode_RGBA_8888_Pixel(*Input++); } break;
                case GuPixelFormats.RGBA_5551: { var Output = (ushort*)_Output; for (int n = 0; n < Count; n++) *Output++ = Encode_RGBA_5551_Pixel(*Input++); } break;
                case GuPixelFormats.RGBA_5650: { var Output = (ushort*)_Output; for (int n = 0; n < Count; n++) *Output++ = Encode_RGBA_5650_Pixel(*Input++); } break;
                case GuPixelFormats.RGBA_4444: { var Output = (ushort*)_Output; for (int n = 0; n < Count; n++) *Output++ = Encode_RGBA_4444_Pixel(*Input++); } break;
                default:
                    throw(new NotImplementedException("Not implemented " + GuPixelFormat));
            }
        }

Same methods

PixelFormatDecoder::Encode ( GuPixelFormats GuPixelFormat, CSPspEmu.Core.Utils.OutputPixel Input, byte Output, int BufferWidth, int Width, int Height ) : void