tiles

package
v0.0.0-...-5198b88 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TileSize   = 32
	TilesTypes = []TileInfo{
		{X: 0, Y: 0, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 192, Y: 0, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 192, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 192, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 192, Y: 96, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 0, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 96, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 0, Y: 0, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 0, Y: 96, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 32, Y: 96, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 64, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 64, Y: 0, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 64, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 96, Y: 0, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 96, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 96, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 64, Y: 128, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 64, Y: 160, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 96, Y: 128, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 96, Y: 160, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 80, Y: 144, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 224, Y: 0, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 192, Y: 32, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 224, Y: 32, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 192, Y: 64, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 224, Y: 64, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 128, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 128, Y: 96, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 128, Y: 128, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 160, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 160, Y: 96, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 160, Y: 128, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 128, Y: 32, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 128, Y: 64, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 160, Y: 32, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 160, Y: 64, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 32, Y: 256, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 32, Y: 288, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 192, Y: 416, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 192, Y: 448, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 416, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 224, Y: 448, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 144, Y: 64, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 144, Y: 96, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 144, Y: 128, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 128, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 160, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 144, Y: 32, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 144, Y: 48, IsWalkable: false, /* contains filtered or unexported fields */},
		{X: 208, Y: 32, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 192, Y: 48, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 224, Y: 48, IsWalkable: true, /* contains filtered or unexported fields */},
		{X: 208, Y: 64, IsWalkable: true, /* contains filtered or unexported fields */},
	}
)

Functions

func LoadTilesFromTileset

func LoadTilesFromTileset(tiles []TileInfo) ([]image.Image, error)

LoadTilesFromTileset load all tiles from []TileInfo and store them in a []image.Image.

Types

type TileInfo

type TileInfo struct {
	X, Y int

	IsWalkable bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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