gwmap

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creature

type Creature interface {
	GetPos() tnet.Position
	SetPos(tnet.Position) error
	GetID() CreatureID
	GetName() string
	GetDir() things.CreatureDirection // TODO: move to tnet? or move tnet.Position to things?
	SetDir(things.CreatureDirection) error
	GetServerType() uint16
	GetOutfitColors() [4]things.OutfitColor
}

type CreatureID

type CreatureID uint32

type MapDataSource

type MapDataSource interface {
	GetMapTile(x, y uint16, floor uint8) (MapTile, error)
	GetCreatureByIDBytes(id [4]byte) (Creature, error)
	GetCreatureByID(CreatureID) (Creature, error)
	AddCreature(creature Creature) error
	RemoveCreatureByID(CreatureID) error
	GetAmbientLight() (ambientColor dat.DatasetColor, ambientLevel uint8) // This might not belong in this interface: it's useful for renderer, but how would we combine multiple backing data sources and the fact this is really gameworld-wide? It might belong in gameworld instead.

	Private_And_Temp__DefaultPlayerSpawnPoint(CreatureID) tnet.Position
}

type MapItem

type MapItem interface {
	GetServerType() uint16
	GetCount() uint16
}

type MapTile

type MapTile interface {
	GetItem(idx int) (MapItem, error)
	AddCreature(creature Creature) error
	GetCreature(idx int) (Creature, error)
	RemoveCreature(Creature) error
}

type MapTileEventSubscriber

type MapTileEventSubscriber interface {
}

Jump to

Keyboard shortcuts

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