From afef032acc68459756fa1a09e55ab5f7cca5df1d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 22 Jun 2020 03:45:16 +0900 Subject: [PATCH] ebiten: Deprecate Run Fixes #1184 --- doc.go | 26 -------------------------- run.go | 3 +++ 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/doc.go b/doc.go index abbeaa74f..2bbb3a701 100644 --- a/doc.go +++ b/doc.go @@ -49,32 +49,6 @@ // } // } // -// For backward compatibility, you can use a shorthand style Run. -// -// // update proceeds the game state. -// // update is called every frame (1/60 [s]). -// func update(screen *ebiten.Image) error { -// -// // Write your game's logical update. -// -// if ebiten.IsDrawingSkipped() { -// // When the game is running slowly, the rendering result -// // will not be adopted. -// return nil -// } -// -// // Write your game's rendering. -// -// return nil -// } -// -// func main() { -// // Call ebiten.Run to start your game loop. -// if err := ebiten.Run(update, 320, 240, 2, "Your game's title"); err != nil { -// log.Fatal(err) -// } -// } -// // In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go' // statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions that // must be called on the main thread under some conditions (typically, before ebiten.RunGame is called). diff --git a/run.go b/run.go index 982cad579..239d1d542 100644 --- a/run.go +++ b/run.go @@ -139,6 +139,9 @@ func IsRunningSlowly() bool { } // Run starts the main loop and runs the game. +// +// Deprecated: (as of 1.12.0) Use RunGame instead. +// // f is a function which is called at every frame. // The argument (*Image) is the render target that represents the screen. // The screen size is based on the given values (width and height).