WadParser 1.1.2

.NET Core 2.1
NuGet\Install-Package WadParser -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package WadParser --version 1.1.2
<PackageReference Include="WadParser" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WadParser --version 1.1.2
#r "nuget: WadParser, 1.1.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install WadParser as a Cake Addin
#addin nuget:?package=WadParser&version=1.1.2

// Install WadParser as a Cake Tool
#tool nuget:?package=WadParser&version=1.1.2

WadParser-dotnet

A C# .NET Core (2.1) helper library to parse WAD files and extract lumps contained in Doom, Quake and Half-life WAD files.

Based on:

Supported Formats

  • IWAD/PWAD
    • Doom, Heretic, Hexen and Strife
  • WAD2
    • Quake
  • WAD3
    • Half-Life, Opposing Force, Blue Shift

Usage

using System;
using nz.doom.WadParser;

namespace WadReader
{
    class Program
    {
        static int Main(string[] args)
        {
            if(args == null || args.Length != 1)
            {
                Console.Error.WriteLine("WAD file required");
                return 2;
            }

            Wad wad = WadParser.Parse(args[0]);

            foreach(var lump in wad.Lumps)
            {
                Console.WriteLine(lump.Name);
            }

            return 0;
        }
    }
}
using System;
using nz.doom.WadParser;

namespace WadReader
{
    class Program
    {
        static int Main(string[] args)
        {
            if(args == null || args.Length != 1)
            {
                Console.Error.WriteLine("WAD file required");
                return 2;
            }

            Wad wad = WadParser.Parse(args[0], false);

            Lump endoomLump = wad.GetLumpByName("ENDOOM");
            
            if( endoomLump != null )
            {
                WadParser.ReadBytesIntoLump(args[0], endoomLump);
                Console.WriteLine($"{endoomLump.Name} is {endoomLump.Bytes.Length} bytes long");
            }
            return 0;
        }
    }
}

See also

Also available for Java https://github.com/elephantflea/WadParser

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.2 430 8/17/2019
1.1.1 319 7/13/2019
1.1.0 311 7/6/2019
1.0.1 319 7/4/2019

Changed how the lump names are parsed