Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Commit 1886497

Browse files
committed
vet: resolve go vet warnings
1 parent 3a80a43 commit 1886497

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

gml/draw_nonheadless.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ func DrawSprite(spriteIndex sprite.SpriteIndex, subimage float64, x, y float64)
5757
}
5858

5959
func DrawSpriteAlpha(spriteIndex sprite.SpriteIndex, subimage float64, x, y float64, alpha float64) {
60-
DrawSpriteExt(spriteIndex, subimage, x, y, 0, geom.Vec{1, 1}, alpha)
60+
DrawSpriteExt(spriteIndex, subimage, x, y, 0, geom.Vec{X: 1, Y: 1}, alpha)
6161
}
6262

6363
func DrawSpriteScaled(spriteIndex sprite.SpriteIndex, subimage float64, x, y float64, scale geom.Vec) {
6464
DrawSpriteExt(spriteIndex, subimage, x, y, 0, scale, 1.0)
6565
}
6666

6767
func DrawSpriteRotated(spriteIndex sprite.SpriteIndex, subimage float64, x, y float64, rotation float64) {
68-
DrawSpriteExt(spriteIndex, subimage, x, y, rotation, geom.Vec{1, 1}, 1.0)
68+
DrawSpriteExt(spriteIndex, subimage, x, y, rotation, geom.Vec{X: 1, Y: 1}, 1.0)
6969
}
7070

7171
func DrawSpriteExt(spriteIndex sprite.SpriteIndex, subimage float64, x, y float64, rotation float64, scale geom.Vec, alpha float64) {

gml/font_manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ type fontManager struct {
2626
}
2727

2828
type fontConfig struct {
29-
Name string `json:Name`
30-
FontSize float64 `json:FontSize`
31-
DPI float64 `json:DPI`
29+
Name string `json:"Name"`
30+
FontSize float64 `json:"FontSize"`
31+
DPI float64 `json:"DPI"`
3232
}
3333

3434
func hasFontSet() bool {

gml/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func instanceCreate(x, y float64, objectIndex ObjectIndex, callback func(inst *O
7676
gState.instanceManager.nextInstanceIndex++
7777
baseObj.internal.InstanceIndex = gState.instanceManager.nextInstanceIndex
7878
}
79-
baseObj.Vec = geom.Vec{x, y}
79+
baseObj.Vec = geom.Vec{X: x, Y: y}
8080

8181
callback(baseObj)
8282

gml/mouse_nonheadless.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func MouseCheckPressed(button int) bool {
3434
// MouseScreenPosition returns the camera viewport
3535
func MousePosition() geom.Vec {
3636
x, y := ebiten.CursorPosition()
37-
r := geom.Vec{float64(x), float64(y)}
37+
r := geom.Vec{X: float64(x), Y: float64(y)}
3838
viewPos := CameraGetViewPos(0)
3939
r.X += viewPos.X
4040
r.Y += viewPos.Y
@@ -44,7 +44,7 @@ func MousePosition() geom.Vec {
4444
// MouseScreenPosition returns the mouse position relative to the window
4545
func MouseScreenPosition() geom.Vec {
4646
x, y := ebiten.CursorPosition()
47-
return geom.Vec{float64(x), float64(y)}
47+
return geom.Vec{X: float64(x), Y: float64(y)}
4848
}
4949

5050
//

0 commit comments

Comments
 (0)