Esempio n. 1
0
        /// <summary>
        /// Gets a palette from a ZSNES savestate
        /// </summary>
        /// <param name="DataStream">Stream containing the savestate data</param>
        /// <returns>Standard color palette</returns>
        public static ColorPalette From_Savestate_ZST(Stream DataStream)
        {
            if (DataStream == null)
            {
                throw new ArgumentNullException();
            }
            var cgram     = new byte[512];
            var converter = new PaletteConverters.Nintendo_SuperFamicom_CGRAM();

            DataStream.Seek(0x618, System.IO.SeekOrigin.Begin);
            DataStream.Read(cgram, 0, 512);
            return(converter.GetPalette(cgram));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets a palette from a ZSNES savestate
        /// </summary>
        /// <param name="DataStream">Stream containing the savestate data</param>
        /// <returns>Standard color palette</returns>
        public static ColorPalette From_Savestate_ZST(Stream DataStream)
        {
            if (DataStream == null) throw new ArgumentNullException();
            var cgram = new byte[512];
            var converter = new PaletteConverters.Nintendo_SuperFamicom_CGRAM();

            DataStream.Seek(0x618, System.IO.SeekOrigin.Begin);
            DataStream.Read(cgram, 0, 512);
            return converter.GetPalette(cgram);
        }