mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-24 12:16:14 -04:00
Removed improper ebiten dependency in d2interface.
This commit is contained in:
parent
ad1decc813
commit
92989d6d7a
@ -1,7 +1,5 @@
|
|||||||
package d2interface
|
package d2interface
|
||||||
|
|
||||||
import "github.com/hajimehoshi/ebiten/v2"
|
|
||||||
|
|
||||||
type renderCallback = func(Surface) error
|
type renderCallback = func(Surface) error
|
||||||
|
|
||||||
type updateCallback = func() error
|
type updateCallback = func() error
|
||||||
@ -21,6 +19,6 @@ type Renderer interface {
|
|||||||
GetCursorPos() (int, int)
|
GetCursorPos() (int, int)
|
||||||
CurrentFPS() float64
|
CurrentFPS() float64
|
||||||
ShowPanicScreen(message string)
|
ShowPanicScreen(message string)
|
||||||
Print(target *ebiten.Image, str string) error
|
Print(target interface{}, str string) error
|
||||||
PrintAt(target *ebiten.Image, str string, x, y int)
|
PrintAt(target interface{}, str string, x, y int)
|
||||||
}
|
}
|
||||||
|
@ -37,16 +37,16 @@ type GlyphPrinter struct {
|
|||||||
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
||||||
//
|
//
|
||||||
// DebugPrint always returns nil as of 1.5.0-alpha.
|
// DebugPrint always returns nil as of 1.5.0-alpha.
|
||||||
func (p *GlyphPrinter) Print(target *ebiten.Image, str string) error {
|
func (p *GlyphPrinter) Print(target interface{}, str string) error {
|
||||||
p.PrintAt(target, str, 0, 0)
|
p.PrintAt(target.(*ebiten.Image), str, 0, 0)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PrintAt draws the string str on the image at (x, y) position.
|
// PrintAt draws the string str on the image at (x, y) position.
|
||||||
// The available runes are in U+0000 to U+00FF, which is C0 Controls and
|
// The available runes are in U+0000 to U+00FF, which is C0 Controls and
|
||||||
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
||||||
func (p *GlyphPrinter) PrintAt(target *ebiten.Image, str string, x, y int) {
|
func (p *GlyphPrinter) PrintAt(target interface{}, str string, x, y int) {
|
||||||
p.drawDebugText(target, str, x, y, false)
|
p.drawDebugText(target.(*ebiten.Image), str, x, y, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *GlyphPrinter) drawDebugText(target *ebiten.Image, str string, ox, oy int, shadow bool) {
|
func (p *GlyphPrinter) drawDebugText(target *ebiten.Image, str string, ox, oy int, shadow bool) {
|
||||||
|
Loading…
Reference in New Issue
Block a user