Beispiel #1
0
        /// <summary>Creates a new instance from an exsiting file with the supplied Palette array</summary>
        /// <param name="path">The full path to the unopened LFD file</param>
        /// <param name="filePosition">The offset of the beginning of the resource</param>
        /// <param name="palettes">The colors used for the resource</param>
        /// <exception cref="Idmr.Common.LoadFileException">Typically due to file corruption</exception>
        public Delt(string path, long filePosition, Pltt[] palettes)
        {
            _palette = Pltt.ConvertToPalette(palettes);
            FileStream stream = File.OpenRead(path);

            _read(stream, filePosition);
            stream.Close();
        }
Beispiel #2
0
 /// <summary>Creates a new instance from an existing opened file with the supplied Palette array</summary>
 /// <param name="stream">The opened LFD file</param>
 /// <param name="filePosition">The offset of the beginning of the resource</param>
 /// <param name="palettes">The colors used for the resource</param>
 /// <exception cref="Idmr.Common.LoadFileException">Typically due to file corruption</exception>
 public Delt(FileStream stream, long filePosition, Pltt[] palettes)
 {
     _palette = Pltt.ConvertToPalette(palettes);
     _read(stream, filePosition);
 }
Beispiel #3
0
 /// <summary>Sets the colors used for the Anim</summary>
 /// <param name="palettes">The colors to be used</param>
 /// <remarks>All <see cref="Frame.Image">Images</see> are updated</remarks>
 public void SetPalette(Pltt[] palettes)
 {
     SetPalette(Pltt.ConvertToPalette(palettes));
 }