go generate ./... with Go 1.19 (#2228)

This commit is contained in:
mattn 2022-08-03 20:48:02 +09:00 committed by GitHub
parent 5bf1934a70
commit 3cd0daac67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 143 additions and 140 deletions

View File

@ -15,9 +15,10 @@
// Package audio provides audio players.
//
// The stream format must be 16-bit little endian and 2 channels. The format is as follows:
// [data] = [sample 1] [sample 2] [sample 3] ...
// [sample *] = [channel 1] ...
// [channel *] = [byte 1] [byte 2] ...
//
// [data] = [sample 1] [sample 2] [sample 3] ...
// [sample *] = [channel 1] ...
// [channel *] = [byte 1] [byte 2] ...
//
// An audio context (audio.Context object) has a sample rate you can specify and all streams you want to play must have the same
// sample rate. However, decoders in e.g. audio/mp3 package adjust sample rate automatically,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

72
doc.go
View File

@ -16,45 +16,45 @@
//
// You can start the game by calling the function RunGame.
//
// // Game implements ebiten.Game interface.
// type Game struct{}
// // Game implements ebiten.Game interface.
// type Game struct{}
//
// // Update proceeds the game state.
// // Update is called every tick (1/60 [s] by default).
// func (g *Game) Update() error {
// // Write your game's logical update.
// return nil
// }
// // Update proceeds the game state.
// // Update is called every tick (1/60 [s] by default).
// func (g *Game) Update() error {
// // Write your game's logical update.
// return nil
// }
//
// // Draw draws the game screen.
// // Draw is called every frame (typically 1/60[s] for 60Hz display).
// func (g *Game) Draw(screen *ebiten.Image) {
// // Write your game's rendering.
// }
// // Draw draws the game screen.
// // Draw is called every frame (typically 1/60[s] for 60Hz display).
// func (g *Game) Draw(screen *ebiten.Image) {
// // Write your game's rendering.
// }
//
// // Layout takes the outside size (e.g., the window size) and returns the (logical) screen size.
// // If you don't have to adjust the screen size with the outside size, just return a fixed size.
// func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) {
// return 320, 240
// }
// // Layout takes the outside size (e.g., the window size) and returns the (logical) screen size.
// // If you don't have to adjust the screen size with the outside size, just return a fixed size.
// func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) {
// return 320, 240
// }
//
// func main() {
// game := &Game{}
// // Specify the window size as you like. Here, a doubled size is specified.
// ebiten.SetWindowSize(640, 480)
// ebiten.SetWindowTitle("Your game's title")
// // Call ebiten.RunGame to start your game loop.
// if err := ebiten.RunGame(game); err != nil {
// log.Fatal(err)
// }
// }
// func main() {
// game := &Game{}
// // Specify the window size as you like. Here, a doubled size is specified.
// ebiten.SetWindowSize(640, 480)
// ebiten.SetWindowTitle("Your game's title")
// // Call ebiten.RunGame to start your game loop.
// if err := ebiten.RunGame(game); 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 Ebitengine functions (e.g.,
// DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame
// is called).
//
// Environment variables
// # Environment variables
//
// `EBITENGINE_SCREENSHOT_KEY` environment variable specifies the key
// to take a screenshot. For example, if you run your game with
@ -70,18 +70,18 @@
// This environment variable can also be set programmatically through os.Setenv before RunGame is called.
// This can take one of the following value:
//
// "auto": Ebitengine chooses the graphics library automatically. This is the default value.
// "opengl": OpenGL, OpenGL ES, or WebGL.
// "directx": DirectX. This works only on Windows.
// "metal": Metal. This works only on macOS or iOS.
// "auto": Ebitengine chooses the graphics library automatically. This is the default value.
// "opengl": OpenGL, OpenGL ES, or WebGL.
// "directx": DirectX. This works only on Windows.
// "metal": Metal. This works only on macOS or iOS.
//
// `EBITENGINE_DIRECTX` environment variable specifies various parameters for DirectX.
// You can specify multiple values separated by a comma. The default value is empty (i.e. no parameters).
//
// "warp": Use WARP (i.e. software rendering).
// "debug": Use a debug layer.
// "warp": Use WARP (i.e. software rendering).
// "debug": Use a debug layer.
//
// Build tags
// # Build tags
//
// `ebitenginedebug` outputs a log of graphics commands. This is useful to know what happens in Ebitengine. In general, the
// number of graphics commands affects the performance of your game.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,4 +2,4 @@
package audio
var Alert_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x017IDATX\xc3c`\x18\x05\xa3`\x14P\x11\xfc\x0f\xfe\xbf\xf9?3\xad\fg\xfb?\xf9?\b\xb4\xd2\xc6x\xa5\xffg\xfeC\xc0\xdf\xff\xee\xb4\b\x9a\x0f\xffa\xe0\xe7\xff$\xca]\xbb\t\x85\xdf\xff\x1f\x01\xee\xfd7\xa1\xccp\x8e\xff\xf5\xff\xbf\xff\xff\x8f\"V\t7~\xed\u007f~ʌ\xf7\xf9\u007f\x17b\x12\x8a(\xe3\xff\xed\xe0\xa0ɥ8`\x10!\x81&'\xfa\xff\xd0\u007fc*\x04\f.\v(\x8dTx\xc0\xa0Z\xf0߂t\xa3\xa4\xff/\xfd\xff\xec?\x11\x00\xac\xfa\xcd\u007f5R\x8d\u007f\xf3\x9fH\x00V\xff\xff\xff\x1e\xd2,X\xfa\xff?\x89\x16\xfc\xff\xefD\x8a\x05Oɰ`&)\x16\xfc'Â\xab\xb8\xf5Sǂ\x8fC\xde\x02\x92\x82\x88\xe6\x91LN2u\xa4mF\xdbMۢ\xe2\xf5\u007fU\xf2\v8d\x83p\x15vf\x94\x94\xa0()\x81\x06\xc55\xa6Ax+\x1c\x91\xff\aI\xacpp\x18\x84\xab\xca\xdc\n\x14\xfa\xf1?\x87b\vpT\xfaep\x8f\xad&\xba\xd2\xc7\x17\xd6\x18͖IH\x91s\x97Ƞ\"-2\xff\x87\"5\xbc~\x10\xd5\xf0\"5\xb5\xfcW\xa6iӑ\x0e\x8d_:4\xdfG\xc1(\x18\xd2\x00\x00-\xdc\xe2\x06\xe3I\x8d\x19\x00\x00\x00\x00IEND\xaeB`\x82")
var Alert_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x017IDATX\xc3c`\x18\x05\xa3`\x14P\x11\xfc\x0f\xfe\xbf\xf9?3\xad\fg\xfb?\xf9?\b\xb4\xd2\xc6x\xa5\xffg\xfeC\xc0\xdf\xff\xee\xb4\b\x9a\x0f\xffa\xe0\xe7\xff$\xca]\xbb\t\x85\xdf\xff\x1f\x01\xee\xfd7\xa1\xccp\x8e\xff\xf5\xff\xbf\xff\xff\x8f\"V\t7~\xed\x7f~ʌ\xf7\xf9\x7f\x17b\x12\x8a(\xe3\xff\xed\xe0\xa0ɥ8`\x10!\x81&'\xfa\xff\xd0\x7fc*\x04\f.\v(\x8dTx\xc0\xa0Z\xf0߂t\xa3\xa4\xff/\xfd\xff\xec?\x11\x00\xac\xfa\xcd\x7f5R\x8d\x7f\xf3\x9fH\x00V\xff\xff\xff\x1e\xd2,X\xfa\xff?\x89\x16\xfc\xff\xefD\x8a\x05Oɰ`&)\x16\xfc'Â\xab\xb8\xf5Sǂ\x8fC\xde\x02\x92\x82\x88\xe6\x91LN2u\xa4mF\xdbMۢ\xe2\xf5\x7fU\xf2\v8d\x83p\x15vf\x94\x94\xa0()\x81\x06\xc55\xa6Ax+\x1c\x91\xff\aI\xacpp\x18\x84\xab\xca\xdc\n\x14\xfa\xf1?\x87b\vpT\xfaep\x8f\xad&\xba\xd2\xc7\x17\xd6\x18͖IH\x91s\x97Ƞ\"-2\xff\x87\"5\xbc~\x10\xd5\xf0\"5\xb5\xfcW\xa6iӑ\x0e\x8d_:4\xdfG\xc1(\x18\xd2\x00\x00-\xdc\xe2\x06\xe3I\x8d\x19\x00\x00\x00\x00IEND\xaeB`\x82")

View File

@ -2,4 +2,4 @@
package audio
var Pause_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\x01\x00\x00\x00\x00\u007fy\xc4*\x00\x00\x00\x02tRNS\x00\x00v\x93\xcd8\x00\x00\x00\x13IDATx\x01c\xa0\x12\xe0\xff\xc0\xffahS\xd4\x01\x00\x86\x107\xc9\xdbPϏ\x00\x00\x00\x00IEND\xaeB`\x82")
var Pause_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\x01\x00\x00\x00\x00\x7fy\xc4*\x00\x00\x00\x02tRNS\x00\x00v\x93\xcd8\x00\x00\x00\x13IDATx\x01c\xa0\x12\xe0\xff\xc0\xffahS\xd4\x01\x00\x86\x107\xc9\xdbPϏ\x00\x00\x00\x00IEND\xaeB`\x82")

View File

@ -2,4 +2,4 @@
package audio
var Play_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x00\x99IDATX\xc3\xed\xd6A\r\xc2@\x10F\xe1\xf6\u0095;\x0eЀ\n\\\xe0\x02\x17\xc8@\x05\x1aP\x80\x00\xae\x1cȇ\x02J\xd3\xdd?\x810\xcf\xc0K\xba\xaf33\fEQ\xfc\x01\xce6Y\x01w\acR\x00\x17۬\x80\x87\xa3UR\x00W\xbb\xac\x80\xa7\x93uR\x007\xfb\xac\x00\x1d\xe3\xf5\x8e^\xf1\x9a\xa2G\xbc\xa6i\x8f\xd7g\xda\xe25\x87\x96x\xcdei\xbc\xdf!\b\u007f\xa2\xe8#\x873\x8d\xfeh\xe1Q\x11\x1dv\xd1q\x1d^8ѕ\x19^\xfaѳ%|x\xa5OǢ(~\x80\x17,/\x87\x87\x9c\xa0y\xfd\x00\x00\x00\x00IEND\xaeB`\x82")
var Play_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x04\x00\x00\x00\xfd\v1\f\x00\x00\x00\x99IDATX\xc3\xed\xd6A\r\xc2@\x10F\xe1\xf6\u0095;\x0eЀ\n\\\xe0\x02\x17\xc8@\x05\x1aP\x80\x00\xae\x1cȇ\x02J\xd3\xdd?\x810\xcf\xc0K\xba\xaf33\fEQ\xfc\x01\xce6Y\x01w\acR\x00\x17۬\x80\x87\xa3UR\x00W\xbb\xac\x80\xa7\x93uR\x007\xfb\xac\x00\x1d\xe3\xf5\x8e^\xf1\x9a\xa2G\xbc\xa6i\x8f\xd7g\xda\xe25\x87\x96x\xcdei\xbc\xdf!\b\x7f\xa2\xe8#\x873\x8d\xfeh\xe1Q\x11\x1dv\xd1q\x1d^8ѕ\x19^\xfaѳ%|x\xa5OǢ(~\x80\x17,/\x87\x87\x9c\xa0y\xfd\x00\x00\x00\x00IEND\xaeB`\x82")

View File

@ -2,4 +2,4 @@
package blocks
var Background_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \b\x02\x00\x00\x00\xfc\x18\xed\xa3\x00\x00\x00\tpHYs\x00\x00\v\x13\x00\x00\v\x13\x01\x00\x9a\x9c\x18\x00\x00\x00<IDATH\xc7\xedѱ\r\x000\b\x03A\xc8J\xec\xbf\x01\x9e\xc9̀\x944\xd1\u007fmt\x05\xd9ݱ\xa9\xaaV\xfb\x13\x8f\x03\x00\x00\x00\x00\xb8Q\xda^\x1dH\xe2\a\x00\x00\x00\x00\xff\x01\x03\xd79\b\xa0\u007fq\xb3\xbb\x00\x00\x00\x00IEND\xaeB`\x82")
var Background_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \b\x02\x00\x00\x00\xfc\x18\xed\xa3\x00\x00\x00\tpHYs\x00\x00\v\x13\x00\x00\v\x13\x01\x00\x9a\x9c\x18\x00\x00\x00<IDATH\xc7\xedѱ\r\x000\b\x03A\xc8J\xec\xbf\x01\x9e\xc9̀\x944\xd1\x7fmt\x05\xd9ݱ\xa9\xaaV\xfb\x13\x8f\x03\x00\x00\x00\x00\xb8Q\xda^\x1dH\xe2\a\x00\x00\x00\x00\xff\x01\x03\xd79\b\xa0\x7fq\xb3\xbb\x00\x00\x00\x00IEND\xaeB`\x82")

View File

@ -2,4 +2,4 @@
package blocks
var Blocks_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00F\x00\x00\x00\n\b\x06\x00\x00\x00\t\xb4(\x93\x00\x00\x00lIDATH\x89핱\r\xc00\b\x04?\x91{\x0f\xc3\x06\fô\xfe\x99\x9c\"JI\xf8\xde\\\xe5\xe2\x04\xd65\\{\xad\x8d\x02\x92\xb0\xb0J\x03I\xc04\xcf,4\x0fڼ\x10\xf7N\x9f\x927\xbe\x87\xf2A\xc93\xd5\x13\xf7\x8a\xf3 z\xee.y\xf7\xafq0\x1d&\xa1\xc3$t\x98\x84\x0e\x93\xd0a\x12:L\xc2 Y\xdeu\xe0\xbd\xed'y\x0f\x13\x1f^}\x06\u007f\x19\xfa\x00\x00\x00\x00IEND\xaeB`\x82")
var Blocks_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00F\x00\x00\x00\n\b\x06\x00\x00\x00\t\xb4(\x93\x00\x00\x00lIDATH\x89핱\r\xc00\b\x04?\x91{\x0f\xc3\x06\fô\xfe\x99\x9c\"JI\xf8\xde\\\xe5\xe2\x04\xd65\\{\xad\x8d\x02\x92\xb0\xb0J\x03I\xc04\xcf,4\x0fڼ\x10\xf7N\x9f\x927\xbe\x87\xf2A\xc93\xd5\x13\xf7\x8a\xf3 z\xee.y\xf7\xafq0\x1d&\xa1\xc3$t\x98\x84\x0e\x93\xd0a\x12:L\xc2 Y\xdeu\xe0\xbd\xed'y\x0f\x13\x1f^}\x06\x7f\x19\xfa\x00\x00\x00\x00IEND\xaeB`\x82")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,4 +2,4 @@
package images
var UI_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80\x00\x00\x00\x80\b\x06\x00\x00\x00\xc3>a\xcb\x00\x00\x02\x1eIDATx\x9c\xed\xdb1N\xe3P\x10\x80\xe1\xf1*\x05U(\"A\x81\x1b:\x8a4\x94\\\x82\xc3\xd09\a\x80\x06q\x98p\b\x1f\x03J(\"A\xd2ЙbY\x89EX\xbbzI\x88\xa3\xf9\xbe\n)\x1a\x824?\xc6\xe89\xd5\xed\xedm,\x16\x8b.\n\xd4u]\x8d\xc7\xe38<<,\x9a\x8f\x88\xea\xf2\xf2\xb2p\x94M\x18-\x16\x8b\xee\xe2\xe2\xa2h\xb8m\xdb\xe2\xd9\x0f]DT\xeb|\x03\xd6\xf3k\xd7?\x00\xbb%\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\xa3\xf1x\\\xb5m[t\x9c{ttT=??\xc7\xf1\xf1q\xd1\xfc\xeb뫓\xc0\x1d\x1bM&\x93X.\x97E\xc3'''qpp\x10m\xdb~\xfb\xfa\xd9\xd9Y\xf5\xf6\xf6\x16\x8f\x8f\x8f\xdf\x06R\xd7u\xd1\xfb\xb29\xa3\x87\x87\x87\xee\xfa\xfa\xbahx6\x9buWWW\xd1\xf7L\xc0\xdd\xdd]\x17\x11\xbd\xaf\u007f\\y\\\x05v\xc8=@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$7:==\xadf\xb3Y\xd1y\xfe\xf9\xf9yնm\xf4=OP\xd7u\xb5\\.{_\x9fL&N\x02wl\xb4\xce\xf0\xcb\xcbKD\xf4\x1f\xf7\xc6\xef\x8f\u007f\xf7zzz\x8a\xa6i\x8a\xde\xfb\xe6\xe6\xa6h\x8e/\x9a\xa6\xe9J5M\xd3\xcd\xe7\xf3\xe2\xf9\xf9|ޕ\x06\xc0f\xb8\aHN\x00\xc9\xedc\x00]\xfc\xe3ނ\xff\xb7o\x01X\xfc\x86\xedS\x00\x9f\x97\xef\xdf\xc7\rٗ\x00,\u007fK\x86\x14@\xdf\xdfv\xcbߢ!\x05\xf0G\xd7\xf3\xb5\xe5o\xc1\x90\x02\xf8\xbc\xe0\xafW\x03\xcbߒ!\x05\x10\xf1\xfd\xa2-\u007f\x8b\x86\x16@\xc4\xdf\v\xb7\xfc-[\xeb0h\x8b,\xfe\x87\f\xf1\n\xc0\x0f\x1aM\xa7\xd3\xe2\xe7\x01\xa6\xd3i\xb5Z\xad\xe2\xfe\xfe\xbeh~\xb5Z\xf9M\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xe7\x1dpX\xe8\f\x9d\xb6W:\x00\x00\x00\x00IEND\xaeB`\x82")
var UI_png = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80\x00\x00\x00\x80\b\x06\x00\x00\x00\xc3>a\xcb\x00\x00\x02\x1eIDATx\x9c\xed\xdb1N\xe3P\x10\x80\xe1\xf1*\x05U(\"A\x81\x1b:\x8a4\x94\\\x82\xc3\xd09\a\x80\x06q\x98p\b\x1f\x03J(\"A\xd2ЙbY\x89EX\xbbzI\x88\xa3\xf9\xbe\n)\x1a\x824?\xc6\xe89\xd5\xed\xedm,\x16\x8b.\n\xd4u]\x8d\xc7\xe38<<,\x9a\x8f\x88\xea\xf2\xf2\xb2p\x94M\x18-\x16\x8b\xee\xe2\xe2\xa2h\xb8m\xdb\xe2\xd9\x0f]DT\xeb|\x03\xd6\xf3k\xd7?\x00\xbb%\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\xa3\xf1x\\\xb5m[t\x9c{ttT=??\xc7\xf1\xf1q\xd1\xfc\xeb뫓\xc0\x1d\x1bM&\x93X.\x97E\xc3'''qpp\x10m\xdb~\xfb\xfa\xd9\xd9Y\xf5\xf6\xf6\x16\x8f\x8f\x8f\xdf\x06R\xd7u\xd1\xfb\xb29\xa3\x87\x87\x87\xee\xfa\xfa\xbahx6\x9buWWW\xd1\xf7L\xc0\xdd\xdd]\x17\x11\xbd\xaf\x7f\\y\\\x05v\xc8=@r\x02HN\x00\xc9\t 9\x01$'\x80\xe4\x04\x90\x9c\x00\x92\x13@r\x02HN\x00\xc9\t 9\x01$7:==\xadf\xb3Y\xd1y\xfe\xf9\xf9yնm\xf4=OP\xd7u\xb5\\.{_\x9fL&N\x02wl\xb4\xce\xf0\xcb\xcbKD\xf4\x1f\xf7\xc6\xef\x8f\x7f\xf7zzz\x8a\xa6i\x8a\xde\xfb\xe6\xe6\xa6h\x8e/\x9a\xa6\xe9J5M\xd3\xcd\xe7\xf3\xe2\xf9\xf9|ޕ\x06\xc0f\xb8\aHN\x00\xc9\xedc\x00]\xfc\xe3ނ\xff\xb7o\x01X\xfc\x86\xedS\x00\x9f\x97\xef\xdf\xc7\rٗ\x00,\x7fK\x86\x14@\xdf\xdfv\xcbߢ!\x05\xf0G\xd7\xf3\xb5\xe5o\xc1\x90\x02\xf8\xbc\xe0\xafW\x03\xcbߒ!\x05\x10\xf1\xfd\xa2-\x7f\x8b\x86\x16@\xc4\xdf\v\xb7\xfc-[\xeb0h\x8b,\xfe\x87\f\xf1\n\xc0\x0f\x1aM\xa7\xd3\xe2\xe7\x01\xa6\xd3i\xb5Z\xad\xe2\xfe\xfe\xbeh~\xb5Z\xf9M\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xe7\x1dpX\xe8\f\x9d\xb6W:\x00\x00\x00\x00IEND\xaeB`\x82")

View File

@ -258,14 +258,14 @@ func (i *Image) adjustedRegion() graphicsdriver.Region {
// DrawImage works more efficiently as batches
// when the successive calls of DrawImages satisfy the below conditions:
//
// * All render targets are same (A in A.DrawImage(B, op))
// * Either all ColorM element values are same or all the ColorM have only
// diagonal ('scale') elements
// * If only (*ColorM).Scale is applied to a ColorM, the ColorM has only
// diagonal elements. The other ColorM functions might modify the other
// elements.
// * All CompositeMode values are same
// * All Filter values are same
// - All render targets are same (A in A.DrawImage(B, op))
// - Either all ColorM element values are same or all the ColorM have only
// diagonal ('scale') elements
// - If only (*ColorM).Scale is applied to a ColorM, the ColorM has only
// diagonal elements. The other ColorM functions might modify the other
// elements.
// - All CompositeMode values are same
// - All Filter values are same
//
// Even when all the above conditions are satisfied, multiple draw commands can
// be used in really rare cases. Ebitengine images usually share an internal

View File

@ -320,12 +320,12 @@ func IsStandardGamepadLayoutAvailable(id GamepadID) bool {
//
// A platform field in a line corresponds with a GOOS like the following:
//
// "Windows": GOOS=windows
// "Mac OS X": GOOS=darwin (not ios)
// "Linux": GOOS=linux (not android)
// "Android": GOOS=android
// "iOS": GOOS=ios
// "": Any GOOS
// "Windows": GOOS=windows
// "Mac OS X": GOOS=darwin (not ios)
// "Linux": GOOS=linux (not android)
// "Android": GOOS=android
// "iOS": GOOS=ios
// "": Any GOOS
//
// On platforms where gamepad mappings are not managed by Ebiten, this always returns false and nil.
//

View File

@ -389,14 +389,14 @@ func (i *Image) processSrc(src *Image) {
//
// The vertex floats are:
//
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in pixels (the upper-left is (0, 0))
// 3: Source Y in pixels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in pixels (the upper-left is (0, 0))
// 3: Source Y in pixels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices []float32, indices []uint16, colorm affine.ColorM, mode graphicsdriver.CompositeMode, filter graphicsdriver.Filter, address graphicsdriver.Address, dstRegion, srcRegion graphicsdriver.Region, subimageOffsets [graphics.ShaderImageCount - 1][2]float32, shader *Shader, uniforms [][]float32, evenOdd bool) {
backendsM.Lock()
defer backendsM.Unlock()

View File

@ -110,14 +110,14 @@ func (i *Image) InternalSize() (int, int) {
//
// The vertex floats are:
//
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in texels
// 3: Source Y in texels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in texels
// 3: Source Y in texels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
//
// src and shader are exclusive and only either is non-nil.
//

View File

@ -14,9 +14,9 @@ import (
//
// For example:
//
// var data []uint8
// ...
// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0]))
// var data []uint8
// ...
// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0]))
func Ptr(data interface{}) unsafe.Pointer {
if data == nil {
return unsafe.Pointer(nil)

View File

@ -327,7 +327,9 @@ func (d *decoder) parsetRNS(length uint32) error {
// Read presents one or more IDAT chunks as one continuous stream (minus the
// intermediate chunk headers and footers). If the PNG data looked like:
// ... len0 IDAT xxx crc0 len1 IDAT yy crc1 len2 IEND crc2
//
// ... len0 IDAT xxx crc0 len1 IDAT yy crc1 len2 IEND crc2
//
// then this reader presents xxxyy. For well-formed PNG data, the decoder state
// immediately before the first Read call is that d.r is positioned between the
// first IDAT and xxx, and the decoder state immediately after the last Read

View File

@ -344,14 +344,14 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) {
//
// The vertex floats are:
//
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in texels
// 3: Source Y in texels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
// 0: Destination X in pixels
// 1: Destination Y in pixels
// 2: Source X in texels
// 3: Source Y in texels
// 4: Color R [0.0-1.0]
// 5: Color G
// 6: Color B
// 7: Color Y
func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, offsets [graphics.ShaderImageCount - 1][2]float32, vertices []float32, indices []uint16, colorm affine.ColorM, mode graphicsdriver.CompositeMode, filter graphicsdriver.Filter, address graphicsdriver.Address, dstRegion, srcRegion graphicsdriver.Region, shader *Shader, uniforms [][]float32, evenOdd bool) {
if i.priority {
panic("restorable: DrawTriangles cannot be called on a priority image")

View File

@ -155,8 +155,8 @@ var textM sync.Mutex
//
// If you want to adjust the position of the text, these functions are useful:
//
// * text.BoundString: the rendered bounds of the given text.
// * golang.org/x/image/font.Face.Metrics: the metrics of the face.
// - text.BoundString: the rendered bounds of the given text.
// - golang.org/x/image/font.Face.Metrics: the metrics of the face.
//
// The '\n' newline character puts the following text on the next line.
// Line height is based on Metrics().Height of the font.
@ -170,9 +170,9 @@ var textM sync.Mutex
//
// Draw/DrawWithOptions and CacheGlyphs are implemented like this:
//
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
//
// Be careful that the passed font face is held by this package and is never released.
// This is a known issue (#498).
@ -195,8 +195,8 @@ func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Co
//
// If you want to adjust the position of the text, these functions are useful:
//
// * text.BoundString: the rendered bounds of the given text.
// * golang.org/x/image/font.Face.Metrics: the metrics of the face.
// - text.BoundString: the rendered bounds of the given text.
// - golang.org/x/image/font.Face.Metrics: the metrics of the face.
//
// The '\n' newline character puts the following text on the next line.
// Line height is based on Metrics().Height of the font.
@ -210,9 +210,9 @@ func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Co
//
// Draw/DrawWithOptions and CacheGlyphs are implemented like this:
//
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
//
// Be careful that the passed font face is held by this package and is never released.
// This is a known issue (#498).
@ -327,9 +327,9 @@ func BoundString(face font.Face, text string) image.Rectangle {
//
// Draw/DrawWithOptions and CacheGlyphs are implemented like this:
//
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// Draw = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
// + Draw them onto the destination by `(*ebiten.Image).DrawImage`
// CacheGlyphs = Create glyphs by `(*ebiten.Image).ReplacePixels` and put them into the cache if necessary
//
// Draw automatically creates and caches necessary glyphs, so usually you don't have to call CacheGlyphs
// explicitly. However, for example, when you call Draw for each rune of one big text, Draw tries to create the glyph

View File

@ -39,7 +39,7 @@ type VibrateOptions struct {
//
// On Android, this line is required in the manifest setting to use Vibrate:
//
// <uses-permission android:name="android.permission.VIBRATE"/>
// <uses-permission android:name="android.permission.VIBRATE"/>
//
// On Android, Magnitude in the options is recognized only when the API Level is 26 or newer.
// Otherwise, Magnitude is ignored.

View File

@ -116,14 +116,14 @@ func SetWindowTitle(title string) {
//
// For desktops, see the document of glfwSetWindowIcon of GLFW 3.2:
//
// This function sets the icon of the specified window.
// If passed an array of candidate images, those of or closest to the sizes
// desired by the system are selected.
// If no images are specified, the window reverts to its default icon.
// This function sets the icon of the specified window.
// If passed an array of candidate images, those of or closest to the sizes
// desired by the system are selected.
// If no images are specified, the window reverts to its default icon.
//
// The desired image sizes varies depending on platform and system settings.
// The selected images will be rescaled as needed.
// Good sizes include 16x16, 32x32 and 48x48.
// The desired image sizes varies depending on platform and system settings.
// The selected images will be rescaled as needed.
// Good sizes include 16x16, 32x32 and 48x48.
//
// As macOS windows don't have icons, SetWindowIcon doesn't work on macOS.
//