-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsprites.go
75 lines (61 loc) · 1.34 KB
/
sprites.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package main
import (
"image"
"github.com/hajimehoshi/ebiten/v2"
)
/* Load all sprites, sub missing ones */
func loadSprites() {
/* Loads boot screen assets */
temp, err := getSpriteImage("title-dark.png", false)
if err == nil {
titleDark = temp
}
temp, err = getSpriteImage("title-dark-blur.png", false)
if err == nil {
titleDarkBlur = temp
}
temp, err = getSpriteImage("fsIcon.png", false)
if err == nil {
fsIcon = temp
}
temp, err = getSpriteImage("fsIconM.png", false)
if err == nil {
fsIconM = temp
}
temp, err = getSpriteImage("apple.png", false)
if err == nil {
appleIcon = temp
}
temp, err = getSpriteImage("exit.png", false)
if err == nil {
exitIcon = temp
}
temp, err = getSpriteImage("wasd.png", false)
if err == nil {
wasdIcon = temp
}
temp, err = getSpriteImage("a-touch.png", false)
if err == nil {
touchIcon = temp
}
temp, err = getSpriteImage("a-left.png", false)
if err == nil {
touchIconLeft = temp
}
temp, err = getSpriteImage("a-right.png", false)
if err == nil {
touchIconRight = temp
}
temp, err = getSpriteImage("a-up.png", false)
if err == nil {
touchIconUp = temp
}
temp, err = getSpriteImage("a-down.png", false)
if err == nil {
touchIconDown = temp
}
temp, err = getSpriteImage("icon.png", false)
if err == nil {
ebiten.SetWindowIcon([]image.Image{temp})
}
}