Skip to content

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author: Michael Gaisser
GitHub Release GitHub Release Date GitHub License

Library for editing LucasArts *.LFD resource files.

Latest Release

3.0, 21 Aug 2023

  • IDisposable has been implemented throughout.
  • Better application of the Dirty flag throughout.
  • Many Indexer types changed to a proper Collection are BREAKING CHANGES due to the Length parameter switching to Count.
  • (LfdFile) Added a Name property for the filename minus ".lfd" extension.
  • (Resource) IsDirty added to expose the flag.
  • (ANIM) FrameCollection collection members now implemented directly.
  • (ANIM) FrameCollection.Remove() marked OBS in favor of new RemoveAt().
  • (CRFT, CPLX, SHIP) Readonly Indexer usage replaced with ReadOnlyCollection<>.
  • (FONT) Fixed missing type assignment in the generic constructors.
  • (FONT) Height and NumberOfGlyphs now write-enabled.
  • (FONT) Internally reworked the glyphs to be a collection instead of an array, no external changes.
  • (FONT) GlyphIndexer now implements Indexer directly, IEnumerable added.
  • (PANL) Internal array now a collection
  • (PANL) ImageIndexer now implements Indexer directly, IEnumerable added.
  • (PLTT) Palette property marked OBS in favor of new ConvertToPalette() overload.
  • (PLTT) IndexRotator struct renamed to just Rotator.
  • (PLTT) Rotator.RotateColors() no longer internally clones the array.
  • (PLTT) RotatorIndexer class created.
  • (TEXT) TextString type and related TextStringCollection created.
    • The TextString object handles substrings natively, instead of each application needing to sort it out.
  • (TEXT) The original Strings array has been deleted in favor of the new Strings collection BREAKING CHANGE.
    • There really wasn't a way to just mark this as OBS and have it work alongside the new collection, as the changes to the original array could not be monitored.

Additional Information

Dependencies

File structure information per resource is found in the individual class files.

Programmer's reference can be found in the help file.

Version History

2.5.2, 17 May 2026

  • (MASK) No code changes, just updated the XML example for the help file.
  • (LfdFile) The per-resource modified flag now resets during Write().

v2.5.1, 10 May 2026

  • (BLAS) Fixed an error in EncodeResource() when importing new sound data. [Issue TSE #1].

v2.5, 14 Feb 2026

  • (DELT) DecodeImage now checks for negative width/height validation directly to avoid overhead of catching an Exception.
  • (DELT) Fixed DecodeImage not processing the final rows if there's skips/blanks.
  • (ANIM) FrameCollection now takes the number of frames as an argument.

v2.4, 02 Feb 2025

  • (Resource) Added Dirty() to allow manual setting of internal modified flag.
  • (MASK) Fixed the Height calculation
  • (MASK) Fixed the 00 processing and corner cases
  • (PANL) Fixed processing the FC Opcode to properly modify the ColorIndex
  • (MTRX) Initial pass created. Full Frame details aren't broken out yet, though structure is prety much known.

v2.3, 16 Jul 2023

  • (FILM) Chunk Opcodes added or renamed:
    • SetColorRange = 0x10, new for VIEW
    • Unknown11 is now ApplyPalette for VIEW
    • Unknown13 is now Toggle for VOIC
    • SetVolume = 0x15, new for VOIC
    • Unknown16 = 0x16, new for VOIC
      • Renames left originals in place as Depcrecated, not a breaking change.
  • (PLTT) Added the newly discovered IndexRotator as read only values, discussed in Issue #4.

v2.2, 01 Apr 2023

  • (CRFT, CPLX, SHIP) Added the IsTwoSided and IsGouraudShaded properties to Shape per discussion in Issue #3.
  • Minor XML updates

v2.1, 30 Oct 2022

  • (CRFT) Can now convert wireframe data to SHIP, but not raw data
  • (CPLX) Can now convert wireframe data to SHIP, but not raw data
  • (CRFT, CPLX, SHIP) Now calculates the Lines in a mesh during Decode.

v2.0, 09 Mar 2021

  • (ANIM) Fixed the retrieval of Frames when RelativePosition is turned on.
  • (BLAS) Added GetWavBytes() to make audio playback easier, reformats data to .WAV.
  • (BLAS) Added Duration property to get audio length in seconds.
  • (FILM) Added ToString() to Block and Chunk.
  • (FONT) TotalChars renamed to NumberOfGlyphs, BREAKING CHANGE.
  • (CRFT) New.
  • (CPLX) New.
  • (SHIP) New.
  • (Resource) Adlb, Btmp, Crft, Cplx, Rlnd, and Ship added to ResourceType.
  • various updates.

v1.2.1, 02 Sep 2019

  • (BLAS) Fixed a crash that occur during Decode for VOIC types. [Issue #1]

v1.2, 12 Jul 2016

  • _isModifed edits.
  • (ANIM) removed old code duplicating DELT data.
  • (FONT) Fixed EncodeResource with large Strides.
  • (FONT) added _baseLine.
  • (LfdFile) Always zeroes out name before write.
  • (LfdFile) Only encodes children if they report being modified.
  • various other tweaks.

v1.1, 14 Dec 2014

  • Changed license to MPL.
  • (ANIM) SetCount and IsModified implementation in FrameCollection.

v1.0, 05 Dec 2011

  • Release.

Copyright Information

Copyright © 2009-2025 Michael Gaisser
This library file and related files are licensed under the Mozilla Public License v2.0 or later. See License.txt for further details.

"Star Wars" and related items are trademarks of LucasFilm Ltd and LucasArts Entertainment Co.

About

Library file for editing LucasArts *.LFD files

Resources

Stars

10 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages