Documentation
¶
Index ¶
- func FragName(fragCode int) string
- func NewFrag(r io.ReadSeeker) model.FragmentReadWriter
- type Ani
- func (ani *Ani) FileName() string
- func (ani *Ani) Identity() string
- func (ani *Ani) Name(id int32) string
- func (ani *Ani) NameAdd(name string) int32
- func (ani *Ani) NameClear()
- func (ani *Ani) NameData() []byte
- func (ani *Ani) NameIndex(name string) int32
- func (ani *Ani) NameOffset(name string) int32
- func (ani *Ani) NameSet(newNames map[int32]string)
- func (ani *Ani) Read(r io.ReadSeeker) error
- func (ani *Ani) SetFileName(name string)
- func (ani *Ani) Write(w io.Writer) error
- type AniBone
- type AniBoneFrame
- type Bmp
- type Bone
- type Dat
- type DatArea
- type DatLayer
- type DatLightEffect
- type DatSinglePlacable
- type DatTile
- type DatTogRef
- type Dds
- type Edd
- type Lay
- func (lay *Lay) FileName() string
- func (lay *Lay) Identity() string
- func (e *Lay) IsRaw() bool
- func (lay *Lay) Name(id int32) string
- func (lay *Lay) NameAdd(name string) int32
- func (lay *Lay) NameClear()
- func (lay *Lay) NameData() []byte
- func (lay *Lay) NameIndex(name string) int32
- func (lay *Lay) NameOffset(name string) int32
- func (lay *Lay) NameSet(newNames map[int32]string)
- func (lay *Lay) Read(r io.ReadSeeker) error
- func (lay *Lay) SetFileName(name string)
- func (lay *Lay) Write(w io.Writer) error
- type LayEntry
- type Light
- type Lit
- type Lod
- type LodEntry
- type Material
- type MaterialAnimation
- type MaterialProperty
- type Mds
- func (mds *Mds) FileName() string
- func (mds *Mds) Identity() string
- func (mds *Mds) Name(id int32) string
- func (mds *Mds) NameAdd(name string) int32
- func (mds *Mds) NameClear()
- func (mds *Mds) NameData() []byte
- func (mds *Mds) NameIndex(name string) int32
- func (mds *Mds) NameOffset(name string) int32
- func (mds *Mds) NameSet(newNames map[int32]string)
- func (mds *Mds) Read(r io.ReadSeeker) error
- func (mds *Mds) SetFileName(name string)
- func (mds *Mds) String() string
- func (mds *Mds) Write(w io.Writer) error
- type MdsBoneAssignment
- type MdsSub
- type Mod
- func (mod *Mod) FileName() string
- func (mod *Mod) Identity() string
- func (mod *Mod) Name(id int32) string
- func (mod *Mod) NameAdd(name string) int32
- func (mod *Mod) NameClear()
- func (mod *Mod) NameData() []byte
- func (mod *Mod) NameIndex(name string) int32
- func (mod *Mod) NameOffset(name string) int32
- func (mod *Mod) NameSet(newNames map[int32]string)
- func (mod *Mod) Read(r io.ReadSeeker) error
- func (mod *Mod) SetFileName(name string)
- func (mod *Mod) Write(w io.Writer) error
- type Object
- type Png
- type Prt
- type PrtEntry
- type Pts
- type PtsEntry
- type ReadWriter
- type Reader
- type Region
- type Ter
- func (ter *Ter) FileName() string
- func (ter *Ter) Identity() string
- func (ter *Ter) Name(id int32) string
- func (ter *Ter) NameAdd(name string) int32
- func (ter *Ter) NameClear()
- func (ter *Ter) NameData() []byte
- func (ter *Ter) NameIndex(name string) int32
- func (ter *Ter) NameOffset(name string) int32
- func (ter *Ter) NameSet(newNames map[int32]string)
- func (ter *Ter) Read(r io.ReadSeeker) error
- func (ter *Ter) SetFileName(name string)
- func (ter *Ter) Write(w io.Writer) error
- type Tog
- type TogEntry
- type Triangle
- type Txt
- type Unk
- type V4Dat
- type V4DatTile
- type V4Info
- type Vertex
- type Wld
- func (wld *Wld) FileName() string
- func (wld *Wld) Identity() string
- func (wld *Wld) Name(id int32) string
- func (wld *Wld) NameAdd(name string) int32
- func (wld *Wld) NameClear()
- func (wld *Wld) NameData() []byte
- func (wld *Wld) NameIndex(name string) int32
- func (wld *Wld) NameOffset(name string) int32
- func (wld *Wld) NameSet(newNames map[int32]string)
- func (wld *Wld) Read(r io.ReadSeeker) error
- func (wld *Wld) SetFileName(name string)
- func (wld *Wld) TagByFrag(srcFrag interface{}) string
- func (wld *Wld) Write(w io.Writer) error
- type WldAscii
- type Writer
- type Zon
- func (zon *Zon) FileName() string
- func (zon *Zon) Identity() string
- func (zon *Zon) Name(id int32) string
- func (zon *Zon) NameAdd(name string) int32
- func (zon *Zon) NameClear()
- func (zon *Zon) NameData() []byte
- func (zon *Zon) NameIndex(name string) int32
- func (zon *Zon) NameOffset(name string) int32
- func (zon *Zon) NameSet(newNames map[int32]string)
- func (zon *Zon) Read(r io.ReadSeeker) error
- func (zon *Zon) ReadV4(r io.ReadSeeker) error
- func (zon *Zon) SetFileName(name string)
- func (zon *Zon) Write(w io.Writer) error
- func (zon *Zon) WriteV4(w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFrag ¶
func NewFrag(r io.ReadSeeker) model.FragmentReadWriter
Types ¶
type Ani ¶
type Ani struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Bones []*AniBone `yaml:"bones,omitempty"` IsStrict bool `yaml:"is_strict,omitempty"` // contains filtered or unexported fields }
func (*Ani) NameClear ¶ added in v1.4.187
func (ani *Ani) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Ani) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Ani) NameOffset ¶ added in v1.4.187
func (*Ani) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Ani) SetFileName ¶
SetFileName sets the name of the file
type AniBone ¶
type AniBone struct { Name string `yaml:"name"` Frames []*AniBoneFrame `yaml:"frames,omitempty"` }
type AniBoneFrame ¶
type AniBoneFrame struct { Milliseconds uint32 `yaml:"milliseconds"` Translation model.Vector3 `yaml:"translation"` Rotation model.Quad4 `yaml:"rotation"` Scale model.Vector3 `yaml:"scale"` }
AniBoneFrame is a bone animation frame
type Bmp ¶
Bmp takes a raw BMP type and converts it to png
func (*Bmp) SetFileName ¶
SetFileName sets the name of the file
type Bone ¶
type Bone struct { Name string Next int32 ChildrenCount uint32 ChildIndex int32 Pivot [3]float32 Rotation [4]float32 Scale [3]float32 Scale2 float32 }
Bone is a bone
type Dat ¶
type Dat struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Unk1 uint32 `yaml:"unk1"` Unk2 uint32 `yaml:"unk2"` Unk3 uint32 `yaml:"unk3"` BaseTileTexture string `yaml:"base_tile_texture"` QuadsPerTile int `yaml:"quads_per_tile"` Tiles []*DatTile `yaml:"tiles"` }
func (*Dat) Read ¶
func (dat *Dat) Read(r io.ReadSeeker) error
Decode reads a v4 zone dat file https://github.com/EQEmu/zone-utilities/blob/master/src/common/eqg_v4_loader.cpp#L115
func (*Dat) SetFileName ¶
SetName sets the name of the file
type DatArea ¶
type DatArea struct { UnkStr1 string `yaml:"unk_str1"` Type int32 `yaml:"type"` UnkStr2 string `yaml:"unk_str2"` Longitude uint32 `yaml:"longitude"` Latitude uint32 `yaml:"latitude"` Position model.Vector3 `yaml:"position"` Rotation model.Vector3 `yaml:"rotation"` Scale model.Vector3 `yaml:"scale"` Size model.Vector3 `yaml:"size"` }
type DatLightEffect ¶
type DatLightEffect struct { UnkStr1 string `yaml:"unk_str1"` UnkStr2 string `yaml:"unk_str2"` Unk3 uint8 `yaml:"unk3"` Longitude uint32 `yaml:"longitude"` Latitude uint32 `yaml:"latitude"` Position model.Vector3 `yaml:"position"` Rotation model.Vector3 `yaml:"rotation"` Scale model.Vector3 `yaml:"scale"` Size float32 `yaml:"size"` }
type DatSinglePlacable ¶
type DatSinglePlacable struct { ModelName string `yaml:"model_name"` InstanceName string `yaml:"instance_name"` Longitude int32 `yaml:"longitude"` Latitude int32 `yaml:"latitude"` Position model.Vector3 `yaml:"position"` Rotation model.Vector3 `yaml:"rotation"` Scale model.Vector3 `yaml:"scale"` Flags uint8 `yaml:"flags"` Unk1 uint32 `yaml:"unk1"` }
type DatTile ¶
type DatTile struct { Lng int32 `yaml:"lng"` Lat int32 `yaml:"lat"` Unk1 uint32 `yaml:"unk1"` Floats []float32 `yaml:"floats"` Colors []uint32 `yaml:"colors"` Colors2 []uint32 `yaml:"colors2"` Flags []uint8 `yaml:"flags"` BaseWaterLevel float32 `yaml:"base_water_level"` Unk2 int32 `yaml:"unk2"` // known to be float or int Unk3 int8 `yaml:"unk3"` // unk_byte on loader Unk3Quad model.Quad4 `yaml:"unk3_quad"` //f1 to f4 on loader Unk3Float float32 `yaml:"unk3_float"` LayerBaseMaterial string `yaml:"layer_base_material"` Layers []*DatLayer `yaml:"layers"` SinglePlacables []*DatSinglePlacable `yaml:"single_placables"` Areas []*DatArea `yaml:"areas"` LightEffects []*DatLightEffect `yaml:"light_effects"` TogRefs []*DatTogRef `yaml:"tog_refs"` }
type Dds ¶
Dds takes a raw DDS type and converts it to an image.Image friendly format
func (*Dds) SetFileName ¶
SetFileName sets the name of the file
type Edd ¶
type Edd struct {
MetaFileName string `yaml:"file_name"`
}
Edd contations particle definitions used by prt examples are in eq root, actoremittersnew.edd, environmentemittersnew.edd, spellsnew.edd
func (*Edd) SetFileName ¶
SetFileName sets the name of the file
type Lay ¶
type Lay struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Entries []*LayEntry `yaml:"entries"` // contains filtered or unexported fields }
Lay is a raw layer struct
func (*Lay) NameClear ¶ added in v1.4.187
func (lay *Lay) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Lay) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Lay) NameOffset ¶ added in v1.4.187
func (*Lay) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Lay) SetFileName ¶
SetFileName sets the name of the file
type LayEntry ¶
type LayEntry struct { Material string `yaml:"material"` Diffuse string `yaml:"diffuse"` Normal string `yaml:"normal"` }
LayEntry is a raw layer entry struct
type Light ¶
type Light struct { Name string `yaml:"name"` Position model.Vector3 `yaml:"position"` Color model.Vector3 `yaml:"color"` Radius float32 `yaml:"radius"` }
Light is a light
type Lit ¶
func (*Lit) SetFileName ¶
SetFileName sets the name of the file
type Lod ¶
LOD is level of detail information Typical usaeg is like so:
EQLOD LOD,OBJ_FIREPIT_STMFT,150 LOD,OBJ_FIREPIT_STMFT_LOD1,250 LOD,OBJ_FIREPIT_STMFT_LOD2,400 LOD,OBJ_FIREPIT_STMFT_LOD3,1000
func (*Lod) SetFileName ¶
SetFileName sets the name of the file
type Material ¶
type Material struct { ID int32 Name string ShaderName string Flag uint32 Properties []*MaterialProperty Animation MaterialAnimation }
type MaterialAnimation ¶
type MaterialProperty ¶
MaterialProperty is a material property
type Mds ¶
type Mds struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Materials []*Material `yaml:"materials"` Bones []*Bone `yaml:"bones"` MainNameIndex int32 `yaml:"main_name_index"` SubNameIndex int32 `yaml:"sub_name_index"` Vertices []*Vertex `yaml:"vertices"` Triangles []Triangle `yaml:"triangles"` Subs []*MdsSub `yaml:"subs"` BoneAssignments []*MdsBoneAssignment `yaml:"bone_assignments"` // contains filtered or unexported fields }
func (*Mds) NameClear ¶ added in v1.4.187
func (mds *Mds) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Mds) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Mds) NameOffset ¶ added in v1.4.187
func (*Mds) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Mds) SetFileName ¶
SetFileName sets the name of the file
type MdsBoneAssignment ¶
type MdsBoneAssignment struct { }
type Mod ¶
type Mod struct { MetaFileName string Version uint32 Materials []*Material Bones []*Bone Vertices []*Vertex Triangles []Triangle // contains filtered or unexported fields }
func (*Mod) NameClear ¶ added in v1.4.187
func (mod *Mod) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Mod) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Mod) NameOffset ¶ added in v1.4.187
func (*Mod) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Mod) SetFileName ¶
SetFileName sets the name of the file
type Object ¶
type Object struct { ModelName string `yaml:"model_name"` InstanceName string `yaml:"instance_name"` Position model.Vector3 `yaml:"position"` Rotation model.Vector3 `yaml:"rotation"` Scale float32 `yaml:"scale"` Lits []*model.RGBA `yaml:"-"` // used in v2+ zones, omitted since it's huge }
Object is an object
type Png ¶
Png takes a raw PNG type and converts it to an image.Image friendly format
func (*Png) SetFileName ¶
SetFileName sets the name of the file
type Prt ¶
type Prt struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Entries []*PrtEntry `yaml:"entries,omitempty"` }
Prt is a Particle Render
func (*Prt) SetFileName ¶
SetFileName sets the name of the file
type PrtEntry ¶
type PrtEntry 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"` }
PrtEntry is ParticleRender entry
type Pts ¶
type Pts struct { MetaFileName string `yaml:"file_name"` Version uint32 Entries []*PtsEntry `yaml:"entries,omitempty"` }
Pts is a particle point
func (*Pts) SetFileName ¶
SetFileName sets the name of the file
type PtsEntry ¶
type PtsEntry struct { Name string `yaml:"name"` BoneName string `yaml:"bone_name"` Translation model.Vector3 `yaml:"translation"` Rotation model.Vector3 `yaml:"rotation"` Scale model.Vector3 `yaml:"scale"` }
PtsEntry is a single entry in a particle point
type ReadWriter ¶
func New ¶
func New(ext string) ReadWriter
New takes an extension and returns a ReadWriter that can parse it
func Read ¶
func Read(ext string, r io.ReadSeeker) (ReadWriter, error)
Read takes an extension and a reader and returns a ReadWriter that can parse it
type Reader ¶
type Reader interface { Identity() string Read(r io.ReadSeeker) error SetFileName(name string) }
type Region ¶
type Region struct { Name string `yaml:"name"` Center model.Vector3 `yaml:"center"` Unknown model.Vector3 `yaml:"unknown"` Extent model.Vector3 `yaml:"extent"` Unk1 uint32 `yaml:"unk1"` Unk2 uint32 `yaml:"unk2"` }
Region is a region
type Ter ¶
type Ter struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Materials []*Material `yaml:"materials"` Vertices []Vertex `yaml:"vertices"` Triangles []Triangle `yaml:"triangles"` // contains filtered or unexported fields }
func (*Ter) NameClear ¶ added in v1.4.187
func (ter *Ter) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Ter) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Ter) NameOffset ¶ added in v1.4.187
func (*Ter) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Ter) SetFileName ¶
SetFileName sets the name of the file
type Tog ¶
func (*Tog) SetFileName ¶
SetFileName sets the name of the file
type Unk ¶
Unk is a fallback type for raw data we can't parse
func (*Unk) SetFileName ¶
SetFileName sets the name of the file
type V4Info ¶
type V4Info struct { Name string `yaml:"name"` MinLng int `yaml:"min_lng"` MinLat int `yaml:"min_lat"` MaxLng int `yaml:"max_lng"` MaxLat int `yaml:"max_lat"` MinExtents model.Vector3 `yaml:"min_extents"` MaxExtents model.Vector3 `yaml:"max_extents"` UnitsPerVert float32 `yaml:"units_per_vert"` QuadsPerTile int `yaml:"quads_per_tile"` CoverMapInputSize int `yaml:"cover_map_input_size"` LayeringMapInputSize int `yaml:"layering_map_input_size"` }
type Vertex ¶
type Vertex struct { Position [3]float32 Normal [3]float32 Tint [4]uint8 Uv [2]float32 Uv2 [2]float32 }
Vertex is a vertex
type Wld ¶
type Wld struct { MetaFileName string Version uint32 IsNewWorld bool IsZone bool Fragments []model.FragmentReadWriter Unk2 uint32 Unk3 uint32 // contains filtered or unexported fields }
func (*Wld) NameClear ¶ added in v1.4.187
func (wld *Wld) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Wld) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Wld) NameOffset ¶ added in v1.4.187
func (*Wld) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Wld) Read ¶
func (wld *Wld) Read(r io.ReadSeeker) error
Read reads a wld file that was prepped by Load
func (*Wld) SetFileName ¶
SetFileName sets the name of the file
type WldAscii ¶
func (*WldAscii) Read ¶
func (wld *WldAscii) Read(r io.ReadSeeker) error
Read reads a wld file that was prepped by Load
func (*WldAscii) SetFileName ¶
SetFileName sets the name of the file
type Zon ¶
type Zon struct { MetaFileName string `yaml:"file_name"` Version uint32 `yaml:"version"` Models []string `yaml:"models"` Objects []Object `yaml:"objects"` Regions []Region `yaml:"regions"` Lights []Light `yaml:"lights"` V4Info V4Info `yaml:"v4info"` V4Dat V4Dat `yaml:"v4dat"` // contains filtered or unexported fields }
Zon is a zone
func (*Zon) NameClear ¶ added in v1.4.187
func (zon *Zon) NameClear()
NameClear purges names and namebuf, called when encode starts
func (*Zon) NameIndex ¶ added in v1.4.187
NameIndex is used when reading, returns the index of a name, or -1 if not found
func (*Zon) NameOffset ¶ added in v1.4.187
func (*Zon) NameSet ¶ added in v1.4.187
NameSet is used during reading, sets the names within a buffer
func (*Zon) ReadV4 ¶
func (zon *Zon) ReadV4(r io.ReadSeeker) error
Decode reads a v4 ZON file https://github.com/EQEmu/zone-utilities/blob/master/src/common/eqg_v4_loader.cpp#L736
func (*Zon) SetFileName ¶
SetFileName sets the name of the file
Source Files
¶
- ani_read.go
- ani_write.go
- bmp_read.go
- bmp_write.go
- dat_read.go
- dat_write.go
- dds_read.go
- dds_write.go
- edd_read.go
- edd_write.go
- frag.go
- lay_read.go
- lay_write.go
- lit_read.go
- lit_write.go
- lod_read.go
- lod_write.go
- mds_read.go
- mds_write.go
- mod_read.go
- mod_write.go
- model.go
- name.go
- png_read.go
- png_write.go
- prt_read.go
- prt_write.go
- pts_read.go
- pts_write.go
- raw.go
- ter_read.go
- ter_write.go
- tog_read.go
- tog_write.go
- txt_read.go
- txt_write.go
- unk_read.go
- unk_write.go
- wld_ascii_read.go
- wld_ascii_write.go
- wld_read.go
- wld_write.go
- zon_read.go
- zon_read_v4.go
- zon_write.go
- zon_write_v4.go