lump

package
v1.0.0-b2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: Unlicense Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxMapLeafs is the maximum number of leafs the engine can handle
	MaxMapLeafs = 65536
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	Metadata
	Data []primitives.Area `json:"data"`
}

Area is Lump 20: Areas

func (*Area) Contents

func (lump *Area) Contents() []primitives.Area

Contents returns internal format structure Data

func (*Area) FromBytes

func (lump *Area) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte data.

func (*Area) ToBytes

func (lump *Area) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type AreaPortal

type AreaPortal struct {
	Metadata
	Data []primitives.AreaPortal `json:"data"`
}

AreaPortal is Lump 21: Areaportals

func (*AreaPortal) Contents

func (lump *AreaPortal) Contents() []primitives.AreaPortal

Contents returns internal format structure Data

func (*AreaPortal) FromBytes

func (lump *AreaPortal) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte data.

func (*AreaPortal) ToBytes

func (lump *AreaPortal) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Brush

type Brush struct {
	Metadata
	Data []primitives.Brush `json:"data"`
}

Brush is Lump 18: Brush

func (*Brush) Contents

func (lump *Brush) Contents() []primitives.Brush

Contents returns internal format structure Data

func (*Brush) FromBytes

func (lump *Brush) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte data.

func (*Brush) ToBytes

func (lump *Brush) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type BrushSide

type BrushSide struct {
	Metadata
	Data []primitives.BrushSide `json:"data"` // MAX_MAP_BRUSHSIDES = 65536
}

BrushSide is Lump 19: BrushSide

func (*BrushSide) Contents

func (lump *BrushSide) Contents() []primitives.BrushSide

Contents returns internal format structure Data

func (*BrushSide) FromBytes

func (lump *BrushSide) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte data.

func (*BrushSide) ToBytes

func (lump *BrushSide) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type ClipPortalVerts

type ClipPortalVerts struct {
	Metadata
	Data []mgl32.Vec3 `json:"data"`
}

ClipPortalVerts is Lump 41: ClipPortalVerts

func (*ClipPortalVerts) Contents

func (lump *ClipPortalVerts) Contents() []mgl32.Vec3

Contents returns internal format structure Data

func (*ClipPortalVerts) FromBytes

func (lump *ClipPortalVerts) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*ClipPortalVerts) ToBytes

func (lump *ClipPortalVerts) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Cubemap

type Cubemap struct {
	Metadata
	Data []primitives.CubemapSample `json:"data"`
}

Cubemap is Lump 42: Cubemaps

func (*Cubemap) Contents

func (lump *Cubemap) Contents() []primitives.CubemapSample

Contents returns internal format structure Data

func (*Cubemap) FromBytes

func (lump *Cubemap) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Cubemap) ToBytes

func (lump *Cubemap) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type DispInfo

type DispInfo struct {
	Metadata
	Data []primitives.DispInfo `json:"data"`
}

DispInfo is Lump 26: DispInfo

func (*DispInfo) Contents

func (lump *DispInfo) Contents() []primitives.DispInfo

Contents returns internal format structure Data

func (*DispInfo) FromBytes

func (lump *DispInfo) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*DispInfo) ToBytes

func (lump *DispInfo) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type DispLightmapSamplePosition

type DispLightmapSamplePosition = rawBytes

DispLightmapSamplePosition is Lump 34: DispLightmapSamplePosition NOTE: This does NOT have a mapped format yet, and is readable as []byte only

type DispTris

type DispTris struct {
	Metadata
	Data []primitives.DispTri `json:"data"`
}

DispTris is Lump 48: DispTris

func (*DispTris) Contents

func (lump *DispTris) Contents() []primitives.DispTri

Contents returns internal format structure Data

func (*DispTris) FromBytes

func (lump *DispTris) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*DispTris) ToBytes

func (lump *DispTris) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type DispVert

type DispVert struct {
	Metadata
	Data []primitives.DispVert `json:"data"`
}

DispVert is Lump 33: DispVert

func (*DispVert) Contents

func (lump *DispVert) Contents() []primitives.DispVert

Contents returns internal format structure Data

func (*DispVert) FromBytes

func (lump *DispVert) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*DispVert) ToBytes

func (lump *DispVert) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Edge

type Edge struct {
	Metadata
	Data [][2]uint16 `json:"data"` // MAX_MAP_EDGES = 256000
}

Edge is Lump 12: Edge

func (*Edge) Contents

func (lump *Edge) Contents() [][2]uint16

Contents returns internal format structure Data

func (*Edge) FromBytes

func (lump *Edge) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Edge) ToBytes

func (lump *Edge) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type EntData

type EntData struct {
	Metadata
	Data []entities.Entity `json:"data"`
}

EntData is Lump 0: Entdata

func (*EntData) Contents

func (lump *EntData) Contents() []entities.Entity

Contents returns internal format structure Data

func (*EntData) FromBytes

func (lump *EntData) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data. @TODO this is a very naive implementation.

func (*EntData) ToBytes

func (lump *EntData) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data. @TODO this is a very naive implementation.

type Face

type Face struct {
	Metadata
	Data []primitives.Face `json:"data"`
}

Face is Lump 7: Face

func (*Face) Contents

func (lump *Face) Contents() []primitives.Face

Contents returns internal format structure Data

func (*Face) FromBytes

func (lump *Face) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Face) ToBytes

func (lump *Face) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type FaceHDR

type FaceHDR struct {
	Metadata
	Data []primitives.Face `json:"data"`
}

FaceHDR is Lump 58: FaceHDR

func (*FaceHDR) Contents

func (lump *FaceHDR) Contents() []primitives.Face

Contents returns internal format structure Data

func (*FaceHDR) FromBytes

func (lump *FaceHDR) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*FaceHDR) ToBytes

func (lump *FaceHDR) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type FaceId

type FaceId struct {
	Metadata
	Data []primitives.FaceId `json:"data"`
}

FaceId is Lump 11: FaceIds

func (*FaceId) Contents

func (lump *FaceId) Contents() []primitives.FaceId

Contents returns internal format structure Data

func (*FaceId) FromBytes

func (lump *FaceId) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*FaceId) ToBytes

func (lump *FaceId) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type FaceMacroTextureInfo

type FaceMacroTextureInfo struct {
	Metadata
	Data []primitives.FaceMacroTextureInfo `json:"data"`
}

FaceMacroTextureInfo is Lump 47: FaceMacroTextureInfo

func (*FaceMacroTextureInfo) Contents

Contents returns internal format structure Data

func (*FaceMacroTextureInfo) FromBytes

func (lump *FaceMacroTextureInfo) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*FaceMacroTextureInfo) ToBytes

func (lump *FaceMacroTextureInfo) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Game

type Game struct {
	Metadata
	Header    primitive.Header            `json:"data"`
	GameLumps []primitive.GenericGameLump `json:"gameLumps"`
	// contains filtered or unexported fields
}

Game is Lump 35. @TODO NOTE: This really needs per-game implementations to be completely useful, otherwise we only get staticprop Data from it

func (*Game) Contents

func (lump *Game) Contents() *Game

Contents returns internal format structure Data

func (*Game) FromBytes

func (lump *Game) FromBytes(raw []byte) (err error)

FromBytes imports this lump from raw byte Data

func (*Game) GetStaticPropLump

func (lump *Game) GetStaticPropLump() *primitive.StaticPropLump

GetStaticPropLump returns the staticprop lump.

func (*Game) SetAbsoluteFileOffset

func (lump *Game) SetAbsoluteFileOffset(fileOffset int)

SetAbsoluteFileOffset updates the lumps offsets to be relative to the lump, rather than the bsp start.

func (*Game) ToBytes

func (lump *Game) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type GameGeneric

type GameGeneric interface {
	SetAbsoluteFileOffset(fileOffset int)
}

type Leaf

type Leaf struct {
	Metadata
	Data []primitives.Leaf `json:"data"`
}

Leaf is Lump 10: Leaf

func (*Leaf) Contents

func (lump *Leaf) Contents() []primitives.Leaf

Contents returns internal format structure Data

func (*Leaf) FromBytes

func (lump *Leaf) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Leaf) ToBytes

func (lump *Leaf) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafAmbientIndex

type LeafAmbientIndex struct {
	Metadata
	Data []primitives.LeafAmbientIndex `json:"data"`
}

LeafAmbientIndex is Lump 52: Leaf Ambient Index

func (*LeafAmbientIndex) Contents

func (lump *LeafAmbientIndex) Contents() []primitives.LeafAmbientIndex

Contents returns internal format structure Data

func (*LeafAmbientIndex) FromBytes

func (lump *LeafAmbientIndex) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafAmbientIndex) ToBytes

func (lump *LeafAmbientIndex) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafAmbientIndexHDR

type LeafAmbientIndexHDR struct {
	Metadata
	Data []primitives.LeafAmbientIndex `json:"data"`
}

LeafAmbientIndexHDR is Lump 51: Leaf Ambient Index HDR

func (*LeafAmbientIndexHDR) Contents

func (lump *LeafAmbientIndexHDR) Contents() []primitives.LeafAmbientIndex

Contents returns internal format structure Data

func (*LeafAmbientIndexHDR) FromBytes

func (lump *LeafAmbientIndexHDR) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafAmbientIndexHDR) ToBytes

func (lump *LeafAmbientIndexHDR) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafAmbientLighting

type LeafAmbientLighting struct {
	Metadata
	Data []primitives.LeafAmbientLighting `json:"data"`
}

LeafAmbientLighting is Lump 56: LeafAmbientLighting

func (*LeafAmbientLighting) Contents

Contents returns internal format structure Data

func (*LeafAmbientLighting) FromBytes

func (lump *LeafAmbientLighting) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafAmbientLighting) ToBytes

func (lump *LeafAmbientLighting) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafAmbientLightingHDR

type LeafAmbientLightingHDR struct {
	Metadata
	Data []primitives.LeafAmbientLighting `json:"data"`
}

LeafAmbientLightingHDR is Lump 55: LeafAmbientLightingHDR

func (*LeafAmbientLightingHDR) Contents

Contents returns internal format structure Data

func (*LeafAmbientLightingHDR) FromBytes

func (lump *LeafAmbientLightingHDR) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafAmbientLightingHDR) ToBytes

func (lump *LeafAmbientLightingHDR) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafBrush

type LeafBrush struct {
	Metadata
	Data []uint16 `json:"data"` // MAX_MAP_LEAFBRUSHES = 65536
}

LeafBrush is Lump 17: LeafBrush

func (*LeafBrush) Contents

func (lump *LeafBrush) Contents() []uint16

Contents returns internal format structure Data

func (*LeafBrush) FromBytes

func (lump *LeafBrush) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafBrush) ToBytes

func (lump *LeafBrush) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafFace

type LeafFace struct {
	Metadata
	Data []uint16 `json:"data"` // MAX_MAP_LEAFFACES = 65536
}

LeafFace is Lump 16: LeafFace

func (*LeafFace) Contents

func (lump *LeafFace) Contents() []uint16

Contents returns internal format structure Data

func (*LeafFace) FromBytes

func (lump *LeafFace) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafFace) ToBytes

func (lump *LeafFace) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafMinDistToWater

type LeafMinDistToWater struct {
	Metadata
	Data []uint16 `json:"data"`
}

LeafMinDistToWater is Lump 46: LeafMinDistToWater

func (*LeafMinDistToWater) Contents

func (lump *LeafMinDistToWater) Contents() []uint16

Contents returns internal format structure Data

func (*LeafMinDistToWater) FromBytes

func (lump *LeafMinDistToWater) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafMinDistToWater) ToBytes

func (lump *LeafMinDistToWater) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type LeafWaterData

type LeafWaterData struct {
	Metadata
	Data []primitives.LeafWaterData `json:"data"`
}

LeafWaterData is Lump 36: leafwaterdata

func (*LeafWaterData) Contents

func (lump *LeafWaterData) Contents() []primitives.LeafWaterData

Contents returns internal format structure Data

func (*LeafWaterData) FromBytes

func (lump *LeafWaterData) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*LeafWaterData) ToBytes

func (lump *LeafWaterData) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Lighting

type Lighting struct {
	Metadata
	Data []primitives.ColorRGBExponent32 `json:"data"`
}

Lighting is Lump 8: Lighting

func (*Lighting) Contents

func (lump *Lighting) Contents() []primitives.ColorRGBExponent32

Contents returns internal format structure Data

func (*Lighting) FromBytes

func (lump *Lighting) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Lighting) ToBytes

func (lump *Lighting) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type MapFlags

type MapFlags struct {
	Metadata
	Data *primitives.MapFlags `json:"data"`
}

MapFlags is Lump 59: MapFlags

func (*MapFlags) Contents

func (lump *MapFlags) Contents() *primitives.MapFlags

Contents returns internal format structure Data

func (*MapFlags) FromBytes

func (lump *MapFlags) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*MapFlags) ToBytes

func (lump *MapFlags) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Metadata

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

Metadata is a Helper info for a lump

func (*Metadata) SetVersion

func (info *Metadata) SetVersion(version int32)

SetVersion sets bsp version of lump

func (*Metadata) Version

func (info *Metadata) Version() int32

Version Returns lump import version in bytes.

type Model

type Model struct {
	Metadata
	Data []primitives.Model `json:"data"`
}

Model is Lump 14: Model

func (*Model) Contents

func (lump *Model) Contents() []primitives.Model

Contents returns internal format structure Data

func (*Model) FromBytes

func (lump *Model) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Model) ToBytes

func (lump *Model) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Node

type Node struct {
	Metadata
	Data []primitives.Node `json:"data"` // MAP_MAX_NODES = 65536
}

Node is Lump 5: Node

func (*Node) Contents

func (lump *Node) Contents() []primitives.Node

Contents returns internal format structure Data

func (*Node) FromBytes

func (lump *Node) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Node) ToBytes

func (lump *Node) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Occlusion

type Occlusion struct {
	Metadata
	Count            int32                          `json:"count"`
	Data             []primitives.OcclusionData     `json:"data"` // len(slice) = Count
	PolyDataCount    int32                          `json:"polyDataCount"`
	PolyData         []primitives.OcclusionPolyData `json:"polyData"` //len(slice) = PolyDataCount
	VertexIndexCount int32                          `json:"VertexIndexCount"`
	VertexIndices    []int32                        `json:"VertexIndices"` //len(slice) = VertexIndexCount
}

Occlusion is Lump 9: Occlusion

func (*Occlusion) Contents

func (lump *Occlusion) Contents() *Occlusion

Contents returns internal format structure Data

func (*Occlusion) FromBytes

func (lump *Occlusion) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Occlusion) ToBytes

func (lump *Occlusion) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Overlay

type Overlay struct {
	Metadata
	Data []primitives.Overlay `json:"data"`
}

Overlay is Lump 45: Overlay Consists of an array of Overlay structs

func (*Overlay) Contents

func (lump *Overlay) Contents() []primitives.Overlay

Contents returns internal format structure Data

func (*Overlay) FromBytes

func (lump *Overlay) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Overlay) ToBytes

func (lump *Overlay) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type OverlayFade

type OverlayFade struct {
	Metadata
	Data []primitives.OverlayFade `json:"data"`
}

OverlayFade is Lump 60: Overlayfades

func (*OverlayFade) Contents

func (lump *OverlayFade) Contents() []primitives.OverlayFade

Contents returns internal format structure Data

func (*OverlayFade) FromBytes

func (lump *OverlayFade) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*OverlayFade) ToBytes

func (lump *OverlayFade) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Pakfile

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

Pakfile is Lump 40: Pakfile

func (*Pakfile) Contents

func (lump *Pakfile) Contents() *zip.Reader

Contents gets internal format structure Data

func (*Pakfile) FromBytes

func (lump *Pakfile) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Pakfile) GetFile

func (lump *Pakfile) GetFile(filePath string) ([]byte, error)

GetFile Get a specific file from the pak This function does have the expectation that filenames are case-insensitive, so in the (shouldn't happen) case of name collisions over case-insensitivity, there may be issues

func (*Pakfile) ToBytes

func (lump *Pakfile) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type PhysCollide

type PhysCollide struct {
	Metadata
	Data []primitives.PhysCollideEntry `json:"data"`
}

PhysCollide is Lump 20: PhysCollide

func (*PhysCollide) Contents

func (lump *PhysCollide) Contents() []primitives.PhysCollideEntry

Contents returns internal format structure Data

func (*PhysCollide) FromBytes

func (lump *PhysCollide) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*PhysCollide) ToBytes

func (lump *PhysCollide) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type PhysDisp

type PhysDisp = rawBytes

PhysDisp is Lump 28: PhysDisp

type Planes

type Planes struct {
	Metadata
	Data []primitives.Plane `json:"data"` // MAP_MAX_PLANES = 65536
}

Planes is Lump 1: Planes

func (*Planes) Contents

func (lump *Planes) Contents() []primitives.Plane

Contents returns internal format structure Data

func (*Planes) FromBytes

func (lump *Planes) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Planes) ToBytes

func (lump *Planes) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type PrimIndice

type PrimIndice struct {
	Metadata
	Data []uint16 `json:"data"`
}

PrimIndice is Lump 39: PrimIndice

func (*PrimIndice) Contents

func (lump *PrimIndice) Contents() []uint16

Contents returns internal format structure Data

func (*PrimIndice) FromBytes

func (lump *PrimIndice) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*PrimIndice) ToBytes

func (lump *PrimIndice) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type PrimVert

type PrimVert struct {
	Metadata
	Data []primitives.PrimVert `json:"data"`
}

PrimVert is Lump 37: PrimVert

func (*PrimVert) Contents

func (lump *PrimVert) Contents() []primitives.PrimVert

Contents returns internal format structure Data

func (*PrimVert) FromBytes

func (lump *PrimVert) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*PrimVert) ToBytes

func (lump *PrimVert) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Primitive

type Primitive struct {
	Metadata
	Data []primitives.Primitive `json:"data"`
}

Primitive is Lump 36: Primitive

func (*Primitive) Contents

func (lump *Primitive) Contents() []primitives.Primitive

Contents returns internal format structure Data

func (*Primitive) FromBytes

func (lump *Primitive) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Primitive) ToBytes

func (lump *Primitive) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Surfedge

type Surfedge struct {
	Metadata
	Data []int32 `json:"data"` // MAX_MAP_SURFEDGES = 512000
}

Surfedge is Lump 13: Surfedge

func (*Surfedge) Contents

func (lump *Surfedge) Contents() []int32

Contents returns internal format structure Data

func (*Surfedge) FromBytes

func (lump *Surfedge) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Surfedge) ToBytes

func (lump *Surfedge) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type TexData

type TexData struct {
	Metadata
	Data []primitives.TexData `json:"data"`
}

TexData is Lump 2: TexData

func (*TexData) Contents

func (lump *TexData) Contents() []primitives.TexData

Contents returns internal format structure Data

func (*TexData) FromBytes

func (lump *TexData) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*TexData) ToBytes

func (lump *TexData) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type TexDataStringData

type TexDataStringData struct {
	Metadata
	Data string `json:"data"` // MAX_MAP_TEXDATA_STRING_DATA = 256000, TEXTURE_NAME_LENGTH = 128
}

TexDataStringData is Lump 43: TexDataStringData

func (*TexDataStringData) Contents

func (lump *TexDataStringData) Contents() string

Contents returns internal format structure Data

func (*TexDataStringData) FromBytes

func (lump *TexDataStringData) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*TexDataStringData) ToBytes

func (lump *TexDataStringData) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type TexDataStringTable

type TexDataStringTable struct {
	Metadata
	Data []int32 `json:"data"` // MAX_MAP_TEXINFO = 2048
}

TexDataStringTable is Lump 44: TexDataStringTable

func (*TexDataStringTable) Contents

func (lump *TexDataStringTable) Contents() []int32

Contents returns internal format structure Data

func (*TexDataStringTable) FromBytes

func (lump *TexDataStringTable) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*TexDataStringTable) ToBytes

func (lump *TexDataStringTable) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type TexInfo

type TexInfo struct {
	Metadata
	Data []primitives.TexInfo `json:"data"`
}

TexInfo is Lump 6: TexInfo

func (*TexInfo) Contents

func (lump *TexInfo) Contents() []primitives.TexInfo

Contents returns internal format structure Data

func (*TexInfo) FromBytes

func (lump *TexInfo) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*TexInfo) ToBytes

func (lump *TexInfo) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Unimplemented

type Unimplemented = rawBytes

Unimplemented is Lump n: Unimplemented lump type.

type VertNormal

type VertNormal struct {
	Metadata
	Data []primitives.VertNormal `json:"data"`
}

VertNormal is Lump 30: VertNormal

func (*VertNormal) Contents

func (lump *VertNormal) Contents() []primitives.VertNormal

Contents returns internal format structure Data

func (*VertNormal) FromBytes

func (lump *VertNormal) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*VertNormal) ToBytes

func (lump *VertNormal) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type VertNormalIndice

type VertNormalIndice struct {
	Metadata
	Data []uint16 `json:"data"`
}

VertNormalIndice is Lump 31: VertNormalIndice

func (*VertNormalIndice) Contents

func (lump *VertNormalIndice) Contents() []uint16

Contents returns internal format structure Data

func (*VertNormalIndice) FromBytes

func (lump *VertNormalIndice) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*VertNormalIndice) ToBytes

func (lump *VertNormalIndice) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Vertex

type Vertex struct {
	Metadata
	Data []mgl32.Vec3 `json:"data"`
}

Vertex is Lump 3: Vertex

func (*Vertex) Contents

func (lump *Vertex) Contents() []mgl32.Vec3

Contents returns internal format structure Data

func (*Vertex) FromBytes

func (lump *Vertex) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Vertex) ToBytes

func (lump *Vertex) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type Visibility

type Visibility struct {
	Metadata
	Data primitives.Vis `json:"data"`
}

Visibility is Lump 4: Visibility

func (*Visibility) Contents

func (lump *Visibility) Contents() *primitives.Vis

Contents returns internal format structure Data

func (*Visibility) FromBytes

func (lump *Visibility) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*Visibility) ToBytes

func (lump *Visibility) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type WorldLight

type WorldLight struct {
	Metadata
	Data []primitives.WorldLight `json:"data"`
}

WorldLight is Lump 15: Worldlight

func (*WorldLight) Contents

func (lump *WorldLight) Contents() []primitives.WorldLight

Contents returns internal format structure Data

func (*WorldLight) FromBytes

func (lump *WorldLight) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*WorldLight) ToBytes

func (lump *WorldLight) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

type WorldLightHDR

type WorldLightHDR struct {
	Metadata
	Data []primitives.WorldLightHDR `json:"data"`
}

WorldLightHDR is Lump 15: Worldlight

func (*WorldLightHDR) Contents

func (lump *WorldLightHDR) Contents() []primitives.WorldLightHDR

Contents returns internal format structure Data

func (*WorldLightHDR) FromBytes

func (lump *WorldLightHDR) FromBytes(raw []byte) error

FromBytes imports this lump from raw byte Data

func (*WorldLightHDR) ToBytes

func (lump *WorldLightHDR) ToBytes() ([]byte, error)

ToBytes converts this lump back to raw byte Data

Jump to

Keyboard shortcuts

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