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 GameGeneric
- type Leaf
- type LeafAmbientIndex
- type LeafAmbientIndexHDR
- type LeafAmbientLighting
- type LeafAmbientLightingHDR
- type LeafBrush
- type LeafFace
- type LeafMinDistToWater
- type LeafWaterData
- type Lighting
- type MapFlags
- type Metadata
- 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 TexDataStringData
- type TexDataStringTable
- type TexInfo
- type Unimplemented
- type VertNormal
- type VertNormalIndice
- type Vertex
- type Visibility
- type WorldLight
- type WorldLightHDR
Constants ¶
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
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
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
type ClipPortalVerts ¶
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
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
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
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
type Edge ¶
Edge is Lump 12: Edge
type EntData ¶
EntData is Lump 0: Entdata
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
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
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
type FaceMacroTextureInfo ¶
type FaceMacroTextureInfo struct {
Metadata
Data []primitives.FaceMacroTextureInfo `json:"data"`
}
FaceMacroTextureInfo is Lump 47: FaceMacroTextureInfo
func (*FaceMacroTextureInfo) Contents ¶
func (lump *FaceMacroTextureInfo) Contents() []primitives.FaceMacroTextureInfo
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) GetStaticPropLump ¶
func (lump *Game) GetStaticPropLump() *primitive.StaticPropLump
GetStaticPropLump returns the staticprop lump.
func (*Game) SetAbsoluteFileOffset ¶
SetAbsoluteFileOffset updates the lumps offsets to be relative to the lump, rather than the bsp start.
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
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 ¶
func (lump *LeafAmbientLighting) Contents() []primitives.LeafAmbientLighting
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 ¶
func (lump *LeafAmbientLightingHDR) Contents() []primitives.LeafAmbientLighting
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 ¶
LeafBrush is Lump 17: LeafBrush
type LeafFace ¶
LeafFace is Lump 16: LeafFace
type LeafMinDistToWater ¶
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
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
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata is a Helper info for a lump
func (*Metadata) SetVersion ¶
SetVersion sets bsp version of lump
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
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
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
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
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
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 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
type PrimIndice ¶
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
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
type Surfedge ¶
Surfedge is Lump 13: Surfedge
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
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 ¶
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
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 ¶
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 ¶
Vertex is Lump 3: Vertex
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
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
- lump.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
- vertex.go
- vertnormal.go
- vertnormalindice.go
- visibility.go
- worldlight.go
- worldlighthdr.go