aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-05-28 16:28:43 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-05-28 16:28:43 +0100
commit5766b0c285052d48ab7756c9c3eef6ae41ecd36e (patch)
tree78e616d480a4114e81c6ec429ae4d985459372e9
parent4ec7e493520d558dd05e911b58ea354d25f33f45 (diff)
downloadunicornpaint-5766b0c285052d48ab7756c9c3eef6ae41ecd36e.tar.gz
unicornpaint-5766b0c285052d48ab7756c9c3eef6ae41ecd36e.tar.bz2
unicornpaint-5766b0c285052d48ab7756c9c3eef6ae41ecd36e.tar.xz
unicornpaint-5766b0c285052d48ab7756c9c3eef6ae41ecd36e.zip
Removed MakeGif.go from the build
-rw-r--r--MakeGif.go32
1 files changed, 18 insertions, 14 deletions
diff --git a/MakeGif.go b/MakeGif.go
index 3119b94..8b651ea 100644
--- a/MakeGif.go
+++ b/MakeGif.go
@@ -1,3 +1,5 @@
+// +build ignore
+
package main
import (
@@ -8,6 +10,8 @@ import (
"image/draw"
"image/gif"
"io/ioutil"
+ "log"
+ "os"
"time"
"github.com/MFAshby/unicornpaint/unicorn"
@@ -72,8 +76,8 @@ func renderGif(un unicorn.Unicorn, gf *gif.GIF) {
}
func main() {
- b1, _ := ioutil.ReadFile("saves/modern")
- b2, _ := ioutil.ReadFile("saves/modern2")
+ b1, _ := ioutil.ReadFile("saves/rain1")
+ b2, _ := ioutil.ReadFile("saves/rain2")
px1 := [][][]uint8{}
json.Unmarshal(b1, &px1)
@@ -88,19 +92,19 @@ func main() {
Delay: []int{50, 50}, // 100ths of a second
}
- // f1, err := os.Create("saves/modern.gif")
- // if err != nil {
- // log.Fatalf("Error opening GIF file to write %v", err)
- // }
- // defer f1.Close()
- // err = gif.EncodeAll(f1, gf)
- // if err != nil {
- // log.Printf("Error writing GIF %v", err)
- // }
+ f1, err := os.Create("saves/rain.gif")
+ if err != nil {
+ log.Fatalf("Error opening GIF file to write %v", err)
+ }
+ defer f1.Close()
+ err = gif.EncodeAll(f1, gf)
+ if err != nil {
+ log.Printf("Error writing GIF %v", err)
+ }
- un, _ = unicorn.NewUnicorn()
+ // un, _ = unicorn.NewUnicorn()
- go renderGif(un, gf)
+ // go renderGif(un, gf)
- un.MainLoop()
+ // un.MainLoop()
}