Skip to content

Commit

Permalink
feat: more informative w2ter structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nikich340 committed Jan 2, 2025
1 parent 255c535 commit 3c125fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions WolvenKit.CR2W/CR2W/CR2WFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ public EFileReadErrorCodes Read(BinaryReader file)

int percentprogress = (int)((float)i / (float)buffers.Count * 100.0);
Logger?.LogProgress(percentprogress);
Logger?.LogString($"Reading buffer data[{i}]: {buffer.Data.Length} bytes");
}
}
// Read embedded files //block 7
Expand All @@ -565,6 +566,7 @@ public EFileReadErrorCodes Read(BinaryReader file)

int percentprogress = (int)((float)i / (float)embedded.Count * 100.0);
Logger?.LogProgress(percentprogress, $"Reading embedded file {emb.ClassName}...");
Logger?.LogString($"Reading embedded file[{i}]: {emb.ClassName}");
}
#endregion

Expand All @@ -583,6 +585,7 @@ public EFileReadErrorCodes Read(BinaryReader file)


Logger?.LogString($"File {FileName} loaded in: {stopwatch1.Elapsed}\n");

stopwatch1.Stop();
//m_stream = null;
return 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;

using System.Diagnostics;
Expand All @@ -13,9 +13,9 @@ namespace WolvenKit.CR2W.Types
[REDMeta(EREDMetaInfo.REDStruct)]
public class STerrainTileData : CVariable
{
[Ordinal(1)] [RED] public CInt16 Lod1 { get; set; }
[Ordinal(2)] [RED] public CInt16 Lod2 { get; set; }
[Ordinal(3)] [RED] public CInt16 Lod3 { get; set; }
[Ordinal(1)] [RED] public CInt16 HeightmapBufferNum { get; set; }
[Ordinal(2)] [RED] public CInt16 ControlmapBufferNum { get; set; }
[Ordinal(3)] [RED] public CInt16 ColormapBufferNum { get; set; }
[Ordinal(4)] [RED] public CInt32 Resolution { get; set; }

public STerrainTileData(CR2WFile cr2w, CVariable parent, string name) :
Expand All @@ -25,4 +25,4 @@ public STerrainTileData(CR2WFile cr2w, CVariable parent, string name) :

public static CVariable Create(CR2WFile cr2w, CVariable parent, string name) => new STerrainTileData(cr2w, parent, name);
}
}
}

0 comments on commit 3c125fd

Please sign in to comment.