internal/ui, internal/mipmap, internal/graphicscommand: fix a wrong panic message

This commit is contained in:
Hajime Hoshi 2022-04-01 20:11:22 +09:00
parent 8e40b2562e
commit b53cb2acd6
3 changed files with 5 additions and 5 deletions

View File

@ -211,7 +211,7 @@ func (s *Shader) convertUniforms(uniforms map[string]interface{}) [][]float32 {
case []float32:
us[idx.resultIndex] = v
default:
panic(fmt.Sprintf("ebiten: unexpected uniform value type: %s, %T", name, v))
panic(fmt.Sprintf("graphicscommand: unexpected uniform value type: %s, %T", name, v))
}
continue
}

View File

@ -155,11 +155,11 @@ func (m *Mipmap) setImg(level int, img *buffered.Image) {
func (m *Mipmap) level(level int) *buffered.Image {
if level == 0 {
panic("ebiten: level must be non-zero at level")
panic("mipmap: level must be non-zero at level")
}
if m.volatile {
panic("ebiten: mipmap images for a volatile image is not implemented yet")
panic("mipmap: mipmap images for a volatile image is not implemented yet")
}
if img, ok := m.imgs[level]; ok {
@ -185,7 +185,7 @@ func (m *Mipmap) level(level int) *buffered.Image {
vs = graphics.QuadVertices(0, 0, float32(w), float32(h), 0.5, 0, 0, 0.5, 0, 0, 1, 1, 1, 1)
filter = graphicsdriver.FilterLinear
default:
panic(fmt.Sprintf("ebiten: invalid level: %d", level))
panic(fmt.Sprintf("mipmap: invalid level: %d", level))
}
is := graphics.QuadIndices()

View File

@ -222,7 +222,7 @@ func (g *globalState) maxTPS() int {
func (g *globalState) setMaxTPS(tps int) {
if tps < 0 && tps != clock.SyncWithFPS {
panic("ebiten: tps must be >= 0 or SyncWithFPS")
panic("ui: tps must be >= 0 or SyncWithFPS")
}
atomic.StoreInt32(&g.maxTPS_, int32(tps))
}