things

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package things implements a registry for items, creatures etc.

Index

Constants

View Source
const (
	OutfitOverlayMaskNone = OutfitOverlayMask(1 << iota)
	OutfitOverlayMaskFirst
	OutfitOverlayMaskSecond
	OutfitOverlayMaskThird
	OutfitOverlayMaskFourth

	OutfitOverlayMaskLast
)
View Source
const (
	CreatureDirectionNorth = CreatureDirection(0)
	CreatureDirectionEast  = CreatureDirection(iota)
	CreatureDirectionSouth
	CreatureDirectionWest
)

Variables

This section is empty.

Functions

func OutfitColorCount added in v0.0.3

func OutfitColorCount() int

Types

type Creature

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

func (*Creature) AnimCount

func (c *Creature) AnimCount() int

func (*Creature) ClientID added in v0.0.3

func (c *Creature) ClientID(clientVersion uint16) uint16

func (*Creature) ColorizedCreatureFrame

func (c *Creature) ColorizedCreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, colors []color.Color) image.Image

func (*Creature) CreatureFrame

func (c *Creature) CreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, colorTemplate bool) image.Image

func (*Creature) GraphicsSize

func (c *Creature) GraphicsSize() struct{ W, H int }

func (*Creature) IdleAnim

func (c *Creature) IdleAnim() bool

func (*Creature) LightInfo

func (c *Creature) LightInfo() dat.LightInfo

func (*Creature) Name

func (c *Creature) Name() string

func (*Creature) ServerID added in v0.0.3

func (c *Creature) ServerID() int

type CreatureDirection added in v0.0.3

type CreatureDirection int

type Item

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

func (*Item) GraphicsSize

func (i *Item) GraphicsSize() struct{ W, H int }

func (*Item) ItemFrame

func (i *Item) ItemFrame(idx int, x, y, z int) image.Image

func (*Item) LightInfo

func (i *Item) LightInfo() dat.LightInfo

func (*Item) MapColor added in v0.0.3

func (i *Item) MapColor() dat.DatasetColor

func (*Item) MapColorOK added in v0.0.3

func (i *Item) MapColorOK() bool

func (*Item) Name

func (i *Item) Name() string

func (*Item) RawClientDatasetItem780 added in v0.0.5

func (i *Item) RawClientDatasetItem780() *dat.Item

RawClientDatasetItem780 is for debug or viewing use only; please do not access it outside these scenarios, as it may disappear anytime.

It is currently used for showing opt byte descriptions in the web UI.

It may return nil.

func (*Item) ValidClientItem added in v0.0.3

func (i *Item) ValidClientItem() bool

type OutfitColor

type OutfitColor int

func (OutfitColor) RGBA

func (col OutfitColor) RGBA() (r, g, b, a uint32)

type OutfitOverlayMask

type OutfitOverlayMask int

type Things

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

func New

func New() (*Things, error)

func (*Things) AddItemsOTB

func (t *Things) AddItemsOTB(i *itemsotb.Items) error

func (*Things) AddSpriteSet

func (t *Things) AddSpriteSet(s *spr.SpriteSet) error

func (*Things) AddTibiaDataset

func (t *Things) AddTibiaDataset(d *dat.Dataset) error

func (*Things) Creature added in v0.0.3

func (t *Things) Creature(serverID uint16, clientVersion uint16) (*Creature, error)

func (*Things) CreatureWithClientID

func (t *Things) CreatureWithClientID(clientID uint16, clientVersion uint16) (*Creature, error)

func (*Things) Item

func (t *Things) Item(serverID uint16, clientVersion uint16) (*Item, error)

func (*Things) ItemWithClientID

func (t *Things) ItemWithClientID(clientID uint16, clientVersion uint16) (*Item, error)

func (*Things) SpriteSetSignature

func (t *Things) SpriteSetSignature() uint32

func (*Things) Temp__GetClientIDForServerID

func (t *Things) Temp__GetClientIDForServerID(serverID uint16, clientVersion uint16) uint16

func (*Things) Temp__GetItemFromOTB

func (t *Things) Temp__GetItemFromOTB(serverID uint16, clientVersion uint16) *itemsotb.Item

func (*Things) TibiaDatasetSignature

func (t *Things) TibiaDatasetSignature() uint32

Directories

Path Synopsis
Package full is unstable; it serves as a helper to populate things.Things hackily.
Package full is unstable; it serves as a helper to populate things.Things hackily.

Jump to

Keyboard shortcuts

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