mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
restorable: Refactoring: move and rename a const
This commit is contained in:
parent
6f4f4ed06f
commit
979836d0f5
@ -25,8 +25,6 @@ import (
|
|||||||
"github.com/hajimehoshi/ebiten/internal/opengl"
|
"github.com/hajimehoshi/ebiten/internal/opengl"
|
||||||
)
|
)
|
||||||
|
|
||||||
const drawImageHistoryMax = 100
|
|
||||||
|
|
||||||
type drawImageHistoryItem struct {
|
type drawImageHistoryItem struct {
|
||||||
image *Image
|
image *Image
|
||||||
vertices []float32
|
vertices []float32
|
||||||
@ -159,7 +157,8 @@ func (p *Image) appendDrawImageHistory(image *Image, vertices []float32, colorm
|
|||||||
if p.stale {
|
if p.stale {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(p.drawImageHistory)+1 > drawImageHistoryMax {
|
const maxDrawImageHistoryNum = 100
|
||||||
|
if len(p.drawImageHistory)+1 > maxDrawImageHistoryNum {
|
||||||
p.makeStale()
|
p.makeStale()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user