Skip to content

Commit a3b0135

Browse files
NeWbY100claude
andcommitted
refactor: capitalize acronyms uniformly across WPF and CLI
- Apply the lib's RAR* convention to all 3-letter acronyms (SRR/SRS/ ISO/CRC/MP3/MP4/MKV/AVI/WMV/ASF/EBML/OSO/SFV/MHD/LHD) in source filenames, type names, properties, MVVM-Toolkit backing fields, XAML class names (x:Class) and binding paths. - Disambiguate Models.SRRFileData vs Core.Comparison.SRRFileData at the three use sites in FileCompareViewModel. - CreatorViewModel logs found VobSub .idx files on the success path and surfaces SRRWriter's per-file skip warnings as WARNING entries. - Bump ReScene.Lib submodule pointer to the matching commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 70c58d3 commit a3b0135

44 files changed

Lines changed: 487 additions & 482 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ReScene.Cli/Commands/CreateCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static async Task<int> RunAsync(string[] args)
5959
try
6060
{
6161
var writer = new SRRWriter();
62-
SrrCreationResult result = await writer.CreateAsync(outPath, rarPaths, ct: cts.Token);
62+
SRRCreationResult result = await writer.CreateAsync(outPath, rarPaths, ct: cts.Token);
6363

6464
if (!result.Success)
6565
{

ReScene.Cli/Commands/ExtractCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static int Run(string[] args)
5555
using FileStream input = File.OpenRead(srrPath);
5656
byte[] buffer = new byte[CopyBufferSize];
5757

58-
foreach (SrrStoredFileBlock stored in srr.StoredFiles)
58+
foreach (SRRStoredFileBlock stored in srr.StoredFiles)
5959
{
6060
string outPath = ResolveSafeOutputPath(outDir, stored.FileName);
6161
Directory.CreateDirectory(Path.GetDirectoryName(outPath)!);

ReScene.Cli/Commands/InspectCommand.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,24 @@ public static int Run(string[] args)
4343
rows.Add((srr.HeaderBlock.BlockPosition, "Header", srr.HeaderBlock.HeaderSize, srr.HeaderBlock.AppName ?? string.Empty));
4444
}
4545

46-
foreach (SrrStoredFileBlock stored in srr.StoredFiles)
46+
foreach (SRRStoredFileBlock stored in srr.StoredFiles)
4747
{
4848
rows.Add((stored.BlockPosition, "StoredFile", stored.HeaderSize + stored.AddSize, stored.FileName));
4949
}
5050

51-
foreach (SrrOsoHashBlock oso in srr.OsoHashBlocks)
51+
foreach (SRROsoHashBlock oso in srr.OSOHashBlocks)
5252
{
53-
rows.Add((oso.BlockPosition, "OsoHash", oso.HeaderSize, oso.FileName));
53+
rows.Add((oso.BlockPosition, "OSOHash", oso.HeaderSize, oso.FileName));
5454
}
5555

56-
foreach (SrrRarFileBlock rarFile in srr.RarFiles)
56+
foreach (SRRRarFileBlock rarFile in srr.RARFiles)
5757
{
58-
rows.Add((rarFile.BlockPosition, "RarFile", rarFile.HeaderSize + rarFile.AddSize, rarFile.FileName));
58+
rows.Add((rarFile.BlockPosition, "RARFile", rarFile.HeaderSize + rarFile.AddSize, rarFile.FileName));
5959
}
6060

61-
foreach (SrrRarPaddingBlock padding in srr.RarPaddingBlocks)
61+
foreach (SRRRarPaddingBlock padding in srr.RARPaddingBlocks)
6262
{
63-
rows.Add((padding.BlockPosition, "RarPadding", padding.HeaderSize + padding.AddSize, padding.RarFileName));
63+
rows.Add((padding.BlockPosition, "RARPadding", padding.HeaderSize + padding.AddSize, padding.RARFileName));
6464
}
6565

6666
rows.Sort((a, b) => a.Offset.CompareTo(b.Offset));

ReScene.Cli/Commands/VerifyCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public static int Run(string[] args)
2626

2727
try
2828
{
29-
SrrVerifyResult result = SRRVerifier.Verify(args[0]);
29+
SRRVerifyResult result = SRRVerifier.Verify(args[0]);
3030

3131
Console.WriteLine($"Blocks scanned: {result.BlocksScanned}");
3232
Console.WriteLine($"File size: {result.FileSize:N0}");
3333

34-
foreach (SrrVerifyIssue issue in result.Issues)
34+
foreach (SRRVerifyIssue issue in result.Issues)
3535
{
3636
Console.WriteLine($"[{issue.Severity}] 0x{issue.Offset:X}: {issue.Message}");
3737
}

ReScene.Lib

Submodule ReScene.Lib updated 74 files

ReScene.NET/App.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ protected override void OnStartup(StartupEventArgs e)
1919
WindowStateService = windowState,
2020
Opacity = 0,
2121
DataContext = new MainWindowViewModel(
22-
new SrrCreationService(), new SrsCreationService(), new SrsReconstructionService(),
23-
new SampleRestorerService(tempDir), new BruteForceService(), new FileCompareService(), new FileDialogService(), new RecentFilesService(appSettings), tempDir, new SrrEditingService(), new SrrVerifyService(), new PropertyExportService(), appSettings)
22+
new SRRCreationService(), new SRSCreationService(), new SRSReconstructionService(),
23+
new SampleRestorerService(tempDir), new BruteForceService(), new FileCompareService(), new FileDialogService(), new RecentFilesService(appSettings), tempDir, new SRREditingService(), new SRRVerifyService(), new PropertyExportService(), appSettings)
2424
};
2525
MainWindow.Show();
2626
}

ReScene.NET/Controls/HexViewControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ private void CopyToClipboard(bool asText)
547547
for (int i = 0; i < read; i++)
548548
{
549549
byte b = buf[i];
550-
sb.Append(b >= 0x20 && b <= 0x7E ? (char)b : '.');
550+
sb.Append(b is >= 0x20 and <= 0x7E ? (char)b : '.');
551551
}
552552

553553
text = sb.ToString();
@@ -749,7 +749,7 @@ protected override void OnRender(DrawingContext context)
749749
}
750750

751751
hexBuilder.Append(b.ToString("X2"));
752-
asciiBuilder.Append(b >= 0x20 && b <= 0x7E ? (char)b : '.');
752+
asciiBuilder.Append(b is >= 0x20 and <= 0x7E ? (char)b : '.');
753753
}
754754

755755
var hexText = new FormattedText(hexBuilder.ToString(),

ReScene.NET/Helpers/FileDialogFilters.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internal static class FileDialogFilters
3131
/// <summary>
3232
/// SRR Creator input — SFV or RAR files.
3333
/// </summary>
34-
public static readonly string[] SfvAndRar =
34+
public static readonly string[] SFVAndRar =
3535
[
3636
"SFV Files|*.sfv",
3737
"RAR Files|*.rar",
@@ -50,7 +50,7 @@ internal static class FileDialogFilters
5050
/// <summary>
5151
/// SRR files only.
5252
/// </summary>
53-
public static readonly string[] SrrFiles =
53+
public static readonly string[] SRRFiles =
5454
[
5555
"SRR Files|*.srr",
5656
"All Files|*.*"
@@ -59,7 +59,7 @@ internal static class FileDialogFilters
5959
/// <summary>
6060
/// SRS files only.
6161
/// </summary>
62-
public static readonly string[] SrsFiles =
62+
public static readonly string[] SRSFiles =
6363
[
6464
"SRS Files|*.srs",
6565
"All Files|*.*"
@@ -102,12 +102,12 @@ internal static class FileDialogFilters
102102
/// <summary>
103103
/// SRR save dialog filter.
104104
/// </summary>
105-
public static readonly string[] SrrSave = ["SRR Files|*.srr"];
105+
public static readonly string[] SRRSave = ["SRR Files|*.srr"];
106106

107107
/// <summary>
108108
/// SRS save dialog filter.
109109
/// </summary>
110-
public static readonly string[] SrsSave = ["SRS Files|*.srs"];
110+
public static readonly string[] SRSSave = ["SRS Files|*.srs"];
111111

112112
/// <summary>
113113
/// All files — for generic save/export dialogs.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ namespace ReScene.NET.Models;
66
/// <summary>
77
/// Holds a parsed SRR file along with detailed RAR block data for each embedded volume.
88
/// </summary>
9-
public class SrrFileData
9+
public class SRRFileData
1010
{
1111
/// <summary>
1212
/// The parsed SRR file.
1313
/// </summary>
14-
public SRRFile SrrFile { get; set; } = null!;
14+
public SRRFile SRRFile { get; set; } = null!;
1515

1616
/// <summary>
1717
/// Detailed RAR blocks per volume, keyed by volume filename.
@@ -25,19 +25,19 @@ public class SrrFileData
2525
/// The path to the SRR file.
2626
/// </param>
2727
/// <returns>
28-
/// A populated <see cref="SrrFileData"/> instance.
28+
/// A populated <see cref="SRRFileData"/> instance.
2929
/// </returns>
30-
public static SrrFileData Load(string filePath)
30+
public static SRRFileData Load(string filePath)
3131
{
3232
var srrFile = SRRFile.Load(filePath);
3333
var volumeBlocks = new Dictionary<string, List<RARDetailedBlock>>(StringComparer.OrdinalIgnoreCase);
3434

35-
if (srrFile.RarFiles.Count > 0)
35+
if (srrFile.RARFiles.Count > 0)
3636
{
3737
try
3838
{
3939
using FileStream fs = File.OpenRead(filePath);
40-
foreach (SrrRarFileBlock rarFile in srrFile.RarFiles)
40+
foreach (SRRRarFileBlock rarFile in srrFile.RARFiles)
4141
{
4242
try
4343
{
@@ -59,9 +59,9 @@ public static SrrFileData Load(string filePath)
5959
}
6060
}
6161

62-
return new SrrFileData
62+
return new SRRFileData
6363
{
64-
SrrFile = srrFile,
64+
SRRFile = srrFile,
6565
VolumeDetailedBlocks = volumeBlocks
6666
};
6767
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace ReScene.NET.Models;
55
/// <summary>
66
/// Holds a parsed SRS file for the Inspector tab.
77
/// </summary>
8-
public class SrsInspectorData
8+
public class SRSInspectorData
99
{
10-
public SRSFile SrsFile { get; set; } = null!;
10+
public SRSFile SRSFile { get; set; } = null!;
1111

1212
/// <summary>
1313
/// Loads and parses an SRS file from disk.
@@ -16,11 +16,11 @@ public class SrsInspectorData
1616
/// Path to the SRS file.
1717
/// </param>
1818
/// <returns>
19-
/// A new <see cref="SrsInspectorData"/> wrapping the parsed file.
19+
/// A new <see cref="SRSInspectorData"/> wrapping the parsed file.
2020
/// </returns>
21-
public static SrsInspectorData Load(string filePath)
21+
public static SRSInspectorData Load(string filePath)
2222
=> new()
2323
{
24-
SrsFile = SRSFile.Load(filePath)
24+
SRSFile = SRSFile.Load(filePath)
2525
};
2626
}

0 commit comments

Comments
 (0)