summaryrefslogtreecommitdiff
path: root/fire
diff options
context:
space:
mode:
Diffstat (limited to 'fire')
-rw-r--r--fire/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/fire/main.go b/fire/main.go
index 8636f43..17760bf 100644
--- a/fire/main.go
+++ b/fire/main.go
@@ -95,9 +95,8 @@ func (dc *drawContext) update(screen *ebiten.Image) error {
case inpututil.IsKeyJustPressed(ebiten.KeySpace):
dc.toggle()
}
- r := screen.Bounds()
- for x := 0; x < r.Max.X; x++ {
- for y := 1; y < r.Max.Y; y++ {
+ for x := 0; x < dc.img.Bounds().Max.X; x++ {
+ for y := 1; y < dc.img.Bounds().Max.Y; y++ {
z := rand.Intn(3)
n := dc.img.ColorIndexAt(x, y-1)
if n > 0 && z == 0 {