2024-06-11 22:19:12 -06:00
|
|
|
package style
|
2024-05-03 13:25:34 -06:00
|
|
|
|
|
|
|
import "image"
|
|
|
|
import "image/color"
|
|
|
|
|
|
|
|
type missingTexture int
|
|
|
|
|
|
|
|
func (texture missingTexture) ColorModel () color.Model {
|
|
|
|
return color.RGBAModel
|
|
|
|
}
|
|
|
|
|
|
|
|
func (texture missingTexture) Bounds () image.Rectangle {
|
|
|
|
return image.Rect(0, 0, int(texture), int(texture))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (texture missingTexture) At (x, y int) color.Color {
|
|
|
|
x /= 8
|
|
|
|
y /= 8
|
|
|
|
if (x + y) % 2 == 0 {
|
|
|
|
return color.RGBA { R: 0xFF, B: 0xFF, A: 0xFF }
|
|
|
|
} else {
|
|
|
|
return color.RGBA { A: 0xFF }
|
|
|
|
}
|
|
|
|
}
|