summaryrefslogtreecommitdiff
path: root/tiledef.go
blob: da6ab3963f1b849f291cc1999e52a795b4a04714 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package mt

type AlignType uint8

const (
	NoAlign AlignType = iota
	WorldAlign
	UserAlign
)

//go:generate stringer -type AlignType

type TileFlags uint16

const (
	TileBackfaceCull TileFlags = 1 << iota
	TileAbleH
	TileAbleV
	TileColor
	TileScale
	TileAlign
)

//go:generate stringer -type TileFlags

type TileDef struct {
	//mt:const uint8(6)

	Texture
	Anim  TileAnim
	Flags TileFlags

	//mt:if %s.Flags&TileColor != 0
	R, G, B uint8
	//mt:end

	//mt:if %s.Flags&TileScale != 0
	Scale uint8
	//mt:end

	//mt:if %s.Flags&TileAlign != 0
	Align AlignType
	//mt:end
}