Wire asset resolution into a live Godot render. VM executes set-texture -> ResourceMap resolves (scene,resId) -> files[section_base+resId] across all archives -> pre-converted BMP -> composite behind the dialogue. The full-screen event-CG layer (EV052*) renders end-to-end from the executed bytecode. - Age.Engine/Sys4/ResourceMap.cs: Resolve + BMP TexturePath; Paths: asset JSONs - GodotAdvHost: create/set/draw-texture -> TextureRect in a _stage layer - IHost.DrawTexture + VM dispatch extended with dst x/y (draw-texture args 7/8) - project.godot 800x600; convert_agf.py all-archive + --scene batch - engine 8/8, C# --selftest still byte-matches vm0 trace (VM behaviour unchanged) Known limitations (next chunk = graphics geometry/blend subsystem): - sprites + BG* via the CG-load subroutine get garbage dst/size — native ops stubbed (0x208 get-texture-size + sprite position/anim chain) - AE* fades draw opaque/instant (no alpha); no chromakey - slot model approximates the game's immediate-mode blit-onto-slot-0 canvas - AGF pre-converted to BMP offline (runtime decoder deferred) See docs/phase-a-slice-plan.md (A2b section). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
1.7 KiB
C#
37 lines
1.7 KiB
C#
namespace Age.Engine.Sys4;
|
|
public static class Paths
|
|
{
|
|
public static string Repo { get; } = FindRepo();
|
|
public static string Workspace => Directory.GetParent(Repo)!.FullName;
|
|
public static string Extracted => Path.Combine(Workspace, "extracted");
|
|
public static string Data1 => Path.Combine(Extracted, "DATA1");
|
|
public static string GameDir => Path.Combine(Workspace, "姫狩りダンジョンマイスター");
|
|
public static string Build => Path.Combine(Repo, "build");
|
|
public static string OpcodesJson => Path.Combine(Build, "opcodes.json");
|
|
public static string AssetSectionsJson => Path.Combine(Build, "asset-sections.json");
|
|
public static string AssetIndexJson => Path.Combine(Build, "asset-index.json");
|
|
public static string Textures => Path.Combine(Build, "textures");
|
|
|
|
private static string FindRepo()
|
|
{
|
|
var d = new DirectoryInfo(AppContext.BaseDirectory);
|
|
while (d != null && d.Name != "age-reimpl") d = d.Parent;
|
|
if (d == null) throw new DirectoryNotFoundException(
|
|
"age-reimpl root not found above " + AppContext.BaseDirectory);
|
|
return d.FullName;
|
|
}
|
|
|
|
/// name(UPPER).BIN -> path; game-dir loose overrides shadow extracted/DATA1 (mirrors paths.scripts()).
|
|
public static Dictionary<string, string> Scripts()
|
|
{
|
|
var d = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
|
if (Directory.Exists(Data1))
|
|
foreach (var p in Directory.EnumerateFiles(Data1, "*.BIN"))
|
|
d[Path.GetFileName(p).ToUpperInvariant()] = p;
|
|
if (Directory.Exists(GameDir))
|
|
foreach (var p in Directory.EnumerateFiles(GameDir, "*.BIN"))
|
|
d[Path.GetFileName(p).ToUpperInvariant()] = p;
|
|
return d;
|
|
}
|
|
}
|