Documentation ¶
Overview ¶
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
dwaddle - Go library for manipulating Doom and Quake WAD files Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.2
Index ¶
- Constants
- Variables
- 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
- type DoomLevel
- 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
- type DoomPicture
- type DoomTexture
- type LDFlag
- type Linedef
- type Node
- type ParsingOpts
- type Sector
- type Seg
- type Sidedef
- 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
- type Thing
- type ThingFlag
- type ThingsLump
- type UdmfFile
- type UdmfLinedef
- type UdmfParseError
- type UdmfParser
- type UdmfSector
- type UdmfSidedef
- type UdmfThing
- type UdmfVertex
- type Vertex
- type 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
- type WadFileLumpFunc
- type WadFileType
- type WadLump
- func (lmp *WadLump) CreateDoomPicture() (*DoomPicture, error)
- func (obj *WadLump) Data() []byte
- func (lmp *WadLump) LoadData(in io.ReadSeeker) error
- func (lmp *WadLump) LoadEntry(in io.ReadSeeker) error
- 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
Constants ¶
const ( DoomTextureMaxNameLen = 8 DoomPatchMaxNameLen = 8 )
const MAX_ORIG_TEXNAME_LEN = 8
const (
UDMF_LINE_REGEX = "[;{}]"
)
const WadLumpNameLimit = 8
Variables ¶
var EntryNotFoundError error = errors.New("Entry not found")
var LumpOutOfRangeError = errors.New("Lump index is out of range")
var UDMF_NAMESPACES = [4]string{
"Doom",
"Heretic",
"Hexen",
"Strife"}
var ZUDMF_NAMESPACES = [2]string{
"ZDoom",
"ZDoomTranslated"}
Functions ¶
func LoadRawPalette ¶
Loads a palette from the stream until no more colors can be read. This will return a new *WPalette instance and nil on success, or nil and an error on failure.
func LoadRawPaletteN ¶
Loads up to numColors colors from a palette from the stream. This will return a new *WPalette instance and nil on success, or nil and an error on failure.
func StartDebugLogging ¶
func StartDebugLogging()
func StopDebugLogging ¶
func StopDebugLogging()
func ValidUdmfNamespaceP ¶
Types ¶
type AbstractTexture ¶
type DoomLevel ¶
type DoomLevel struct { Things []*Thing Linedefs []*Linedef Sidedefs []*Sidedef Vertices []*Vertex Segs []*Seg Subsectors []*Subsector Nodes []*Node Sectors []*Sector RawBlockmap []byte RawReject []byte RawBehavior []byte }
Represents a non-UDMF Doom level
func (*DoomLevel) ParseLinedefs ¶
func (*DoomLevel) ParseNodes ¶
func (*DoomLevel) ParseSectors ¶
func (*DoomLevel) ParseSidedefs ¶
func (*DoomLevel) ParseSubsectors ¶
func (*DoomLevel) ParseVertices ¶
type DoomPicColumn ¶
type DoomPicture ¶
type DoomPicture struct { Width uint16 Height uint16 Left int16 Top int16 Columns []*DoomPicColumn // contains filtered or unexported fields }
func NewDoomPicture ¶
func NewDoomPicture() *DoomPicture
func (*DoomPicture) Name ¶
func (pic *DoomPicture) Name() string
func (*DoomPicture) SetName ¶
func (pic *DoomPicture) SetName(newName string) error
type DoomTexture ¶
func NewDoomTexture ¶
func NewDoomTexture() *DoomTexture
func (*DoomTexture) Name ¶
func (tex *DoomTexture) Name() string
func (*DoomTexture) SetName ¶
func (tex *DoomTexture) SetName(newName string) error
type LDFlag ¶
type LDFlag int32
const ( LDFlag_Impassible LDFlag = 0x0001 LDFlag_BlockMonsters LDFlag = 0x0002 LDFlag_TwoSided LDFlag = 0x0004 LDFlag_UpperUnpegged LDFlag = 0x0008 LDFlag_LowerUnpegged LDFlag = 0x0010 LDFlag_Secret LDFlag = 0x0020 LDFlag_BlockSound LDFlag = 0x0040 LDFlag_NotOnAutomap LDFlag = 0x0080 LDFlag_AlwaysOnAutomap LDFlag = 0x0100 LDFlag_BoomUseThrough LDFlag = 0x0200 LDFlag_HexUseMultiple LDFlag = 0x0200 LDFlag_HexActPlayerUse LDFlag = 0x0400 LDFlag_HexActMonsterCross LDFlag = 0x0800 LDFlag_HexActProjectile LDFlag = 0x0C00 LDFlag_HexUseActPlayerBump LDFlag = 0x1000 LDFlag_HexActProjCross LDFlag = 0x1400 LDFlag_HexActPlayerUseThrough LDFlag = 0x1800 LDFlag_HexUseActPlayerMonster LDFlag = 0x2000 /* 0x4000 not used */ LDFlag_HexBlockEverything LDFlag = 0x8000 )
type ParsingOpts ¶
type ParsingOpts struct {
LexWarnOnBadIdent bool
}
type Sector ¶
type Sector struct { FloorHeight int16 CeilingHeight int16 LightLevel uint16 Type uint16 Tag int16 // contains filtered or unexported fields }
func (*Sector) CeilingTexture ¶
func (*Sector) FloorTexture ¶
func (*Sector) SetCeilingTexture ¶
func (*Sector) SetFloorTexture ¶
type Sidedef ¶
type Sidedef struct { XOffset int16 YOffset int16 Sector int16 // contains filtered or unexported fields }
func (*Sidedef) LowerTexture ¶
func (*Sidedef) MiddleTexture ¶
func (*Sidedef) SetLowerTexture ¶
func (*Sidedef) SetMiddleTexture ¶
func (*Sidedef) SetUpperTexture ¶
func (*Sidedef) UpperTexture ¶
type ThingFlag ¶
type ThingFlag int16
const ( ThingFlag_Easy ThingFlag = 0x0001 ThingFlag_Normal ThingFlag = 0x0002 ThingFlag_Hard ThingFlag = 0x0004 ThingFlag_Ambush ThingFlag = 0x0008 ThingFlag_MPOnly ThingFlag = 0x0010 ThingFlag_BoomNoDM ThingFlag = 0x0020 ThingFlag_BoomNoCoop ThingFlag = 0x0040 ThingFlag_MBFFriendly ThingFlag = 0x0080 ThingFlag_StrifeEasy ThingFlag = 0x0001 ThingFlag_StrifeNormal ThingFlag = 0x0002 ThingFlag_StrifeHard ThingFlag = 0x0004 ThingFlag_StrifeStandStill ThingFlag = 0x0008 ThingFlag_StrifeNoSP ThingFlag = 0x0010 ThingFlag_StrifeAmbush ThingFlag = 0x0020 ThingFlag_StrifeFriendly ThingFlag = 0x0040 /* 0x0080 not used */ ThingFlag_StrifeTrans ThingFlag = 0x0100 ThingFlag_StrifeInvisible ThingFlag = 0x0200 )
type ThingsLump ¶
type ThingsLump struct {
Things []*Thing
}
func NewThingsLump ¶
func NewThingsLump() *ThingsLump
type UdmfFile ¶
type UdmfFile struct { Vertices []*UdmfVertex Linedefs []*UdmfLinedef Sidedefs []*UdmfSidedef Sectors []*UdmfSector Things []*UdmfThing // contains filtered or unexported fields }
func NewUdmfFile ¶
func (*UdmfFile) SetNamespace ¶
type UdmfLinedef ¶
type UdmfLinedef struct { ID int32 Name string UserKeys map[string]string Comment string V1 int32 V2 int32 Blocking bool BlockMonsters bool BlockSound bool BlockFloaters bool // Strife-specific TwoSided bool DontPegTop bool DontPegBottom bool Secret bool DontDraw bool Mapped bool PassUse bool // Not in Strife/Heretic/Hexen namespaces // Strife-specific flags Translucent bool JumpOver bool // SPAC flags PlayerCross bool PlayerUse bool MonsterCross bool MonsterUse bool Impact bool PlayerPush bool MonsterPush bool MissileCross bool RepeatSpecial bool // Linedef special information Special int32 Arg0 int32 Arg1 int32 Arg2 int32 Arg3 int32 Arg4 int32 SideFront int32 SideBack int32 // ZDoom Alpha float64 RenderStyle string AnyCross bool MonsterActivate bool BlockPlayers bool BlockEverything bool FirstSideOnly bool ZoneBoundary bool ClipMidTex bool WrapMidTex bool MidTex3d bool MidTex3dImpassible bool CheckSwitchRange bool BlockProjectiles bool BlockUse bool BlockSight bool BlockHitscan bool Transparent bool LockNumber int32 Arg0Str string MoreIds string // contains filtered or unexported fields }
func NewUdmfLinedef ¶
func NewUdmfLinedef() *UdmfLinedef
type UdmfParseError ¶
type UdmfParseError struct {
Text string
}
func (*UdmfParseError) Error ¶
func (err *UdmfParseError) Error() string
type UdmfParser ¶
type UdmfParser struct { Udmf *UdmfFile IdentsNotFound []string Warnings []string // contains filtered or unexported fields }
func NewUdmfParser ¶
func NewUdmfParser() *UdmfParser
func NewUdmfParserWithOpts ¶
func NewUdmfParserWithOpts(opts *ParsingOpts) *UdmfParser
func (*UdmfParser) Parse ¶
func (parse *UdmfParser) Parse(textmap string)
func (*UdmfParser) ParseError ¶
func (parser *UdmfParser) ParseError(msg string, args ...interface{})
type UdmfSector ¶
type UdmfSector struct { ID int32 Name string UserKeys map[string]string Comment string Special int32 HeightFloor int32 HeightCeiling int32 TextureFloor string TextureCeiling string LightLevel int32 // ZDoom XPanningFloor float64 YPanningFloor float64 XPanningCeiling float64 YPanningCeiling float64 XScaleFloor float64 YScaleFloor float64 XScaleCeiling float64 YScaleCeiling float64 RotationFloor float64 RotationCeiling float64 CeilingPlane_A float64 CeilingPlane_B float64 CeilingPlane_C float64 CeilingPlane_D float64 FloorPlane_A float64 FloorPlane_B float64 FloorPlane_C float64 FloorPlane_D float64 LightFloor int32 LightCeiling int32 LightFloorAbsolute bool LightCeilingAbsolute bool AlphaFloor float64 AlphaCeiling float64 Gravity float64 RenderStyleFloor string RenderStyleCeiling string LightColor int32 FadeColor int32 Desaturation float64 Silent bool NoFallingDamage bool DropActors bool NoRespawn bool SoundSequence string Hidden bool WaterZone bool MoreIds string DamageAmount int32 DamageType string DamageInterval int32 Leakiness int32 DamageTerrainEffect bool DamageHazard bool FloorTerrain string CeilingTerrain string Floor_Reflect float64 Ceiling_Reflect float64 FogDensity int32 FloorGlowColor int32 FloorGlowHeight float64 CeilingGlowColor int32 CeilingGlowHeight float64 Color_Floor int32 Color_Ceiling int32 Color_WallTop int32 Color_wallbottom int32 Color_Sprites int32 PortalCeilingBlockSound bool PortalCeilingDisabled bool PortalCeilingNoPass bool PortalCeilingNoRender bool PortalCeilingOverlayType string PortalFloorBlockSound bool PortalFloorDisabled bool PortalFloorNoPass bool PortalFloorNoRender bool PortalFloorOverlayType string // contains filtered or unexported fields }
func NewUdmfSector ¶
func NewUdmfSector() *UdmfSector
type UdmfSidedef ¶
type UdmfSidedef struct { ID int32 Name string UserKeys map[string]string Comment string OffsetX int32 OffsetY int32 TextureTop string TextureBottom string TextureMiddle string Sector int32 //ZDoom ScaleX_Top float64 ScaleY_Top float64 ScaleX_Mid float64 ScaleY_Mid float64 ScaleX_Bottom float64 ScaleY_Bottom float64 OffsetX_Top float64 OffsetY_Top float64 OffsetX_Mid float64 OffsetY_Mid float64 OffsetX_Bottom float64 OffsetY_Bottom float64 Light int32 LightAbsolute bool LightFog bool NoFakeContrast bool SmoothLighting bool ClipMidTex bool WrapMidTex bool NoDecals bool // contains filtered or unexported fields }
func NewUdmfSidedef ¶
func NewUdmfSidedef() *UdmfSidedef
type UdmfThing ¶
type UdmfThing struct { ID int32 Name string UserKeys map[string]string Comment string X float64 Y float64 Height float64 Angle int32 Type int32 Skill1 bool Skill2 bool Skill3 bool Skill4 bool Skill5 bool Ambush bool Single bool Dm bool Coop bool Friend bool // Not supported in Strife/Heretic/Hexen namspaces // These are not supported in the Doom/Strife/Heretic namespaces Dormant bool Class1 bool Class2 bool Class3 bool // These are Strife-specific Standing bool StrifeAlly bool Translucent bool Invisible bool // Thing specials are Hexen-only Special int32 Arg0 int32 Arg1 int32 Arg2 int32 Arg3 int32 Arg4 int32 // ZDoom Skill6 bool Skill7 bool Skill8 bool Skill9 bool Skill10 bool Skill11 bool Skill12 bool Skill13 bool Skill14 bool Skill15 bool Skill16 bool Class4 bool Class5 bool Class6 bool Class7 bool Class8 bool Class9 bool Class10 bool Class11 bool Class12 bool Class13 bool Class14 bool Class15 bool Class16 bool Conversation int32 CountSecret bool Arg0Str string Gravity float64 Health int32 RenderStyle string FillColor int32 Alpha float64 Score int32 Pitch int32 Roll int32 ScaleX float64 ScaleY float64 Scale float64 FloatBobPhase int32 // contains filtered or unexported fields }
func NewUdmfThing ¶
func NewUdmfThing() *UdmfThing
type UdmfVertex ¶
type UdmfVertex struct { ID int32 Name string UserKeys map[string]string X float64 Y float64 // ZDoom ZFloor float64 ZCeiling float64 // contains filtered or unexported fields }
func NewUdmfVertex ¶
func NewUdmfVertex() *UdmfVertex
type WadFile ¶
type WadFile struct { Filename string // contains filtered or unexported fields }
func NewWadFile ¶
func NewWadFile() *WadFile
func (*WadFile) ClearLumps ¶
func (wad *WadFile) ClearLumps()
func (*WadFile) GetLumpByName ¶
func (*WadFile) GetPnamesImages ¶
func (wad *WadFile) GetPnamesImages(pnamesLmp string) ([]*DoomPicture, error)
func (*WadFile) ParseTextureLump ¶
func (*WadFile) RemoveLump ¶
func (*WadFile) SetWadType ¶
func (wad *WadFile) SetWadType(newType WadFileType) error
func (*WadFile) WadType ¶
func (wad *WadFile) WadType() WadFileType
func (*WadFile) WithAllLumps ¶
func (wad *WadFile) WithAllLumps(fn WadFileLumpFunc) error
type WadFileInterface ¶
type WadFileInterface interface { NumLumps() int Lumps() []*WadLump AddLump(newLump *WadLump) error RemoveLump(idx int) error ClearLumps() GetLumpByName(name string) (*WadLump, int, error) GetLump(idx int) (*WadLump, error) Load(inStream io.ReadSeeker) error Save(outStream io.WriteSeeker) error WithAllLumps(WadFileLumpFunc) error }
type WadFileLumpFunc ¶
type WadFileType ¶
type WadFileType string
const ( WadFile_IWAD WadFileType = "IWAD" WadFile_PWAD WadFileType = "PWAD" )
type WadLump ¶
type WadLump struct {
// contains filtered or unexported fields
}
The lump type used in Doom WAD files
func NewWadLump ¶
func NewWadLump() *WadLump
func (*WadLump) CreateDoomPicture ¶
func (lmp *WadLump) CreateDoomPicture() (*DoomPicture, error)
func (*WadLump) ValidNameP ¶
type WadLumpInterface ¶
type WadLumpInterface interface { Name() string SetName(string) error ValidNameP(name string) bool Size() int32 Data() []byte SetData(newData []byte) LoadEntry(in io.ReadSeeker) error LoadData(in io.ReadSeeker) error SaveData(out io.WriteSeeker) error SaveEntry(out io.WriteSeeker) error }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
dwaddle
Waddle-Go - Various utilities for Doom and Quake combined in one program Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
Waddle-Go - Various utilities for Doom and Quake combined in one program Copyright (C) 2019 Alexa Jones-Gonzales <alexa@partition36.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |