mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
parent
289129c9e5
commit
3cafb0f6fd
@ -13,25 +13,28 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:generate go run gen.go
|
//go:generate go run gen.go
|
||||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -input text.png -output text.png.go -package ebitenutil -var textPng
|
|
||||||
|
|
||||||
package ebitenutil
|
package ebitenutil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
_ "embed"
|
||||||
"image"
|
"image"
|
||||||
_ "image/png"
|
_ "image/png"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2"
|
"github.com/hajimehoshi/ebiten/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:embed text.png
|
||||||
|
var text_png []byte
|
||||||
|
|
||||||
var (
|
var (
|
||||||
debugPrintTextImage *ebiten.Image
|
debugPrintTextImage *ebiten.Image
|
||||||
debugPrintTextSubImages = map[rune]*ebiten.Image{}
|
debugPrintTextSubImages = map[rune]*ebiten.Image{}
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
img, _, err := image.Decode(bytes.NewReader(textPng))
|
img, _, err := image.Decode(bytes.NewReader(text_png))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user