Documentation
¶
Index ¶
- Constants
- type Area
- type AreaPortal
- type Brush
- type BrushSide
- type ClipPortalVerts
- type Cubemap
- type DispInfo
- type DispLightmapSamplePosition
- type DispTris
- type DispVert
- type Edge
- type EntData
- type Face
- type FaceHDR
- type FaceId
- type FaceMacroTextureInfo
- type Game
- type ILump
- type Leaf
- type LeafAmbientIndex
- type LeafAmbientIndexHDR
- type LeafAmbientLighting
- type LeafAmbientLightingHDR
- type LeafBrush
- type LeafFace
- type LeafMinDistToWater
- type LeafWaterData
- type Lighting
- type LumpGeneric
- type LumpInfo
- type MapFlags
- type Model
- type Node
- type Occlusion
- type Overlay
- type OverlayFade
- type Pakfile
- type PhysCollide
- type PhysDisp
- type Planes
- type PrimIndice
- type PrimVert
- type Primitive
- type Surfedge
- type TexData
- type TexDataStringTable
- type TexInfo
- type TexdataStringData
- type Unimplemented
- type VertNormal
- type VertNormalIndice
- type Vertex
- type Visibility
- type WorldLight
- type WorldLightHDR
Constants ¶
const MAX_MAP_LEAFS = 65536
Lump 10: Leaf
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 20: Areas
func (*Area) GetData ¶
func (lump *Area) GetData() []primitives.Area
Get internal format structure data
type AreaPortal ¶
type AreaPortal struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 21: Areaportals
func (*AreaPortal) FromBytes ¶
func (lump *AreaPortal) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*AreaPortal) GetData ¶
func (lump *AreaPortal) GetData() []primitives.AreaPortal
Get internal format structure data
func (*AreaPortal) ToBytes ¶
func (lump *AreaPortal) ToBytes() []byte
Dump this lump back to raw byte data
type Brush ¶
type Brush struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 18: Brush
func (*Brush) GetData ¶
func (lump *Brush) GetData() []primitives.Brush
Get internal format structure data
type BrushSide ¶
type BrushSide struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 19: BrushSide
func (*BrushSide) GetData ¶
func (lump *BrushSide) GetData() []primitives.BrushSide
Get internal format structure data
type ClipPortalVerts ¶
type ClipPortalVerts struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 41: ClipPortalVerts
func (*ClipPortalVerts) FromBytes ¶
func (lump *ClipPortalVerts) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*ClipPortalVerts) GetData ¶
func (lump *ClipPortalVerts) GetData() []mgl32.Vec3
Get internal format structure data
func (*ClipPortalVerts) ToBytes ¶
func (lump *ClipPortalVerts) ToBytes() []byte
Dump this lump back to raw byte data
type Cubemap ¶
type Cubemap struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 42: Cubemaps
func (*Cubemap) GetData ¶
func (lump *Cubemap) GetData() []primitives.CubemapSample
Get internal format structure data
type DispInfo ¶
type DispInfo struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 26: DispInfo
func (*DispInfo) GetData ¶
func (lump *DispInfo) GetData() []primitives.DispInfo
Get internal format structure data
type DispLightmapSamplePosition ¶
type DispLightmapSamplePosition struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 34: DispLightmapSamplePosition NOTE: This does NOT have a mapped format yet, and is readable as []byte only
func (*DispLightmapSamplePosition) FromBytes ¶
func (lump *DispLightmapSamplePosition) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*DispLightmapSamplePosition) GetData ¶
func (lump *DispLightmapSamplePosition) GetData() []byte
Get internal format structure data
func (*DispLightmapSamplePosition) ToBytes ¶
func (lump *DispLightmapSamplePosition) ToBytes() []byte
Dump this lump back to raw byte data
type DispTris ¶
type DispTris struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 48: DispTris
func (*DispTris) GetData ¶
func (lump *DispTris) GetData() []primitives.DispTri
Get internal format structure data
type DispVert ¶
type DispVert struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 33: DispVert
func (*DispVert) GetData ¶
func (lump *DispVert) GetData() []primitives.DispVert
Get internal format structure data
type Edge ¶
type Edge struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 12: Edge
type EntData ¶
type EntData struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 0: Entdata
type Face ¶
type Face struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 7: Face
func (*Face) GetData ¶
func (lump *Face) GetData() []primitives.Face
Get internal format structure data
type FaceHDR ¶
type FaceHDR struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 58: FaceHDR
func (*FaceHDR) GetData ¶
func (lump *FaceHDR) GetData() []primitives.Face
Get internal format structure data
type FaceId ¶
type FaceId struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 11: FaceIds
func (*FaceId) GetData ¶
func (lump *FaceId) GetData() []primitives.FaceId
Get internal format structure data
type FaceMacroTextureInfo ¶
type FaceMacroTextureInfo struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 47: FaceMacroTextureInfo
func (*FaceMacroTextureInfo) FromBytes ¶
func (lump *FaceMacroTextureInfo) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*FaceMacroTextureInfo) GetData ¶
func (lump *FaceMacroTextureInfo) GetData() []primitives.FaceMacroTextureInfo
Get internal format structure data
func (*FaceMacroTextureInfo) ToBytes ¶
func (lump *FaceMacroTextureInfo) ToBytes() []byte
Dump this lump back to raw byte data
type Game ¶
type Game struct {
LumpGeneric
Header primitives.Header
GameLumps []primitives.GenericGameLump
LumpOffset int32
// contains filtered or unexported fields
}
Lump 35. @TODO NOTE: This really needs per-game implementations to be completely useful, otherwise we only get staticprop data from it
func (*Game) GetStaticPropLump ¶
func (lump *Game) GetStaticPropLump() *primitives.StaticPropLump
func (*Game) UpdateInternalOffsets ¶
This update the lumps offsets to be relative to the lump, rather than the bsp start
type ILump ¶
type ILump interface {
// Import a []byte to a defined lump structure(s).
FromBytes([]byte, int32)
// Export lump structure back to []byte.
ToBytes() []byte
}
Lump interface. Organise Lump data in a cleaner and more accessible manner
type Leaf ¶
type Leaf struct {
LumpGeneric
// contains filtered or unexported fields
}
func (*Leaf) GetData ¶
func (lump *Leaf) GetData() []primitives.Leaf
Get internal format structure data
type LeafAmbientIndex ¶
type LeafAmbientIndex struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 52: Leaf Ambient Index
func (*LeafAmbientIndex) FromBytes ¶
func (lump *LeafAmbientIndex) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafAmbientIndex) GetData ¶
func (lump *LeafAmbientIndex) GetData() []primitives.LeafAmbientIndex
Get internal format structure data
func (*LeafAmbientIndex) ToBytes ¶
func (lump *LeafAmbientIndex) ToBytes() []byte
Dump this lump back to raw byte data
type LeafAmbientIndexHDR ¶
type LeafAmbientIndexHDR struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 51: Leaf Ambient Index HDR
func (*LeafAmbientIndexHDR) FromBytes ¶
func (lump *LeafAmbientIndexHDR) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafAmbientIndexHDR) GetData ¶
func (lump *LeafAmbientIndexHDR) GetData() []primitives.LeafAmbientIndex
Get internal format structure data
func (*LeafAmbientIndexHDR) ToBytes ¶
func (lump *LeafAmbientIndexHDR) ToBytes() []byte
Dump this lump back to raw byte data
type LeafAmbientLighting ¶
type LeafAmbientLighting struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 56: LeafAmbientLighting
func (*LeafAmbientLighting) FromBytes ¶
func (lump *LeafAmbientLighting) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafAmbientLighting) GetData ¶
func (lump *LeafAmbientLighting) GetData() []primitives.LeafAmbientLighting
Get internal format structure data
func (*LeafAmbientLighting) ToBytes ¶
func (lump *LeafAmbientLighting) ToBytes() []byte
Dump this lump back to raw byte data
type LeafAmbientLightingHDR ¶
type LeafAmbientLightingHDR struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 55: LeafAmbientLightingHDR
func (*LeafAmbientLightingHDR) FromBytes ¶
func (lump *LeafAmbientLightingHDR) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafAmbientLightingHDR) GetData ¶
func (lump *LeafAmbientLightingHDR) GetData() []primitives.LeafAmbientLighting
Get internal format structure data
func (*LeafAmbientLightingHDR) ToBytes ¶
func (lump *LeafAmbientLightingHDR) ToBytes() []byte
Dump this lump back to raw byte data
type LeafBrush ¶
type LeafBrush struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 17: LeafBrush
type LeafFace ¶
type LeafFace struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 16: LeafFace
type LeafMinDistToWater ¶
type LeafMinDistToWater struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 46: LeafMinDistToWater
func (*LeafMinDistToWater) FromBytes ¶
func (lump *LeafMinDistToWater) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafMinDistToWater) GetData ¶
func (lump *LeafMinDistToWater) GetData() []uint16
Get internal format structure data
func (*LeafMinDistToWater) ToBytes ¶
func (lump *LeafMinDistToWater) ToBytes() []byte
Dump this lump back to raw byte data
type LeafWaterData ¶
type LeafWaterData struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 36: leafwaterdata
func (*LeafWaterData) FromBytes ¶
func (lump *LeafWaterData) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*LeafWaterData) GetData ¶
func (lump *LeafWaterData) GetData() []primitives.LeafWaterData
Get internal format structure data
func (*LeafWaterData) ToBytes ¶
func (lump *LeafWaterData) ToBytes() []byte
Dump this lump back to raw byte data
type Lighting ¶
type Lighting struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 8: Lighting
func (*Lighting) GetData ¶
func (lump *Lighting) GetData() []primitives.ColorRGBExponent32
Get internal format structure data
type LumpGeneric ¶
type LumpGeneric struct {
LumpInfo
// contains filtered or unexported fields
}
func (*LumpGeneric) FromBytes ¶
func (lump *LumpGeneric) FromBytes(data []byte, length int32)
Import this lump from raw byte data
func (*LumpGeneric) ToBytes ¶
func (lump *LumpGeneric) ToBytes() []byte
Dump this lump back to raw byte data
type LumpInfo ¶
type LumpInfo struct {
// contains filtered or unexported fields
}
Helper info for a lump
type MapFlags ¶
type MapFlags struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 59: MapFlags
func (*MapFlags) GetData ¶
func (lump *MapFlags) GetData() *primitives.MapFlags
Get internal format structure data
type Model ¶
type Model struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 14: Model
func (*Model) GetData ¶
func (lump *Model) GetData() []primitives.Model
Get internal format structure data
type Node ¶
type Node struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 5: Node
func (*Node) GetData ¶
func (lump *Node) GetData() []primitives.Node
Get internal format structure data
type Occlusion ¶
type Occlusion struct {
LumpGeneric
Count int32
Data []primitives.OcclusionData // len(slice) = Count
PolyDataCount int32
PolyData []primitives.OcclusionPolyData //len(slice) = PolyDataCount
VertexIndexCount int32
VertexIndices []int32 //len(slice) = VertexIndexCount
}
Lump 9: Occlusion
type Overlay ¶
type Overlay struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 45: Overlay Consists of an array of Overlay structs
func (*Overlay) GetData ¶
func (lump *Overlay) GetData() []primitives.Overlay
Get internal format structure data
type OverlayFade ¶
type OverlayFade struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 60: Overlayfades
func (*OverlayFade) FromBytes ¶
func (lump *OverlayFade) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*OverlayFade) GetData ¶
func (lump *OverlayFade) GetData() []primitives.OverlayFade
Get internal format structure data
func (*OverlayFade) ToBytes ¶
func (lump *OverlayFade) ToBytes() []byte
Dump this lump back to raw byte data
type Pakfile ¶
type Pakfile struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 40: Pakfile
type PhysCollide ¶
type PhysCollide struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 20: PhysCollide
func (*PhysCollide) FromBytes ¶
func (lump *PhysCollide) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*PhysCollide) GetData ¶
func (lump *PhysCollide) GetData() []primitives.PhysCollideEntry
Get internal format structure data
func (*PhysCollide) ToBytes ¶
func (lump *PhysCollide) ToBytes() []byte
Dump this lump back to raw byte data
type PhysDisp ¶
type PhysDisp struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 28: PhysDisp
type Planes ¶
type Planes struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 1: Planes
func (*Planes) GetData ¶
func (lump *Planes) GetData() []primitives.Plane
Get internal format structure data
type PrimIndice ¶
type PrimIndice struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 39: PrimIndice
func (*PrimIndice) FromBytes ¶
func (lump *PrimIndice) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*PrimIndice) GetData ¶
func (lump *PrimIndice) GetData() []uint16
Get internal format structure data
func (*PrimIndice) ToBytes ¶
func (lump *PrimIndice) ToBytes() []byte
Dump this lump back to raw byte data
type PrimVert ¶
type PrimVert struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 37: PrimVert
func (*PrimVert) GetData ¶
func (lump *PrimVert) GetData() []primitives.PrimVert
Get internal format structure data
type Primitive ¶
type Primitive struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 36: Primitive
func (*Primitive) GetData ¶
func (lump *Primitive) GetData() []primitives.Primitive
Get internal format structure data
type Surfedge ¶
type Surfedge struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 13: Surfedge
type TexData ¶
type TexData struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 2: TexData
func (*TexData) GetData ¶
func (lump *TexData) GetData() []primitives.TexData
Get internal format structure data
type TexDataStringTable ¶
type TexDataStringTable struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 44: TexDataStringTable
func (*TexDataStringTable) FromBytes ¶
func (lump *TexDataStringTable) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*TexDataStringTable) GetData ¶
func (lump *TexDataStringTable) GetData() []int32
Get internal format structure data
func (*TexDataStringTable) ToBytes ¶
func (lump *TexDataStringTable) ToBytes() []byte
Dump this lump back to raw byte data
type TexInfo ¶
type TexInfo struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 6: TexInfo
func (*TexInfo) GetData ¶
func (lump *TexInfo) GetData() []primitives.TexInfo
Get internal format structure data
type TexdataStringData ¶
type TexdataStringData struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 43: TexdataStringData
func (*TexdataStringData) FromBytes ¶
func (lump *TexdataStringData) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*TexdataStringData) GetData ¶
func (lump *TexdataStringData) GetData() string
Get internal format structure data
func (*TexdataStringData) ToBytes ¶
func (lump *TexdataStringData) ToBytes() []byte
Dump this lump back to raw byte data
type Unimplemented ¶
type Unimplemented struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump n: Unimplemented lump type
func (*Unimplemented) FromBytes ¶
func (lump *Unimplemented) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*Unimplemented) GetData ¶
func (lump *Unimplemented) GetData() []byte
Get internal format structure data
func (*Unimplemented) ToBytes ¶
func (lump *Unimplemented) ToBytes() []byte
Dump this lump back to raw byte data
type VertNormal ¶
type VertNormal struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 30: VertNormal
func (*VertNormal) FromBytes ¶
func (lump *VertNormal) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*VertNormal) GetData ¶
func (lump *VertNormal) GetData() []primitives.VertNormal
Get internal format structure data
func (*VertNormal) ToBytes ¶
func (lump *VertNormal) ToBytes() []byte
Dump this lump back to raw byte data
type VertNormalIndice ¶
type VertNormalIndice struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 31: VertNormalIndice
func (*VertNormalIndice) FromBytes ¶
func (lump *VertNormalIndice) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*VertNormalIndice) GetData ¶
func (lump *VertNormalIndice) GetData() []uint16
Get internal format structure data
func (*VertNormalIndice) ToBytes ¶
func (lump *VertNormalIndice) ToBytes() []byte
Dump this lump back to raw byte data
type Vertex ¶
type Vertex struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 3: Vertex
type Visibility ¶
type Visibility struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 4: Visibility
func (*Visibility) FromBytes ¶
func (lump *Visibility) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*Visibility) GetData ¶
func (lump *Visibility) GetData() *primitives.Vis
Get internal format structure data
func (*Visibility) ToBytes ¶
func (lump *Visibility) ToBytes() []byte
Dump this lump back to raw byte data
type WorldLight ¶
type WorldLight struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 15: Worldlight
func (*WorldLight) FromBytes ¶
func (lump *WorldLight) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*WorldLight) GetData ¶
func (lump *WorldLight) GetData() []primitives.WorldLight
Get internal format structure data
func (*WorldLight) ToBytes ¶
func (lump *WorldLight) ToBytes() []byte
Dump this lump back to raw byte data
type WorldLightHDR ¶
type WorldLightHDR struct {
LumpGeneric
// contains filtered or unexported fields
}
Lump 15: Worldlight
func (*WorldLightHDR) FromBytes ¶
func (lump *WorldLightHDR) FromBytes(raw []byte, length int32)
Import this lump from raw byte data
func (*WorldLightHDR) GetData ¶
func (lump *WorldLightHDR) GetData() []primitives.WorldLight
Get internal format structure data
func (*WorldLightHDR) ToBytes ¶
func (lump *WorldLightHDR) ToBytes() []byte
Dump this lump back to raw byte data
Source Files
¶
- area.go
- areaportal.go
- brush.go
- brushside.go
- clipportalverts.go
- cubemap.go
- dispinfo.go
- displightmapsampleposition.go
- disptris.go
- dispvert.go
- edge.go
- entdata.go
- face.go
- facehdr.go
- faceid.go
- facemacrotextureinfo.go
- game.go
- leaf.go
- leafambientindex.go
- leafambientindexhdr.go
- leafambientlighting.go
- leafambientlightinghdr.go
- leafbrush.go
- leafface.go
- leafmindisttowater.go
- leafwaterdata.go
- lighting.go
- lumps.go
- mapflags.go
- model.go
- node.go
- occlusion.go
- overlay.go
- overlayfade.go
- pakfile.go
- physcollide.go
- physdisp.go
- planes.go
- primindice.go
- primitive.go
- primvert.go
- surfedge.go
- texdata.go
- texdatastringdata.go
- texdatastringtable.go
- texinfo.go
- unimplemented.go
- vertex.go
- vertnormal.go
- vertnormalindice.go
- visibility.go
- worldlight.go
- worldlighthdr.go