rawfrag

package
v1.4.183 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FragCodeDefault               = 0x00 // 0
	FragCodeDefaultPaletteFile    = 0x01 // 1
	FragCodeUserData              = 0x02 // 2
	FragCodeBMInfo                = 0x03 // 3 BMINFO (property of SIMPLESPRITEDEFINITION)
	FragCodeSimpleSpriteDef       = 0x04 // 4 SIMPLESPRITEDEF
	FragCodeSimpleSprite          = 0x05 // 5 SIMPLESPRITE (property of BLITSPRITEDEFINITION, MATERIALDEFINITION)
	FragCodeSprite2DDef           = 0x06 // 6
	FragCodeSprite2D              = 0x07 // 7
	FragCodeSprite3DDef           = 0x08 // 8 SPRITE3DDEF
	FragCodeSprite3D              = 0x09 // 9 3DSPRITE (property of ACTORDEF)
	FragCodeSprite4DDef           = 0x0A // 10
	FragCodeSprite4D              = 0x0B // 11
	FragCodeParticleSpriteDef     = 0x0C // 12 PARTICLESPRITEDEF
	FragCodeParticleSprite        = 0x0D // 13
	FragCodeCompositeSpriteDef    = 0x0E // 14
	FragCodeCompositeSprite       = 0x0F // 15
	FragCodeHierarchicalSpriteDef = 0x10 // 16 HIERARCHICALSPRITEDEF
	FragCodeHierarchicalSprite    = 0x11 // 17
	FragCodeTrackDef              = 0x12 // 18 TRACKDEFINITION
	FragCodeTrack                 = 0x13 // 19 TRACKINSTANCE
	FragCodeActorDef              = 0x14 // 20 ACTORDEF
	FragCodeActor                 = 0x15 // 21 ACTORINST
	FragCodeSphere                = 0x16 // 22 SPHERE (may be child of region?)
	FragCodePolyhedronDef         = 0x17 // 23 POLYHEDRONDEFINITION
	FragCodePolyhedron            = 0x18 // 24
	FragCodeSphereListDef         = 0x19 // 25
	FragCodeSphereList            = 0x1A // 26
	FragCodeLightDef              = 0x1B // 27 LIGHTDEFINITION
	FragCodeLight                 = 0x1C // 28
	FragCodePointLightOld         = 0x1D // 29
	FragCodePointLightOldDef      = 0x1E // 30
	FragCodeSound                 = 0x1F // 31
	FragCodeSoundDef              = 0x20 // 32
	FragCodeWorldTree             = 0x21 // 33 WORLDTREE
	FragCodeRegion                = 0x22 // 34 REGION
	FragCodeActiveGeoRegion       = 0x23 // 35
	FragCodeSkyRegion             = 0x24 // 36
	FragCodeDirectionalLightOld   = 0x25 // 37
	FragCodeBlitSpriteDef         = 0x26 // 38 BLITSPRITEDEFINITION
	FragCodeBlitSprite            = 0x27 // 39
	FragCodePointLight            = 0x28 // 40 POINTLIGHT
	FragCodeZone                  = 0x29 // 41 ZONE
	FragCodeAmbientLight          = 0x2A // 42 AMBIENTLIGHT
	FragCodeDirectionalLight      = 0x2B // 43
	FragCodeDMSpriteDef           = 0x2C // 44
	FragCodeDMSprite              = 0x2D // 45 DMSPRITE (property of HIERARCHICALSPRITEDEF)
	FragCodeDMTrackDef            = 0x2E // 46 TRACKDEFINITION
	FragCodeDMTrack               = 0x2F // 47 TRACKINSTANCE
	FragCodeMaterialDef           = 0x30 // 48 MATERIALDEFINITION
	FragCodeMaterialPalette       = 0x31 // 49 MATERIALPALETTE
	FragCodeDmRGBTrackDef         = 0x32 // 50
	FragCodeDmRGBTrack            = 0x33 // 51
	FragCodeParticleCloudDef      = 0x34 // 52
	FragCodeGlobalAmbientLightDef = 0x35 // 53
	FragCodeDmSpriteDef2          = 0x36 // 54 DMSPRITEDEF2
	FragCodeDmTrackDef2           = 0x37 // 55
)

Variables

This section is empty.

Functions

func FragIndex

func FragIndex(name string) int

FragIndex returns the index of a fragment

func FragName

func FragName(fragCode int) string

FragName returns the name of a fragment

func NewFrag

NewFrag takes a reader, analyzes the first 4 bytes, and returns a new fragment struct based on it

Types

type Obstacle

type Obstacle struct {
	Flags      uint32
	NextRegion int32
	Type       int32
	Vertices   []uint32
	NormalABCD [4]float32
	EdgeWall   uint32
	UserData   string
}

type RenderInfo added in v1.4.145

type RenderInfo struct {
	Method                uint32
	Flags                 uint8
	Pen                   uint32
	Brightness            float32
	ScaledAmbient         float32
	SimpleSpriteReference uint32
	UVInfoOrigin          [3]float32
	UVInfoUAxis           [3]float32
	UVInfoVAxis           [3]float32
	Uvs                   [][2]float32
}

func (*RenderInfo) Write added in v1.4.145

func (e *RenderInfo) Write(enc *encdec.Encoder) error

type VisList

type VisList struct {
	Ranges []byte
}

type VisNode

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

type Wall

type Wall struct {
	Flags                       uint32       `yaml:"flags"`
	VertexCount                 uint32       `yaml:"vertex_count"`
	RenderMethod                uint32       `yaml:"render_method"`
	RenderFlags                 uint32       `yaml:"render_flags"`
	RenderPen                   uint32       `yaml:"render_pen"`
	RenderBrightness            float32      `yaml:"render_brightness"`
	RenderScaledAmbient         float32      `yaml:"render_scaled_ambient"`
	RenderSimpleSpriteReference uint32       `yaml:"render_simple_sprite_reference"`
	RenderUVInfoOrigin          [3]float32   `yaml:"render_uv_info_origin"`
	RenderUVInfoUAxis           [3]float32   `yaml:"render_uv_info_u_axis"`
	RenderUVInfoVAxis           [3]float32   `yaml:"render_uv_info_v_axis"`
	RenderUVMapEntryCount       uint32       `yaml:"render_uv_map_entry_count"`
	RenderUVMapEntries          [][2]float32 `yaml:"render_uv_map_entries"`
	Normal                      [4]float32   `yaml:"normal"`
	Vertices                    []uint32     `yaml:"vertices"`
}

type WldFragActiveGeoRegion

type WldFragActiveGeoRegion struct {
}

WldFragActiveGeoRegion is empty in libeq, empty in openzone, ACTIVEGEOMETRYREGION in wld

func (*WldFragActiveGeoRegion) FragCode

func (e *WldFragActiveGeoRegion) FragCode() int

func (*WldFragActiveGeoRegion) Read

func (e *WldFragActiveGeoRegion) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragActiveGeoRegion) Write

func (e *WldFragActiveGeoRegion) Write(w io.Writer, isNewWorld bool) error

type WldFragActor

type WldFragActor struct {
	NameRef        int32
	ActorDefRef    int32
	Flags          uint32
	SphereRef      uint32
	CurrentAction  uint32
	Location       [6]float32
	Unk1           uint32
	BoundingRadius float32
	ScaleFactor    float32
	SoundNameRef   int32
	DMRGBTrackRef  int32
	UserData       string
}

WldFragActor is Actor in libeq, Object Location in openzone, ACTORINST in wld, ObjectInstance in lantern

func (*WldFragActor) FragCode

func (e *WldFragActor) FragCode() int

func (*WldFragActor) Read

func (e *WldFragActor) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragActor) Write

func (e *WldFragActor) Write(w io.Writer, isNewWorld bool) error

type WldFragActorDef

type WldFragActorDef struct {
	NameRef         int32 `yaml:"name_ref"`
	Flags           uint32
	CallbackNameRef int32  `yaml:"callback_name_ref"`
	BoundsRef       int32  // ref to sphere, spherelist or polyhedron
	CurrentAction   uint32 `yaml:"current_action"`
	Location        [6]float32
	Unk1            uint32               `yaml:"unk1"`
	Actions         []WldFragModelAction `yaml:"actions"`
	FragmentRefs    []uint32             `yaml:"fragment_refs"`
	Unk2            uint32               `yaml:"unk2"`
}

WldFragActorDef is ActorDef in libeq, Static in openzone, ACTORDEF in wld

func (*WldFragActorDef) FragCode

func (e *WldFragActorDef) FragCode() int

func (*WldFragActorDef) Read

func (e *WldFragActorDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragActorDef) Write

func (e *WldFragActorDef) Write(w io.Writer, isNewWorld bool) error

type WldFragAmbientLight

type WldFragAmbientLight struct {
	NameRef  int32    `yaml:"name_ref"`
	LightRef int32    `yaml:"light_ref"`
	Flags    uint32   `yaml:"flags"`
	Regions  []uint32 `yaml:"regions"`
}

WldFragAmbientLight is AmbientLight in libeq, Ambient Light in openzone, AMBIENTLIGHT in wld, WldFragAmbientLight in lantern

func (*WldFragAmbientLight) FragCode

func (e *WldFragAmbientLight) FragCode() int

func (*WldFragAmbientLight) Read

func (e *WldFragAmbientLight) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragAmbientLight) Write

func (e *WldFragAmbientLight) Write(w io.Writer, isNewWorld bool) error

type WldFragBMInfo

type WldFragBMInfo struct {
	NameRef      int32    `yaml:"name_ref"`
	TextureNames []string `yaml:"texture_names"`
}

WldFragBMInfo is BmInfo in libeq, Texture Bitmap Names in openzone, FRAME and BMINFO in wld, BitmapName in lantern

func (*WldFragBMInfo) FragCode

func (e *WldFragBMInfo) FragCode() int

func (*WldFragBMInfo) Read

func (e *WldFragBMInfo) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragBMInfo) Write

func (e *WldFragBMInfo) Write(w io.Writer, isNewWorld bool) error

type WldFragBlitSprite

type WldFragBlitSprite struct {
	NameRef       int32
	BlitSpriteRef int32
	Unknown       int32
}

WldFragBlitSprite is BlitSprite in libeq, empty in openzone, BLITSPRITE (ref) in wld, ParticleSpriteReference in lantern

func (*WldFragBlitSprite) FragCode

func (e *WldFragBlitSprite) FragCode() int

func (*WldFragBlitSprite) Read

func (e *WldFragBlitSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragBlitSprite) Write

func (e *WldFragBlitSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragBlitSpriteDef

type WldFragBlitSpriteDef struct {
	NameRef           int32  `yaml:"name_ref"`
	Flags             uint32 `yaml:"flags"`
	SpriteInstanceRef uint32 `yaml:"sprite_instance_ref"`
	Unknown           int32  `yaml:"unknown"`
}

WldFragBlitSpriteDef is BlitSprite in libeq, empty in openzone, BLITSPRITE (ref) in wld, ParticleSprite in lantern

func (*WldFragBlitSpriteDef) FragCode

func (e *WldFragBlitSpriteDef) FragCode() int

func (*WldFragBlitSpriteDef) Read

func (e *WldFragBlitSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragBlitSpriteDef) Write

func (e *WldFragBlitSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragCompositeSprite

type WldFragCompositeSprite struct {
	NameRef               int32  `yaml:"name_ref"`
	CompositeSpriteDefRef int32  `yaml:"composite_sprite_def_ref"`
	Flags                 uint32 `yaml:"flags"`
}

WldFragCompositeSprite is empty in libeq, empty in openzone, COMPOSITESPRITE (ref) in wld

func (*WldFragCompositeSprite) FragCode

func (e *WldFragCompositeSprite) FragCode() int

func (*WldFragCompositeSprite) Read

func (e *WldFragCompositeSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragCompositeSprite) Write

func (e *WldFragCompositeSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragCompositeSpriteDef

type WldFragCompositeSpriteDef struct {
	NameRef int32  `yaml:"name_ref"`
	Flags   uint32 `yaml:"flags"`
}

WldFragCompositeSpriteDef is empty in libeq, empty in openzone, COMPOSITESPRITEDEF in wld, Actor in lantern

func (*WldFragCompositeSpriteDef) FragCode

func (e *WldFragCompositeSpriteDef) FragCode() int

func (*WldFragCompositeSpriteDef) Read

func (e *WldFragCompositeSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragCompositeSpriteDef) Write

func (e *WldFragCompositeSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragDMSprite

type WldFragDMSprite struct {
	NameRef     int32  `yaml:"name_ref"`
	DMSpriteRef int32  `yaml:"dm_sprite_ref"`
	Params      uint32 `yaml:"params"`
}

WldFragDMSprite is DmSprite in libeq, Mesh Reference in openzone, empty in wld, MeshReference in lantern

func (*WldFragDMSprite) FragCode

func (e *WldFragDMSprite) FragCode() int

func (*WldFragDMSprite) Read

func (e *WldFragDMSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDMSprite) Write

func (e *WldFragDMSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragDMSpriteDef

type WldFragDMSpriteDef struct {
	NameRef              int32
	Flags                uint32
	Fragment1            int16
	MaterialPaletteRef   uint32
	Fragment3            uint32
	Center               [3]float32
	Params1              [3]float32
	Vertices             [][3]float32
	TexCoords            [][2]float32
	Normals              [][3]float32
	Colors               []int32
	Faces                []WldFragDMSpriteDefFace
	Meshops              []WldFragDMSpriteDefMeshOp
	SkinAssignmentGroups [][2]uint16
	Data8                []uint32
	FaceMaterialGroups   [][2]int16
	VertexMaterialGroups [][2]int16
	Params2              [3]float32
	Params3              [6]float32
}

WldFragDMSpriteDef is DmSpriteDef in libeq, Alternate Mesh in openzone, DMSPRITEDEF in wld, LegacyMesh in lantern

func (*WldFragDMSpriteDef) FragCode

func (e *WldFragDMSpriteDef) FragCode() int

func (*WldFragDMSpriteDef) Read

func (e *WldFragDMSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDMSpriteDef) Write

func (e *WldFragDMSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragDMSpriteDefFace added in v1.4.163

type WldFragDMSpriteDefFace struct {
	Flags         uint16
	Data          [4]uint16
	VertexIndexes [3]uint16
}

type WldFragDMSpriteDefMeshOp added in v1.4.163

type WldFragDMSpriteDefMeshOp struct {
	TypeField   uint32
	VertexIndex uint32
	Offset      float32
	Param1      uint16
	Param2      uint16
}

type WldFragDMTrack

type WldFragDMTrack struct {
}

WldFragDMTrack is DmTrack in libeq, Mesh Animated Vertices Reference in openzone, empty in wld, MeshAnimatedVerticesReference in lantern

func (*WldFragDMTrack) FragCode

func (e *WldFragDMTrack) FragCode() int

func (*WldFragDMTrack) Read

func (e *WldFragDMTrack) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDMTrack) Write

func (e *WldFragDMTrack) Write(w io.Writer, isNewWorld bool) error

type WldFragDMTrackDef

type WldFragDMTrackDef struct {
}

WldFragDMTrack is DmTrackDef in libeq, empty in openzone, empty in wld

func (*WldFragDMTrackDef) FragCode

func (e *WldFragDMTrackDef) FragCode() int

func (*WldFragDMTrackDef) Read

func (e *WldFragDMTrackDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDMTrackDef) Write

func (e *WldFragDMTrackDef) Write(w io.Writer, isNewWorld bool) error

type WldFragDag added in v1.4.130

type WldFragDag struct {
	NameRef                   int32    `yaml:"name_ref"`
	Flags                     uint32   `yaml:"flags"`
	TrackRef                  uint32   `yaml:"track_ref"`
	MeshOrSpriteOrParticleRef uint32   `yaml:"mesh_or_sprite_or_particle_ref"`
	SubDags                   []uint32 `yaml:"sub_bones"`
}

type WldFragDefault

type WldFragDefault struct {
}

WldFragDefault is empty in libeq, empty in openzone, DEFAULT?? in wld

func (*WldFragDefault) FragCode

func (e *WldFragDefault) FragCode() int

func (*WldFragDefault) Read

func (e *WldFragDefault) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDefault) Write

func (e *WldFragDefault) Write(w io.Writer, isNewWorld bool) error

type WldFragDefaultPaletteFile

type WldFragDefaultPaletteFile struct {
	NameRef    int32  `yaml:"name_ref"`
	NameLength uint16 `yaml:"name_length"`
	FileName   string `yaml:"file_name"`
}

WldFragDefaultPaletteFile is DefaultPaletteFile in libeq, empty in openzone, DEFAULTPALETTEFILE in wld

func (*WldFragDefaultPaletteFile) FragCode

func (e *WldFragDefaultPaletteFile) FragCode() int

func (*WldFragDefaultPaletteFile) Read

func (e *WldFragDefaultPaletteFile) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDefaultPaletteFile) Write

func (e *WldFragDefaultPaletteFile) Write(w io.Writer, isNewWorld bool) error

type WldFragDirectionalLight

type WldFragDirectionalLight struct {
}

WldFragDirectionalLight is DirectionalLight in libeq, empty in openzone, DIRECTIONALLIGHT in wld

func (*WldFragDirectionalLight) FragCode

func (e *WldFragDirectionalLight) FragCode() int

func (*WldFragDirectionalLight) Read

func (e *WldFragDirectionalLight) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDirectionalLight) Write

func (e *WldFragDirectionalLight) Write(w io.Writer, isNewWorld bool) error

type WldFragDirectionalLightOld

type WldFragDirectionalLightOld struct {
}

DirectionalLigtOld is empty in libeq, empty in openzone, DIRECTIONALLIGHT in wld

func (*WldFragDirectionalLightOld) FragCode

func (e *WldFragDirectionalLightOld) FragCode() int

func (*WldFragDirectionalLightOld) Read

func (e *WldFragDirectionalLightOld) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDirectionalLightOld) Write

func (e *WldFragDirectionalLightOld) Write(w io.Writer, isNewWorld bool) error

type WldFragDmRGBTrack

type WldFragDmRGBTrack struct {
	NameRef  int32
	TrackRef int32
	Flags    uint32
}

WldFragDmRGBTrack is DmRGBTrack in libeq, Vertex Color Reference in openzone, empty in wld, VertexColorsReference in lantern

func (*WldFragDmRGBTrack) FragCode

func (e *WldFragDmRGBTrack) FragCode() int

func (*WldFragDmRGBTrack) Read

func (e *WldFragDmRGBTrack) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDmRGBTrack) Write

func (e *WldFragDmRGBTrack) Write(w io.Writer, isNewWorld bool) error

type WldFragDmRGBTrackDef

type WldFragDmRGBTrackDef struct {
	NameRef int32
	Data1   uint32 // usually contains 1
	Data2   uint32 // usually contains 1
	Sleep   uint32 // usually contains 200
	Data4   uint32 // usually contains 0
	RGBAs   [][4]uint8
}

WldFragDmRGBTrackDef is a list of colors, one per vertex, for baked lighting. It is DmRGBTrackDef in libeq, Vertex Color in openzone, empty in wld, VertexColors in lantern

func (*WldFragDmRGBTrackDef) FragCode

func (e *WldFragDmRGBTrackDef) FragCode() int

func (*WldFragDmRGBTrackDef) Read

func (e *WldFragDmRGBTrackDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDmRGBTrackDef) Write

func (e *WldFragDmRGBTrackDef) Write(w io.Writer, isNewWorld bool) error

type WldFragDmSpriteDef2

type WldFragDmSpriteDef2 struct {
	NameRef              int32
	Flags                uint32
	MaterialPaletteRef   uint32
	DMTrackRef           int32 // only used for flags/trees
	Fragment3Ref         int32
	Fragment4Ref         int32 // unknown, usually ref to first texture
	CenterOffset         [3]float32
	Params2              [3]uint32
	BoundingRadius       float32 // AKA max_distance in libeq
	BoundingBoxMin       [3]float32
	BoundingBoxMax       [3]float32
	Scale                uint16
	Vertices             [][3]int16
	UVs                  [][2]float32
	VertexNormals        [][3]int8
	Colors               [][4]uint8
	Faces                []WldFragMeshFaceEntry
	FaceMaterialGroups   [][2]uint16
	SkinAssignmentGroups [][2]int16
	VertexMaterialGroups [][2]int16
	MeshOps              []WldFragMeshOpEntry
}

WldFragDmSpriteDef2 is DmSpriteDef2 in libeq, WldFragDmSpriteDef2 in openzone, DMSPRITEDEF2 in wld, WldFragDmSpriteDef2 in lantern

func (*WldFragDmSpriteDef2) FragCode

func (e *WldFragDmSpriteDef2) FragCode() int

func (*WldFragDmSpriteDef2) Read

func (e *WldFragDmSpriteDef2) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDmSpriteDef2) Write

func (e *WldFragDmSpriteDef2) Write(w io.Writer, isNewWorld bool) error

type WldFragDmTrackDef2

type WldFragDmTrackDef2 struct {
	NameRef     int32                     `yaml:"name_ref"`
	Flags       uint32                    `yaml:"flags"`
	VertexCount uint16                    `yaml:"vertex_count"`
	FrameCount  uint16                    `yaml:"frame_count"`
	Param1      uint16                    `yaml:"param_1"` // usually contains 100
	Param2      uint16                    `yaml:"param_2"` // usually contains 0
	Scale       uint16                    `yaml:"scale"`
	Frames      []WldFragMeshAnimatedBone `yaml:"frames"`
	Size6       uint32                    `yaml:"size_6"`
}

WldFragDmTrackDef2 is DmTrackDef2 in libeq, Mesh Animated Vertices in openzone, DMTRACKDEF in wld, MeshAnimatedVertices in lantern

func (*WldFragDmTrackDef2) FragCode

func (e *WldFragDmTrackDef2) FragCode() int

func (*WldFragDmTrackDef2) Read

func (e *WldFragDmTrackDef2) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragDmTrackDef2) Write

func (e *WldFragDmTrackDef2) Write(w io.Writer, isNewWorld bool) error

type WldFragGlobalAmbientLightDef

type WldFragGlobalAmbientLightDef struct {
	Color [4]uint8
}

WldFragGlobalAmbientLightDef is GlobalAmbientLightDef in libeq, WldFragGlobalAmbientLightDef Fragment in openzone, empty in wld, GlobalAmbientLight in lantern

func (*WldFragGlobalAmbientLightDef) FragCode

func (e *WldFragGlobalAmbientLightDef) FragCode() int

func (*WldFragGlobalAmbientLightDef) Read

func (e *WldFragGlobalAmbientLightDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragGlobalAmbientLightDef) Write

func (e *WldFragGlobalAmbientLightDef) Write(w io.Writer, isNewWorld bool) error

Read writes the fragment to the writer

type WldFragHierarchicalSprite added in v1.4.147

type WldFragHierarchicalSprite struct {
	NameRef               uint32
	HierarchicalSpriteRef uint32
	Param                 uint32
}

WldFragHierarchicalSprite is HierarchicalSprite in libeq, SkeletonTrackSetReference in openzone, HIERARCHICALSPRITE (ref) in wld, SkeletonHierarchyReference in lantern

func (*WldFragHierarchicalSprite) FragCode added in v1.4.147

func (e *WldFragHierarchicalSprite) FragCode() int

func (*WldFragHierarchicalSprite) Read added in v1.4.147

func (e *WldFragHierarchicalSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragHierarchicalSprite) Write added in v1.4.147

func (e *WldFragHierarchicalSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragHierarchicalSpriteDef added in v1.4.147

type WldFragHierarchicalSpriteDef struct {
	NameRef                     int32        `yaml:"name_ref"`
	Flags                       uint32       `yaml:"flags"`
	CollisionVolumeRef          uint32       `yaml:"collision_volume_ref"`
	CenterOffset                [3]float32   `yaml:"center_offset"`
	BoundingRadius              float32      `yaml:"bounding_radius"`
	Dags                        []WldFragDag `yaml:"bones"`
	DMSprites                   []uint32
	LinkSkinUpdatesToDagIndexes []uint32 `yaml:"skin_links"`
}

WldFragHierarchicalSpriteDef is HierarchicalSpriteDef in libeq, SkeletonTrackSet in openzone, HIERARCHICALSPRITE in wld, SkeletonHierarchy in lantern

func (*WldFragHierarchicalSpriteDef) FragCode added in v1.4.147

func (e *WldFragHierarchicalSpriteDef) FragCode() int

func (*WldFragHierarchicalSpriteDef) Read added in v1.4.147

func (e *WldFragHierarchicalSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragHierarchicalSpriteDef) Write added in v1.4.147

func (e *WldFragHierarchicalSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragLight

type WldFragLight struct {
	NameRef     int32  `yaml:"name_ref"`
	LightDefRef int32  `yaml:"light_def_ref"`
	Flags       uint32 `yaml:"flags"`
}

WldFragLight is Light in libeq, Light Source Reference in openzone, POINTLIGHTT ?? in wld, LightSourceReference in lantern

func (*WldFragLight) FragCode

func (e *WldFragLight) FragCode() int

func (*WldFragLight) Read

func (e *WldFragLight) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragLight) Write

func (e *WldFragLight) Write(w io.Writer, isNewWorld bool) error

type WldFragLightDef

type WldFragLightDef struct {
	NameRef         int32        `yaml:"name_ref"`
	Flags           uint32       `yaml:"flags"`
	FrameCurrentRef uint32       `yaml:"frame_current_ref"`
	Sleep           uint32       `yaml:"sleep"`
	LightLevels     []float32    `yaml:"light_levels"`
	Colors          [][3]float32 `yaml:"colors"`
}

WldFragLightDef is LightDef in libeq, WldFragLightDef Source in openzone, LIGHT (ref) in wld, LightSource in lantern

func (*WldFragLightDef) FragCode

func (e *WldFragLightDef) FragCode() int

func (*WldFragLightDef) Read

func (e *WldFragLightDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragLightDef) Write

func (e *WldFragLightDef) Write(w io.Writer, isNewWorld bool) error

type WldFragMaterialDef

type WldFragMaterialDef struct {
	NameRef         int32    `yaml:"name_ref"`
	Flags           uint32   `yaml:"flags"`
	RenderMethod    uint32   `yaml:"render_method"`
	RGBPen          [4]uint8 `yaml:"rgb_pen"`
	Brightness      float32  `yaml:"brightness"`
	ScaledAmbient   float32  `yaml:"scaled_ambient"`
	SimpleSpriteRef uint32   `yaml:"sprite_instance_ref"`
	Pair1           uint32
	Pair2           float32
}

WldFragMaterialDef is MaterialDef in libeq, Texture in openzone, MATERIALDEFINITION in wld, Material in lantern

func (*WldFragMaterialDef) FragCode

func (e *WldFragMaterialDef) FragCode() int

func (*WldFragMaterialDef) Read

func (e *WldFragMaterialDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragMaterialDef) Write

func (e *WldFragMaterialDef) Write(w io.Writer, isNewWorld bool) error

type WldFragMaterialPalette

type WldFragMaterialPalette struct {
	NameRef      int32
	Flags        uint32
	MaterialRefs []uint32
}

WldFragMaterialPalette is MaterialPalette in libeq, TextureList in openzone, MATERIALPALETTE in wld, WldFragMaterialPalette in lantern

func (*WldFragMaterialPalette) FragCode

func (e *WldFragMaterialPalette) FragCode() int

func (*WldFragMaterialPalette) Read

func (e *WldFragMaterialPalette) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragMaterialPalette) Write

func (e *WldFragMaterialPalette) Write(w io.Writer, isNewWorld bool) error

type WldFragMeshAnimatedBone

type WldFragMeshAnimatedBone struct {
	Position model.Vector3 `yaml:"position"`
}

type WldFragMeshFaceEntry added in v1.4.116

type WldFragMeshFaceEntry struct {
	Flags uint16
	Index [3]uint16
}

type WldFragMeshFaceMaterialGroup added in v1.4.116

type WldFragMeshFaceMaterialGroup struct {
	Count      uint16
	MaterialID uint16
}

type WldFragMeshOpEntry

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

type WldFragMeshSkinAssignmentGroup added in v1.4.116

type WldFragMeshSkinAssignmentGroup struct {
	Count  int16
	Index1 int16
}

type WldFragModelAction

type WldFragModelAction struct {
	Unk1 uint32    `yaml:"unk1"`
	Lods []float32 `yaml:"lods"`
}

type WldFragParticleCloudDef

type WldFragParticleCloudDef struct {
	NameRef               int32
	SettingOne            uint32
	SettingTwo            uint32
	ParticleMovement      uint32 // 0x01 sphere, 0x02 plane, 0x03 stream, 0x04 none
	Flags                 uint32 //Flag 1, High Opacity, Flag 3, Follows Item
	SimultaneousParticles uint32
	Unk6                  uint32
	Unk7                  uint32
	Unk8                  uint32
	Unk9                  uint32
	Unk10                 uint32
	SpawnRadius           float32 // sphere radius
	SpawnAngle            float32 // cone angle
	SpawnLifespan         uint32
	SpawnVelocity         float32
	SpawnNormal           [3]float32
	SpawnRate             uint32
	SpawnScale            float32
	Color                 [4]uint8
	BlitSpriteDefRef      uint32
}

WldFragParticleCloudDef is ParticleCloudDef in libeq, empty in openzone, empty in wld, WldFragParticleCloudDef in lantern

func (*WldFragParticleCloudDef) FragCode

func (e *WldFragParticleCloudDef) FragCode() int

func (*WldFragParticleCloudDef) Read

func (e *WldFragParticleCloudDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragParticleCloudDef) Write

func (e *WldFragParticleCloudDef) Write(w io.Writer, isNewWorld bool) error

type WldFragParticleSprite

type WldFragParticleSprite struct {
	NameRef              int32  `yaml:"name_ref"`
	ParticleSpriteDefRef int32  `yaml:"particle_sprite_def_ref"`
	Flags                uint32 `yaml:"flags"`
}

WldFragParticleSprite is ParticleSprite in libeq, empty in openzone, PARTICLESPRITE (ref) in wld

func (*WldFragParticleSprite) FragCode

func (e *WldFragParticleSprite) FragCode() int

func (*WldFragParticleSprite) Read

func (e *WldFragParticleSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragParticleSprite) Write

func (e *WldFragParticleSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragParticleSpriteDef

type WldFragParticleSpriteDef struct {
	NameRef                     int32           `yaml:"name_ref"`
	Flags                       uint32          `yaml:"flags"`
	VerticesCount               uint32          `yaml:"vertices_count"`
	Unknown                     uint32          `yaml:"unknown"`
	CenterOffset                model.Vector3   `yaml:"center_offset"`
	Radius                      float32         `yaml:"radius"`
	Vertices                    []model.Vector3 `yaml:"vertices"`
	RenderMethod                uint32          `yaml:"render_method"`
	RenderFlags                 uint32          `yaml:"render_flags"`
	RenderPen                   uint32          `yaml:"render_pen"`
	RenderBrightness            float32         `yaml:"render_brightness"`
	RenderScaledAmbient         float32         `yaml:"render_scaled_ambient"`
	RenderSimpleSpriteReference uint32          `yaml:"render_simple_sprite_reference"`
	RenderUVInfoOrigin          model.Vector3   `yaml:"render_uv_info_origin"`
	RenderUVInfoUAxis           model.Vector3   `yaml:"render_uv_info_u_axis"`
	RenderUVInfoVAxis           model.Vector3   `yaml:"render_uv_info_v_axis"`
	RenderUVMapEntryCount       uint32          `yaml:"render_uv_map_entry_count"`
	RenderUVMapEntries          []model.Vector2 `yaml:"render_uv_map_entries"`
	Pen                         []uint32        `yaml:"pen"`
}

WldFragParticleSpriteDef is ParticleSpriteDef in libeq, empty in openzone, PARTICLESPRITEDEF in wld

func (*WldFragParticleSpriteDef) FragCode

func (e *WldFragParticleSpriteDef) FragCode() int

func (*WldFragParticleSpriteDef) Read

func (e *WldFragParticleSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragParticleSpriteDef) Write

func (e *WldFragParticleSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragPointLight

type WldFragPointLight struct {
	NameRef  int32      `yaml:"name_ref"`
	LightRef int32      `yaml:"light_ref"`
	Flags    uint32     `yaml:"flags"`
	Location [3]float32 `yaml:"location"`
	Radius   float32    `yaml:"radius"`
}

WldFragPointLight is PointLight in libeq, Light Info in openzone, POINTLIGHT in wld, LightInstance in lantern

func (*WldFragPointLight) FragCode

func (e *WldFragPointLight) FragCode() int

func (*WldFragPointLight) Read

func (e *WldFragPointLight) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragPointLight) Write

func (e *WldFragPointLight) Write(w io.Writer, isNewWorld bool) error

type WldFragPointLightOld

type WldFragPointLightOld struct {
	NameRef int32  `yaml:"name_ref"`
	Flags   uint32 `yaml:"flags"`
}

WldFragPointLightOld is empty in libeq, empty in openzone, POINTLIGHT?? in wld

func (*WldFragPointLightOld) FragCode

func (e *WldFragPointLightOld) FragCode() int

func (*WldFragPointLightOld) Read

func (e *WldFragPointLightOld) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragPointLightOld) Write

func (e *WldFragPointLightOld) Write(w io.Writer, isNewWorld bool) error

type WldFragPointLightOldDef

type WldFragPointLightOldDef struct {
	NameRef       int32 `yaml:"name_ref"`
	PointLightRef int32 `yaml:"point_light_ref"`
}

WldFragPointLightOldDef is empty in libeq, empty in openzone, empty in wld

func (*WldFragPointLightOldDef) FragCode

func (e *WldFragPointLightOldDef) FragCode() int

func (*WldFragPointLightOldDef) Read

func (e *WldFragPointLightOldDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragPointLightOldDef) Write

func (e *WldFragPointLightOldDef) Write(w io.Writer, isNewWorld bool) error

type WldFragPolyhedron

type WldFragPolyhedron struct {
	NameRef     int32   `yaml:"name_ref"`
	FragmentRef int32   `yaml:"fragment_ref"`
	Flags       uint32  `yaml:"flags"`
	Scale       float32 `yaml:"scale"`
}

WldFragPolyhedron is Polyhedron in libeq, Polygon Animation Reference in openzone, POLYHEDRON (ref) in wld, Fragment18 in lantern

func (*WldFragPolyhedron) FragCode

func (e *WldFragPolyhedron) FragCode() int

func (*WldFragPolyhedron) Read

func (e *WldFragPolyhedron) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragPolyhedron) Write

func (e *WldFragPolyhedron) Write(w io.Writer, isNewWorld bool) error

type WldFragPolyhedronDef

type WldFragPolyhedronDef struct {
	NameRef        int32
	Flags          uint32
	BoundingRadius float32      // params1 in libeq
	ScaleFactor    float32      // params2 in libeq
	Vertices       [][3]float32 // entries1 in libeq
	Faces          [][]uint32   // entries2 in libeq
}

WldFragPolyhedronDef is PolyhedronDef in libeq, Polygon animation in openzone, POLYHEDRONDEFINITION in wld, Fragment17 in lantern

func (*WldFragPolyhedronDef) FragCode

func (e *WldFragPolyhedronDef) FragCode() int

func (*WldFragPolyhedronDef) Read

func (e *WldFragPolyhedronDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragPolyhedronDef) Write

func (e *WldFragPolyhedronDef) Write(w io.Writer, isNewWorld bool) error

type WldFragRegion

type WldFragRegion struct {
	NameRef         int32        `yaml:"name_ref"`
	Flags           uint32       `yaml:"flags"`
	AmbientLightRef int32        `yaml:"ambient_light_ref"`
	RegionVertices  [][3]float32 `yaml:"region_vertices"`
	RegionProximals [][2]float32 `yaml:"region_proximals"`
	RenderVertices  [][3]float32 `yaml:"render_vertices"`
	Walls           []Wall       `yaml:"walls"`
	Obstacles       []Obstacle   `yaml:"obstacles"`
	VisNodes        []VisNode    `yaml:"visible_nodes"`
	VisLists        []VisList    `yaml:"vis_lists"`
	Sphere          [4]float32   `yaml:"sphere"`
	ReverbVolume    float32
	ReverbOffset    int32
	UserData        string
	MeshReference   int32
}

WldFragRegion is Region in libeq, Bsp WldFragRegion in openzone, REGION in wld, BspRegion in lantern

func (*WldFragRegion) FragCode

func (e *WldFragRegion) FragCode() int

func (*WldFragRegion) Read

func (e *WldFragRegion) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragRegion) Write

func (e *WldFragRegion) Write(w io.Writer, isNewWorld bool) error

type WldFragSimpleSprite

type WldFragSimpleSprite struct {
	NameRef   int32  `yaml:"name_ref"`
	SpriteRef uint32 `yaml:"sprite_ref"`
	Flags     uint32 `yaml:"flags"`
}

WldFragSimpleSprite is SimpleSprite in libeq, Texture Bitmap Info Reference in openzone, SIMPLESPRITEINST in wld, BitmapInfoReference in lantern

func (*WldFragSimpleSprite) FragCode

func (e *WldFragSimpleSprite) FragCode() int

func (*WldFragSimpleSprite) Read

func (e *WldFragSimpleSprite) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSimpleSprite) Write

func (e *WldFragSimpleSprite) Write(w io.Writer, isNewWorld bool) error

type WldFragSimpleSpriteDef

type WldFragSimpleSpriteDef struct {
	NameRef      int32    `yaml:"name_ref"`
	Flags        uint32   `yaml:"flags"`
	CurrentFrame int32    `yaml:"current_frame"`
	Sleep        uint32   `yaml:"sleep"`
	BitmapRefs   []uint32 `yaml:"bitmap_refs"`
}

WldFragSimpleSpriteDef is SimpleSpriteDef in libeq, WldFragSimpleSpriteDef Bitmap Info in openzone, SIMPLESPRITEDEF in wld, BitmapInfo in lantern

func (*WldFragSimpleSpriteDef) FragCode

func (e *WldFragSimpleSpriteDef) FragCode() int

func (*WldFragSimpleSpriteDef) Read

func (e *WldFragSimpleSpriteDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSimpleSpriteDef) Write

func (e *WldFragSimpleSpriteDef) Write(w io.Writer, isNewWorld bool) error

type WldFragSkyRegion

type WldFragSkyRegion struct {
}

WldFragSkyRegion is empty in libeq, empty in openzone, SKYREGION in wld

func (*WldFragSkyRegion) FragCode

func (e *WldFragSkyRegion) FragCode() int

func (*WldFragSkyRegion) Read

func (e *WldFragSkyRegion) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSkyRegion) Write

func (e *WldFragSkyRegion) Write(w io.Writer, isNewWorld bool) error

type WldFragSound

type WldFragSound struct {
	NameRef int32  `yaml:"name_ref"`
	Flags   uint32 `yaml:"flags"`
}

WldFragSound is empty in libeq, empty in openzone, SOUNDDEFINITION in wld

func (*WldFragSound) FragCode

func (e *WldFragSound) FragCode() int

func (*WldFragSound) Read

func (e *WldFragSound) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSound) Write

func (e *WldFragSound) Write(w io.Writer, isNewWorld bool) error

type WldFragSoundDef

type WldFragSoundDef struct {
	NameRef int32  `yaml:"name_ref"`
	Flags   uint32 `yaml:"flags"`
}

WldFragSoundDef is empty in libeq, empty in openzone, SOUNDINSTANCE in wld

func (*WldFragSoundDef) FragCode

func (e *WldFragSoundDef) FragCode() int

func (*WldFragSoundDef) Read

func (e *WldFragSoundDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSoundDef) Write

func (e *WldFragSoundDef) Write(w io.Writer, isNewWorld bool) error

type WldFragSphere

type WldFragSphere struct {
	NameRef int32   `yaml:"name_ref"`
	Radius  float32 `yaml:"radius"`
}

WldFragSphere is Sphere in libeq, Zone Unknown in openzone, SPHERE (ref) in wld, Fragment16 in lantern

func (*WldFragSphere) FragCode

func (e *WldFragSphere) FragCode() int

func (*WldFragSphere) Read

func (e *WldFragSphere) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSphere) Write

func (e *WldFragSphere) Write(w io.Writer, isNewWorld bool) error

type WldFragSphereList

type WldFragSphereList struct {
	NameRef          int32  `yaml:"name_ref"`
	SphereListDefRef int32  `yaml:"sphere_list_def_ref"`
	Params1          uint32 `yaml:"params1"`
}

WldFragSphereList is SphereList in libeq, empty in openzone, SPHERELIST (ref) in wld

func (*WldFragSphereList) FragCode

func (e *WldFragSphereList) FragCode() int

func (*WldFragSphereList) Read

func (e *WldFragSphereList) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSphereList) Write

func (e *WldFragSphereList) Write(w io.Writer, isNewWorld bool) error

type WldFragSphereListDef

type WldFragSphereListDef struct {
	NameRef     int32         `yaml:"name_ref"`
	Flags       uint32        `yaml:"flags"`
	SphereCount uint32        `yaml:"sphere_count"`
	Radius      float32       `yaml:"radius"`
	Scale       float32       `yaml:"scale"`
	Spheres     []model.Quad4 `yaml:"spheres"`
}

WldFragSphereListDef is SphereListDef in libeq, empty in openzone, SPHERELISTDEFINITION in wld

func (*WldFragSphereListDef) FragCode

func (e *WldFragSphereListDef) FragCode() int

func (*WldFragSphereListDef) Read

func (e *WldFragSphereListDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSphereListDef) Write

func (e *WldFragSphereListDef) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite2D

type WldFragSprite2D struct {
	NameRef       int32  `yaml:"name_ref"`
	TwoDSpriteRef uint32 `yaml:"two_d_sprite_ref"`
	Flags         uint32 `yaml:"flags"`
}

WldFragSprite2D is Sprite2D in libeq, Two-Dimensional Object Reference in openzone, 2DSPRITE (ref) in wld, Fragment07 in lantern

func (*WldFragSprite2D) FragCode

func (e *WldFragSprite2D) FragCode() int

func (*WldFragSprite2D) Read

func (e *WldFragSprite2D) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite2D) Write

func (e *WldFragSprite2D) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite2DDef

type WldFragSprite2DDef struct {
	NameRef                     int32
	Flags                       uint32
	TextureCount                uint32
	PitchCount                  uint32
	Scale                       [2]float32
	SphereListRef               uint32
	DepthScale                  float32
	CenterOffset                [3]float32
	BoundingRadius              float32
	CurrentFrameRef             int32
	Sleep                       uint32
	Headings                    []uint32
	RenderMethod                uint32
	RenderFlags                 uint8
	RenderPen                   uint32
	RenderBrightness            float32
	RenderScaledAmbient         float32
	RenderSimpleSpriteReference uint32
	RenderUVInfoOrigin          [3]float32
	RenderUVInfoUAxis           [3]float32
	RenderUVInfoVAxis           [3]float32
	Uvs                         [][2]float32
}

WldFragSprite2DDef is Sprite2DDef in libeq, Two-Dimensional Object in openzone, 2DSPRITEDEF in wld, Fragment06 in lantern

func (*WldFragSprite2DDef) FragCode

func (e *WldFragSprite2DDef) FragCode() int

func (*WldFragSprite2DDef) Read

func (e *WldFragSprite2DDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite2DDef) Write

func (e *WldFragSprite2DDef) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite3D

type WldFragSprite3D struct {
	NameRef        int32
	Sprite3DDefRef int32
	Flags          uint32
}

WldFragSprite3D is Sprite3D in libeq, Camera Reference in openzone, 3DSPRITE (ref) in wld, CameraReference in lantern

func (*WldFragSprite3D) FragCode

func (e *WldFragSprite3D) FragCode() int

func (*WldFragSprite3D) Read

func (e *WldFragSprite3D) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite3D) Write

func (e *WldFragSprite3D) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite3DDef

type WldFragSprite3DDef struct {
	NameRef        int32
	Flags          uint32
	SphereListRef  uint32
	CenterOffset   [3]float32
	BoundingRadius float32
	Vertices       [][3]float32
	BspNodes       []WldFragThreeDSpriteBspNode
}

WldFragSprite3DDef is Sprite3DDef in libeq, Camera in openzone, 3DSPRITEDEF in wld, Camera in lantern

func (*WldFragSprite3DDef) FragCode

func (e *WldFragSprite3DDef) FragCode() int

func (*WldFragSprite3DDef) Read

func (e *WldFragSprite3DDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite3DDef) Write

func (e *WldFragSprite3DDef) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite4D

type WldFragSprite4D struct {
	NameRef  int32  `yaml:"name_ref"`
	FourDRef int32  `yaml:"four_d_ref"`
	Params1  uint32 `yaml:"params_1"`
}

WldFragSprite4D is Sprite4D in libeq, empty in openzone, 4DSPRITE (ref) in wld

func (*WldFragSprite4D) FragCode

func (e *WldFragSprite4D) FragCode() int

func (*WldFragSprite4D) Read

func (e *WldFragSprite4D) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite4D) Write

func (e *WldFragSprite4D) Write(w io.Writer, isNewWorld bool) error

type WldFragSprite4DDef

type WldFragSprite4DDef struct {
	NameRef         int32         `yaml:"name_ref"`
	Flags           uint32        `yaml:"flags"`
	PolyRef         int32         `yaml:"poly_ref"`
	CenterOffset    model.Vector3 `yaml:"center_offset"`
	Radius          float32       `yaml:"radius"`
	CurrentFrame    uint32        `yaml:"current_frame"`
	Sleep           uint32        `yaml:"sleep"`
	SpriteFragments []uint32      `yaml:"sprite_fragments"`
}

WldFragSprite4DDef is Sprite4DDef in libeq, empty in openzone, 4DSPRITEDEF in wld

func (*WldFragSprite4DDef) FragCode

func (e *WldFragSprite4DDef) FragCode() int

func (*WldFragSprite4DDef) Read

func (e *WldFragSprite4DDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragSprite4DDef) Write

func (e *WldFragSprite4DDef) Write(w io.Writer, isNewWorld bool) error

type WldFragThreeDSpriteBspNode

type WldFragThreeDSpriteBspNode struct {
	FrontTree                   uint32
	BackTree                    uint32
	VertexIndexes               []uint32
	RenderMethod                uint32
	RenderFlags                 uint8
	RenderPen                   uint32
	RenderBrightness            float32
	RenderScaledAmbient         float32
	RenderSimpleSpriteReference uint32
	RenderUVInfoOrigin          [3]float32
	RenderUVInfoUAxis           [3]float32
	RenderUVInfoVAxis           [3]float32
	Uvs                         [][2]float32
}

type WldFragTrack

type WldFragTrack struct {
	NameRef  int32  `yaml:"name_ref"`
	TrackRef int32  `yaml:"track_ref"`
	Flags    uint32 `yaml:"flags"`
	Sleep    uint32 `yaml:"sleep"` // if 0x01 is set, this is the number of milliseconds to sleep before starting the animation
}

WldFragTrack is a bone in a skeleton. It is Track in libeq, Mob Skeleton Piece Track Reference in openzone, TRACKINSTANCE in wld, TrackDefFragment in lantern

func (*WldFragTrack) FragCode

func (e *WldFragTrack) FragCode() int

func (*WldFragTrack) Read

func (e *WldFragTrack) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragTrack) Write

func (e *WldFragTrack) Write(w io.Writer, isNewWorld bool) error

type WldFragTrackBoneTransform

type WldFragTrackBoneTransform struct {
	RotateDenominator int16
	Rotation          [4]int16
	ShiftDenominator  int16
	Shift             [3]int16
}

type WldFragTrackDef

type WldFragTrackDef struct {
	NameRef         int32                       `yaml:"name_ref"`
	Flags           uint32                      `yaml:"flags"`
	FrameTransforms []WldFragTrackBoneTransform `yaml:"skeleton_transforms"`
}

WldFragTrackDef is TrackDef in libeq, Mob Skeleton Piece WldFragTrackDef in openzone, TRACKDEFINITION in wld, TrackDefFragment in lantern

func (*WldFragTrackDef) FragCode

func (e *WldFragTrackDef) FragCode() int

func (*WldFragTrackDef) Read

func (e *WldFragTrackDef) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragTrackDef) Write

func (e *WldFragTrackDef) Write(w io.Writer, isNewWorld bool) error

type WldFragUserData

type WldFragUserData struct {
}

WldFragUserData is empty in libeq, empty in openzone, USERDATA in wld

func (*WldFragUserData) FragCode

func (e *WldFragUserData) FragCode() int

func (*WldFragUserData) Read

func (e *WldFragUserData) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragUserData) Write

func (e *WldFragUserData) Write(w io.Writer, isNewWorld bool) error

type WldFragWorldTree

type WldFragWorldTree struct {
	NameRef int32           `yaml:"name_ref"`
	Nodes   []WorldTreeNode `yaml:"nodes"`
}

WldFragWorldTree is WorldTree in libeq, BSP Tree in openzone, WORLDTREE in wld, BspTree in lantern For serialization, refer to here: https://github.com/knervous/LanternExtractor2/blob/knervous/merged/LanternExtractor/EQ/Wld/DataTypes/BspNode.cs For constructing, refer to here: https://github.com/knervous/LanternExtractor2/blob/920541d15958e90aa91f7446a74226cbf26b829a/LanternExtractor/EQ/Wld/Exporters/GltfWriter.cs#L304

func (*WldFragWorldTree) FragCode

func (e *WldFragWorldTree) FragCode() int

func (*WldFragWorldTree) Read

func (e *WldFragWorldTree) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragWorldTree) Write

func (e *WldFragWorldTree) Write(w io.Writer, isNewWorld bool) error

type WldFragZone

type WldFragZone struct {
	NameRef  int32    `yaml:"name_ref"`
	Flags    uint32   `yaml:"flags"`
	Regions  []uint32 `yaml:"regions"`
	UserData string   `yaml:"user_data"`
}

WldFragZone is Zone in libeq, Region Flag in openzone, ZONE in wld, BspRegionType in lantern

func (*WldFragZone) FragCode

func (e *WldFragZone) FragCode() int

func (*WldFragZone) Read

func (e *WldFragZone) Read(r io.ReadSeeker, isNewWorld bool) error

func (*WldFragZone) Write

func (e *WldFragZone) Write(w io.Writer, isNewWorld bool) error

type WorldTreeNode

type WorldTreeNode struct {
	Normal    [4]float32 `yaml:"normal"`
	RegionRef int32      `yaml:"region_ref"`
	FrontRef  int32      `yaml:"front_ref"`
	BackRef   int32      `yaml:"back_ref"`
}

Jump to

Keyboard shortcuts

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