-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
35 lines (29 loc) · 866 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"image"
"time"
"github.com/klauspost/gad/hoaxplus/00-intro"
"github.com/klauspost/gad/hoaxplus/01-title"
_ "github.com/klauspost/gad/hoaxplus/data"
"github.com/klauspost/gfx"
)
var (
renderWidth = 624
renderHeight = 240
)
// Generates binary data.
// To install go-bindata, do: go get -u github.com/jteeuwen/go-bindata/...
//
//go:generate go-bindata -ignore=\.go\z -pkg=data -o ../../data/data.go --prefix=../../data ../../data/...
func main() {
// Create our draw buffer
screen := image.NewGray(image.Rect(0, 0, renderWidth, renderHeight))
fullColor := image.NewRGBA(image.Rect(0, 0, renderWidth, renderHeight))
gfx.SetRenderSize(renderWidth, renderHeight)
gfx.Fullscreen(false)
fx := intro.NewIntro(screen)
if true {
fx = title.NewTitle(screen, fullColor)
}
gfx.Run(func() { gfx.RunTimedDur(fx, 5*time.Second) })
}