UNTESTED: ebiten v2
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
"image"
|
||||
"sort"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/ebitenutil"
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
|
||||
)
|
||||
|
||||
type CartPt struct {
|
||||
@@ -118,9 +118,7 @@ func (s *Scenario) Draw(screen *ebiten.Image) error {
|
||||
op.GeoM.Translate(float64(spr.Rect.Min.X), float64(spr.Rect.Min.Y))
|
||||
op.GeoM.Scale(s.Zoom, s.Zoom)
|
||||
|
||||
if err := screen.DrawImage(spr.Image, &op); err != nil {
|
||||
return err
|
||||
}
|
||||
screen.DrawImage(spr.Image, &op)
|
||||
|
||||
x1, y1 := geo.Apply(0, 0)
|
||||
ebitenutil.DebugPrintAt(
|
||||
@@ -187,9 +185,7 @@ func (s *Scenario) renderCell(x, y, z int, screen *ebiten.Image, counter *int) e
|
||||
// Zoom has to come last
|
||||
op.GeoM.Scale(s.Zoom, s.Zoom)
|
||||
|
||||
if err := screen.DrawImage(spr.Image, &op); err != nil {
|
||||
return err
|
||||
}
|
||||
screen.DrawImage(spr.Image, &op)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user