Documentation
¶
Index ¶
- Constants
- func ApplyGroundBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry)
- func ComputeBordersForTile(pos Pos, tiles map[Pos]TileData, reg *brushes.Registry) []uint16
- func FindGroundBrushByID(reg *brushes.Registry, groundID int) *brushes.Brush
- func PickRandomItem(items []brushes.Item) int
- type Pos
- type TileChange
- func ApplyCarpetBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry) []TileChange
- func ApplyDoodadBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry) []TileChange
- func ApplyDoodadBrushVariation(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry, ...) []TileChange
- func ApplyDoorBrush(tiles map[Pos]TileData, center Pos, wallBrushName, doorType string, ...) []TileChange
- func ApplyFlagBrush(tiles map[Pos]TileData, center Pos, flagValue int) []TileChange
- func ApplyOptionalBorderBrush(tiles map[Pos]TileData, center Pos, reg *brushes.Registry) []TileChange
- func ApplyTableBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry) []TileChange
- func ApplyWallBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry) []TileChange
- func ApplyWallDecoBrush(tiles map[Pos]TileData, center Pos, brushName string, reg *brushes.Registry) []TileChange
- func RecomputeBordersAround(tiles map[Pos]TileData, center Pos, reg *brushes.Registry) []TileChange
- func TileChangeFromData(pos Pos, td TileData) TileChange
- type TileData
Constants ¶
View Source
const ( BorderNone = 0 NorthHorizontal = 1 EastHorizontal = 2 SouthHorizontal = 3 WestHorizontal = 4 NorthwestCorner = 5 NortheastCorner = 6 SouthwestCorner = 7 SoutheastCorner = 8 NorthwestDiagonal = 9 NortheastDiagonal = 10 SoutheastDiagonal = 11 SouthwestDiagonal = 12 CarpetCenter = 13 TileNorthwest = 1 TileNorth = 2 TileNortheast = 4 TileWest = 8 TileEast = 16 TileSouthwest = 32 TileSouth = 64 TileSoutheast = 128 WallPole = 0 WallSouthEnd = 1 WallEastEnd = 2 WallNorthwestDiagonal = 3 WallWestEnd = 4 WallNortheastDiagonal = 5 WallHorizontal = 6 WallSouthT = 7 WallNorthEnd = 8 WallVertical = 9 WallSouthwestDiagonal = 10 WallEastT = 11 WallSoutheastDiagonal = 12 WallWestT = 13 WallNorthT = 14 WallIntersection = 15 WallUntouchable = 16 WalltileNorth = 1 WalltileWest = 2 WalltileEast = 4 WalltileSouth = 8 TableNorthEnd = 0 TableSouthEnd = 1 TableEastEnd = 2 TableWestEnd = 3 TableHorizontal = 4 TableVertical = 5 TableAlone = 6 )
View Source
const OptionalBorderFlag = 1 << 16
Variables ¶
This section is empty.
Functions ¶
func ApplyGroundBrush ¶
func ComputeBordersForTile ¶
func FindGroundBrushByID ¶
func PickRandomItem ¶
Types ¶
type TileChange ¶
type TileChange struct {
X int `json:"x"`
Y int `json:"y"`
Z int `json:"z"`
GroundID int `json:"groundId"`
Flags int `json:"flags"`
HouseID int `json:"houseId"`
Items []uint16 `json:"items"`
}
func ApplyCarpetBrush ¶
func ApplyDoodadBrush ¶
func ApplyDoorBrush ¶
func ApplyFlagBrush ¶
func ApplyFlagBrush(tiles map[Pos]TileData, center Pos, flagValue int) []TileChange
func ApplyTableBrush ¶
func ApplyWallBrush ¶
func ApplyWallDecoBrush ¶
func RecomputeBordersAround ¶
RecomputeBordersAround recalculates borders for a tile and all its neighbors. Call this AFTER all ground placements in a batch for correct results.
func TileChangeFromData ¶
func TileChangeFromData(pos Pos, td TileData) TileChange
Click to show internal directories.
Click to hide internal directories.