d2dcc

package
v0.0.0-...-c8cfab0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CofToDir16 = []int{4, 8, 0, 9, 5, 10, 1, 11, 6, 12, 2, 13, 7, 14, 3, 15}
View Source
var CofToDir32 = []int{
	4, 16, 8, 17, 0, 18, 9, 19, 5, 20, 10, 21, 1, 22, 11, 23,
	6, 24, 12, 25, 2, 26, 13, 27, 7, 28, 14, 29, 3, 30, 15, 31,
}
View Source
var CofToDir4 = []int{0, 1, 2, 3}
View Source
var CofToDir8 = []int{4, 0, 5, 1, 6, 2, 7, 3}

Functions

This section is empty.

Types

type DCC

type DCC struct {
	Signature          int
	Version            int
	NumberOfDirections int
	FramesPerDirection int
	Directions         []DCCDirection
}

func LoadDCC

func LoadDCC(fileData []byte) (*DCC, error)

type DCCCell

type DCCCell struct {
	Width       int
	Height      int
	XOffset     int
	YOffset     int
	LastWidth   int
	LastHeight  int
	LastXOffset int
	LastYOffset int
}

type DCCDirection

type DCCDirection struct {
	OutSizeCoded               int
	CompressionFlags           int
	Variable0Bits              int
	WidthBits                  int
	HeightBits                 int
	XOffsetBits                int
	YOffsetBits                int
	OptionalDataBits           int
	CodedBytesBits             int
	EqualCellsBitstreamSize    int
	PixelMaskBitstreamSize     int
	EncodingTypeBitsreamSize   int
	RawPixelCodesBitstreamSize int
	Frames                     []*DCCDirectionFrame
	PaletteEntries             [256]byte
	Box                        d2common.Rectangle
	Cells                      []*DCCCell
	PixelData                  []byte
	HorizontalCellCount        int
	VerticalCellCount          int
	PixelBuffer                []DCCPixelBufferEntry
}

func CreateDCCDirection

func CreateDCCDirection(bm *d2common.BitMuncher, file DCC) DCCDirection

func (*DCCDirection) CalculateCells

func (v *DCCDirection) CalculateCells()

func (*DCCDirection) FillPixelBuffer

func (v *DCCDirection) FillPixelBuffer(pcd, ec, pm, et, rp *d2common.BitMuncher)

func (*DCCDirection) GenerateFrames

func (v *DCCDirection) GenerateFrames(pcd *d2common.BitMuncher)

type DCCDirectionFrame

type DCCDirectionFrame struct {
	Width                 int
	Height                int
	XOffset               int
	YOffset               int
	NumberOfOptionalBytes int
	NumberOfCodedBytes    int
	FrameIsBottomUp       bool
	Box                   d2common.Rectangle
	Cells                 []DCCCell
	PixelData             []byte
	HorizontalCellCount   int
	VerticalCellCount     int
	// contains filtered or unexported fields
}

func CreateDCCDirectionFrame

func CreateDCCDirectionFrame(bits *d2common.BitMuncher, direction DCCDirection) *DCCDirectionFrame

func (*DCCDirectionFrame) CalculateCells

func (v *DCCDirectionFrame) CalculateCells(direction DCCDirection)

type DCCPixelBufferEntry

type DCCPixelBufferEntry struct {
	Value          [4]byte
	Frame          int
	FrameCellIndex int
}

Jump to

Keyboard shortcuts

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