aha
This commit is contained in:
parent
3fab8dbe7a
commit
2bb2635120
1 changed files with 9 additions and 12 deletions
21
main.go
21
main.go
|
@ -19,18 +19,15 @@ func main() {
|
||||||
ebiten.SetWindowSize(screenWidth*2, screenHeight*2)
|
ebiten.SetWindowSize(screenWidth*2, screenHeight*2)
|
||||||
ebiten.SetWindowTitle("TODO")
|
ebiten.SetWindowTitle("TODO")
|
||||||
|
|
||||||
var boxesPNG image.Image
|
boxesFile, err := assets.Open("assets/boxes.png")
|
||||||
func() {
|
if err != nil {
|
||||||
boxesFile, err := assets.Open("assets/boxes.png")
|
log.Fatalf("Couldn't open asset: %v", err)
|
||||||
if err != nil {
|
}
|
||||||
log.Fatalf("Couldn't open asset: %v", err)
|
boxesPNG, _, err := image.Decode(boxesFile)
|
||||||
}
|
if err != nil {
|
||||||
defer boxesFile.Close()
|
log.Fatalf("Couldn't decode asset: %v", err)
|
||||||
boxesPNG, _, err = image.Decode(boxesFile)
|
}
|
||||||
if err != nil {
|
boxesFile.Close()
|
||||||
log.Fatalf("Couldn't decode asset: %v", err)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
tiles := &engine.Tilemap{
|
tiles := &engine.Tilemap{
|
||||||
Map: [][]int{
|
Map: [][]int{
|
||||||
|
|
Loading…
Reference in a new issue