Documentation
¶
Overview ¶
helper is helper functions used for commonly used functions
Index ¶
- Variables
- func ByteCompareTest(src []byte, dst []byte) error
- func Compare(val, val2 interface{}) error
- func Deflate(in []byte) ([]byte, error)
- func DirTest() string
- func DmSpriteDefTagParse(isChr bool, tag string) (string, error)
- func FilenameCRC32(name string) uint32
- func GenerateCRC16(data []byte) (checksum uint16, err error)
- func GenerateCRC32(data []byte) (checksum uint32, err error)
- func Inflate(in []byte, size int) ([]byte, error)
- func MaterialTagParse(isChr bool, tag string) (string, error)
- func Pluralize(in int) string
- func ReadStringHash(hash []byte) string
- func RegexpMatch(key string, pattern string, search string) ([]string, error)
- func RenderMethodInt(in string) uint32
- func RenderMethodStr(in uint32) string
- func TrackAnimationParse(isChr bool, tag string) (animationTag string, modelTag string)
- func Validate(data []byte) error
- func Write(data []byte, w io.Writer) error
- func WriteString(w io.Writer, in string) error
- func WriteStringHash(hash string) []byte
- type ByteSeekerTest
- func (b *ByteSeekerTest) Bytes() []byte
- func (b *ByteSeekerTest) Cap() int
- func (b *ByteSeekerTest) Len() int
- func (b *ByteSeekerTest) Read(p []byte) (n int, err error)
- func (b *ByteSeekerTest) ReadByte() (c byte, err error)
- func (b *ByteSeekerTest) ReadFrom(r io.Reader) (n int64, err error)
- func (b *ByteSeekerTest) ReadRune() (r rune, size int, err error)
- func (b *ByteSeekerTest) ReadString(delim byte) (line string, err error)
- func (b *ByteSeekerTest) Reset()
- func (b *ByteSeekerTest) Seek(offset int64, whence int) (int64, error)
- func (b *ByteSeekerTest) Write(p []byte) (n int, err error)
- func (b *ByteSeekerTest) WriteByte(c byte) error
- func (b *ByteSeekerTest) WriteString(s string) (n int, err error)
- type FragmentReadWriter
- type FragmentReader
- type FragmentWriter
Constants ¶
This section is empty.
Variables ¶
var Version string
Functions ¶
func ByteCompareTest ¶ added in v1.4.302
ByteCompareTest compares two byte arrays, and returns an error if they are not equal. This was made for testing
func DmSpriteDefTagParse ¶ added in v1.4.265
func FilenameCRC32 ¶
FilenameCRC32 returns the CRC of a file's name
func GenerateCRC16 ¶
GenerateCRC16 places a checksum on the last 2 bytes of writer
func GenerateCRC32 ¶
GenerateCRC32 places a checksum on the last 4 bytes of writer
func MaterialTagParse ¶ added in v1.4.265
MaterialTagParse checks if the material tag represents a variation material and returns a prefix if applicable.
func ReadStringHash ¶
func RegexpMatch ¶ added in v1.4.265
QuickParse parses a key using a pattern, removing first element (the matched line)
func RenderMethodInt ¶ added in v1.4.302
func RenderMethodStr ¶ added in v1.4.302
func TrackAnimationParse ¶ added in v1.4.265
TrackAnimationParse parses the tag and returns the animation and model codes
func WriteString ¶
WriteString is used to write a CString (zero terminated) to w
func WriteStringHash ¶
Types ¶
type ByteSeekerTest ¶ added in v1.4.302
ByteSeekerTest is used primarily for tag systems in tests, it isn't efficient otherwise
func NewByteSeekerTest ¶ added in v1.4.302
func NewByteSeekerTest() *ByteSeekerTest
func (*ByteSeekerTest) Bytes ¶ added in v1.4.302
func (b *ByteSeekerTest) Bytes() []byte
func (*ByteSeekerTest) Cap ¶ added in v1.4.302
func (b *ByteSeekerTest) Cap() int
func (*ByteSeekerTest) Len ¶ added in v1.4.302
func (b *ByteSeekerTest) Len() int
func (*ByteSeekerTest) Read ¶ added in v1.4.302
func (b *ByteSeekerTest) Read(p []byte) (n int, err error)
func (*ByteSeekerTest) ReadByte ¶ added in v1.4.302
func (b *ByteSeekerTest) ReadByte() (c byte, err error)
func (*ByteSeekerTest) ReadFrom ¶ added in v1.4.302
func (b *ByteSeekerTest) ReadFrom(r io.Reader) (n int64, err error)
func (*ByteSeekerTest) ReadRune ¶ added in v1.4.302
func (b *ByteSeekerTest) ReadRune() (r rune, size int, err error)
func (*ByteSeekerTest) ReadString ¶ added in v1.4.302
func (b *ByteSeekerTest) ReadString(delim byte) (line string, err error)
func (*ByteSeekerTest) Reset ¶ added in v1.4.302
func (b *ByteSeekerTest) Reset()
func (*ByteSeekerTest) Seek ¶ added in v1.4.302
func (b *ByteSeekerTest) Seek(offset int64, whence int) (int64, error)
func (*ByteSeekerTest) Write ¶ added in v1.4.302
func (b *ByteSeekerTest) Write(p []byte) (n int, err error)
func (*ByteSeekerTest) WriteByte ¶ added in v1.4.302
func (b *ByteSeekerTest) WriteByte(c byte) error
func (*ByteSeekerTest) WriteString ¶ added in v1.4.302
func (b *ByteSeekerTest) WriteString(s string) (n int, err error)
type FragmentReadWriter ¶ added in v1.4.302
type FragmentReadWriter interface { FragmentReader FragmentWriter }
FragmentReadWriter is used to read a fragment in wld format