bag

package
v0.0.0-...-63dc931 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decompress

func Decompress(path, ipath string) error

Decompress video.bag file and update video.idx.

func ReplaceSprites

func ReplaceSprites(path, ipath string, list []Replacement) error

ReplaceSprites changes one or more sprites in the video.bag and video.idx.

Types

type File

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

func Open

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

func OpenWithIndex

func OpenWithIndex(path, ipath string) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) ImageByName

func (f *File) ImageByName(name string) (*ImageRec, error)

func (*File) Images

func (f *File) Images() ([]*ImageRec, error)

func (*File) ReadAll

func (f *File) ReadAll() error

func (*File) Segments

func (f *File) Segments() ([]*Segment, error)

type ImageRec

type ImageRec struct {
	SegmInd uint16 `json:"segment_ind"`
	Offset  uint32 `json:"segment_offset"`
	Index   int    `json:"image_index"`
	Name    string `json:"name"`
	Size    uint32 `json:"size"`
	Field1  uint32
	Type    uint16 `json:"type"`
	// contains filtered or unexported fields
}

func (*ImageRec) Decode

func (img *ImageRec) Decode() (*pcx.Image, error)

func (*ImageRec) DecodeHeader

func (img *ImageRec) DecodeHeader() (*pcx.ImageMeta, image.Point, error)

func (*ImageRec) Raw

func (img *ImageRec) Raw() ([]byte, error)

type Replacement

type Replacement struct {
	ImageInd int
	Image    image.Image
	Point    *image.Point
}

type Segment

type Segment struct {
	Index     int         `json:"ind"`
	BagOffset int         `json:"bag_offset"`
	Size      int         `json:"size"`
	SizeComp  int         `json:"size_compressed"`
	ImagesInd int         `json:"images_ind"`
	ImagesCnt int         `json:"images_cnt"`
	Images    []*ImageRec `json:"images,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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