mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
examples: Misspelling (//go:generated -> //go:generate)
This commit is contained in:
parent
537bdb29f8
commit
07c8cb0e23
@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -36,8 +36,8 @@ const (
|
|||||||
var ebitenImage *ebiten.Image
|
var ebitenImage *ebiten.Image
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -46,8 +46,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -79,8 +79,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -65,8 +65,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Runner_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Runner_png))
|
||||||
|
@ -122,8 +122,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.FiveYears_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.FiveYears_jpg))
|
||||||
|
@ -53,8 +53,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
||||||
|
@ -73,8 +73,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -89,8 +89,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -192,8 +192,8 @@ type Game struct {
|
|||||||
var ebitenImage *ebiten.Image
|
var ebitenImage *ebiten.Image
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -66,8 +66,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -91,8 +91,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -43,8 +43,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -139,8 +139,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -65,8 +65,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -39,8 +39,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
||||||
|
@ -43,8 +43,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img1, _, err := image.Decode(bytes.NewReader(rmascot.Out01_png))
|
img1, _, err := image.Decode(bytes.NewReader(rmascot.Out01_png))
|
||||||
|
@ -42,8 +42,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -98,8 +98,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -39,8 +39,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -46,8 +46,8 @@ const (
|
|||||||
var smokeImage *ebiten.Image
|
var smokeImage *ebiten.Image
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Smoke_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Smoke_png))
|
||||||
|
@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -47,8 +47,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
||||||
|
@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -42,8 +42,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(resources.Gopher_png))
|
img, _, err := image.Decode(bytes.NewReader(resources.Gopher_png))
|
||||||
|
@ -42,8 +42,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -44,8 +44,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||||
|
@ -44,8 +44,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
||||||
|
@ -229,8 +229,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
@ -46,8 +46,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.UI_png))
|
img, _, err := image.Decode(bytes.NewReader(images.UI_png))
|
||||||
|
@ -377,8 +377,8 @@ func main() {
|
|||||||
w, h := ebiten.ScreenSizeInFullscreen()
|
w, h := ebiten.ScreenSizeInFullscreen()
|
||||||
fmt.Printf("Screen size in fullscreen: %d, %d\n", w, h)
|
fmt.Printf("Screen size in fullscreen: %d, %d\n", w, h)
|
||||||
|
|
||||||
// Decode an image from a byte slice.
|
// Decode an image from the image file's byte slice.
|
||||||
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
|
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
|
||||||
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
|
||||||
// See https://pkg.go.dev/embed for more details.
|
// See https://pkg.go.dev/embed for more details.
|
||||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||||
|
Loading…
Reference in New Issue
Block a user