wad

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FooBspStub = `` /* 72698-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type BSP

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

func NewBsp

func NewBsp(level *Level) *BSP

func (*BSP) FindNode

func (bsp *BSP) FindNode(x int16, y int16) (uint16, bool)

func (*BSP) FindOppositeSubSectorByHulls

func (bsp *BSP) FindOppositeSubSectorByHulls(subSectorId uint16, is2 *model.InputSegment, wallSectors map[uint16]bool) []*model.InputSegment

func (*BSP) FindOppositeSubSectorByPoints

func (bsp *BSP) FindOppositeSubSectorByPoints(subSectorId uint16, is2 *model.InputSegment, wallSectors map[uint16]bool) []*model.InputSegment

func (*BSP) FindRect

func (bsp *BSP) FindRect(x int16, y int16) (lumps.BBox, bool)

func (*BSP) FindSector

func (bsp *BSP) FindSector(x int16, y int16) (uint16, uint16, *lumps.Sector)

func (*BSP) FindSubSector

func (bsp *BSP) FindSubSector(x int16, y int16) (uint16, bool)

func (*BSP) FindSubSectorForced

func (bsp *BSP) FindSubSectorForced(x int16, y int16) (uint16, bool)

func (*BSP) TraverseBsp

func (bsp *BSP) TraverseBsp(container *[]uint16, x int16, y int16, root uint16)

type Builder

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

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Setup

func (b *Builder) Setup(wadFile string, levelNumber int) (*model.Input, error)

type FooBsp

type FooBsp struct {
	Container []*FooBspElement
}

func NewFooBsp

func NewFooBsp() *FooBsp

func (*FooBsp) Add

func (f *FooBsp) Add(sector string, subSector string, startX int16, startY int16, endX int16, endY int16, result uint16, tag string)

func (*FooBsp) Print

func (f *FooBsp) Print()

type FooBspElement

type FooBspElement struct {
	Sector    uint16
	SubSector uint16
	StartX    int16
	StartY    int16
	EndX      int16
	EndY      int16
	Result    uint16
	Tag       string
}

func NewFooBspElement

func NewFooBspElement(sector string, subSector string, startX int16, startY int16, endX int16, endY int16, result uint16, tag string) *FooBspElement

type Level

type Level struct {
	Things     []*lumps.Thing
	LineDefs   []*lumps.LineDef
	SideDefs   []*lumps.SideDef
	Vertexes   []*lumps.Vertex
	Segments   []*lumps.Seg
	SubSectors []*lumps.SubSector
	Sectors    []*lumps.Sector
	Nodes      []*lumps.Node
}

func (*Level) GetSectorFromSubSector

func (l *Level) GetSectorFromSubSector(subSectorId uint16) (uint16, bool)

func (*Level) SegmentOppositeSideDef

func (l *Level) SegmentOppositeSideDef(seg *lumps.Seg, lineDef *lumps.LineDef) (int16, *lumps.SideDef)

func (*Level) SegmentSideDef

func (l *Level) SegmentSideDef(seg *lumps.Seg, lineDef *lumps.LineDef) (int16, *lumps.SideDef)

type Point

type Point struct {
	X int16
	Y int16
}

type Point3

type Point3 struct {
	X float64
	Y float64
	Z float64
	U float64
	V float64
}

func MakePoint3

func MakePoint3(x, y, z, u, v int16) Point3

func MakePoint3F

func MakePoint3F(x, y, z, u, v float64) Point3

type QuerySegment

type QuerySegment struct {
	Partial int
	Segment *model.InputSegment
}

type SegmentData

type SegmentData struct {
	Start XY
	End   XY
	Count int
}

type WAD

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

func New

func New() *WAD

func (*WAD) GetFlat

func (w *WAD) GetFlat(flatName string) (*lumps.Flat, bool)

func (*WAD) GetImage

func (w *WAD) GetImage(pNameNumber int16) (*lumps.Image, bool)

func (*WAD) GetLevel

func (w *WAD) GetLevel(levelName string) (*Level, error)

func (*WAD) GetLevels

func (w *WAD) GetLevels() []string

func (*WAD) GetTexture

func (w *WAD) GetTexture(name string) (*lumps.Texture, bool)

func (*WAD) GetTextureImage

func (w *WAD) GetTextureImage(textureName string) (*image.RGBA, error)

func (*WAD) Load

func (w *WAD) Load(filename string) error

type XY

type XY struct {
	X float64
	Y float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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