Skip to content

Commit

Permalink
Include MetaGen in output
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlamin committed Sep 8, 2024
1 parent a5d3de1 commit cf23caa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions MapUpconverter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Global
{B8133A09-958D-4129-935E-5AAC2AF91B69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8133A09-958D-4129-935E-5AAC2AF91B69}.Release|Any CPU.Build.0 = Release|Any CPU
{3D78D50E-185D-467D-9F1A-B15FEDD677A2}.CLIOnlyRelease|Any CPU.ActiveCfg = Release|Any CPU
{3D78D50E-185D-467D-9F1A-B15FEDD677A2}.CLIOnlyRelease|Any CPU.Build.0 = Release|Any CPU
{3D78D50E-185D-467D-9F1A-B15FEDD677A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D78D50E-185D-467D-9F1A-B15FEDD677A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D78D50E-185D-467D-9F1A-B15FEDD677A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
12 changes: 2 additions & 10 deletions MapUpconverter/ADT/Obj1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ public static Warcraft.NET.Files.ADT.TerrainObject.One.TerrainObjectOne Convert(

var m2BoundingBox = new Warcraft.NET.Files.Structures.BoundingBox();

if(BoundingBoxInfo.boundingBoxBlobDict.TryGetValue(mlddEntry.NameId.ToString(), out var boundingBox))
{
m2BoundingBox = boundingBox;
}
else
if(!BoundingBoxInfo.boundingBoxBlobDict.TryGetValue(mlddEntry.NameId.ToString(), out m2BoundingBox))
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("No bounding box found for M2 " + mlddEntry.NameId + ", using empty bounding box. This will cause issues in-game.");
Expand Down Expand Up @@ -98,11 +94,7 @@ public static Warcraft.NET.Files.ADT.TerrainObject.One.TerrainObjectOne Convert(

var wmoBoundingBox = new Warcraft.NET.Files.Structures.BoundingBox();

if (BoundingBoxInfo.boundingBoxBlobDict.TryGetValue(mlmdEntry.NameId.ToString(), out var boundingBox))
{
wmoBoundingBox = boundingBox;
}
else
if (!BoundingBoxInfo.boundingBoxBlobDict.TryGetValue(mlmdEntry.NameId.ToString(), out wmoBoundingBox))
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("No bounding box found for WMO " + mlmdEntry.NameId + ", using empty bounding box. This will cause issues in-game.");
Expand Down
3 changes: 3 additions & 0 deletions MetaGen/MetaGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<BaseOutputPath>..\bin</BaseOutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
4 changes: 4 additions & 0 deletions MetaGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("MetaGen - A tool meant to extract meta information from WoW files.");

if (args.Length == 1 && (args[0].ToLower().EndsWith(".m2") || args[0].ToLower().EndsWith(".wmo")))
{
if (args[0].ToLower().EndsWith(".m2"))
Expand All @@ -24,6 +26,8 @@ static void Main(string[] args)
{
Console.WriteLine("Usage (single mode): MetaGen <.m2 or .wmo file>");
Console.WriteLine("Usage (full run mode): MetaGen <meta folder> <CASC product> (WoW folder or CDN host)");
Console.WriteLine("Press enter to exit.");
Console.ReadLine();
return;
}

Expand Down

0 comments on commit cf23caa

Please sign in to comment.