config

package
v0.0.0-...-38e8959 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Unlicense Imports: 2 Imported by: 2

Documentation

Overview

Package config specifies the data required for decoding CEL images.

Index

Constants

This section is empty.

Variables

View Source
var RelPaths = map[string]string{}/* 1402 elements not displayed */

RelPaths maps from CEL file names to "diabdat.mpq" relative paths.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Number of embedded images; a non-zero value implies that the given file is
	// a CEL archive.
	Nimgs int
	// Header size in bytes.
	Header int
	// Default frame dimensions.
	W, H int
	// Specific frame dimensions, mapping from frame number to width or height.
	FrameWidth, FrameHeight map[int]int
	// Palette paths.
	Pals []string
	// Colour transition paths.
	Trns []string
	// GetDecoderType returns the CEL frame decoder type of the given frame
	// number. The decoder type may be one of the following.
	//
	//    (0) cel.decodeType0
	//    (1) cel.decodeType1
	//    (2) cel.decodeType2
	//    (3) cel.decodeType3
	//    (4) cel.decodeType4
	//    (5) cel.decodeType5
	//    (6) cel.decodeType6
	GetDecoderType func(frameNum int) int
}

A Config specifies the data required for decoding a given CEL image.

func Get

func Get(name string) (*Config, error)

Get returns the image config data of the given CEL image.

Jump to

Keyboard shortcuts

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