-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Phys File Type, Added more M2 chunks (some unfinished), changed some smaller things #11
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f9c08ef
Added Physics and other Chunks
gul4sch e01d895
yo
gul4sch 3446eef
Added .skin import/export
gul4sch 3177ea7
updated spaces, comments and names
gul4sch ddea812
fixed more
gul4sch a352a4f
h
gul4sch 3308832
change
gul4sch f78e289
changes
gul4sch 2c7056b
plyt
gul4sch 6f141f6
Fixing
gul4sch f4647cc
skel
gul4sch b6d460a
e
gul4sch f65726a
fixes
gul4sch 7da0293
Merge branch 'm2stuff'
gul4sch d6e9ed1
updates
gul4sch b7e866b
Delete Mat3x4.cs
gul4sch b5ae8e5
Merge branch 'master' into master
Luzifix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using Warcraft.NET.Docs.Steps; | ||
using Warcraft.NET.Files.Skel; | ||
|
||
namespace Warcraft.NET.Docs | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using Warcraft.NET.Attribute; | ||
using Warcraft.NET.Files.Interfaces; | ||
using Warcraft.NET.Files.M2.Entries; | ||
|
||
namespace Warcraft.NET.Files.M2.Chunks.BfA | ||
{ | ||
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLegion, AutoDocChunkVersionHelper.VersionBeforeBfA)] | ||
public class LDV1 : IIFFChunk, IBinarySerializable | ||
{ | ||
/// <summary> | ||
/// Holds the binary chunk signature. | ||
/// </summary> | ||
public const string Signature = "LDV1"; | ||
|
||
/// <summary> | ||
/// Gets or sets the Lod Data Version 1 Entries | ||
/// </summary> | ||
public List<LDV1Entry> LDV1Entries = new(); | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="LDV1"/> | ||
/// </summary> | ||
public LDV1() { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="LDV1"/> | ||
/// </summary> | ||
/// <param name="inData">ExtendedData.</param> | ||
public LDV1(byte[] inData) => LoadBinaryData(inData); | ||
|
||
/// <inheritdoc /> | ||
public string GetSignature() { return Signature; } | ||
|
||
/// <inheritdoc /> | ||
public uint GetSize() { return (uint)Serialize().Length; } | ||
|
||
/// <inheritdoc /> | ||
public void LoadBinaryData(byte[] inData) | ||
{ | ||
{ | ||
using (var ms = new MemoryStream(inData)) | ||
using (var br = new BinaryReader(ms)) | ||
{ | ||
var LDV1count = br.BaseStream.Length / LDV1Entry.GetSize(); | ||
for (var i = 0; i < LDV1count; ++i) | ||
{ | ||
LDV1Entries.Add(new LDV1Entry(br.ReadBytes(LDV1Entry.GetSize()))); | ||
} | ||
} | ||
} | ||
} | ||
|
||
/// <inheritdoc /> | ||
public byte[] Serialize(long offset = 0) | ||
{ | ||
using (var ms = new MemoryStream()) | ||
using (var bw = new BinaryWriter(ms)) | ||
{ | ||
foreach (LDV1Entry obj in LDV1Entries) | ||
{ | ||
bw.Write(obj.Serialize()); | ||
} | ||
return ms.ToArray(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,4 @@ public byte[] Serialize(long offset = 0) | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using Warcraft.NET.Attribute; | ||
using Warcraft.NET.Files.Interfaces; | ||
using Warcraft.NET.Files.M2.Entries; | ||
|
||
namespace Warcraft.NET.Files.M2.Chunks.BfA | ||
{ | ||
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLegion, AutoDocChunkVersionHelper.VersionBeforeBfA)] | ||
public class WFV1 : IIFFChunk, IBinarySerializable | ||
{ | ||
/// <summary> | ||
/// Holds the binary chunk signature. | ||
/// </summary> | ||
public const string Signature = "WFV1"; | ||
|
||
/// <summary> | ||
/// Gets or sets the full data (deserialization NYI) | ||
/// </summary> | ||
public byte[] Data; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="WFV1"/> | ||
/// </summary> | ||
public WFV1() { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="WFV1"/> | ||
/// </summary> | ||
/// <param name="inData">ExtendedData.</param> | ||
public WFV1(byte[] inData) => LoadBinaryData(inData); | ||
|
||
/// <inheritdoc /> | ||
public string GetSignature() { return Signature; } | ||
|
||
/// <inheritdoc /> | ||
public uint GetSize() { return (uint)Serialize().Length; } | ||
|
||
/// <inheritdoc /> | ||
public void LoadBinaryData(byte[] inData) | ||
{ | ||
Data = inData; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public byte[] Serialize(long offset = 0) | ||
{ | ||
return Data; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the parsing of the chunk struct is not implemented we dont add the AutoDocChunk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
[AutoDocChunk(AutoDocChunkVersionHelper.VersionAfterLegion, AutoDocChunkVersionHelper.VersionBeforeBfA)]