d2cof

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: 3 Imported by: 0

Documentation

Overview

Package d2cof contains the logic for loading and processing COF files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir64ToCof

func Dir64ToCof(direction, numDirections int) int

Dir64ToCof returns the cof direction based on the actual direction

Types

type COF

type COF struct {
	NumberOfDirections int
	FramesPerDirection int
	NumberOfLayers     int
	Speed              int
	CofLayers          []CofLayer
	CompositeLayers    map[d2enum.CompositeType]int
	AnimationFrames    []d2enum.AnimationFrame
	Priority           [][][]d2enum.CompositeType
}

COF is a structure that represents a COF file.

func Load

func Load(fileData []byte) (*COF, error)

Load loads a COF file.

type CofLayer

type CofLayer struct {
	Type        d2enum.CompositeType
	Shadow      byte
	Selectable  bool
	Transparent bool
	DrawEffect  d2enum.DrawEffect
	WeaponClass d2enum.WeaponClass
}

CofLayer is a structure that represents a single layer in a COF file.

Jump to

Keyboard shortcuts

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