raw

package
v1.4.220 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FragName

func FragName(fragCode int) string

FragName returns the name of a fragment

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) FileName

func (ani *Ani) FileName() string

func (*Ani) Identity

func (ani *Ani) Identity() string

func (*Ani) Name added in v1.4.187

func (ani *Ani) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Ani) NameAdd added in v1.4.187

func (ani *Ani) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Ani) NameClear added in v1.4.187

func (ani *Ani) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Ani) NameData added in v1.4.187

func (ani *Ani) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Ani) NameIndex added in v1.4.187

func (ani *Ani) NameIndex(name string) int32

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 *Ani) NameOffset(name string) int32

func (*Ani) NameSet added in v1.4.187

func (ani *Ani) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Ani) Read

func (ani *Ani) Read(r io.ReadSeeker) error

Read an ANI file

func (*Ani) SetFileName

func (ani *Ani) SetFileName(name string)

SetFileName sets the name of the file

func (*Ani) Write

func (ani *Ani) Write(w io.Writer) error

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

type Bmp struct {
	MetaFileName string `yaml:"file_name"`
	Data         string `yaml:"data"`
}

Bmp takes a raw BMP type and converts it to png

func (*Bmp) FileName

func (bmp *Bmp) FileName() string

FileName returns the name of the file

func (*Bmp) Identity

func (bmp *Bmp) Identity() string

Identity returns the type of the struct

func (*Bmp) Read

func (bmp *Bmp) Read(r io.ReadSeeker) error

func (*Bmp) SetFileName

func (bmp *Bmp) SetFileName(name string)

SetFileName sets the name of the file

func (*Bmp) Write

func (bmp *Bmp) Write(w io.Writer) error

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) FileName

func (dat *Dat) FileName() string

func (*Dat) Identity

func (dat *Dat) Identity() string

func (*Dat) SetFileName

func (dat *Dat) SetFileName(name string)

SetName sets the name of the file

func (*Dat) Write

func (dat *Dat) Write(w io.Writer) error

Encode encodes a v4 zone dat file https://github.com/EQEmu/zone-utilities/blob/master/src/common/eqg_v4_loader.cpp#L115

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 DatLayer

type DatLayer struct {
	Material       string  `yaml:"material"`
	DetailMaskDim  uint32  `yaml:"detail_mask_dim"`
	DetailMaskDims []uint8 `yaml:"detail_mask_dims"`
}

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 DatTogRef

type DatTogRef struct {
	Name      string        `yaml:"name"`
	Longitude uint32        `yaml:"longitude"`
	Latitude  uint32        `yaml:"latitude"`
	Position  model.Vector3 `yaml:"position"`
	Rotation  model.Vector3 `yaml:"rotation"`
	Scale     model.Vector3 `yaml:"scale"`
	Adjust    float32       `yaml:"adjust"`
}

type Dds

type Dds struct {
	MetaFileName string `yaml:"file_name"`
	Data         string `yaml:"data"`
}

Dds takes a raw DDS type and converts it to an image.Image friendly format

func (*Dds) FileName

func (dds *Dds) FileName() string

FileName returns the name of the file

func (*Dds) Identity

func (dds *Dds) Identity() string

Identity returns the type of the struct

func (*Dds) Read

func (dds *Dds) Read(r io.ReadSeeker) error

func (*Dds) SetFileName

func (dds *Dds) SetFileName(name string)

SetFileName sets the name of the file

func (*Dds) Write

func (dds *Dds) Write(w io.Writer) error

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) FileName

func (edd *Edd) FileName() string

FileName returns the name of the file

func (*Edd) Identity

func (edd *Edd) Identity() string

Identity returns the type of the struct

func (*Edd) Read

func (edd *Edd) Read(r io.ReadSeeker) error

func (*Edd) SetFileName

func (edd *Edd) SetFileName(name string)

SetFileName sets the name of the file

func (*Edd) Write

func (edd *Edd) Write(w io.Writer) error

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) FileName

func (lay *Lay) FileName() string

FileName returns the name of the file

func (*Lay) Identity

func (lay *Lay) Identity() string

Identity notes this is a lay file

func (*Lay) IsRaw

func (e *Lay) IsRaw() bool

IsRaw notes this is a raw file

func (*Lay) Name added in v1.4.187

func (lay *Lay) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Lay) NameAdd added in v1.4.187

func (lay *Lay) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Lay) NameClear added in v1.4.187

func (lay *Lay) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Lay) NameData added in v1.4.187

func (lay *Lay) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Lay) NameIndex added in v1.4.187

func (lay *Lay) NameIndex(name string) int32

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 *Lay) NameOffset(name string) int32

func (*Lay) NameSet added in v1.4.187

func (lay *Lay) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Lay) Read

func (lay *Lay) Read(r io.ReadSeeker) error

Read takes data

func (*Lay) SetFileName

func (lay *Lay) SetFileName(name string)

SetFileName sets the name of the file

func (*Lay) Write

func (lay *Lay) Write(w io.Writer) error

Write will write a lay 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

type Lit struct {
	MetaFileName string        `yaml:"file_name"`
	Entries      []*model.RGBA `yaml:"entries"`
}

func (*Lit) FileName

func (lit *Lit) FileName() string

FileName returns the name of the file

func (*Lit) Identity

func (lit *Lit) Identity() string

Identity returns the type of the struct

func (*Lit) Read

func (lit *Lit) Read(r io.ReadSeeker) error

Decode will read a lit

func (*Lit) SetFileName

func (lit *Lit) SetFileName(name string)

SetFileName sets the name of the file

func (*Lit) Write

func (lit *Lit) Write(w io.Writer) error

type Lod

type Lod struct {
	MetaFileName string      `yaml:"file_name"`
	Entries      []*LodEntry `yaml:"entries"`
}

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) FileName

func (lod *Lod) FileName() string

FileName returns the name of the file

func (*Lod) Identity

func (lod *Lod) Identity() string

Identity returns the type of the struct

func (*Lod) Read

func (lod *Lod) Read(r io.ReadSeeker) error

func (*Lod) SetFileName

func (lod *Lod) SetFileName(name string)

SetFileName sets the name of the file

func (*Lod) Write

func (lod *Lod) Write(w io.Writer) error

type LodEntry

type LodEntry struct {
	Category   string
	ObjectName string
	Distance   int
}

type Material

type Material struct {
	ID         int32
	Name       string
	ShaderName string
	Flag       uint32
	Properties []*MaterialProperty
	Animation  MaterialAnimation
}

type MaterialAnimation

type MaterialAnimation struct {
	Sleep    uint32
	Textures []string
}

type MaterialProperty

type MaterialProperty struct {
	Name     string
	Category uint32
	Value    string
	Data     []byte
}

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) FileName

func (mds *Mds) FileName() string

FileName returns the name of the file

func (*Mds) Identity

func (mds *Mds) Identity() string

func (*Mds) Name added in v1.4.187

func (mds *Mds) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Mds) NameAdd added in v1.4.187

func (mds *Mds) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Mds) NameClear added in v1.4.187

func (mds *Mds) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Mds) NameData added in v1.4.187

func (mds *Mds) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Mds) NameIndex added in v1.4.187

func (mds *Mds) NameIndex(name string) int32

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 *Mds) NameOffset(name string) int32

func (*Mds) NameSet added in v1.4.187

func (mds *Mds) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Mds) Read

func (mds *Mds) Read(r io.ReadSeeker) error

Read reads a mds file

func (*Mds) SetFileName

func (mds *Mds) SetFileName(name string)

SetFileName sets the name of the file

func (*Mds) String

func (mds *Mds) String() string

func (*Mds) Write

func (mds *Mds) Write(w io.Writer) error

Write writes a mds file

type MdsBoneAssignment

type MdsBoneAssignment struct {
}

type MdsSub

type MdsSub 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) FileName

func (mod *Mod) FileName() string

FileName returns the name of the file

func (*Mod) Identity

func (mod *Mod) Identity() string

func (*Mod) Name added in v1.4.187

func (mod *Mod) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Mod) NameAdd added in v1.4.187

func (mod *Mod) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Mod) NameClear added in v1.4.187

func (mod *Mod) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Mod) NameData added in v1.4.187

func (mod *Mod) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Mod) NameIndex added in v1.4.187

func (mod *Mod) NameIndex(name string) int32

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 *Mod) NameOffset(name string) int32

func (*Mod) NameSet added in v1.4.187

func (mod *Mod) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Mod) Read

func (mod *Mod) Read(r io.ReadSeeker) error

Decode reads a MOD file

func (*Mod) SetFileName

func (mod *Mod) SetFileName(name string)

SetFileName sets the name of the file

func (*Mod) Write

func (mod *Mod) Write(w io.Writer) error

Encode writes a mod 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

type Png struct {
	MetaFileName string `yaml:"file_name"`
	Data         string `yaml:"data"`
}

Png takes a raw PNG type and converts it to an image.Image friendly format

func (*Png) FileName

func (png *Png) FileName() string

FileName returns the name of the file

func (*Png) Identity

func (png *Png) Identity() string

Identity returns the type of the struct

func (*Png) Read

func (png *Png) Read(r io.ReadSeeker) error

func (*Png) SetFileName

func (png *Png) SetFileName(name string)

SetFileName sets the name of the file

func (*Png) Write

func (png *Png) Write(w io.Writer) error

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) FileName

func (prt *Prt) FileName() string

FileName returns the name of the file

func (*Prt) Identity

func (prt *Prt) Identity() string

Identity returns the type of the struct

func (*Prt) Read

func (prt *Prt) Read(r io.ReadSeeker) error

Read reads a PRT file

func (*Prt) SetFileName

func (prt *Prt) SetFileName(name string)

SetFileName sets the name of the file

func (*Prt) Write

func (prt *Prt) Write(w io.Writer) error

Write writes a prt 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) FileName

func (pts *Pts) FileName() string

FileName returns the name of the file

func (*Pts) Identity

func (pts *Pts) Identity() string

Identity returns the type of the struct

func (*Pts) Read

func (pts *Pts) Read(r io.ReadSeeker) error

Read reads a PTS file

func (*Pts) SetFileName

func (pts *Pts) SetFileName(name string)

SetFileName sets the name of the file

func (*Pts) Write

func (pts *Pts) Write(w io.Writer) error

Encode writes a pts 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

type ReadWriter interface {
	Reader
	Writer
}

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

func Write

func Write(ext string, w io.Writer) (ReadWriter, error)

Write takes an extension and a writer 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) FileName

func (ter *Ter) FileName() string

FileName returns the name of the file

func (*Ter) Identity

func (ter *Ter) Identity() string

Identity returns the type of the struct

func (*Ter) Name added in v1.4.187

func (ter *Ter) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Ter) NameAdd added in v1.4.187

func (ter *Ter) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Ter) NameClear added in v1.4.187

func (ter *Ter) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Ter) NameData added in v1.4.187

func (ter *Ter) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Ter) NameIndex added in v1.4.187

func (ter *Ter) NameIndex(name string) int32

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 *Ter) NameOffset(name string) int32

func (*Ter) NameSet added in v1.4.187

func (ter *Ter) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Ter) Read

func (ter *Ter) Read(r io.ReadSeeker) error

Read reads a TER file

func (*Ter) SetFileName

func (ter *Ter) SetFileName(name string)

SetFileName sets the name of the file

func (*Ter) Write

func (ter *Ter) Write(w io.Writer) error

Write writes a ter file

type Tog

type Tog struct {
	MetaFileName string      `yaml:"file_name"`
	Entries      []*TogEntry `yaml:"entries"`
}

func (*Tog) FileName

func (tog *Tog) FileName() string

FileName returns the name of the file

func (*Tog) Identity

func (tog *Tog) Identity() string

Identity returns the type of the struct

func (*Tog) Read

func (tog *Tog) Read(r io.ReadSeeker) error

func (*Tog) SetFileName

func (tog *Tog) SetFileName(name string)

SetFileName sets the name of the file

func (*Tog) Write

func (tog *Tog) Write(w io.Writer) error

type TogEntry

type TogEntry struct {
	Position [3]float32 `yaml:"position"`
	Rotation [3]float32 `yaml:"rotation"`
	Scale    float32    `yaml:"scale"`
	Name     string     `yaml:"name"`
	FileType string     `yaml:"file_type"`
}

type Triangle

type Triangle struct {
	Index        [3]uint32
	MaterialName string
	Flag         uint32
}

Triangle is a triangle

type Txt

type Txt struct {
	MetaFileName string `yaml:"file_name"`
	Data         string `yaml:"data"`
}

Txt is a text file

func (*Txt) FileName

func (txt *Txt) FileName() string

FileName returns the name of the file

func (*Txt) Identity

func (txt *Txt) Identity() string

Identity notes this is a txt file

func (*Txt) Read

func (txt *Txt) Read(r io.ReadSeeker) error

Read takes data

func (*Txt) SetFileName

func (txt *Txt) SetFileName(name string)

SetFileName sets the name of the file

func (*Txt) Write

func (txt *Txt) Write(w io.Writer) error

Write will write a txt file

type Unk

type Unk struct {
	MetaFileName string `yaml:"file_name"`
	Data         []byte `yaml:"data,omitempty"`
}

Unk is a fallback type for raw data we can't parse

func (*Unk) FileName

func (unk *Unk) FileName() string

FileName returns the name of the file

func (*Unk) Identity

func (unk *Unk) Identity() string

Identity returns the type of the struct

func (*Unk) Read

func (unk *Unk) Read(r io.ReadSeeker) error

func (*Unk) SetFileName

func (unk *Unk) SetFileName(name string)

SetFileName sets the name of the file

func (*Unk) Write

func (unk *Unk) Write(w io.Writer) error

type V4Dat

type V4Dat struct {
	Unk1            uint32 `yaml:"unk1"`
	Unk2            uint32 `yaml:"unk2"`
	Unk3            uint32 `yaml:"unk3"`
	BaseTileTexture string `yaml:"base_tile_texture"`
	Tiles           []V4DatTile
}

type V4DatTile

type V4DatTile struct {
	Lng     int32    `yaml:"lng"`
	Lat     int32    `yaml:"lat"`
	Unk     uint32   `yaml:"unk"`
	Colors  []uint32 `yaml:"colors"`
	Colors2 []uint32 `yaml:"colors2"`
}

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) FileName

func (wld *Wld) FileName() string

FileName returns the name of the file

func (*Wld) Identity

func (wld *Wld) Identity() string

func (*Wld) Name added in v1.4.187

func (wld *Wld) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Wld) NameAdd added in v1.4.187

func (wld *Wld) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Wld) NameClear added in v1.4.187

func (wld *Wld) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Wld) NameData added in v1.4.187

func (wld *Wld) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Wld) NameIndex added in v1.4.187

func (wld *Wld) NameIndex(name string) int32

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 *Wld) NameOffset(name string) int32

func (*Wld) NameSet added in v1.4.187

func (wld *Wld) NameSet(newNames map[int32]string)

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

func (wld *Wld) SetFileName(name string)

SetFileName sets the name of the file

func (*Wld) TagByFrag added in v1.4.187

func (wld *Wld) TagByFrag(srcFrag interface{}) string

func (*Wld) Write

func (wld *Wld) Write(w io.Writer) error

Write writes wld.Fragments to a .wld writer. Use quail.WldMarshal to convert a Wld to wld.Fragments

type WldAscii

type WldAscii struct {
	MetaFileName string `yaml:"file_name"`
	Data         string `yaml:"data"`
}

func (*WldAscii) FileName

func (wld *WldAscii) FileName() string

FileName returns the name of the file

func (*WldAscii) Identity

func (wld *WldAscii) Identity() string

func (*WldAscii) Read

func (wld *WldAscii) Read(r io.ReadSeeker) error

Read reads a wld file that was prepped by Load

func (*WldAscii) SetFileName

func (wld *WldAscii) SetFileName(name string)

SetFileName sets the name of the file

func (*WldAscii) Write

func (wld *WldAscii) Write(w io.Writer) error

Write writes data to a wld_ascii file

type Writer

type Writer interface {
	Identity() string
	FileName() string
	Write(w io.Writer) error
}

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) FileName

func (zon *Zon) FileName() string

FileName returns the name of the file

func (*Zon) Identity

func (zon *Zon) Identity() string

func (*Zon) Name added in v1.4.187

func (zon *Zon) Name(id int32) string

Name is used during reading, returns the Name of an id

func (*Zon) NameAdd added in v1.4.187

func (zon *Zon) NameAdd(name string) int32

NameAdd is used when writing, appending new names

func (*Zon) NameClear added in v1.4.187

func (zon *Zon) NameClear()

NameClear purges names and namebuf, called when encode starts

func (*Zon) NameData added in v1.4.187

func (zon *Zon) NameData() []byte

NameData is used during writing, dumps the name cache

func (*Zon) NameIndex added in v1.4.187

func (zon *Zon) NameIndex(name string) int32

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 *Zon) NameOffset(name string) int32

func (*Zon) NameSet added in v1.4.187

func (zon *Zon) NameSet(newNames map[int32]string)

NameSet is used during reading, sets the names within a buffer

func (*Zon) Read

func (zon *Zon) Read(r io.ReadSeeker) error

Decode reads a ZON file

func (*Zon) SetFileName

func (zon *Zon) SetFileName(name string)

SetFileName sets the name of the file

func (*Zon) Write

func (zon *Zon) Write(w io.Writer) error

Encode writes a zon file

func (*Zon) WriteV4

func (zon *Zon) WriteV4(w io.Writer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL