Documentation ¶
Index ¶
- Variables
- func ByteCompareTest(src []byte, dst []byte) error
- func DirTest() string
- func NameBuild(srcNames []string) (map[string]int32, []byte, error)
- type Animation
- type Bone
- type BoneAnimation
- type BoneAnimationFrame
- 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 Header
- type Layer
- type Light
- type Material
- type MaterialAnimation
- type MaterialProperty
- type Model
- func (model *Model) BoneBuild(version uint32, fileType string, names map[string]int32) ([]byte, error)
- func (model *Model) MaterialBuild(names map[string]int32) ([]byte, error)
- func (model *Model) NameBuild(miscNames []string) (map[string]int32, []byte, error)
- func (model *Model) TriangleBuild(version uint32, names map[string]int32) ([]byte, error)
- func (model *Model) VertexBuild(version uint32, names map[string]int32) ([]byte, error)
- type Object
- type ParticlePoint
- type ParticlePointEntry
- type ParticleRender
- type ParticleRenderEntry
- type Quad4
- type RGBA
- type Region
- type Triangle
- type UIndex3
- type Vector2
- type Vector3
- type Vertex
- type Zone
Constants ¶
This section is empty.
Variables ¶
var Version string
Functions ¶
func ByteCompareTest ¶
ByteCompareTest compares two byte arrays, and returns an error if they are not equal. This was made for testing
Types ¶
type Animation ¶
type Animation struct { Header *Header `yaml:"header,omitempty"` Bones []*BoneAnimation `yaml:"bones,omitempty"` IsStrict bool `yaml:"is_strict,omitempty"` }
Animation is an animation
func NewAnimation ¶
type Bone ¶
type Bone struct { Name string `yaml:"name"` Next int32 `yaml:"next"` ChildrenCount uint32 `yaml:"children_count"` ChildIndex int32 `yaml:"child_index"` Pivot Vector3 `yaml:"pivot"` Rotation Quad4 `yaml:"rotation"` Scale Vector3 `yaml:"scale"` Flags uint32 `yaml:"flags"` Children []int `yaml:"children,omitempty"` // used by wld }
Bone is a bone
type BoneAnimation ¶
type BoneAnimation struct { Name string `yaml:"name"` FrameCount uint32 `yaml:"frame_count"` Frames []*BoneAnimationFrame `yaml:"frames,omitempty"` }
type BoneAnimationFrame ¶
type BoneAnimationFrame struct { Milliseconds uint32 `yaml:"milliseconds"` Translation Vector3 `yaml:"translation"` Rotation Quad4 `yaml:"rotation"` Scale Vector3 `yaml:"scale"` }
BoneAnimationFrame is a bone animation frame
type ByteSeekerTest ¶
ByteSeekerTest is used primarily for tag systems in tests, it isn't efficient otherwise
func NewByteSeekerTest ¶
func NewByteSeekerTest() *ByteSeekerTest
func (*ByteSeekerTest) Bytes ¶
func (b *ByteSeekerTest) Bytes() []byte
func (*ByteSeekerTest) Cap ¶
func (b *ByteSeekerTest) Cap() int
func (*ByteSeekerTest) Len ¶
func (b *ByteSeekerTest) Len() int
func (*ByteSeekerTest) ReadByte ¶
func (b *ByteSeekerTest) ReadByte() (c byte, err error)
func (*ByteSeekerTest) ReadFrom ¶
func (b *ByteSeekerTest) ReadFrom(r io.Reader) (n int64, err error)
func (*ByteSeekerTest) ReadString ¶
func (b *ByteSeekerTest) ReadString(delim byte) (line string, err error)
func (*ByteSeekerTest) Reset ¶
func (b *ByteSeekerTest) Reset()
func (*ByteSeekerTest) Seek ¶
func (b *ByteSeekerTest) Seek(offset int64, whence int) (int64, error)
func (*ByteSeekerTest) WriteByte ¶
func (b *ByteSeekerTest) WriteByte(c byte) error
func (*ByteSeekerTest) WriteString ¶
func (b *ByteSeekerTest) WriteString(s string) (n int, err error)
type Layer ¶
type Layer struct { Material string `yaml:"material"` Diffuse string `yaml:"diffuse"` Normal string `yaml:"normal"` }
Layer is a layer of materials to swap
type Material ¶
type Material struct { ID int32 `yaml:"id,omitempty"` Name string `yaml:"name"` ShaderName string `yaml:"shader_name"` Flag uint32 `yaml:"flag"` Properties []*MaterialProperty `yaml:"properties,omitempty"` Animation MaterialAnimation `yaml:"animation,omitempty"` }
Material is a material
type MaterialAnimation ¶
type MaterialProperty ¶
type MaterialProperty struct { Name string `yaml:"name"` Category uint32 `yaml:"category"` Value string `yaml:"value"` Data []byte `yaml:"data,omitempty"` }
MaterialProperty is a material property
func (*MaterialProperty) String ¶
func (m *MaterialProperty) String() string
type Model ¶
type Model struct { Header *Header `yaml:"header,omitempty"` FileType string `yaml:"file_type,omitempty"` Materials []*Material `yaml:"materials,omitempty"` ParticlePoints []*ParticlePoint `yaml:"particle_points,omitempty"` ParticleRenders []*ParticleRender `yaml:"particle_renders,omitempty"` Layers []*Layer `yaml:"layers,omitempty"` Bones []Bone `yaml:"bones,omitempty"` Vertices []Vertex `yaml:"vertices,omitempty"` Triangles []Triangle `yaml:"triangles,omitempty"` }
Model is a model
func (*Model) BoneBuild ¶
func (model *Model) BoneBuild(version uint32, fileType string, names map[string]int32) ([]byte, error)
BoneBuild prepares an EQG-styled bone buffer list
func (*Model) MaterialBuild ¶
MaterialBuild prepares an EQG-styled material buffer list
func (*Model) TriangleBuild ¶
TriangleBuild prepares an EQG-styled triangle buffer list
type ParticlePoint ¶
type ParticlePoint struct { Header *Header `yaml:"header,omitempty"` Entries []*ParticlePointEntry `yaml:"entries,omitempty"` }
ParticlePoint is a particle point
func NewParticlePoint ¶
func NewParticlePoint(name string) *ParticlePoint
type ParticlePointEntry ¶
type ParticlePointEntry struct { Name string `yaml:"name"` BoneName string `yaml:"bone_name"` Translation Vector3 `yaml:"translation"` Rotation Vector3 `yaml:"rotation"` Scale Vector3 `yaml:"scale"` NameSuffix []byte `yaml:"name_suffix,omitempty"` BoneSuffix []byte `yaml:"bone_suffix,omitempty"` }
ParticlePointEntry is a single entry in a particle point
type ParticleRender ¶
type ParticleRender struct { Header *Header `yaml:"header,omitempty"` Entries []*ParticleRenderEntry `yaml:"entries,omitempty"` }
func NewParticleRender ¶
func NewParticleRender(name string) *ParticleRender
type ParticleRenderEntry ¶
type ParticleRenderEntry struct { ID uint32 `yaml:"id"` //id is actorsemittersnew.edd ID2 uint32 `yaml:"id2"` ParticlePoint string `yaml:"particle_point"` ParticlePointSuffix []byte `yaml:"particle_point_suffix,omitempty"` UnknownA1 uint32 `yaml:"unknowna1"` UnknownA2 uint32 `yaml:"unknowna2"` UnknownA3 uint32 `yaml:"unknowna3"` UnknownA4 uint32 `yaml:"unknowna4"` UnknownA5 uint32 `yaml:"unknowna5"` Duration uint32 `yaml:"duration"` UnknownB uint32 `yaml:"unknownb"` UnknownFFFFFFFF int32 `yaml:"unknownffffffff"` UnknownC uint32 `yaml:"unknownc"` }
ParticleRender defines what particle to emit on a particle point
type Quad4 ¶
type Quad4 struct { X float32 `yaml:"fx"` Y float32 `yaml:"fy"` Z float32 `yaml:"fz"` W float32 `yaml:"fw"` }
Quad4 has X,Y,Z,W defined as float32
type Triangle ¶
type Triangle struct { Index UIndex3 `yaml:"index"` MaterialName string `yaml:"material_name"` Flag uint32 `yaml:"flag"` }
Triangle is a triangle
type Vector3 ¶
Vector3 has X,Y,Z defined as float32
func ApplyQuaternion ¶
ApplyQuaternion transforms this vector by multiplying it by the specified quaternion and then by the quaternion inverse. It basically applies the rotation encoded in the quaternion to this vector.
type Vertex ¶
type Vertex struct { Position Vector3 `yaml:"position"` Normal Vector3 `yaml:"normal"` Tint RGBA `yaml:"tint"` Uv Vector2 `yaml:"uv"` Uv2 Vector2 `yaml:"uv2"` }
Vertex is a vertex
type Zone ¶
type Zone struct { Header *Header `yaml:"header,omitempty"` Models []string `yaml:"models,omitempty"` Objects []Object `yaml:"objects,omitempty"` Regions []Region `yaml:"regions,omitempty"` Lights []Light `yaml:"lights,omitempty"` Lits []*RGBA `yaml:"lits,omitempty"` // contains filtered or unexported fields }
Zone is a zone
func (*Zone) NameClear ¶
func (e *Zone) NameClear()
NameClear purges names and namebuf, called when encode starts