mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
gofmt -s
This commit is contained in:
parent
0083fe5df1
commit
fdfc44281f
@ -23,7 +23,7 @@ import (
|
||||
const FileNameText = "text.png"
|
||||
|
||||
//go:generate go-bindata -nocompress -pkg=assets text.png
|
||||
//go:generate gofmt -w .
|
||||
//go:generate gofmt -s -w .
|
||||
|
||||
const (
|
||||
TextImageWidth = 192
|
||||
|
@ -143,7 +143,7 @@ type _bintree_t struct {
|
||||
}
|
||||
|
||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
||||
"text.png": &_bintree_t{text_png, map[string]*_bintree_t{}},
|
||||
"text.png": {text_png, map[string]*_bintree_t{}},
|
||||
}}
|
||||
|
||||
// Restore an asset under the given directory
|
||||
|
@ -18,4 +18,4 @@ package assets
|
||||
// Use -ignore as a blacklist instead.
|
||||
|
||||
//go:generate go-bindata -nocompress -pkg=assets -ignore=\.md$ images
|
||||
//go:generate gofmt -w .
|
||||
//go:generate gofmt -s -w .
|
||||
|
@ -197,11 +197,11 @@ type _bintree_t struct {
|
||||
}
|
||||
|
||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
||||
"images": &_bintree_t{nil, map[string]*_bintree_t{
|
||||
"arcadefont.png": &_bintree_t{images_arcadefont_png, map[string]*_bintree_t{}},
|
||||
"ebiten.png": &_bintree_t{images_ebiten_png, map[string]*_bintree_t{}},
|
||||
"fiveyears.jpg": &_bintree_t{images_fiveyears_jpg, map[string]*_bintree_t{}},
|
||||
"gophers.jpg": &_bintree_t{images_gophers_jpg, map[string]*_bintree_t{}},
|
||||
"images": {nil, map[string]*_bintree_t{
|
||||
"arcadefont.png": {images_arcadefont_png, map[string]*_bintree_t{}},
|
||||
"ebiten.png": {images_ebiten_png, map[string]*_bintree_t{}},
|
||||
"fiveyears.jpg": {images_fiveyears_jpg, map[string]*_bintree_t{}},
|
||||
"gophers.jpg": {images_gophers_jpg, map[string]*_bintree_t{}},
|
||||
}},
|
||||
}}
|
||||
|
||||
|
@ -13,6 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
//go:generate go run keyboard/keyboard/gen.go
|
||||
//go:generate gofmt -w .
|
||||
//go:generate gofmt -s -w .
|
||||
|
||||
package example
|
||||
|
@ -88,7 +88,7 @@ func toBytes(l, r []int16) []byte {
|
||||
panic("len(l) must equal to len(r)")
|
||||
}
|
||||
b := make([]byte, len(l)*4)
|
||||
for i, _ := range l {
|
||||
for i := range l {
|
||||
b[4*i] = byte(l[i])
|
||||
b[4*i+1] = byte(l[i] >> 8)
|
||||
b[4*i+2] = byte(r[i])
|
||||
|
@ -71,7 +71,7 @@ func toBytes(l, r []int16) []byte {
|
||||
panic("len(l) must equal to len(r)")
|
||||
}
|
||||
b := make([]byte, len(l)*4)
|
||||
for i, _ := range l {
|
||||
for i := range l {
|
||||
b[4*i] = byte(l[i])
|
||||
b[4*i+1] = byte(l[i] >> 8)
|
||||
b[4*i+2] = byte(r[i])
|
||||
|
@ -142,7 +142,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
ebitenImageWidth, ebitenImageHeight = ebitenImage.Size()
|
||||
for i, _ := range sprites.sprites {
|
||||
for i := range sprites.sprites {
|
||||
w, h := ebitenImage.Size()
|
||||
x, y := rand.Intn(screenWidth-w), rand.Intn(screenHeight-h)
|
||||
vx, vy := 2*rand.Intn(2)-1, 2*rand.Intn(2)-1
|
||||
|
@ -42,7 +42,7 @@ var (
|
||||
)
|
||||
|
||||
func update(screen *ebiten.Image) error {
|
||||
for key, _ := range keyStates {
|
||||
for key := range keyStates {
|
||||
if !ebiten.IsKeyPressed(key) {
|
||||
keyStates[key] = 0
|
||||
continue
|
||||
|
@ -15,4 +15,4 @@
|
||||
package ebiten
|
||||
|
||||
//go:generate go run genkeys.go
|
||||
//go:generate gofmt -w .
|
||||
//go:generate gofmt -s -w .
|
||||
|
Loading…
Reference in New Issue
Block a user