packs

package
v0.0.0-...-26f9ad4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path    string
	Name    []byte
	IsLoose bool

	Offset uint32
	Size   uint32
	Crc32  uint32
}

func (Asset) Display

func (a Asset) Display()

Display shows pack info

func (*Asset) GetSize

func (a *Asset) GetSize() int64

GetSize returns size off asset header

func (*Asset) LoadFromBinary

func (a *Asset) LoadFromBinary(f *os.File)

func (*Asset) UnpackFromBinary

func (a *Asset) UnpackFromBinary(f *os.File, outDir string)

type Asset2

type Asset2 struct {
	Path    string
	Name    string
	IsLoose bool

	NameHash   uint64
	Offset     uint64
	RealSize   uint64
	PackedSize uint64
	IsZip      bool
	Crc32      uint32
}

func (*Asset2) ApplyName

func (a *Asset2) ApplyName(nameList []utils.HashName)

func (*Asset2) LoadFromBinary

func (a *Asset2) LoadFromBinary(f *os.File)

func (*Asset2) ReadNameList

func (a *Asset2) ReadNameList(f *os.File) (nameList []utils.HashName)

func (*Asset2) UnpackFromBinary

func (a *Asset2) UnpackFromBinary(f *os.File, outDir string)

type Pack

type Pack struct {
	Path string
	Name string

	Assets []Asset
}

func (Pack) Display

func (p Pack) Display()

Display shows pack info

func (*Pack) LoadFromDir

func (p *Pack) LoadFromDir(path string)

func (*Pack) LoadFromFile

func (p *Pack) LoadFromFile(path string)

func (*Pack) Unpack

func (p *Pack) Unpack(outDir string)

func (*Pack) WritePack

func (p *Pack) WritePack(outDir, outName string)

type Pack2

type Pack2 struct {
	Path string
	Name string

	NameList []utils.HashName
	Assets   []Asset2
}

func (*Pack2) ApplyHash

func (p *Pack2) ApplyHash()

func (*Pack2) LoadFromDir

func (p *Pack2) LoadFromDir(path string)

func (*Pack2) LoadFromFile

func (p *Pack2) LoadFromFile(path string)

func (*Pack2) SortAssets

func (p *Pack2) SortAssets()

func (*Pack2) Unpack

func (p *Pack2) Unpack(outDir string)

func (*Pack2) WritePack2

func (p *Pack2) WritePack2(outDir, outName string)

WritePack2 is quick and dirty

Jump to

Keyboard shortcuts

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