grf

package
v0.0.0-...-90da1f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionSpriteFilePair

type ActionSpriteFilePair struct {
	ACT *act.ActionFile
	SPR *spr.SpriteFile
}

type Entry

type Entry struct {
	Name   string
	Header EntryHeader
	Data   []byte
}

Entry ...

func (*Entry) Decode

func (e *Entry) Decode(data []byte) error

Decode ...

type EntryHeader

type EntryHeader struct {
	CompressedSize        uint32
	CompressedSizeAligned uint32
	UncompressedSize      uint32
	Flags                 entryFlags
	Offset                uint32
}

EntryHeader ...

type EntryTree

type EntryTree struct {
	Root *EntryTreeNode
}

func (*EntryTree) Find

func (t *EntryTree) Find(s string) ([]*Entry, bool)

func (*EntryTree) Insert

func (t *EntryTree) Insert(value string, data []*Entry) error

func (*EntryTree) Traverse

func (t *EntryTree) Traverse(n *EntryTreeNode, f func(*EntryTreeNode))

type EntryTreeNode

type EntryTreeNode struct {
	Value string
	Data  []*Entry
	Left  *EntryTreeNode
	Right *EntryTreeNode
}

func (*EntryTreeNode) Find

func (n *EntryTreeNode) Find(s string) ([]*Entry, bool)

func (*EntryTreeNode) Insert

func (n *EntryTreeNode) Insert(value string, data []*Entry) error

type File

type File struct {
	Header struct {
		Signature       [15]byte
		EncryptionKey   [15]byte
		FileTableOffset uint32
		EntryCount      uint32
		ReservedFiles   uint32
		Version         uint32
	}
	// contains filtered or unexported fields
}

func Load

func Load(path string) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) GetEntries

func (f *File) GetEntries(dir string) []*Entry

func (*File) GetEntry

func (f *File) GetEntry(name string) (entry *Entry, err error)

func (*File) GetEntryDirectories

func (f *File) GetEntryDirectories() map[string][]*Entry

func (*File) GetEntryTree

func (f *File) GetEntryTree() *EntryTree

func (*File) GetSpriteFiles

func (f *File) GetSpriteFiles(name string) (ActionSpriteFilePair, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL