Exemplo n.º 1
0
 /// <summary>
 /// Gets a palette from a Gens savestate
 /// </summary>
 /// <param name="DataStream">Stream containing the savestate data</param>
 /// <returns>Standard color palette</returns>
 public static ColorPalette From_Savestate_GSX(Stream DataStream)
 {
     if (DataStream == null) throw new ArgumentNullException();
     var cram = new byte[128];
     var converter = new PaletteConverters.Sega_Megadrive_CRAM();
     DataStream.Seek(0x11f78, System.IO.SeekOrigin.Begin);
     DataStream.Read(cram, 0, 128);
     return converter.GetPalette(cram);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Gets a palette from a Gens savestate
        /// </summary>
        /// <param name="DataStream">Stream containing the savestate data</param>
        /// <returns>Standard color palette</returns>
        public static ColorPalette From_Savestate_GSX(Stream DataStream)
        {
            if (DataStream == null)
            {
                throw new ArgumentNullException();
            }
            var cram      = new byte[128];
            var converter = new PaletteConverters.Sega_Megadrive_CRAM();

            DataStream.Seek(0x11f78, System.IO.SeekOrigin.Begin);
            DataStream.Read(cram, 0, 128);
            return(converter.GetPalette(cram));
        }