Skip to content

Commit

Permalink
use colormapping repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jan 20, 2023
1 parent 97e80e4 commit adaf56c
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 735 deletions.
139 changes: 0 additions & 139 deletions colormapping/colormapping.go

This file was deleted.

67 changes: 0 additions & 67 deletions colormapping/colormapping_test.go

This file was deleted.

45 changes: 0 additions & 45 deletions colormapping/palette.go

This file was deleted.

30 changes: 0 additions & 30 deletions colormapping/palette_test.go

This file was deleted.

1 change: 0 additions & 1 deletion colormapping/testdata/palette_nodes.txt

This file was deleted.

4 changes: 0 additions & 4 deletions colormapping/testdata/testcolor.txt

This file was deleted.

Binary file removed colormapping/testdata/unifieddyes_palette_extended.png
Binary file not shown.
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ go 1.17
require (
github.com/fogleman/gg v1.3.0
github.com/minetest-go/mapparser v0.1.3
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.1
)

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/klauspost/compress v1.15.4 // indirect
github.com/minetest-go/colormapping v1.0.0
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
Expand All @@ -8,6 +10,8 @@ github.com/klauspost/compress v1.14.2 h1:S0OHlFk/Gbon/yauFJ4FfJJF5V0fc5HbBTJazi2
github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.4 h1:1kn4/7MepF/CHmYub99/nNX8az0IJjfSOU/jbnTVfqQ=
github.com/klauspost/compress v1.15.4/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/minetest-go/colormapping v1.0.0 h1:kT2v8NG7kPf63p8cl/GPM6YSrxaT5O3zOW8HIs4xHjo=
github.com/minetest-go/colormapping v1.0.0/go.mod h1:arMBjO6+z8+yhLvrsX4tCnYq5fzGcPFUOj/4Xb78Ktc=
github.com/minetest-go/mapparser v0.1.1 h1:Ir7ChKX0lwnyr6Zg/Jd3ipQT1vPCAQYN6GWmQXK020Y=
github.com/minetest-go/mapparser v0.1.1/go.mod h1:Rjv12WQ3Tn9BsOr0ohFguGWFol3vIfgQcTUy5wCACgo=
github.com/minetest-go/mapparser v0.1.2 h1:aAcRqikLAnZ9gV6mgwkhoclDwjo45eJs7Fz0WvD7vB4=
Expand All @@ -17,8 +21,13 @@ github.com/minetest-go/mapparser v0.1.3/go.mod h1:TcjEkPY9n0rBM+beSstw+Jje8nGl+L
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand All @@ -27,3 +36,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion isorenderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math"

"github.com/fogleman/gg"
"github.com/minetest-go/maprenderer/colormapping"
"github.com/minetest-go/colormapping"
)

var tan30 = math.Tan(30 * math.Pi / 180)
Expand Down
9 changes: 2 additions & 7 deletions isorenderer_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package maprenderer

import (
"os"
"testing"

"github.com/minetest-go/maprenderer/colormapping"
"github.com/minetest-go/colormapping"
"github.com/stretchr/testify/assert"
)

Expand All @@ -16,12 +15,8 @@ func TestIsoRenderer(t *testing.T) {
cm := colormapping.NewColorMapping()
assert.NotNil(t, cm)

data, err := os.ReadFile("testdata/mtg.txt")
assert.NoError(t, err)
assert.NotNil(t, data)

//load testcolors
_, err = cm.LoadColorMapping(data)
err = cm.LoadDefaults()
assert.NoError(t, err)

r, err := NewIsoRenderer(cm, m.GetMapblock, 64)
Expand Down
2 changes: 1 addition & 1 deletion maprenderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"image"

"github.com/minetest-go/maprenderer/colormapping"
"github.com/minetest-go/colormapping"
)

const (
Expand Down
Loading

0 comments on commit adaf56c

Please sign in to comment.