diff --git a/examples/images/arcadefont.png b/examples/_resources/images/arcadefont.png similarity index 100% rename from examples/images/arcadefont.png rename to examples/_resources/images/arcadefont.png diff --git a/examples/images/blocks/background.png b/examples/_resources/images/blocks/background.png similarity index 100% rename from examples/images/blocks/background.png rename to examples/_resources/images/blocks/background.png diff --git a/examples/images/blocks/blocks.png b/examples/_resources/images/blocks/blocks.png similarity index 100% rename from examples/images/blocks/blocks.png rename to examples/_resources/images/blocks/blocks.png diff --git a/examples/images/ebiten.png b/examples/_resources/images/ebiten.png similarity index 100% rename from examples/images/ebiten.png rename to examples/_resources/images/ebiten.png diff --git a/examples/images/gophers.jpg b/examples/_resources/images/gophers.jpg similarity index 100% rename from examples/images/gophers.jpg rename to examples/_resources/images/gophers.jpg diff --git a/examples/images/keyboard/keyboard.png b/examples/_resources/images/keyboard/keyboard.png similarity index 100% rename from examples/images/keyboard/keyboard.png rename to examples/_resources/images/keyboard/keyboard.png diff --git a/examples/images/license.md b/examples/_resources/images/license.md similarity index 100% rename from examples/images/license.md rename to examples/_resources/images/license.md diff --git a/examples/alphablending/main.go b/examples/alphablending/main.go index 9bffcfed3..63facfea2 100644 --- a/examples/alphablending/main.go +++ b/examples/alphablending/main.go @@ -72,7 +72,7 @@ func update(screen *ebiten.Image) error { func main() { var err error - ebitenImage, _, err = ebitenutil.NewImageFromFile("images/ebiten.png", ebiten.FilterNearest) + ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/blocks/blocks/gamescene.go b/examples/blocks/blocks/gamescene.go index 91f05b168..fade023ca 100644 --- a/examples/blocks/blocks/gamescene.go +++ b/examples/blocks/blocks/gamescene.go @@ -76,7 +76,7 @@ func init() { } imageEmpty.Fill(color.White) // Background - imageGameBG, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterLinear) + imageGameBG, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterLinear) if err != nil { panic(err) } diff --git a/examples/blocks/blocks/piece.go b/examples/blocks/blocks/piece.go index d9a6fc575..955c887a6 100644 --- a/examples/blocks/blocks/piece.go +++ b/examples/blocks/blocks/piece.go @@ -23,7 +23,7 @@ var imageBlocks *ebiten.Image func init() { var err error - imageBlocks, _, err = ebitenutil.NewImageFromFile("images/blocks/blocks.png", ebiten.FilterNearest) + imageBlocks, _, err = ebitenutil.NewImageFromFile("_resources/images/blocks/blocks.png", ebiten.FilterNearest) if err != nil { panic(err) } diff --git a/examples/blocks/blocks/titlescene.go b/examples/blocks/blocks/titlescene.go index 854715acc..be9088b00 100644 --- a/examples/blocks/blocks/titlescene.go +++ b/examples/blocks/blocks/titlescene.go @@ -26,7 +26,7 @@ var imageBackground *ebiten.Image func init() { var err error - imageBackground, _, err = ebitenutil.NewImageFromFile("images/blocks/background.png", ebiten.FilterNearest) + imageBackground, _, err = ebitenutil.NewImageFromFile("_resources/images/blocks/background.png", ebiten.FilterNearest) if err != nil { panic(err) } diff --git a/examples/common/font.go b/examples/common/font.go index ba042e9e0..d1e16bb9f 100644 --- a/examples/common/font.go +++ b/examples/common/font.go @@ -15,13 +15,14 @@ package common import ( - "github.com/hajimehoshi/ebiten" - "github.com/hajimehoshi/ebiten/ebitenutil" "image/color" "math" "path/filepath" "runtime" "strings" + + "github.com/hajimehoshi/ebiten" + "github.com/hajimehoshi/ebiten/ebitenutil" ) var ( @@ -49,7 +50,7 @@ func init() { path = filepath.Dir(path) dir = filepath.Join(path, "..") } - arcadeFontPath := filepath.Join(dir, "images", "arcadefont.png") + arcadeFontPath := filepath.Join(dir, "_resources", "images", "arcadefont.png") arcadeFontImage, _, err := ebitenutil.NewImageFromFile(arcadeFontPath, ebiten.FilterNearest) if err != nil { diff --git a/examples/hue/main.go b/examples/hue/main.go index c6d7e7eb8..342f27275 100644 --- a/examples/hue/main.go +++ b/examples/hue/main.go @@ -47,7 +47,7 @@ func update(screen *ebiten.Image) error { func main() { var err error - gophersImage, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest) + gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/keyboard/main.go b/examples/keyboard/main.go index f27b21d22..9bfedb222 100644 --- a/examples/keyboard/main.go +++ b/examples/keyboard/main.go @@ -32,7 +32,7 @@ var keyboardImage *ebiten.Image func init() { var err error - keyboardImage, _, err = ebitenutil.NewImageFromFile("images/keyboard/keyboard.png", ebiten.FilterNearest) + keyboardImage, _, err = ebitenutil.NewImageFromFile("_resources/images/keyboard/keyboard.png", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/mosaic/main.go b/examples/mosaic/main.go index 1b181c0d7..77a31b534 100644 --- a/examples/mosaic/main.go +++ b/examples/mosaic/main.go @@ -46,7 +46,7 @@ func update(screen *ebiten.Image) error { func main() { var err error - gophersImage, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest) + gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/perspective/main.go b/examples/perspective/main.go index 03d17f2fe..e78cc1ec9 100644 --- a/examples/perspective/main.go +++ b/examples/perspective/main.go @@ -66,7 +66,7 @@ func update(screen *ebiten.Image) error { func main() { var err error - gophersImage, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest) + gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/rotate/main.go b/examples/rotate/main.go index f36514697..e8ebef1cd 100644 --- a/examples/rotate/main.go +++ b/examples/rotate/main.go @@ -48,7 +48,7 @@ func update(screen *ebiten.Image) error { func main() { var err error - gophersImage, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest) + gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/sprites/main.go b/examples/sprites/main.go index fb2c2c6a2..08694f91d 100644 --- a/examples/sprites/main.go +++ b/examples/sprites/main.go @@ -133,7 +133,7 @@ Press <- or -> to change the number of sprites`, ebiten.CurrentFPS(), sprites.Le func main() { var err error - ebitenImage, _, err = ebitenutil.NewImageFromFile("images/ebiten.png", ebiten.FilterNearest) + ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterNearest) if err != nil { log.Fatal(err) } diff --git a/examples/windowsize/main.go b/examples/windowsize/main.go index 9bc4b3811..eec150caf 100644 --- a/examples/windowsize/main.go +++ b/examples/windowsize/main.go @@ -102,7 +102,7 @@ FPS: %0.2f`, x, y, ebiten.CurrentFPS()) func main() { var err error - gophersImage, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest) + gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest) if err != nil { log.Fatal(err) }