sprite

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(datPath, sprPath string, serverToClient map[uint16]uint16) (*Cache, error)

func (*Cache) Dat

func (c *Cache) Dat() *DatFile

func (*Cache) OutfitPNG

func (c *Cache) OutfitPNG(looktype uint16, head, body, legs, feet, addons, direction int, mount uint16) ([]byte, error)

func (*Cache) PNG

func (c *Cache) PNG(id uint16) ([]byte, error)

func (*Cache) PNGByServerID

func (c *Cache) PNGByServerID(id uint16) ([]byte, error)

func (*Cache) Spr

func (c *Cache) Spr() *SpriteFile

type DatFile

type DatFile struct {
	Signature    uint32
	ItemCount    uint16
	OutfitCount  uint16
	EffectCount  uint16
	MissileCount uint16
	Items        map[uint16]*DatItem
	Outfits      map[uint16]*DatItem
	Effects      map[uint16]*DatItem
	Missiles     map[uint16]*DatItem
}

type DatItem

type DatItem struct {
	ClientID    uint16
	Width       uint8
	Height      uint8
	ColorLayers uint8
	XDiv        uint8
	YDiv        uint8
	ZDiv        uint8
	AnimCount   uint8
	SpriteIDs   []uint32
	Flags       map[uint8][]byte
}

type SpriteFile

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

func (*SpriteFile) Close

func (s *SpriteFile) Close() error

func (*SpriteFile) GetRGBA

func (s *SpriteFile) GetRGBA(id uint32) (*image.RGBA, error)

func (*SpriteFile) RawSpriteData added in v1.2.0

func (s *SpriteFile) RawSpriteData(id uint32) ([]byte, error)

func (*SpriteFile) Signature added in v1.2.0

func (s *SpriteFile) Signature() uint32

func (*SpriteFile) SpriteCount added in v1.2.0

func (s *SpriteFile) SpriteCount() uint32

Jump to

Keyboard shortcuts

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