-
Notifications
You must be signed in to change notification settings - Fork 6
/
ground.go
45 lines (40 loc) · 2.83 KB
/
ground.go
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
45
package mario_go
type Ground struct {
Sprite
sx float32
sy float32
}
func NewGround() *Ground {
s := &Ground{}
return s
}
func (s Ground) Dots() Dots {
var m int32 = 0x9B4808
var l int32 = 0xFECDC6
var b int32 = 0x000000
indices := []int32{
0, 15, m, 1, 15, l, 2, 15, l, 3, 15, l, 4, 15, l, 5, 15, l, 6, 15, l, 7, 15, l, 8, 15, l, 9, 15, l, 10, 15, b, 11, 15, m, 12, 15, l, 13, 15, l, 14, 15, l, 15, 15, m,
0, 14, l, 1, 14, m, 2, 14, m, 3, 14, m, 4, 14, m, 5, 14, m, 6, 14, m, 7, 14, m, 8, 14, m, 9, 14, m, 10, 14, b, 11, 14, l, 12, 14, m, 13, 14, m, 14, 14, m, 15, 14, b,
0, 13, l, 1, 13, m, 2, 13, m, 3, 13, m, 4, 13, m, 5, 13, m, 6, 13, m, 7, 13, m, 8, 13, m, 9, 13, m, 10, 13, b, 11, 13, l, 12, 13, m, 13, 13, m, 14, 13, m, 15, 13, b,
0, 12, l, 1, 12, m, 2, 12, m, 3, 12, m, 4, 12, m, 5, 12, m, 6, 12, m, 7, 12, m, 8, 12, m, 9, 12, m, 10, 12, b, 11, 12, l, 12, 12, m, 13, 12, m, 14, 12, m, 15, 12, b,
0, 11, l, 1, 11, m, 2, 11, m, 3, 11, m, 4, 11, m, 5, 11, m, 6, 11, m, 7, 11, m, 8, 11, m, 9, 11, m, 10, 11, b, 11, 11, l, 12, 11, b, 13, 11, m, 14, 11, m, 15, 11, b,
0, 10, l, 1, 10, m, 2, 10, m, 3, 10, m, 4, 10, m, 5, 10, m, 6, 10, m, 7, 10, m, 8, 10, m, 9, 10, m, 10, 10, b, 11, 10, m, 12, 10, b, 13, 10, b, 14, 10, b, 15, 10, m,
0, 9, l, 1, 9, m, 2, 9, m, 3, 9, m, 4, 9, m, 5, 9, m, 6, 9, m, 7, 9, m, 8, 9, m, 9, 9, m, 10, 9, b, 11, 9, l, 12, 9, l, 13, 9, l, 14, 9, l, 15, 9, b,
0, 8, l, 1, 8, m, 2, 8, m, 3, 8, m, 4, 8, m, 5, 8, m, 6, 8, m, 7, 8, m, 8, 8, m, 9, 8, m, 10, 8, b, 11, 8, l, 12, 8, m, 13, 8, m, 14, 8, m, 15, 8, b,
0, 7, l, 1, 7, m, 2, 7, m, 3, 7, m, 4, 7, m, 5, 7, m, 6, 7, m, 7, 7, m, 8, 7, m, 9, 7, m, 10, 7, b, 11, 7, l, 12, 7, m, 13, 7, m, 14, 7, m, 15, 7, b,
0, 6, l, 1, 6, m, 2, 6, m, 3, 6, m, 4, 6, m, 5, 6, m, 6, 6, m, 7, 6, m, 8, 6, m, 9, 6, m, 10, 6, b, 11, 6, l, 12, 6, m, 13, 6, m, 14, 6, m, 15, 6, b,
0, 5, b, 1, 5, b, 2, 5, m, 3, 5, m, 4, 5, m, 5, 5, m, 6, 5, m, 7, 5, m, 8, 5, m, 9, 5, b, 10, 5, l, 11, 5, m, 12, 5, m, 13, 5, m, 14, 5, m, 15, 5, b,
0, 4, l, 1, 4, l, 2, 4, b, 3, 4, b, 4, 4, m, 5, 4, m, 6, 4, m, 7, 4, m, 8, 4, m, 9, 4, b, 10, 4, l, 11, 4, m, 12, 4, m, 13, 4, m, 14, 4, m, 15, 4, b,
0, 3, l, 1, 3, m, 2, 3, l, 3, 3, l, 4, 3, b, 5, 3, b, 6, 3, b, 7, 3, b, 8, 3, l, 9, 3, m, 10, 3, m, 11, 3, m, 12, 3, m, 13, 3, m, 14, 3, m, 15, 3, b,
0, 2, l, 1, 2, m, 2, 2, m, 3, 2, m, 4, 2, l, 5, 2, l, 6, 2, l, 7, 2, b, 8, 2, l, 9, 2, m, 10, 2, m, 11, 2, m, 12, 2, m, 13, 2, m, 14, 2, m, 15, 2, b,
0, 1, l, 1, 1, m, 2, 1, m, 3, 1, m, 4, 1, m, 5, 1, m, 6, 1, m, 7, 1, b, 8, 1, l, 9, 1, m, 10, 1, m, 11, 1, m, 12, 1, m, 13, 1, m, 14, 1, b, 15, 1, b,
0, 0, m, 1, 0, b, 2, 0, b, 3, 0, b, 4, 0, b, 5, 0, b, 6, 0, b, 7, 0, m, 8, 0, l, 9, 0, b, 10, 0, b, 11, 0, b, 12, 0, b, 13, 0, b, 14, 0, b, 15, 0, m,
}
return MakeDots(indices)
}
func (s Ground) Width() int {
return 16
}
func (s Ground) Height() int {
return 16
}