ebiten/ebitenutil/internal/assets/bindata.go

210 lines
10 KiB
Go
Raw Normal View History

2016-10-20 17:02:50 +02:00
// Code generated by go-bindata.
// sources:
// text.png
// DO NOT EDIT!
2014-12-10 17:59:38 +01:00
package assets
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
type asset struct {
bytes []byte
info os.FileInfo
}
2016-10-20 17:02:50 +02:00
type bindataFileInfo struct {
2014-12-10 17:59:38 +01:00
name string
size int64
mode os.FileMode
modTime time.Time
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) Name() string {
2014-12-10 17:59:38 +01:00
return fi.name
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) Size() int64 {
2014-12-10 17:59:38 +01:00
return fi.size
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) Mode() os.FileMode {
2014-12-10 17:59:38 +01:00
return fi.mode
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) ModTime() time.Time {
2014-12-10 17:59:38 +01:00
return fi.modTime
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) IsDir() bool {
2014-12-10 17:59:38 +01:00
return false
}
2016-10-20 17:02:50 +02:00
func (fi bindataFileInfo) Sys() interface{} {
2014-12-10 17:59:38 +01:00
return nil
}
2016-10-20 17:02:50 +02:00
var _textPng = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\xc0\x00\x00\x00\x80\b\x03\x00\x00\x00jZ\x96Y\x00\x00\x00\x06PLTE\x00\x00\x00\xff\xff\xff\xa5\u065f\xdd\x00\x00\x00\x01tRNS\x00@\xe6\xd8f\x00\x00\a\xb2IDATx\x9c\xec\x1c\x89v#!\b\xf2\xe6\xff\u007f\x99MT\xe4\xf4\x984m\x8e\r\xbb\xb5\x13\x83\x1c\xe2\x01\x8c\xf6\x02o\x0e_\x05n\x80\x83\x9aX?j\x1b\xf1w\xda\xde\xe0\x02x\x05iu\xfd\x87\xf5\xa1\u0537\xb2}\x8b\x86<\xb6\xf2\xb9`,\x80t\xfb\xd7>\xd0\x15J)\u07d2\xd5\xe0/`\xd0G\u0497\x87\xae.\xf2\xa3\xb2g\x11\x9e|c\xaa\xa8\xfb\x12D\x1a\xbb\x90\xf0\xba}\xb8\xfep\xdda\xeb\xd9\x06\xa8x2\xeaU5E\xa8Yc\xa9\u01fd\xa2k\xeaYoq\r+\x807\xe4f\x01C\xa2\x97T\xdb\xe0\xed\u007f\xed\x17~\u0691\xc40\xdd\x05\x19\xceM\xacR\xa2\xebZ3Yqcp\x8f\u059cX\xf3\xe3U\b\xd5\a\x94\xaa\xb6\ue532Y\x80\u0298Q\x16P\x1asi\xd8R\xa7O\x9dy\xaf#%\x11\x05a)\xd3\x00\x9am\x1b\xf4QK\u00ad\xe3P\xab&e\x01QR\x9e\x9d\xea)\u05f8r\x9f]\xcbG\xad\x10\x94\x00\x00v\xd5V\xe8}\x12\xb7\xe9.\xebh\xedJ\xb7\"=\x02N\xcd\abTLF\xc0\r\x0e[\xad\xf7\x81V\xde*\u0231\xff\x912\xfb\x8d\x93\x01\xcc\xca\xf4\xe5#\xd9\a\x1c\x03Wa\xec\xf3\x03\u0631\x03\u0652T}\xdepo\x15\x9a\x8b\xf4\xe09\xf0\xf9\xf0u\xa7\x9f\r\x1f\xa6\xc0b\x0e\x87\xcd\xe5\x05\xc0x\xa3\xfd\xb1|\x90\xc2:mg\xdc\xe9\xb2b\x83P\xeb{#U\xa2\xc93\xb2+\x12\x19\xf4=\xb6\xfe\u01b8A\xa1\x0e\xb5\u063d\x13/%:^+CH\xfb\xc4EAcS\b\x02DbN\xd8\xdbO2\a\x9aWz\xf5\xed\x8a{\xe7\tu\x1f\x1d\x9c\u07d4\xc9O\xfeA>\x1a\x93\xe7h\xae\xb3\xe4K\xe5\xf3[\x05\xa8nr\xa47\xbd\x12'`\x1a\x9b\x11\xae\x03\x1aP\xa6N\xe4T\x8eqB\xd3\x18\x84*bA\xa58\xc4P?*\xa2\\\xa0G4\xde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b3b\x99\xf3\x8f\n\x18\x9bk\xeec2,\x88\x98Y\xcb\x16\xc4L\x944\u0122\x88\x88\xd1\xc0L\x17\xe3\x9d\r\xdd\xed\xde\xe0\xfaCH\xee\xf2\xab\ahw4P]\xa6\xf4I\\N\xc1\xf6\xdcv\xa9H\u04a4\xfc*\x038\x1f\uae72\u06a1Yc\xab\xef\U000d42d4\x18R\u072e\xbb3\xcb\xc5\x13\xe0\x00\xa6\x1eC\r\xa4\r<WH,P\xbe\xb5\xa3@\x9b\xa3\x9bq\xf2\x8e\xac\
2014-12-10 17:59:38 +01:00
2016-10-20 17:02:50 +02:00
func textPngBytes() ([]byte, error) {
return _textPng, nil
2014-12-10 17:59:38 +01:00
}
2016-10-20 17:02:50 +02:00
func textPng() (*asset, error) {
bytes, err := textPngBytes()
2014-12-10 17:59:38 +01:00
if err != nil {
return nil, err
}
2016-10-20 17:02:50 +02:00
info := bindataFileInfo{name: "text.png", size: 2058, mode: os.FileMode(420), modTime: time.Unix(1455644231, 0)}
2014-12-10 17:59:38 +01:00
a := &asset{bytes: bytes, info: info}
return a, nil
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found", name)
}
2016-10-20 17:02:50 +02:00
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
2014-12-10 17:59:38 +01:00
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
2016-10-20 17:02:50 +02:00
"text.png": textPng,
2014-12-10 17:59:38 +01:00
}
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(cannonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
2016-10-20 17:02:50 +02:00
for childName := range node.Children {
rv = append(rv, childName)
2014-12-10 17:59:38 +01:00
}
return rv, nil
}
2016-10-20 17:02:50 +02:00
type bintree struct {
2014-12-10 17:59:38 +01:00
Func func() (*asset, error)
2016-10-20 17:02:50 +02:00
Children map[string]*bintree
2014-12-10 17:59:38 +01:00
}
2016-10-20 17:02:50 +02:00
var _bintree = &bintree{nil, map[string]*bintree{
"text.png": {textPng, map[string]*bintree{}},
2014-12-10 17:59:38 +01:00
}}
2016-10-20 17:02:50 +02:00
// RestoreAsset restores an asset under the given directory
2014-12-10 17:59:38 +01:00
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
2016-10-20 17:02:50 +02:00
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
2014-12-10 17:59:38 +01:00
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}
2016-10-20 17:02:50 +02:00
// RestoreAssets restores an asset under the given directory recursively
2014-12-10 17:59:38 +01:00
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
2016-10-20 17:02:50 +02:00
// File
if err != nil {
2014-12-10 17:59:38 +01:00
return RestoreAsset(dir, name)
2016-10-20 17:02:50 +02:00
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
2014-12-10 17:59:38 +01:00
}
}
return nil
}
func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}