mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
parent
5305735055
commit
67400d242b
@ -71,9 +71,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -37,9 +37,6 @@ var ebitenImage *ebiten.Image
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -47,9 +47,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -80,9 +80,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -66,9 +66,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Runner_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -123,9 +123,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -93,9 +93,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.FiveYears_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -54,9 +54,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -74,9 +74,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -90,9 +90,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -193,9 +193,6 @@ var ebitenImage *ebiten.Image
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -67,9 +67,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -92,9 +92,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -44,9 +44,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -140,9 +140,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -66,9 +66,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -40,9 +40,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -44,9 +44,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img1, _, err := image.Decode(bytes.NewReader(rmascot.Out01_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -43,9 +43,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -100,9 +100,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -40,9 +40,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -47,9 +47,6 @@ var smokeImage *ebiten.Image
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Smoke_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -71,9 +71,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -48,9 +48,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -1,44 +0,0 @@
|
||||
// Copyright 2018 The Ebiten Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/ebiten.png -output=./images/ebiten.go -var=Ebiten_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/fiveyears.jpg -output=./images/fiveyears.go -var=FiveYears_jpg
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/gophers.jpg -output=./images/gophers.go -var=Gophers_jpg
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/runner.png -output=./images/runner.go -var=Runner_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/smoke.png -output=./images/smoke.go -var=Smoke_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/spritesheet.png -output=./images/spritesheet.go -var=Spritesheet_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/tile.png -output=./images/tile.go -var=Tile_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/tiles.png -output=./images/tiles.go -var=Tiles_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=images -input=./images/ui.png -output=./images/ui.go -var=UI_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=audio -input=./images/audio/alert.png -output=./images/audio/alert.go -var=Alert_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=audio -input=./images/audio/pause.png -output=./images/audio/pause.go -var=Pause_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=audio -input=./images/audio/play.png -output=./images/audio/play.go -var=Play_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=blocks -input=./images/blocks/background.png -output=./images/blocks/background.go -var=Background_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=blocks -input=./images/blocks/blocks.png -output=./images/blocks/blocks.go -var=Blocks_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=flappy -input=./images/flappy/gopher.png -output=./images/flappy/gopher.go -var=Gopher_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=flappy -input=./images/flappy/tiles.png -output=./images/flappy/tiles.go -var=Tiles_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=mascot -input=./images/mascot/out01.png -output=./images/mascot/out01.go -var=Out01_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=mascot -input=./images/mascot/out02.png -output=./images/mascot/out02.go -var=Out02_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=mascot -input=./images/mascot/out03.png -output=./images/mascot/out03.go -var=Out03_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=shader -input=./images/shader/gopher.png -output=./images/shader/gopher.go -var=Gopher_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=shader -input=./images/shader/gopherbg.png -output=./images/shader/gopherbg.go -var=GopherBg_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=shader -input=./images/shader/normal.png -output=./images/shader/normal.go -var=Normal_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=shader -input=./images/shader/noise.png -output=./images/shader/noise.go -var=Noise_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=platformer -input=./images/platformer/background.png -output=./images/platformer/background.go -var=Background_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=platformer -input=./images/platformer/left.png -output=./images/platformer/left.go -var=Left_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=platformer -input=./images/platformer/mainchar.png -output=./images/platformer/mainchar.go -var=MainChar_png
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -package=platformer -input=./images/platformer/right.png -output=./images/platformer/right.go -var=Right_png
|
||||
//go:generate gofmt -s -w .
|
||||
|
||||
package resources
|
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package audio
|
||||
|
||||
var Alert_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x017IDATX\xc3c`\x18\x05\xa3`\x14P\x11\xfc\x0f\xfe\xbf\xf9?3\xad\fg\xfb?\xf9?\b\xb4\xd2\xc6x\xa5\xffg\xfeC\xc0\xdf\xff\xee\xb4\b\x9a\x0f\xffa\xe0\xe7\xff$\xca]\xbb\t\x85\xdf\xff\x1f\x01\xee\xfd7\xa1\xccp\x8e\xff\xf5\xff\xbf\xff\xff\x8f\"V\t7~\xed\x7f~ʌ\xf7\xf9\x7f\x17b\x12\x8a(\xe3\xff\xed\xe0\xa0ɥ8`\x10!\x81&'\xfa\xff\xd0\x7fc*\x04\f.\v(\x8dTx\xc0\xa0Z\xf0߂t\xa3\xa4\xff/\xfd\xff\xec?\x11\x00\xac\xfa\xcd\x7f5R\x8d\x7f\xf3\x9fH\x00V\xff\xff\xff\x1e\xd2,X\xfa\xff?\x89\x16\xfc\xff\xefD\x8a\x05Oɰ`&)\x16\xfc'Â\xab\xb8\xf5Sǂ\x8fC\xde\x02\x92\x82\x88\xe6\x91LN2u\xa4mF\xdbMۢ\xe2\xf5\x7fU\xf2\v8d\x83p\x15vf\x94\x94\xa0()\x81\x06\xc55\xa6Ax+\x1c\x91\xff\aI\xacpp\x18\x84\xab\xca\xdc\n\x14\xfa\xf1?\x87b\vpT\xfaep\x8f\xad&\xba\xd2\xc7\x17\xd6\x18͖IH\x91s\x97Ƞ\"-2\xff\x87\"5\xbc~\x10\xd5\xf0\"5\xb5\xfcW\xa6iӑ\x0e\x8d_:4\xdfG\xc1(\x18\xd2\x00\x00-\xdc\xe2\x06\xe3I\x8d\x19\x00\x00\x00\x00IEND\xaeB`\x82")
|
30
examples/resources/images/audio/embed.go
Normal file
30
examples/resources/images/audio/embed.go
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package audio
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed alert.png
|
||||
Alert_png []byte
|
||||
|
||||
//go:embed pause.png
|
||||
Pause_png []byte
|
||||
|
||||
//go:embed play.png
|
||||
Play_png []byte
|
||||
)
|
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package audio
|
||||
|
||||
var Pause_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\x01\x00\x00\x00\x00\x7fy\xc4*\x00\x00\x00\x02tRNS\x00\x00v\x93\xcd8\x00\x00\x00\x13IDATx\x01c\xa0\x12\xe0\xff\xc0\xffahS\xd4\x01\x00\x86\x107\xc9\xdbPϏ\x00\x00\x00\x00IEND\xaeB`\x82")
|
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package audio
|
||||
|
||||
var Play_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x00\x99IDATX\xc3\xed\xd6A\r\xc2@\x10F\xe1\xf6\u0095;\x0eЀ\n\\\xe0\x02\x17\xc8@\x05\x1aP\x80\x00\xae\x1cȇ\x02J\xd3\xdd?\x810\xcf\xc0K\xba\xaf33\fEQ\xfc\x01\xce6Y\x01w\acR\x00\x17۬\x80\x87\xa3UR\x00W\xbb\xac\x80\xa7\x93uR\x007\xfb\xac\x00\x1d\xe3\xf5\x8e^\xf1\x9a\xa2G\xbc\xa6i\x8f\xd7g\xda\xe25\x87\x96x\xcdei\xbc\xdf!\b\x7f\xa2\xe8#\x873\x8d\xfeh\xe1Q\x11\x1dv\xd1q\x1d^8ѕ\x19^\xfaѳ%|x\xa5OǢ(~\x80\x17,/\x87\x87\x9c\xa0y\xfd\x00\x00\x00\x00IEND\xaeB`\x82")
|
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package blocks
|
||||
|
||||
var Background_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \b\x02\x00\x00\x00\xfc\x18\xed\xa3\x00\x00\x00\tpHYs\x00\x00\v\x13\x00\x00\v\x13\x01\x00\x9a\x9c\x18\x00\x00\x00<IDATH\xc7\xedѱ\r\x000\b\x03A\xc8J\xec\xbf\x01\x9e\xc9̀\x944\xd1\x7fmt\x05\xd9ݱ\xa9\xaaV\xfb\x13\x8f\x03\x00\x00\x00\x00\xb8Q\xda^\x1dH\xe2\a\x00\x00\x00\x00\xff\x01\x03\xd79\b\xa0\x7fq\xb3\xbb\x00\x00\x00\x00IEND\xaeB`\x82")
|
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package blocks
|
||||
|
||||
var Blocks_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00F\x00\x00\x00\n\b\x06\x00\x00\x00\t\xb4(\x93\x00\x00\x00lIDATH\x89핱\r\xc00\b\x04?\x91{\x0f\xc3\x06\fô\xfe\x99\x9c\"JI\xf8\xde\\\xe5\xe2\x04\xd65\\{\xad\x8d\x02\x92\xb0\xb0J\x03I\xc04\xcf,4\x0fڼ\x10\xf7N\x9f\x927\xbe\x87\xf2A\xc93\xd5\x13\xf7\x8a\xf3 z\xee.y\xf7\xafq0\x1d&\xa1\xc3$t\x98\x84\x0e\x93\xd0a\x12:L\xc2 Y\xdeu\xe0\xbd\xed'y\x0f\x13\x1f^}\x06\x7f\x19\xfa\x00\x00\x00\x00IEND\xaeB`\x82")
|
27
examples/resources/images/blocks/embed.go
Normal file
27
examples/resources/images/blocks/embed.go
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package blocks
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed background.png
|
||||
Background_png []byte
|
||||
|
||||
//go:embed blocks.png
|
||||
Blocks_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
48
examples/resources/images/embed.go
Normal file
48
examples/resources/images/embed.go
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package images
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed ebiten.png
|
||||
Ebiten_png []byte
|
||||
|
||||
//go:embed fiveyears.jpg
|
||||
FiveYears_jpg []byte
|
||||
|
||||
//go:embed gophers.jpg
|
||||
Gophers_jpg []byte
|
||||
|
||||
//go:embed runner.png
|
||||
Runner_png []byte
|
||||
|
||||
//go:embed smoke.png
|
||||
Smoke_png []byte
|
||||
|
||||
//go:embed spritesheet.png
|
||||
Spritesheet_png []byte
|
||||
|
||||
//go:embed tile.png
|
||||
Tile_png []byte
|
||||
|
||||
//go:embed tiles.png
|
||||
Tiles_png []byte
|
||||
|
||||
//go:embed ui.png
|
||||
UI_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
27
examples/resources/images/flappy/embed.go
Normal file
27
examples/resources/images/flappy/embed.go
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package flappy
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed gopher.png
|
||||
Gopher_png []byte
|
||||
|
||||
//go:embed tiles.png
|
||||
Tiles_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
30
examples/resources/images/mascot/embed.go
Normal file
30
examples/resources/images/mascot/embed.go
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package mascot
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed out01.png
|
||||
Out01_png []byte
|
||||
|
||||
//go:embed out02.png
|
||||
Out02_png []byte
|
||||
|
||||
//go:embed out03.png
|
||||
Out03_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
33
examples/resources/images/platformer/embed.go
Normal file
33
examples/resources/images/platformer/embed.go
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package platformer
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed background.png
|
||||
Background_png []byte
|
||||
|
||||
//go:embed left.png
|
||||
Left_png []byte
|
||||
|
||||
//go:embed mainchar.png
|
||||
MainChar_png []byte
|
||||
|
||||
//go:embed right.png
|
||||
Right_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
33
examples/resources/images/shader/embed.go
Normal file
33
examples/resources/images/shader/embed.go
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2022 The Ebitengine Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package shader
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed gopher.png
|
||||
Gopher_png []byte
|
||||
|
||||
//go:embed gopherbg.png
|
||||
GopherBg_png []byte
|
||||
|
||||
//go:embed normal.png
|
||||
Normal_png []byte
|
||||
|
||||
//go:embed noise.png
|
||||
Noise_png []byte
|
||||
)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +0,0 @@
|
||||
// Code generated by file2byteslice. DO NOT EDIT.
|
||||
|
||||
package images
|
||||
|
||||
var UI_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80\x00\x00\x00\x80\b\x06\x00\x00\x00\xc3>a\xcb\x00\x00\x02\x1eIDATx\x9c\xed\xdb1N\xe3P\x10\x80\xe1\xf1*\x05U(\"A\x81\x1b:\x8a4\x94\\\x82\xc3\xd09\a\x80\x06q\x98p\b\x1f\x03J(\"A\xd2ЙbY\x89EX\xbbzI\x88\xa3\xf9\xbe\n)\x1a\x824?\xc6\xe89\xd5\xed\xedm,\x16\x8b.\n\xd4u]\x8d\xc7\xe38<<,\x9a\x8f\x88\xea\xf2\xf2\xb2p\x94M\x18-\x16\x8b\xee\xe2\xe2\xa2h\xb8m\xdb\xe2\xd9\x0f]DT\xeb|\x03\xd6\xf3k\xd7?\x00\xbb%\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\xa3\xf1x\\\xb5m[t\x9c{ttT=??\xc7\xf1\xf1q\xd1\xfc\xeb뫓\xc0\x1d\x1bM&\x93X.\x97E\xc3'''qpp\x10m\xdb~\xfb\xfa\xd9\xd9Y\xf5\xf6\xf6\x16\x8f\x8f\x8f\xdf\x06R\xd7u\xd1\xfb\xb29\xa3\x87\x87\x87\xee\xfa\xfa\xbahx6\x9buWWW\xd1\xf7L\xc0\xdd\xdd]\x17\x11\xbd\xaf\x7f\\y\\\x05v\xc8=@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$7:==\xadf\xb3Y\xd1y\xfe\xf9\xf9yնm\xf4=OP\xd7u\xb5\\.{_\x9fL&N\x02wl\xb4\xce\xf0\xcb\xcbKD\xf4\x1f\xf7\xc6\xef\x8f\x7f\xf7zzz\x8a\xa6i\x8a\xde\xfb\xe6\xe6\xa6h\x8e/\x9a\xa6\xe9J5M\xd3\xcd\xe7\xf3\xe2\xf9\xf9|ޕ\x06\xc0f\xb8\aHN\x00\xc9\xedc\x00]\xfc\xe3ނ\xff\xb7o\x01X\xfc\x86\xedS\x00\x9f\x97\xef\xdf\xc7\rٗ\x00,\x7fK\x86\x14@\xdf\xdfv\xcbߢ!\x05\xf0G\xd7\xf3\xb5\xe5o\xc1\x90\x02\xf8\xbc\xe0\xafW\x03\xcbߒ!\x05\x10\xf1\xfd\xa2-\x7f\x8b\x86\x16@\xc4\xdf\v\xb7\xfc-[\xeb0h\x8b,\xfe\x87\f\xf1\n\xc0\x0f\x1aM\xa7\xd3\xe2\xe7\x01\xa6\xd3i\xb5Z\xad\xe2\xfe\xfe\xbeh~\xb5Z\xf9M\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xe7\x1dpX\xe8\f\x9d\xb6W:\x00\x00\x00\x00IEND\xaeB`\x82")
|
@ -71,9 +71,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -70,9 +70,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(resources.Gopher_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -43,9 +43,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -44,9 +44,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -44,9 +44,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -230,9 +230,6 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
func main() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -47,9 +47,6 @@ var (
|
||||
|
||||
func init() {
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.UI_png))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -389,9 +389,6 @@ func main() {
|
||||
fmt.Printf("Screen size in fullscreen: %d, %d\n", w, h)
|
||||
|
||||
// Decode an image from the image file's byte slice.
|
||||
// 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.
|
||||
// See https://pkg.go.dev/embed for more details.
|
||||
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user