func unpaletted() (result *sdl.Surface) { result = sdl.NewSurface(8, 8) for y := 0; y < 8; y++ { for x := 0; x < 8; x++ { result.Set(x, y, color.RGBA{byte(x*16 + y*16), 0, 0, 255}) } } return result }
func initApp() App { sdl.Run(640, 480) sdl.SetFrame(sdl.NewSurface(320, 240)) a := &app{} a.nanosecondsPerFrame = 33e6 a.states = []State{} return a }