]> git.lizzy.rs Git - mt.git/blob - tiledef.go
Add WaitGroup to SerializePkt
[mt.git] / tiledef.go
1 package mt
2
3 type AlignType uint8
4
5 const (
6         NoAlign AlignType = iota
7         WorldAlign
8         UserAlign
9 )
10
11 //go:generate stringer -type AlignType
12
13 type TileFlags uint16
14
15 const (
16         TileBackfaceCull TileFlags = 1 << iota
17         TileAbleH
18         TileAbleV
19         TileColor
20         TileScale
21         TileAlign
22 )
23
24 //go:generate stringer -type TileFlags
25
26 type TileDef struct {
27         //mt:const uint8(6)
28
29         Texture
30         Anim  TileAnim
31         Flags TileFlags
32
33         //mt:if %s.Flags&TileColor != 0
34         R, G, B uint8
35         //mt:end
36
37         //mt:if %s.Flags&TileScale != 0
38         Scale uint8
39         //mt:end
40
41         //mt:if %s.Flags&TileAlign != 0
42         Align AlignType
43         //mt:end
44 }