Skip to content

Commit

Permalink
Fix autodoc generation for adt
Browse files Browse the repository at this point in the history
  • Loading branch information
Luzifix committed Jul 19, 2024
1 parent 568e91c commit 1c7d687
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 96 deletions.
107 changes: 31 additions & 76 deletions Docs/ADT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ R = Read Only<br>
N/A = Not in this file for this expansion<br>
**NYI** = Not Yet Implemented / TODO

### Root ADT
### ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER||||||||
Expand All @@ -26,123 +26,78 @@ N/A = Not in this file for this expansion<br>
|MFBO||||||||
|MTXF|N/A|||||||
|MCRF||N/A|N/A|N/A|N/A|N/A|N/A|
|MCSH||||||||
|MCAL||||||||

### _tex0 ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MTEX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MDID|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MHID|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCNK|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCSH|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCAL|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MVER||||||||
|MTEX||||N/A|N/A|N/A|N/A|
|MDID|N/A|N/A|N/A|||||
|MHID|N/A|N/A|N/A|||||
|MCNK|N/A|||||||
|MCSH||||||||
|MCAL||||||||
|MCLY|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCMT|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MAMP|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MTXP|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MTXF|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCMT|N/A|||||||
|MAMP|N/A|||||||
|MTXP|N/A|||||||
|MTXF|N/A|||||||
|MTCG|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|

### _obj0 ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCNK|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCRD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MCRW|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MMDX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MMID|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MWMO|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MWID|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MDDF|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MODF|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MWDR|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MWDS|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|

### _obj1 ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDL|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLFD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|

### _lod ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDL|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLFD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMD|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMX|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLDB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|

### Tex ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MDID|N/A|N/A|N/A|||||
|MHID|N/A|N/A|N/A|||||
|MVER||||||||
|MAMP|N/A|||||||
|MTEX||||N/A|N/A|N/A|N/A|
|MCNK|N/A|||||||
|MTXP|**NYI**|||||||

### Obj0 ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MCRD|N/A|||||||
|MCRW|N/A|||||||
|MDDF||||||||
|MODF||||||||
|MCNK|N/A|||||||
|MVER||||||||
|MMDX|||||N/A|N/A|N/A|
|MMID||||N/A|N/A|N/A|N/A|
|MWMO|||||N/A|N/A|N/A|
|MWID|||||N/A|N/A|N/A|
|MDDF||||||||
|MODF||||||||
|MWDR|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MWDS|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|

### Obj1 ADT
### _obj1 ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER||||||||
|MLDL|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLFD|N/A|||||||
|MLDD|N/A|||||||
|MLDX|N/A|||||||
|MLMD|N/A|||||||
|MLMX|N/A|||||||
|MVER||||||||
|MLDB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MMDX|||||N/A|N/A|N/A|
|MMID||||N/A|N/A|N/A|N/A|
|MWMO|||||N/A|N/A|N/A|
|MWID|||||N/A|N/A|N/A|

### Lod ADT
### _lod ADT
|Chunk|LK|WoD|Legion|BfA|SL|DF|TWW|
|-----|-----|-----|-----|-----|-----|-----|-----|
|MVER||||||||
|MLHD|N/A|||||||
|MLVH|N/A|||||||
|MLLL|N/A|||||||
|MLND|N/A|||||||
|MLVI|N/A|||||||
|MLSI|N/A|||||||
|MLLD|N/A|||||||
|MLLN|N/A|||||||
|MLLI|N/A|||||||
|MLLV|N/A|||||||
|MLMB|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|**NYI**|
|MBMH|N/A|||||||
|MBBB|N/A|||||||
|MBMI|N/A|||||||
|MBNV|N/A|||||||
|MBMB|N/A|||||||
|MLLD|N/A|||||||
|MLLN|N/A|||||||
|MLLI|N/A|||||||
|MLLV|N/A|||||||
|MVER||||||||

19 changes: 11 additions & 8 deletions Warcraft.NET.Docs/ChunkAvailability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal static class ChunkAvailability
"adt", new ()
{
{
"Root ADT", new()
"ADT", new()
{
"MVER",
"MHDR",
Expand Down Expand Up @@ -85,13 +85,16 @@ internal static class ChunkAvailability
"_lod ADT", new()
{
"MVER",
"MLDL",
"MLFD",
"MLDD",
"MLDX",
"MLMD",
"MLMX",
"MLDB",
"MLHD",
"MLVH",
"MLLL",
"MLND",
"MLVI",
"MLSI",
"MLLD",
"MLLN",
"MLLI",
"MLLV",
"MLMB",
}
},
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/Chunks/MoP/MTXP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Warcraft.NET.Files.ADT.Chunks.MoP
/// <summary>
/// MTXP Chunk - Array of flags for entries in MTEX. Always same number of entries as MTEX
/// </summary>
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLK, AutoDocChunkVersionHelper.VersionAfterWoD)]
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLK, AutoDocChunkVersion.LK)]
public class MTXP : IIFFChunk, IBinarySerializable
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/Terrain/BfA/MCNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Warcraft.NET.Files.ADT.Terrain.BfA
/// <summary>
/// MCNK - BfA MCNK chunk
/// </summary>
[AutoDocFile("adt", "Root ADT")]
[AutoDocFile("adt")]
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLegion, AutoDocChunkVersionHelper.VersionBeforeBfA)]
public class MCNK : MCNKBase
{
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/Terrain/BfA/Terrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Warcraft.NET.Files.ADT.Terrain.BfA
{
[AutoDocFile("adt", "Root ADT")]
[AutoDocFile("adt")]
public class Terrain : TerrainBase
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/Terrain/Wotlk/MCNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Warcraft.NET.Files.ADT.Terrain.Wotlk
/// <summary>
/// MCNK - Wotlk MCNK chunk
/// </summary>
[AutoDocFile("adt", "Root ADT")]
[AutoDocFile("adt")]
[AutoDocChunk(AutoDocChunkVersion.LK, AutoDocChunkVersionHelper.VersionAfterLK)]
public class MCNK : MCNKBase
{
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/Terrain/Wotlk/Terrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Warcraft.NET.Files.ADT.Terrain.Wotlk
{
[AutoDocFile("adt", "Root ADT")]
[AutoDocFile("adt")]
public class Terrain : TerrainBase
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/TerrainLOD/Legion/TerrainLOD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Warcraft.NET.Files.ADT.TerrainLOD.Legion
{
#nullable enable
[AutoDocFile("adt", "Lod ADT")]
[AutoDocFile("adt", "_lod ADT")]
public class TerrainLOD : TerrainLODBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Warcraft.NET.Files.ADT.TerrainObject.One
{
[AutoDocFile("adt", "Obj1 ADT")]
[AutoDocFile("adt", "_obj1 ADT")]
public class TerrainObjectOne : TerrainObjectBase
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/TerrainObject/Zero/MCNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Warcraft.NET.Files.ADT.TerrainObject.Zero
/// <summary>
/// MCNK
/// </summary>
[AutoDocFile("adt", "Obj0 ADT")]
[AutoDocFile("adt", "_obj0 ADT")]
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLK, AutoDocChunkVersion.LK)]
public class MCNK : IIFFChunk, IBinarySerializable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Warcraft.NET.Files.ADT.TerrainObject.Zero
{
[AutoDocFile("adt", "Obj0 ADT")]
[AutoDocFile("adt", "_obj0 ADT")]
public class TerrainObjectZero : TerrainObjectBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Warcraft.NET.Files.ADT.TerrainTexture.BfA
{
[AutoDocFile("adt", "Tex ADT")]
[AutoDocFile("adt", "_tex0 ADT")]
public class TerrainTexture : TerrainTextureBase
{
[ChunkOrder(4)]
Expand Down
2 changes: 1 addition & 1 deletion Warcraft.NET/Files/ADT/TerrainTexture/MCNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Warcraft.NET.Files.ADT.TerrainTexture
/// <summary>
/// MCNK
/// </summary>
[AutoDocFile("adt", "Tex ADT")]
[AutoDocFile("adt", "_tex0 ADT")]
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLK, AutoDocChunkVersion.LK)]
public class MCNK : IIFFChunk, IBinarySerializable
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Warcraft.NET.Attribute;
using Warcraft.NET.Extensions;
using Warcraft.NET.Files.Interfaces;

Expand All @@ -8,6 +9,7 @@ namespace Warcraft.NET.Files.ADT.TerrainTexture.MapChunk.SubChunks
/// <summary>
/// MCAL Chunk - Contains alpha map data in one of three forms - uncompressed 2048, uncompressed 4096 and compressed.
/// </summary>
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAll)]
public class MCAL : IIFFChunk, IBinarySerializable
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System.IO;
using Warcraft.NET.Attribute;
using Warcraft.NET.Files.Interfaces;

namespace Warcraft.NET.Files.ADT.TerrainTexture.MapChunk.SubChunks
{
/// <summary>
/// MCMT chunk - Terrain material record id.
/// </summary>
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLK, AutoDocChunkVersion.LK)]
public class MCMT : IIFFChunk, IBinarySerializable
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System.IO;
using Warcraft.NET.Attribute;
using Warcraft.NET.Files.Interfaces;

namespace Warcraft.NET.Files.ADT.TerrainTexture.MapChunk.SubChunks
{
/// <summary>
/// MCSH chunk - holds baked terrain shadows.
/// </summary>
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAll)]
public class MCSH : IIFFChunk, IBinarySerializable
{
/// <summary>
Expand Down
5 changes: 4 additions & 1 deletion Warcraft.NET/Files/ADT/TerrainTexture/TerrainTextureBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public abstract class TerrainTextureBase : ChunkedFile
public MCNK[] Chunks { get; set; }

[ChunkOrder(7), ChunkOptional]
public MTXP TextureFlags { get; set; }
public MTXP TextureParameters { get; set; }

[ChunkOrder(8), ChunkOptional]
public MTXF TextureFlags { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="TerrainTexture"/> class.
Expand Down

0 comments on commit 1c7d687

Please sign in to comment.