Skip to content

Commit be90f06

Browse files
committed
Code cleanup
1 parent 4c684f9 commit be90f06

6 files changed

+20
-26
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.19
44

55
require (
66
github.com/disintegration/imaging v1.6.2
7-
github.com/stretchr/testify v1.8.2
7+
github.com/stretchr/testify v1.10.0
88
)
99

1010
require (

go.sum

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
21
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
32
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
43
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
54
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
65
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
76
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
8-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
10-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
11-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
12-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
13-
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
14-
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
7+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
8+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
159
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
1610
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
1711
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
1812
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
1913
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
2014
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
21-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2215
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2316
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

render/renderer.go

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ func (r *Renderer) getTileImage(tile *tiled.LayerTile) (image.Image, error) {
139139
}
140140

141141
func (r *Renderer) _renderLayer(layer *tiled.Layer) error {
142-
143142
var xs, xe, xi, ys, ye, yi int
144143
if r.m.RenderOrder == "" || r.m.RenderOrder == "right-down" {
145144
xs = 0

tmx_defaults.go

+17-12
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,23 @@ SOFTWARE.
1919

2020
package tiled
2121

22-
type aliasGroup Group
23-
type aliasImageLayer ImageLayer
24-
type internalLayer Layer
25-
type aliasLayer struct {
26-
internalLayer
27-
// Layer data in raw format
28-
Data *Data `xml:"data"`
29-
}
30-
type aliasMap Map
31-
type aliasObject Object
32-
type aliasObjectGroup ObjectGroup
33-
type aliasText Text
22+
type (
23+
aliasGroup Group
24+
aliasImageLayer ImageLayer
25+
internalLayer Layer
26+
aliasLayer struct {
27+
internalLayer
28+
// Layer data in raw format
29+
Data *Data `xml:"data"`
30+
}
31+
)
32+
33+
type (
34+
aliasMap Map
35+
aliasObject Object
36+
aliasObjectGroup ObjectGroup
37+
aliasText Text
38+
)
3439

3540
// SetDefaults provides default values for Group.
3641
func (a *aliasGroup) SetDefaults() {

tmx_property_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
)
3030

3131
func TestGetProperty(t *testing.T) {
32-
3332
props := Properties{
3433
{
3534
Name: "string-name",

tmx_tileset_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
)
3131

3232
func TestGetTileRect(t *testing.T) {
33-
3433
type Case struct {
3534
id uint32
3635
rect image.Rectangle
@@ -165,5 +164,4 @@ func TestGetTileRect(t *testing.T) {
165164
}
166165
})
167166
}
168-
169167
}

0 commit comments

Comments
 (0)