d2pl2

package
v0.0.0-...-c7db75a Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package d2pl2 handles processing of PL2 palette files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PL2

type PL2 struct {
	BasePalette PL2Palette

	LightLevelVariations [32]PL2PaletteTransform
	InvColorVariations   [16]PL2PaletteTransform
	SelectedUintShift    PL2PaletteTransform
	AlphaBlend           [3][256]PL2PaletteTransform
	AdditiveBlend        [256]PL2PaletteTransform
	MultiplicativeBlend  [256]PL2PaletteTransform
	HueVariations        [111]PL2PaletteTransform
	RedTones             PL2PaletteTransform
	GreenTones           PL2PaletteTransform
	BlueTones            PL2PaletteTransform
	UnknownVariations    [14]PL2PaletteTransform
	MaxComponentBlend    [256]PL2PaletteTransform
	DarkendColorShift    PL2PaletteTransform

	TextColors      [13]PL2Color24Bits
	TextColorShifts [13]PL2PaletteTransform
}

PL2 represents a palette file.

func Load

func Load(data []byte) (*PL2, error)

Load uses restruct to read the binary pl2 data into structs

type PL2Color

type PL2Color struct {
	R uint8
	G uint8
	B uint8
	// contains filtered or unexported fields
}

PL2Color represents an RGBA color

type PL2Color24Bits

type PL2Color24Bits struct {
	R uint8
	G uint8
	B uint8
}

PL2Color24Bits represents an RGB color

type PL2Palette

type PL2Palette struct {
	Colors [256]PL2Color
}

PL2Palette represents a PL2 palette.

type PL2PaletteTransform

type PL2PaletteTransform struct {
	Indices [256]uint8
}

PL2PaletteTransform represents a PL2 palette transform.

Jump to

Keyboard shortcuts

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