Versions in this module Expand all Collapse all v1 v1.1.1 Feb 4, 2020 Changes in this version + const DoomPatchMaxNameLen + const DoomTextureMaxNameLen + const MAX_ORIG_TEXNAME_LEN + const UDMF_LINE_REGEX + const WadLumpNameLimit + var EntryNotFoundError error = errors.New("Entry not found") + var LumpOutOfRangeError = errors.New("Lump index is out of range") + var UDMF_NAMESPACES = [4]string + var ZUDMF_NAMESPACES = [2]string + func DebugLog(header, msg string, args ...interface{}) + func LoadRawPalette(in io.Reader) (color.Palette, error) + func LoadRawPaletteN(in io.Reader, numColors int) (color.Palette, error) + func StartDebugLogging() + func StopDebugLogging() + func ValidUdmfNamespaceP(name string) bool + type AbstractTexture interface + Name func() string + SetName func(newName string) error + ToImage func(pal color.Palette) *image.RGBA + type DoomLevel struct + Linedefs []*Linedef + Nodes []*Node + RawBehavior []byte + RawBlockmap []byte + RawReject []byte + Sectors []*Sector + Segs []*Seg + Sidedefs []*Sidedef + Subsectors []*Subsector + Things []*Thing + Vertices []*Vertex + func (level *DoomLevel) ParseLinedefs(data []byte, hexen bool) error + func (level *DoomLevel) ParseNodes(data []byte) error + func (level *DoomLevel) ParseSectors(data []byte) error + func (level *DoomLevel) ParseSegs(data []byte) error + func (level *DoomLevel) ParseSidedefs(data []byte) error + func (level *DoomLevel) ParseSubsectors(data []byte) error + func (level *DoomLevel) ParseThings(data []byte, hexen bool) error + func (level *DoomLevel) ParseVertices(data []byte) error + type DoomPicColumn struct + OffsetY byte + Pixels []byte + type DoomPicture struct + Columns []*DoomPicColumn + Height uint16 + Left int16 + Top int16 + Width uint16 + func NewDoomPicture() *DoomPicture + func (pic *DoomPicture) Name() string + func (pic *DoomPicture) SetName(newName string) error + func (pic *DoomPicture) ToImage(pal color.Palette) *image.RGBA + type DoomTexture struct + Image *image.RGBA + func NewDoomTexture() *DoomTexture + func (tex *DoomTexture) Name() string + func (tex *DoomTexture) SetName(newName string) error + func (tex *DoomTexture) ToImage(pal color.Palette) *image.RGBA + type LDFlag int32 + const LDFlag_AlwaysOnAutomap + const LDFlag_BlockMonsters + const LDFlag_BlockSound + const LDFlag_BoomUseThrough + const LDFlag_HexActMonsterCross + const LDFlag_HexActPlayerUse + const LDFlag_HexActPlayerUseThrough + const LDFlag_HexActProjCross + const LDFlag_HexActProjectile + const LDFlag_HexBlockEverything + const LDFlag_HexUseActPlayerBump + const LDFlag_HexUseActPlayerMonster + const LDFlag_HexUseMultiple + const LDFlag_Impassible + const LDFlag_LowerUnpegged + const LDFlag_NotOnAutomap + const LDFlag_Secret + const LDFlag_TwoSided + const LDFlag_UpperUnpegged + type Linedef struct + Args [5]uint8 + BackSide int16 + EndVertex int16 + Flags LDFlag + FrontSide int16 + HexenSpecial uint8 + SectorTag int16 + Special int16 + StartVertex int16 + type Node struct + BBLeft int32 + BBRight int32 + EndX int16 + EndY int16 + LeftChild int16 + RightChild int16 + X int16 + Y int16 + type ParsingOpts struct + LexWarnOnBadIdent bool + type Sector struct + CeilingHeight int16 + FloorHeight int16 + LightLevel uint16 + Tag int16 + Type uint16 + func (sect *Sector) CeilingTexture() string + func (sect *Sector) FloorTexture() string + func (sect *Sector) SetCeilingTexture(newVal string) error + func (sect *Sector) SetFloorTexture(newVal string) error + type Seg struct + Angle int16 + Direction int16 + EndVertex int16 + LinedefNum int16 + Offset int16 + StartVertex int16 + type Sidedef struct + Sector int16 + XOffset int16 + YOffset int16 + func (side *Sidedef) LowerTexture() string + func (side *Sidedef) MiddleTexture() string + func (side *Sidedef) SetLowerTexture(newVal string) error + func (side *Sidedef) SetMiddleTexture(newVal string) error + func (side *Sidedef) SetUpperTexture(newVal string) error + func (side *Sidedef) UpperTexture() string + type Subsector struct + FirstSeg uint16 + NumSegs uint16 + type Thing struct + Angle int16 + Args [5]int8 + Flags ThingFlag + ID int16 + Special uint8 + Type int16 + X int16 + Y int16 + Z int16 + type ThingFlag int16 + const ThingFlag_Ambush + const ThingFlag_BoomNoCoop + const ThingFlag_BoomNoDM + const ThingFlag_Easy + const ThingFlag_Hard + const ThingFlag_MBFFriendly + const ThingFlag_MPOnly + const ThingFlag_Normal + const ThingFlag_StrifeAmbush + const ThingFlag_StrifeEasy + const ThingFlag_StrifeFriendly + const ThingFlag_StrifeHard + const ThingFlag_StrifeInvisible + const ThingFlag_StrifeNoSP + const ThingFlag_StrifeNormal + const ThingFlag_StrifeStandStill + const ThingFlag_StrifeTrans + type ThingsLump struct + Things []*Thing + func NewThingsLump() *ThingsLump + type UdmfFile struct + Linedefs []*UdmfLinedef + Sectors []*UdmfSector + Sidedefs []*UdmfSidedef + Things []*UdmfThing + Vertices []*UdmfVertex + func NewUdmfFile(ns string) *UdmfFile + func (obj *UdmfFile) IsZdoom() bool + func (obj *UdmfFile) Namespace() string + func (obj *UdmfFile) SetNamespace(newNS string) bool + type UdmfLinedef struct + Alpha float64 + AnyCross bool + Arg0 int32 + Arg0Str string + Arg1 int32 + Arg2 int32 + Arg3 int32 + Arg4 int32 + BlockEverything bool + BlockFloaters bool + BlockHitscan bool + BlockMonsters bool + BlockPlayers bool + BlockProjectiles bool + BlockSight bool + BlockSound bool + BlockUse bool + Blocking bool + CheckSwitchRange bool + ClipMidTex bool + Comment string + DontDraw bool + DontPegBottom bool + DontPegTop bool + FirstSideOnly bool + ID int32 + Impact bool + JumpOver bool + LockNumber int32 + Mapped bool + MidTex3d bool + MidTex3dImpassible bool + MissileCross bool + MonsterActivate bool + MonsterCross bool + MonsterPush bool + MonsterUse bool + MoreIds string + Name string + PassUse bool + PlayerCross bool + PlayerPush bool + PlayerUse bool + RenderStyle string + RepeatSpecial bool + Secret bool + SideBack int32 + SideFront int32 + Special int32 + Translucent bool + Transparent bool + TwoSided bool + UserKeys map[string]string + V1 int32 + V2 int32 + WrapMidTex bool + ZoneBoundary bool + func NewUdmfLinedef() *UdmfLinedef + type UdmfParseError struct + Text string + func (err *UdmfParseError) Error() string + type UdmfParser struct + IdentsNotFound []string + Udmf *UdmfFile + Warnings []string + func NewUdmfParser() *UdmfParser + func NewUdmfParserWithOpts(opts *ParsingOpts) *UdmfParser + func (parse *UdmfParser) Parse(textmap string) + func (parser *UdmfParser) ParseError(msg string, args ...interface{}) + type UdmfSector struct + AlphaCeiling float64 + AlphaFloor float64 + CeilingGlowColor int32 + CeilingGlowHeight float64 + CeilingPlane_A float64 + CeilingPlane_B float64 + CeilingPlane_C float64 + CeilingPlane_D float64 + CeilingTerrain string + Ceiling_Reflect float64 + Color_Ceiling int32 + Color_Floor int32 + Color_Sprites int32 + Color_WallTop int32 + Color_wallbottom int32 + Comment string + DamageAmount int32 + DamageHazard bool + DamageInterval int32 + DamageTerrainEffect bool + DamageType string + Desaturation float64 + DropActors bool + FadeColor int32 + FloorGlowColor int32 + FloorGlowHeight float64 + FloorPlane_A float64 + FloorPlane_B float64 + FloorPlane_C float64 + FloorPlane_D float64 + FloorTerrain string + Floor_Reflect float64 + FogDensity int32 + Gravity float64 + HeightCeiling int32 + HeightFloor int32 + Hidden bool + ID int32 + Leakiness int32 + LightCeiling int32 + LightCeilingAbsolute bool + LightColor int32 + LightFloor int32 + LightFloorAbsolute bool + LightLevel int32 + MoreIds string + Name string + NoFallingDamage bool + NoRespawn bool + PortalCeilingBlockSound bool + PortalCeilingDisabled bool + PortalCeilingNoPass bool + PortalCeilingNoRender bool + PortalCeilingOverlayType string + PortalFloorBlockSound bool + PortalFloorDisabled bool + PortalFloorNoPass bool + PortalFloorNoRender bool + PortalFloorOverlayType string + RenderStyleCeiling string + RenderStyleFloor string + RotationCeiling float64 + RotationFloor float64 + Silent bool + SoundSequence string + Special int32 + TextureCeiling string + TextureFloor string + UserKeys map[string]string + WaterZone bool + XPanningCeiling float64 + XPanningFloor float64 + XScaleCeiling float64 + XScaleFloor float64 + YPanningCeiling float64 + YPanningFloor float64 + YScaleCeiling float64 + YScaleFloor float64 + func NewUdmfSector() *UdmfSector + type UdmfSidedef struct + ClipMidTex bool + Comment string + ID int32 + Light int32 + LightAbsolute bool + LightFog bool + Name string + NoDecals bool + NoFakeContrast bool + OffsetX int32 + OffsetX_Bottom float64 + OffsetX_Mid float64 + OffsetX_Top float64 + OffsetY int32 + OffsetY_Bottom float64 + OffsetY_Mid float64 + OffsetY_Top float64 + ScaleX_Bottom float64 + ScaleX_Mid float64 + ScaleX_Top float64 + ScaleY_Bottom float64 + ScaleY_Mid float64 + ScaleY_Top float64 + Sector int32 + SmoothLighting bool + TextureBottom string + TextureMiddle string + TextureTop string + UserKeys map[string]string + WrapMidTex bool + func NewUdmfSidedef() *UdmfSidedef + type UdmfThing struct + Alpha float64 + Ambush bool + Angle int32 + Arg0 int32 + Arg0Str string + Arg1 int32 + Arg2 int32 + Arg3 int32 + Arg4 int32 + Class1 bool + Class10 bool + Class11 bool + Class12 bool + Class13 bool + Class14 bool + Class15 bool + Class16 bool + Class2 bool + Class3 bool + Class4 bool + Class5 bool + Class6 bool + Class7 bool + Class8 bool + Class9 bool + Comment string + Conversation int32 + Coop bool + CountSecret bool + Dm bool + Dormant bool + FillColor int32 + FloatBobPhase int32 + Friend bool + Gravity float64 + Health int32 + Height float64 + ID int32 + Invisible bool + Name string + Pitch int32 + RenderStyle string + Roll int32 + Scale float64 + ScaleX float64 + ScaleY float64 + Score int32 + Single bool + Skill1 bool + Skill10 bool + Skill11 bool + Skill12 bool + Skill13 bool + Skill14 bool + Skill15 bool + Skill16 bool + Skill2 bool + Skill3 bool + Skill4 bool + Skill5 bool + Skill6 bool + Skill7 bool + Skill8 bool + Skill9 bool + Special int32 + Standing bool + StrifeAlly bool + Translucent bool + Type int32 + UserKeys map[string]string + X float64 + Y float64 + func NewUdmfThing() *UdmfThing + type UdmfVertex struct + ID int32 + Name string + UserKeys map[string]string + X float64 + Y float64 + ZCeiling float64 + ZFloor float64 + func NewUdmfVertex() *UdmfVertex + type Vertex struct + X int16 + Y int16 + type WadFile struct + Filename string + func NewWadFile() *WadFile + func (wad *WadFile) AddLump(newLump *WadLump) error + func (wad *WadFile) ClearLumps() + func (wad *WadFile) GetDoomLevel(mapName string) (*DoomLevel, error) + func (wad *WadFile) GetLump(idx int) (*WadLump, error) + func (wad *WadFile) GetLumpByName(name string) (*WadLump, int, error) + func (wad *WadFile) GetPnamesImages(pnamesLmp string) ([]*DoomPicture, error) + func (wad *WadFile) Load(inStream io.ReadSeeker) error + func (wad *WadFile) NumLumps() int + func (wad *WadFile) ParseTextureLump(lmpName string, pnamesLmpName string, pal color.Palette) ([]*DoomTexture, error) + func (wad *WadFile) RemoveLump(idx int) error + func (wad *WadFile) Save(outStream io.WriteSeeker) error + func (wad *WadFile) SetWadType(newType WadFileType) error + func (wad *WadFile) WadType() WadFileType + func (wad *WadFile) WithAllLumps(fn WadFileLumpFunc) error + type WadFileInterface interface + AddLump func(newLump *WadLump) error + ClearLumps func() + GetLump func(idx int) (*WadLump, error) + GetLumpByName func(name string) (*WadLump, int, error) + Load func(inStream io.ReadSeeker) error + Lumps func() []*WadLump + NumLumps func() int + RemoveLump func(idx int) error + Save func(outStream io.WriteSeeker) error + WithAllLumps func(WadFileLumpFunc) error + type WadFileLumpFunc func(int, *WadLump) error + type WadFileType string + const WadFile_IWAD + const WadFile_PWAD + type WadLump struct + func NewWadLump() *WadLump + func (lmp *WadLump) CreateDoomPicture() (*DoomPicture, error) + func (lmp *WadLump) LoadData(in io.ReadSeeker) error + func (lmp *WadLump) LoadEntry(in io.ReadSeeker) error + func (obj *WadLump) Data() []byte + func (obj *WadLump) Name() string + func (obj *WadLump) SaveData(out io.WriteSeeker) error + func (obj *WadLump) SaveEntry(out io.WriteSeeker) error + func (obj *WadLump) SetData(newData []byte) + func (obj *WadLump) SetName(newName string) error + func (obj *WadLump) Size() int32 + func (obj *WadLump) ValidNameP(name string) bool + type WadLumpInterface interface + Data func() []byte + LoadData func(in io.ReadSeeker) error + LoadEntry func(in io.ReadSeeker) error + Name func() string + SaveData func(out io.WriteSeeker) error + SaveEntry func(out io.WriteSeeker) error + SetData func(newData []byte) + SetName func(string) error + Size func() int32 + ValidNameP func(name string) bool