diff --git a/internal/ui/context.go b/internal/ui/context.go index c56e1c5cd..1288c5132 100644 --- a/internal/ui/context.go +++ b/internal/ui/context.go @@ -30,8 +30,6 @@ import ( "github.com/hajimehoshi/ebiten/v2/internal/hooks" ) -const DefaultTPS = clock.DefaultTPS - type Game interface { NewOffscreenImage(width, height int) *Image Layout(outsideWidth, outsideHeight int) (int, int) @@ -353,14 +351,6 @@ func SetFPSMode(fpsMode FPSModeType) { theUI.SetFPSMode(fpsMode) } -func TPS() int { - return clock.TPS() -} - -func SetTPS(tps int) { - clock.SetTPS(tps) -} - func IsScreenClearedEveryFrame() bool { return theGlobalState.isScreenClearedEveryFrame() } diff --git a/run.go b/run.go index 00f2471cd..f561927f0 100644 --- a/run.go +++ b/run.go @@ -76,7 +76,7 @@ type Game interface { } // DefaultTPS represents a default ticks per second, that represents how many times game updating happens in a second. -const DefaultTPS = ui.DefaultTPS +const DefaultTPS = clock.DefaultTPS // CurrentFPS returns the current number of FPS (frames per second), that represents // how many swapping buffer happens per second. @@ -417,7 +417,7 @@ func ScheduleFrame() { // // MaxTPS is concurrent-safe. func MaxTPS() int { - return ui.TPS() + return clock.TPS() } // CurrentTPS returns the current TPS (ticks per second), @@ -447,7 +447,7 @@ const UncappedTPS = SyncWithFPS // // SetMaxTPS is concurrent-safe. func SetMaxTPS(tps int) { - ui.SetTPS(tps) + clock.SetTPS(tps) } // IsScreenTransparent reports whether the window is transparent.