File tree 2 files changed +20
-22
lines changed
2 files changed +20
-22
lines changed Original file line number Diff line number Diff line change 38
38
// found, then default 16 color palette is used.
39
39
//
40
40
// Can be freely read and updated. Changes will be visible immediately.
41
- Palette [256 ]image.RGB = defaultPalette ()
41
+ Palette [256 ]image.RGB = defaultPalette
42
42
43
43
// SpriteSheetWidth will be used if sprite-sheet.png was not found.
44
44
SpriteSheetWidth = defaultSpriteSheetWidth
@@ -84,7 +84,7 @@ func Reset() {
84
84
ScreenWidth = defaultScreenWidth
85
85
ScreenHeight = defaultScreenHeight
86
86
Color = 6
87
- Palette = defaultPalette ()
87
+ Palette = defaultPalette
88
88
}
89
89
90
90
// Boot initializes the engine based on user parameters such as ScreenWidth and ScreenHeight.
Original file line number Diff line number Diff line change @@ -55,24 +55,22 @@ func useSpriteSheet(b []byte) error {
55
55
return nil
56
56
}
57
57
58
- func defaultPalette () [256 ]image.RGB {
59
- //nolint:govet
60
- return [256 ]image.RGB {
61
- {0 , 0 , 0 },
62
- {0x1D , 0x2B , 0x53 },
63
- {0x7E , 0x25 , 0x53 },
64
- {0x00 , 0x87 , 0x51 },
65
- {0xAB , 0x52 , 0x36 },
66
- {0x5F , 0x57 , 0x4F },
67
- {0xC2 , 0xC3 , 0xC7 },
68
- {0xff , 0xf1 , 0xe8 },
69
- {0xFF , 0x00 , 0x4D },
70
- {0xFF , 0xA3 , 0x00 },
71
- {0xFF , 0xEC , 0x27 },
72
- {0x00 , 0xE4 , 0x36 },
73
- {0x29 , 0xAD , 0xFF },
74
- {0x83 , 0x76 , 0x9C },
75
- {0xFF , 0x77 , 0xA8 },
76
- {0xFF , 0xCC , 0xAA },
77
- }
58
+ //nolint:govet
59
+ var defaultPalette = [256 ]image.RGB {
60
+ {0 , 0 , 0 },
61
+ {0x1D , 0x2B , 0x53 },
62
+ {0x7E , 0x25 , 0x53 },
63
+ {0x00 , 0x87 , 0x51 },
64
+ {0xAB , 0x52 , 0x36 },
65
+ {0x5F , 0x57 , 0x4F },
66
+ {0xC2 , 0xC3 , 0xC7 },
67
+ {0xff , 0xf1 , 0xe8 },
68
+ {0xFF , 0x00 , 0x4D },
69
+ {0xFF , 0xA3 , 0x00 },
70
+ {0xFF , 0xEC , 0x27 },
71
+ {0x00 , 0xE4 , 0x36 },
72
+ {0x29 , 0xAD , 0xFF },
73
+ {0x83 , 0x76 , 0x9C },
74
+ {0xFF , 0x77 , 0xA8 },
75
+ {0xFF , 0xCC , 0xAA },
78
76
}
You can’t perform that action at this time.
0 commit comments