wld

package
v1.4.147 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

virtual is Virtual World file format, it is used to make binary world more human readable and editable

Index

Constants

This section is empty.

Variables

View Source
var AsciiVersion = "v0.0.1"

Functions

This section is empty.

Types

type ActorAction added in v1.4.113

type ActorAction struct {
	Unk1           uint32
	LevelOfDetails []ActorLevelOfDetail
}

ActorAction is a declaration of ACTION

type ActorDef added in v1.4.118

type ActorDef struct {
	Tag            string
	Callback       string
	BoundsRef      int32
	CurrentAction  NullUint32
	Location       NullFloat32Slice6
	ActiveGeometry NullUint32
	Unk1           uint32
	Actions        []ActorAction
	Unk2           uint32
	// contains filtered or unexported fields
}

ActorDef is a declaration of ACTORDEF

func (*ActorDef) Definition added in v1.4.125

func (e *ActorDef) Definition() string

func (*ActorDef) Read added in v1.4.125

func (e *ActorDef) Read(r *AsciiReadToken) error

func (*ActorDef) ToRaw added in v1.4.138

func (e *ActorDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*ActorDef) Write added in v1.4.125

func (e *ActorDef) Write(w io.Writer) error

type ActorInst added in v1.4.118

type ActorInst struct {
	Tag              string
	DefinitionTag    string
	CurrentAction    NullUint32
	Location         NullFloat32Slice6
	BoundingRadius   NullFloat32
	Scale            NullFloat32
	SoundTag         NullString
	Active           NullUint32
	SpriteVolumeOnly NullUint32
	DMRGBTrackTag    NullString
	SphereTag        string
	SphereRadius     float32
	UserData         string
	// contains filtered or unexported fields
}

ActorInst is a declaration of ACTORINST

func (*ActorInst) Definition added in v1.4.125

func (e *ActorInst) Definition() string

func (*ActorInst) Read added in v1.4.125

func (e *ActorInst) Read(r *AsciiReadToken) error

func (*ActorInst) ToRaw added in v1.4.138

func (e *ActorInst) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*ActorInst) Write added in v1.4.125

func (e *ActorInst) Write(w io.Writer) error

type ActorLevelOfDetail added in v1.4.118

type ActorLevelOfDetail struct {
	SpriteTag   string
	SpriteFlags uint32
	MinDistance float32
}

ActorLevelOfDetail is a declaration of LEVELOFDETAIL

type AmbientLight added in v1.4.128

type AmbientLight struct {
	Tag        string
	LightTag   string
	LightFlags uint32
	Regions    []uint32
	// contains filtered or unexported fields
}

func (*AmbientLight) Definition added in v1.4.128

func (e *AmbientLight) Definition() string

func (*AmbientLight) Read added in v1.4.128

func (e *AmbientLight) Read(r *AsciiReadToken) error

func (*AmbientLight) ToRaw added in v1.4.138

func (e *AmbientLight) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*AmbientLight) Write added in v1.4.128

func (e *AmbientLight) Write(w io.Writer) error

type AsciiReadToken added in v1.4.120

type AsciiReadToken struct {
	// contains filtered or unexported fields
}

func LoadAsciiFile added in v1.4.121

func LoadAsciiFile(path string, wld *Wld) (*AsciiReadToken, error)

LoadAsciiFile returns a new AsciiReader that reads from r.

func (*AsciiReadToken) Close added in v1.4.121

func (a *AsciiReadToken) Close() error

func (*AsciiReadToken) Read added in v1.4.120

func (a *AsciiReadToken) Read(p []byte) (n int, err error)

Read reads up to len(p) bytes into p. It returns the number of bytes read (0 <= n <= len(p)) and any error encountered.

func (*AsciiReadToken) ReadProperty added in v1.4.120

func (a *AsciiReadToken) ReadProperty(name string, minNumArgs int) ([]string, error)

func (*AsciiReadToken) TotalLineCountRead added in v1.4.124

func (a *AsciiReadToken) TotalLineCountRead() int

type AttachedSkin added in v1.4.123

type AttachedSkin struct {
	DMSpriteTag               string
	LinkSkinUpdatesToDagIndex uint32
}

type BSPNode added in v1.4.118

type BSPNode struct {
	Vertices      []uint32
	RenderMethod  string
	Pen           NullUint32
	Brightness    NullFloat32
	ScaledAmbient NullFloat32
	SpriteTag     NullString
	UvOrigin      NullFloat32Slice3
	UAxis         NullFloat32Slice3
	VAxis         NullFloat32Slice3
	Uvs           [][2]float32
	TwoSided      int
	FrontTree     uint32
	BackTree      uint32
}

BSPNode is a declaration of BSPNODE

type DMSprite added in v1.4.130

type DMSprite struct {
	Tag           string
	DefinitionTag string
	Param         uint32
	// contains filtered or unexported fields
}

DMSprite is a declaration of DMSPRITEINSTANCE

func (*DMSprite) Definition added in v1.4.130

func (e *DMSprite) Definition() string

func (*DMSprite) Read added in v1.4.130

func (e *DMSprite) Read(r *AsciiReadToken) error

func (*DMSprite) ToRaw added in v1.4.139

func (e *DMSprite) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*DMSprite) Write added in v1.4.130

func (e *DMSprite) Write(w io.Writer) error

type DMSpriteDef added in v1.4.130

type DMSpriteDef struct {
	Tag            string
	Flags          uint32
	Fragment1Maybe int16
	Material       string
	Fragment3      uint32
	CenterPosition [3]float32
	Params2        uint32
	Something2     uint32
	Something3     uint32
	Verticies      [][3]float32
	TexCoords      [][3]float32
	Normals        [][3]float32
	Colors         []int32
	Polygons       []*DMSpriteDefSpritePolygon
	VertexPieces   []*DMSpriteDefVertexPiece
	PostVertexFlag uint32
	RenderGroups   []*DMSpriteDefRenderGroup
	VertexTex      [][2]float32
	Size6Pieces    []*DMSpriteDefSize6Entry
	// contains filtered or unexported fields
}

DMSpriteDef is a declaration of DMSPRITEDEF

func (*DMSpriteDef) Definition added in v1.4.139

func (e *DMSpriteDef) Definition() string

func (*DMSpriteDef) Read added in v1.4.139

func (e *DMSpriteDef) Read(r *AsciiReadToken) error

func (*DMSpriteDef) ToRaw added in v1.4.139

func (e *DMSpriteDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*DMSpriteDef) Write added in v1.4.139

func (e *DMSpriteDef) Write(w io.Writer) error

type DMSpriteDef2 added in v1.4.116

type DMSpriteDef2 struct {
	Tag                  string
	Flags                uint32
	DmTrackTag           string
	Fragment3Ref         int32
	Fragment4Ref         int32
	Params2              [3]uint32
	MaxDistance          float32
	Min                  [3]float32
	Max                  [3]float32
	CenterOffset         [3]float32
	Vertices             [][3]float32
	UVs                  [][2]float32
	VertexNormals        [][3]float32
	VertexColors         [][4]uint8
	SkinAssignmentGroups [][2]uint16
	MaterialPaletteTag   string
	Faces                []*Face
	MeshOps              []*MeshOp
	FaceMaterialGroups   [][2]uint16
	VertexMaterialGroups [][2]int16
	BoundingRadius       float32
	FPScale              uint16
	PolyhedronTag        string
	// contains filtered or unexported fields
}

DMSpriteDef2 is a declaration of DMSpriteDef2

func (*DMSpriteDef2) Definition added in v1.4.120

func (e *DMSpriteDef2) Definition() string

func (*DMSpriteDef2) Read added in v1.4.120

func (e *DMSpriteDef2) Read(r *AsciiReadToken) error

func (*DMSpriteDef2) ToRaw added in v1.4.138

func (e *DMSpriteDef2) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*DMSpriteDef2) Write added in v1.4.120

func (e *DMSpriteDef2) Write(w io.Writer) error

type DMSpriteDefRenderGroup added in v1.4.130

type DMSpriteDefRenderGroup struct {
	PolygonCount int16
	MaterialId   int16
}

type DMSpriteDefSize6Entry added in v1.4.130

type DMSpriteDefSize6Entry struct {
	Unk1 uint32
	Unk2 uint32
	Unk3 uint32
	Unk4 uint32
	Unk5 uint32
}

type DMSpriteDefSpritePolygon added in v1.4.130

type DMSpriteDefSpritePolygon struct {
	Flag int16
	Unk1 int16
	Unk2 int16
	Unk3 int16
	Unk4 int16
	I1   int16
	I2   int16
	I3   int16
}

type DMSpriteDefVertexPiece added in v1.4.130

type DMSpriteDefVertexPiece struct {
	Count  int16
	Offset int16
}

type Dag added in v1.4.123

type Dag struct {
	Tag       string
	Track     string
	SubDags   []uint32
	SpriteTag string
}

type Face added in v1.4.116

type Face struct {
	Flags    uint16
	Triangle [3]uint16
}

type GlobalAmbientLightDef added in v1.4.145

type GlobalAmbientLightDef struct {
	Tag string
	// contains filtered or unexported fields
}

GlobalAmbientLightDef is a declaration of GLOBALAMBIENTLIGHTDEF

func (*GlobalAmbientLightDef) Definition added in v1.4.145

func (e *GlobalAmbientLightDef) Definition() string

func (*GlobalAmbientLightDef) Read added in v1.4.145

func (*GlobalAmbientLightDef) ToRaw added in v1.4.145

func (e *GlobalAmbientLightDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*GlobalAmbientLightDef) Write added in v1.4.145

func (e *GlobalAmbientLightDef) Write(w io.Writer) error

type HierarchicalSpriteDef added in v1.4.123

type HierarchicalSpriteDef struct {
	Tag                string
	Dags               []Dag
	AttachedSkins      []AttachedSkin
	CenterOffset       NullFloat32Slice3
	BoundingRadius     NullFloat32
	CollisionVolumeTag string
	// contains filtered or unexported fields
}

func (*HierarchicalSpriteDef) Definition added in v1.4.123

func (e *HierarchicalSpriteDef) Definition() string

func (*HierarchicalSpriteDef) Read added in v1.4.123

func (*HierarchicalSpriteDef) ToRaw added in v1.4.139

func (e *HierarchicalSpriteDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*HierarchicalSpriteDef) Write added in v1.4.123

func (e *HierarchicalSpriteDef) Write(w io.Writer) error

type LightDef added in v1.4.118

type LightDef struct {
	Tag          string
	Flags        uint32
	CurrentFrame NullUint32
	Sleep        NullUint32
	LightLevels  []float32
	Colors       [][3]float32
	// contains filtered or unexported fields
}

LightDef is a declaration of LIGHTDEF

func (*LightDef) Definition added in v1.4.125

func (e *LightDef) Definition() string

func (*LightDef) Read added in v1.4.125

func (e *LightDef) Read(r *AsciiReadToken) error

func (*LightDef) ToRaw added in v1.4.138

func (e *LightDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*LightDef) Write added in v1.4.125

func (e *LightDef) Write(w io.Writer) error

type MaterialDef added in v1.4.116

type MaterialDef struct {
	Tag             string   // TAG %s
	RenderMethod    string   // RENDERMETHOD %s
	RGBPen          [4]uint8 // RGBPEN %d %d %d
	Brightness      float32  // BRIGHTNESS %0.7e
	ScaledAmbient   float32  // SCALEDAMBIENT %0.7e
	SimpleSpriteTag string   // SIMPLESPRITEINST
	Pair1           NullUint32
	Pair2           NullFloat32
	// contains filtered or unexported fields
}

MaterialDef is an entry MATERIALDEFINITION

func (*MaterialDef) Definition added in v1.4.121

func (e *MaterialDef) Definition() string

func (*MaterialDef) Read added in v1.4.121

func (e *MaterialDef) Read(r *AsciiReadToken) error

func (*MaterialDef) ToRaw added in v1.4.138

func (e *MaterialDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*MaterialDef) Write added in v1.4.121

func (e *MaterialDef) Write(w io.Writer) error

type MaterialPalette added in v1.4.116

type MaterialPalette struct {
	Tag string

	Materials []string
	// contains filtered or unexported fields
}

MaterialPalette is a declaration of MATERIALPALETTE

func (*MaterialPalette) Definition added in v1.4.120

func (e *MaterialPalette) Definition() string

func (*MaterialPalette) Read added in v1.4.120

func (e *MaterialPalette) Read(r *AsciiReadToken) error

func (*MaterialPalette) ToRaw added in v1.4.138

func (e *MaterialPalette) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*MaterialPalette) Write added in v1.4.120

func (e *MaterialPalette) Write(w io.Writer) error

type MeshOp added in v1.4.116

type MeshOp struct {
	Index1    uint16
	Index2    uint16
	Offset    float32
	Param1    uint8
	TypeField uint8
}

type NullFloat32 added in v1.4.145

type NullFloat32 struct {
	Float32 float32
	Valid   bool
}

type NullFloat32Slice3 added in v1.4.145

type NullFloat32Slice3 struct {
	Float32Slice3 [3]float32
	Valid         bool
}

type NullFloat32Slice4 added in v1.4.147

type NullFloat32Slice4 struct {
	Float32Slice4 [4]float32
	Valid         bool
}

type NullFloat32Slice6 added in v1.4.145

type NullFloat32Slice6 struct {
	Float32Slice6 [6]float32
	Valid         bool
}

type NullFloat64 added in v1.4.145

type NullFloat64 sql.NullFloat64

type NullInt16 added in v1.4.145

type NullInt16 sql.NullInt16

type NullInt32 added in v1.4.145

type NullInt32 sql.NullInt32

type NullInt64 added in v1.4.145

type NullInt64 sql.NullInt64

type NullInt8 added in v1.4.145

type NullInt8 struct {
	Int8  int8
	Valid bool
}

type NullString added in v1.4.145

type NullString sql.NullString

type NullUint16 added in v1.4.145

type NullUint16 struct {
	Uint16 uint16
	Valid  bool
}

type NullUint32 added in v1.4.145

type NullUint32 struct {
	Uint32 uint32
	Valid  bool
}

type NullUint64 added in v1.4.145

type NullUint64 struct {
	Uint64 uint64
	Valid  bool
}

type NullUint8 added in v1.4.145

type NullUint8 struct {
	Uint8 uint8
	Valid bool
}

type Obstacle added in v1.4.128

type Obstacle struct {
	Normal   [4]float32
	Vertices [][3]float32
}

type PointLight added in v1.4.118

type PointLight struct {
	Tag        string
	LightFlags uint32
	LightTag   string
	Flags      uint32
	Location   [3]float32
	Radius     float32
	// contains filtered or unexported fields
}

PointLight is a declaration of POINTLIGHT

func (*PointLight) Definition added in v1.4.125

func (e *PointLight) Definition() string

func (*PointLight) Read added in v1.4.125

func (e *PointLight) Read(r *AsciiReadToken) error

func (*PointLight) ToRaw added in v1.4.139

func (e *PointLight) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*PointLight) Write added in v1.4.125

func (e *PointLight) Write(w io.Writer) error

type PolyhedronDefinition added in v1.4.120

type PolyhedronDefinition struct {
	Tag            string
	Flags          uint32
	BoundingRadius float32
	ScaleFactor    float32
	Vertices       [][3]float32
	Faces          []*PolyhedronDefinitionFace
	// contains filtered or unexported fields
}

func (*PolyhedronDefinition) Definition added in v1.4.120

func (e *PolyhedronDefinition) Definition() string

func (*PolyhedronDefinition) Read added in v1.4.120

func (*PolyhedronDefinition) ToRaw added in v1.4.139

func (e *PolyhedronDefinition) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*PolyhedronDefinition) Write added in v1.4.120

func (e *PolyhedronDefinition) Write(w io.Writer) error

type PolyhedronDefinitionFace added in v1.4.120

type PolyhedronDefinitionFace struct {
	Vertices []uint32
}

type PropOpt added in v1.4.129

type PropOpt struct {
	Name string
	Min  int
}

type RGBTrack added in v1.4.133

type RGBTrack struct {
	Tag           string
	DefinitionTag string
	Flags         uint32
	// contains filtered or unexported fields
}

RGBTrack is a track instance for RGB deformation tracks

func (*RGBTrack) Definition added in v1.4.133

func (e *RGBTrack) Definition() string

func (*RGBTrack) Read added in v1.4.133

func (e *RGBTrack) Read(token *AsciiReadToken) error

func (*RGBTrack) ToRaw added in v1.4.139

func (e *RGBTrack) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*RGBTrack) Write added in v1.4.133

func (e *RGBTrack) Write(w io.Writer) error

type RGBTrackDef added in v1.4.133

type RGBTrackDef struct {
	Tag   string
	Data1 uint32
	Data2 uint32
	Data4 uint32
	Sleep uint32
	RGBAs [][4]uint8
	// contains filtered or unexported fields
}

func (*RGBTrackDef) Definition added in v1.4.133

func (e *RGBTrackDef) Definition() string

func (*RGBTrackDef) Read added in v1.4.133

func (e *RGBTrackDef) Read(token *AsciiReadToken) error

func (*RGBTrackDef) ToRaw added in v1.4.138

func (e *RGBTrackDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*RGBTrackDef) Write added in v1.4.133

func (e *RGBTrackDef) Write(w io.Writer) error

type Region added in v1.4.113

type Region struct {
	Tag               string
	RegionFog         int
	Gouraud2          int
	EncodedVisibility int
	VisListBytes      int
	AmbientLightTag   string
	RegionVertices    [][3]float32
	RenderVertices    [][3]float32
	Walls             []*Wall
	Obstacles         []*Obstacle
	CuttingObstacles  []*Obstacle
	VisTree           *VisTree
	Sphere            [4]float32
	ReverbVolume      float32
	ReverbOffset      int32
	UserData          string
	SpriteTag         string
	// contains filtered or unexported fields
}

func (*Region) Definition added in v1.4.128

func (e *Region) Definition() string

func (*Region) Read added in v1.4.128

func (e *Region) Read(token *AsciiReadToken) error

func (*Region) ToRaw added in v1.4.138

func (e *Region) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*Region) Write added in v1.4.128

func (e *Region) Write(w io.Writer) error

type SimpleSpriteDef added in v1.4.116

type SimpleSpriteDef struct {
	Tag                string
	SkipFrames         NullUint32
	Sleep              NullUint32
	CurrentFrame       NullInt32
	Animated           NullUint32
	SimpleSpriteFrames []SimpleSpriteFrame
	// contains filtered or unexported fields
}

SimpleSpriteDef is a declaration of SIMPLESPRITEDEF

func (*SimpleSpriteDef) Definition added in v1.4.121

func (e *SimpleSpriteDef) Definition() string

func (*SimpleSpriteDef) Read added in v1.4.121

func (e *SimpleSpriteDef) Read(r *AsciiReadToken) error

func (*SimpleSpriteDef) ToRaw added in v1.4.138

func (e *SimpleSpriteDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*SimpleSpriteDef) Write added in v1.4.121

func (e *SimpleSpriteDef) Write(w io.Writer) error

type SimpleSpriteFrame added in v1.4.129

type SimpleSpriteFrame struct {
	TextureFile string
	TextureTag  string
}

type Sprite3DDef added in v1.4.118

type Sprite3DDef struct {
	Tag            string
	CenterOffset   NullFloat32Slice3
	BoundingRadius NullFloat32
	SphereListTag  string
	Vertices       [][3]float32
	BSPNodes       []*BSPNode
	// contains filtered or unexported fields
}

Sprite3DDef is a declaration of SPRITE3DDEF

func (*Sprite3DDef) Definition added in v1.4.125

func (e *Sprite3DDef) Definition() string

func (*Sprite3DDef) Read added in v1.4.125

func (s *Sprite3DDef) Read(r *AsciiReadToken) error

func (*Sprite3DDef) ToRaw added in v1.4.138

func (e *Sprite3DDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*Sprite3DDef) Write added in v1.4.125

func (e *Sprite3DDef) Write(w io.Writer) error

type TrackDef added in v1.4.120

type TrackDef struct {
	Tag             string
	FrameTransforms []TrackFrameTransform
	// contains filtered or unexported fields
}

func (*TrackDef) Definition added in v1.4.120

func (e *TrackDef) Definition() string

func (*TrackDef) Read added in v1.4.120

func (e *TrackDef) Read(r *AsciiReadToken) error

func (*TrackDef) ToRaw added in v1.4.139

func (e *TrackDef) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*TrackDef) Write added in v1.4.120

func (e *TrackDef) Write(w io.Writer) error

type TrackFrameTransform added in v1.4.120

type TrackFrameTransform struct {
	XYZScale       int16
	XYZ            [3]float32
	RotScale       NullInt16
	Rotation       NullFloat32Slice3
	LegacyRotation NullFloat32Slice4
}

type TrackInstance added in v1.4.120

type TrackInstance struct {
	Tag           string
	DefinitionTag string
	Interpolate   int
	Reverse       int
	Sleep         NullUint32
	// contains filtered or unexported fields
}

func (*TrackInstance) Definition added in v1.4.120

func (e *TrackInstance) Definition() string

func (*TrackInstance) Read added in v1.4.120

func (e *TrackInstance) Read(r *AsciiReadToken) error

func (*TrackInstance) ToRaw added in v1.4.139

func (e *TrackInstance) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*TrackInstance) Write added in v1.4.120

func (e *TrackInstance) Write(w io.Writer) error

type VisList added in v1.4.128

type VisList struct {
	Ranges []int8
}

type VisNode added in v1.4.128

type VisNode struct {
	Normal       [4]float32
	VisListIndex uint32
	FrontTree    uint32
	BackTree     uint32
}

type VisTree added in v1.4.128

type VisTree struct {
	VisNodes []*VisNode
	VisLists []*VisList
}

type Wall added in v1.4.128

type Wall struct {
	Normal   [4]float32
	Vertices [][3]float32
}

type Wld

type Wld struct {
	FileName               string
	GlobalAmbientLight     *GlobalAmbientLightDef
	Version                uint32
	SimpleSpriteDefs       []*SimpleSpriteDef
	MaterialDefs           []*MaterialDef
	MaterialPalettes       []*MaterialPalette
	DMSpriteDefs           []*DMSpriteDef
	DMSpriteInsts          []*DMSprite
	DMSpriteDef2s          []*DMSpriteDef2
	ActorDefs              []*ActorDef
	ActorInsts             []*ActorInst
	LightDefs              []*LightDef
	PointLights            []*PointLight
	Sprite3DDefs           []*Sprite3DDef
	TrackInstances         []*TrackInstance
	TrackDefs              []*TrackDef
	HierarchicalSpriteDefs []*HierarchicalSpriteDef
	PolyhedronDefs         []*PolyhedronDefinition
	WorldTrees             []*WorldTree
	Regions                []*Region
	AmbientLights          []*AmbientLight
	Zones                  []*Zone
	RGBTrackDefs           []*RGBTrackDef
	RGBTrackInsts          []*RGBTrack
	// contains filtered or unexported fields
}

Wld is a struct representing a Wld file

func (*Wld) ByTag added in v1.4.138

func (wld *Wld) ByTag(tag string) WldDefinitioner

ByTag returns a instance by tag

func (*Wld) ReadAscii added in v1.4.120

func (wld *Wld) ReadAscii(path string) error

ReadAscii reads the ascii file at path

func (*Wld) ReadRaw added in v1.4.130

func (wld *Wld) ReadRaw(src *raw.Wld) error

func (*Wld) WriteAscii added in v1.4.113

func (wld *Wld) WriteAscii(path string, isDir bool) error

func (*Wld) WriteRaw added in v1.4.131

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

type WldDefinitioner added in v1.4.138

type WldDefinitioner interface {
	Definition() string
	ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)
}

type WorldNode added in v1.4.128

type WorldNode struct {
	Normals        [4]float32
	WorldRegionTag string
	FrontTree      uint32
	BackTree       uint32
	Distance       float32
}

type WorldTree added in v1.4.128

type WorldTree struct {
	Tag        string
	WorldNodes []*WorldNode
	// contains filtered or unexported fields
}

func (*WorldTree) Definition added in v1.4.128

func (e *WorldTree) Definition() string

func (*WorldTree) Read added in v1.4.128

func (e *WorldTree) Read(r *AsciiReadToken) error

func (*WorldTree) ToRaw added in v1.4.138

func (e *WorldTree) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*WorldTree) Write added in v1.4.128

func (e *WorldTree) Write(w io.Writer) error

type Zone added in v1.4.128

type Zone struct {
	Tag      string
	Regions  []uint32
	UserData string
	// contains filtered or unexported fields
}

func (*Zone) Definition added in v1.4.128

func (e *Zone) Definition() string

func (*Zone) Read added in v1.4.128

func (e *Zone) Read(r *AsciiReadToken) error

func (*Zone) ToRaw added in v1.4.139

func (e *Zone) ToRaw(srcWld *Wld, dst *raw.Wld) (int16, error)

func (*Zone) Write added in v1.4.128

func (e *Zone) Write(w io.Writer) error

Jump to

Keyboard shortcuts

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