Documentation ¶
Index ¶
- Variables
- func ReadLSF(r io.ReadSeeker) (lsgo.Resource, error)
- func ReadLSFAttribute(r io.ReadSeeker, name string, dt lsgo.DataType, length uint, ...) (lsgo.NodeAttribute, error)
- func ReadNames(r io.ReadSeeker) ([][]string, error)
- func ReadNode(r io.ReadSeeker, valueStart int64, ni NodeInfo, names [][]string, ...) (lsgo.Node, error)
- func ReadRegions(r io.ReadSeeker, valueStart int64, names [][]string, nodeInfo []NodeInfo, ...) ([]*lsgo.Node, error)
- type AttributeEntry
- type AttributeInfo
- type LSFHeader
- type NodeEntry
- type NodeInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var LSFSignature = [4]byte{0x4C, 0x53, 0x4F, 0x46}
Functions ¶
func ReadLSFAttribute ¶
func ReadLSFAttribute(r io.ReadSeeker, name string, dt lsgo.DataType, length uint, version lsgo.FileVersion, engineVersion uint32) (lsgo.NodeAttribute, error)
func ReadNode ¶
func ReadNode(r io.ReadSeeker, valueStart int64, ni NodeInfo, names [][]string, attributeInfo []AttributeInfo, version lsgo.FileVersion, engineVersion uint32) (lsgo.Node, error)
func ReadRegions ¶
func ReadRegions(r io.ReadSeeker, valueStart int64, names [][]string, nodeInfo []NodeInfo, attributeInfo []AttributeInfo, version lsgo.FileVersion, engineVersion uint32) ([]*lsgo.Node, error)
Types ¶
type AttributeEntry ¶
type AttributeEntry struct { Long bool // (16-bit MSB: index into name hash table, 16-bit LSB: offset in hash chain) NameHashTableIndex uint32 // 26-bit MSB: Length of this attribute TypeAndLength uint32 // Note: These indexes are assigned seemingly arbitrarily, and are not necessarily indices into the node list NodeIndex int32 // Note: These indexes are assigned seemingly arbitrarily, and are not necessarily indices into the node list NextAttributeIndex int32 // Absolute position of attribute value in the value stream Offset uint32 }
attribute extension in the LSF file
func (AttributeEntry) NameIndex ¶
func (ae AttributeEntry) NameIndex() int
Index into name hash table
func (*AttributeEntry) Read ¶
func (ae *AttributeEntry) Read(r io.ReadSeeker) error
func (AttributeEntry) TypeID ¶
func (ae AttributeEntry) TypeID() lsgo.DataType
Type of this attribute (see NodeAttribute.DataType)
type AttributeInfo ¶
type AttributeInfo struct { V2 bool // Index into name hash table NameIndex int // Offset in hash chain NameOffset int // Type of this attribute (see NodeAttribute.DataType) TypeID lsgo.DataType // Length of this attribute Length uint // Absolute position of attribute data in the values section DataOffset uint // (-1: this is the last attribute) NextAttributeIndex int }
type LSFHeader ¶
type LSFHeader struct { // LSOF file signature Signature [4]byte // Version of the LSOF file D:OS EE is version 1/2, D:OS 2 is version 3 Version lsgo.FileVersion // Possibly version number? (major, minor, rev, build) EngineVersion uint32 // Total uncompressed size of the string hash table StringsUncompressedSize uint32 // Compressed size of the string hash table StringsSizeOnDisk uint32 // Total uncompressed size of the node list NodesUncompressedSize uint32 // Compressed size of the node list NodesSizeOnDisk uint32 // Total uncompressed size of the attribute list AttributesUncompressedSize uint32 // Compressed size of the attribute list AttributesSizeOnDisk uint32 // Total uncompressed size of the raw value buffer ValuesUncompressedSize uint32 // Compressed size of the raw value buffer ValuesSizeOnDisk uint32 // Uses the same format as packages (see BinUtils.MakeCompressionFlags) CompressionFlags byte // Possibly unused, always 0 Unknown2 byte Unknown3 uint16 // Extended node/attribute format indicator, 0 for V2, 0/1 for V3 Extended uint32 }
func (LSFHeader) IsCompressed ¶
type NodeEntry ¶
type NodeEntry struct { Long bool // (16-bit MSB: index into name hash table, 16-bit LSB: offset in hash chain) NameHashTableIndex uint32 // (-1: node has no attributes) FirstAttributeIndex int32 // (-1: this node is a root region) ParentIndex int32 // (-1: this is the last node) NextSiblingIndex int32 }
func (NodeEntry) NameOffset ¶
Click to show internal directories.
Click to hide internal directories.