dwaddle

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

README

Dwaddle is a command line program for manipulating Doom WAD files (and a few other things). Unlike most WAD editors, however, Dwaddle mostly focuses on features I didn't find in other editors, yet realized I still needed. The result is a set of "modes" that Dwaddle can run in. These are:

   collage: Creates a texture collage from a WAD file
   gimppal: Converts raw palettes to Gimp palette files (*.gpl)
  optimpk3: Optimizes GZDoom PK3 files by removing unused textures
            from the PK3 file
   palconv: Converts images to a specified palette.  Can be used on
            single images or to process batches.
  udmfinfo: Prints out information about a UDMF level
   wadtool: Modify and export the contents of WAD files

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

View Source
const (
	DoomTextureMaxNameLen = 8
	DoomPatchMaxNameLen   = 8
)
View Source
const MAX_ORIG_TEXNAME_LEN = 8
View Source
const (
	UDMF_LINE_REGEX = "[;{}]"
)
View Source
const WadLumpNameLimit = 8

Variables

View Source
var EntryNotFoundError error = errors.New("Entry not found")
View Source
var LumpOutOfRangeError = errors.New("Lump index is out of range")
View Source
var UDMF_NAMESPACES = [4]string{
	"Doom",
	"Heretic",
	"Hexen",
	"Strife"}
View Source
var ZUDMF_NAMESPACES = [2]string{
	"ZDoom",
	"ZDoomTranslated"}

Functions

func DebugLog

func DebugLog(header, msg string, args ...interface{})

func LoadRawPalette

func LoadRawPalette(in io.Reader) (color.Palette, error)

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

func LoadRawPaletteN(in io.Reader, numColors int) (color.Palette, error)

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

func ValidUdmfNamespaceP(name string) bool

Types

type AbstractTexture

type AbstractTexture interface {
	Name() string
	SetName(newName string) error
	ToImage(pal color.Palette) *image.RGBA
}

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 (level *DoomLevel) ParseLinedefs(data []byte, hexen bool) error

func (*DoomLevel) ParseNodes

func (level *DoomLevel) ParseNodes(data []byte) error

func (*DoomLevel) ParseSectors

func (level *DoomLevel) ParseSectors(data []byte) error

func (*DoomLevel) ParseSegs

func (level *DoomLevel) ParseSegs(data []byte) error

func (*DoomLevel) ParseSidedefs

func (level *DoomLevel) ParseSidedefs(data []byte) error

func (*DoomLevel) ParseSubsectors

func (level *DoomLevel) ParseSubsectors(data []byte) error

func (*DoomLevel) ParseThings

func (level *DoomLevel) ParseThings(data []byte, hexen bool) error

func (*DoomLevel) ParseVertices

func (level *DoomLevel) ParseVertices(data []byte) error

type DoomPicColumn

type DoomPicColumn struct {
	OffsetY byte
	Pixels  []byte
}

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

func (*DoomPicture) ToImage

func (pic *DoomPicture) ToImage(pal color.Palette) *image.RGBA

type DoomTexture

type DoomTexture struct {
	Image *image.RGBA
	// contains filtered or unexported fields
}

func NewDoomTexture

func NewDoomTexture() *DoomTexture

func (*DoomTexture) Name

func (tex *DoomTexture) Name() string

func (*DoomTexture) SetName

func (tex *DoomTexture) SetName(newName string) error

func (*DoomTexture) ToImage

func (tex *DoomTexture) ToImage(pal color.Palette) *image.RGBA

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 Linedef

type Linedef struct {
	StartVertex int16
	EndVertex   int16
	Flags       LDFlag
	Special     int16
	SectorTag   int16
	FrontSide   int16
	BackSide    int16

	// Hexen specific
	HexenSpecial uint8
	Args         [5]uint8
}

type Node

type Node struct {
	X          int16
	Y          int16
	EndX       int16
	EndY       int16
	BBRight    int32
	BBLeft     int32
	RightChild int16
	LeftChild  int16
}

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 (sect *Sector) CeilingTexture() string

func (*Sector) FloorTexture

func (sect *Sector) FloorTexture() string

func (*Sector) SetCeilingTexture

func (sect *Sector) SetCeilingTexture(newVal string) error

func (*Sector) SetFloorTexture

func (sect *Sector) SetFloorTexture(newVal string) error

type Seg

type Seg struct {
	StartVertex int16
	EndVertex   int16
	Angle       int16
	LinedefNum  int16
	Direction   int16
	Offset      int16
}

type Sidedef

type Sidedef struct {
	XOffset int16
	YOffset int16
	Sector  int16
	// contains filtered or unexported fields
}

func (*Sidedef) LowerTexture

func (side *Sidedef) LowerTexture() string

func (*Sidedef) MiddleTexture

func (side *Sidedef) MiddleTexture() string

func (*Sidedef) SetLowerTexture

func (side *Sidedef) SetLowerTexture(newVal string) error

func (*Sidedef) SetMiddleTexture

func (side *Sidedef) SetMiddleTexture(newVal string) error

func (*Sidedef) SetUpperTexture

func (side *Sidedef) SetUpperTexture(newVal string) error

func (*Sidedef) UpperTexture

func (side *Sidedef) UpperTexture() string

type Subsector

type Subsector struct {
	NumSegs  uint16
	FirstSeg uint16
}

type Thing

type Thing struct {
	X     int16
	Y     int16
	Angle int16
	Type  int16
	Flags ThingFlag

	// Hexen format
	ID      int16
	Z       int16
	Special uint8
	Args    [5]int8
}

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 NewUdmfFile(ns string) *UdmfFile

func (*UdmfFile) IsZdoom

func (obj *UdmfFile) IsZdoom() bool

func (*UdmfFile) Namespace

func (obj *UdmfFile) Namespace() string

func (*UdmfFile) SetNamespace

func (obj *UdmfFile) SetNamespace(newNS string) bool

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 Vertex

type Vertex struct {
	X int16
	Y int16
}

type WadFile

type WadFile struct {
	Filename string
	// contains filtered or unexported fields
}

func NewWadFile

func NewWadFile() *WadFile

func (*WadFile) AddLump

func (wad *WadFile) AddLump(newLump *WadLump) error

func (*WadFile) ClearLumps

func (wad *WadFile) ClearLumps()

func (*WadFile) GetDoomLevel

func (wad *WadFile) GetDoomLevel(mapName string) (*DoomLevel, error)

func (*WadFile) GetLump

func (wad *WadFile) GetLump(idx int) (*WadLump, error)

func (*WadFile) GetLumpByName

func (wad *WadFile) GetLumpByName(name string) (*WadLump, int, error)

func (*WadFile) GetPnamesImages

func (wad *WadFile) GetPnamesImages(pnamesLmp string) ([]*DoomPicture, error)

func (*WadFile) Load

func (wad *WadFile) Load(inStream io.ReadSeeker) error

func (*WadFile) NumLumps

func (wad *WadFile) NumLumps() int

func (*WadFile) ParseTextureLump

func (wad *WadFile) ParseTextureLump(lmpName string, pnamesLmpName string, pal color.Palette) ([]*DoomTexture, error)

func (*WadFile) RemoveLump

func (wad *WadFile) RemoveLump(idx int) error

func (*WadFile) Save

func (wad *WadFile) Save(outStream io.WriteSeeker) error

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 WadFileLumpFunc func(int, *WadLump) error

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) Data

func (obj *WadLump) Data() []byte

func (*WadLump) LoadData

func (lmp *WadLump) LoadData(in io.ReadSeeker) error

func (*WadLump) LoadEntry

func (lmp *WadLump) LoadEntry(in io.ReadSeeker) error

func (*WadLump) Name

func (obj *WadLump) Name() string

func (*WadLump) SaveData

func (obj *WadLump) SaveData(out io.WriteSeeker) error

func (*WadLump) SaveEntry

func (obj *WadLump) SaveEntry(out io.WriteSeeker) error

func (*WadLump) SetData

func (obj *WadLump) SetData(newData []byte)

func (*WadLump) SetName

func (obj *WadLump) SetName(newName string) error

func (*WadLump) Size

func (obj *WadLump) Size() int32

func (*WadLump) ValidNameP

func (obj *WadLump) ValidNameP(name string) bool

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
}

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.

Jump to

Keyboard shortcuts

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