grf

package
v0.0.0-...-3eebe10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: GPL-3.0 Imports: 17 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 *Path

	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)

type Path

type Path struct {
	// contains filtered or unexported fields
}

func NewFilePath

func NewFilePath(b []byte) (*Path, error)

func (Path) Bytes

func (p Path) Bytes() []byte

Bytes returns the raw grf extracted byte slice of the filepath

func (Path) Dir

func (p Path) Dir() string

Dir returns the Windows1252 directory of the file path

func (Path) Korean

func (p Path) Korean() string

Korean returns the Korean EUCKR encoded filepath

func (Path) String

func (p Path) String() string

String returns the Windows1252 encoded filepath

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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