chore(cli): UI-debug apparatus — mock-selbar, dump-edges, crop, probe
Standalone AcDream.Cli subcommands built during the D.5.3a visual gate, kept as reusable UI/sprite/framebuffer debugging apparatus (alongside the existing export-ui-sprite / dump-sprite-sheet / render-vitals-mockup tools): - mock-selbar: composite the selected-object health bar (back + fill at fractions) - dump-edges: print a sprite's first/last column RGB at every row - crop: crop + nearest-upscale a region of a PNG (zoom into a framebuffer dump) - probe: print the RGB of a pixel block from a PNG Dev-only (reached via explicit args[0]); no game-runtime impact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8f627cce0e
commit
07965852e0
2 changed files with 141 additions and 0 deletions
|
|
@ -82,6 +82,45 @@ if (args.Length >= 1 && args[0] == "dump-font-atlas")
|
|||
return FontAtlasDump.Run(dfaDir, dfaFont, dfaSample, dfaOut);
|
||||
}
|
||||
|
||||
if (args.Length >= 1 && args[0] == "probe")
|
||||
{
|
||||
// probe <in.png> <x0> <y0> <x1> <y1>
|
||||
if (args.Length < 6) { Console.Error.WriteLine("usage: AcDream.Cli probe <in.png> <x0> <y0> <x1> <y1>"); return 2; }
|
||||
return VitalsMockup.Probe(args[1], int.Parse(args[2]), int.Parse(args[3]), int.Parse(args[4]), int.Parse(args[5]));
|
||||
}
|
||||
|
||||
if (args.Length >= 1 && args[0] == "crop")
|
||||
{
|
||||
// crop <in.png> <x> <y> <w> <h> <zoom> <out.png>
|
||||
if (args.Length < 8) { Console.Error.WriteLine("usage: AcDream.Cli crop <in.png> <x> <y> <w> <h> <zoom> <out.png>"); return 2; }
|
||||
return VitalsMockup.Crop(args[1],
|
||||
int.Parse(args[2]), int.Parse(args[3]), int.Parse(args[4]), int.Parse(args[5]), int.Parse(args[6]), args[7]);
|
||||
}
|
||||
|
||||
if (args.Length >= 1 && args[0] == "dump-edges")
|
||||
{
|
||||
string? deDir = args.ElementAtOrDefault(1) ?? Env.GetEnvironmentVariable("ACDREAM_DAT_DIR");
|
||||
string? deId = args.ElementAtOrDefault(2);
|
||||
if (string.IsNullOrWhiteSpace(deDir) || string.IsNullOrWhiteSpace(deId))
|
||||
{
|
||||
Console.Error.WriteLine("usage: AcDream.Cli dump-edges <dat-directory> <0xId>");
|
||||
return 2;
|
||||
}
|
||||
return VitalsMockup.DumpEdges(deDir, deId);
|
||||
}
|
||||
|
||||
if (args.Length >= 1 && args[0] == "mock-selbar")
|
||||
{
|
||||
string? msbDir = args.ElementAtOrDefault(1) ?? Env.GetEnvironmentVariable("ACDREAM_DAT_DIR");
|
||||
string msbOut = args.ElementAtOrDefault(2) ?? "selbar.png";
|
||||
if (string.IsNullOrWhiteSpace(msbDir))
|
||||
{
|
||||
Console.Error.WriteLine("usage: AcDream.Cli mock-selbar <dat-directory> [out.png]");
|
||||
return 2;
|
||||
}
|
||||
return VitalsMockup.MockSelBar(msbDir, msbOut);
|
||||
}
|
||||
|
||||
if (args.Length >= 1 && args[0] == "export-ui-sprite")
|
||||
{
|
||||
string? eusDatDir = args.ElementAtOrDefault(1) ?? Env.GetEnvironmentVariable("ACDREAM_DAT_DIR");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue