diff --git a/tools/RainMeshProbe/Program.cs b/tools/RainMeshProbe/Program.cs index 37475b1..1eaff70 100644 --- a/tools/RainMeshProbe/Program.cs +++ b/tools/RainMeshProbe/Program.cs @@ -28,8 +28,47 @@ using var dats = new DatCollection(datDir, DatAccessType.Read); uint[] gfxIds = { 0x01004C42u, 0x01004C44u }; foreach (uint gid in gfxIds) ProbeRain(dats, gid); + +// Phase 7c: also dump every sky surface we know to test the LUMINOUS flag. +// Two existing code comments contradict each other about whether Dereth's +// dome/sun/moon meshes carry the LUMINOUS bit. Resolve empirically. +Console.WriteLine(); +Console.WriteLine("================ Sky Surface LUMINOUS audit ================"); +uint[] skySurfaceIds = { + 0x08000048u, 0x08000049u, 0x0800004Au, 0x0800004Bu, // dome 0x010015EE + 0x0800004Du, // star sheet 0x010015EF + 0x0800004Eu, 0x0800004Fu, 0x08000050u, 0x08000051u, // dome 0x010015F0 + 0x08000053u, 0x08000054u, 0x08000055u, 0x08000056u, // dome 0x010015F1 + 0x08000057u, 0x08000058u, 0x08000059u, 0x0800005Au, // dome 0x010015F2 + 0x080000D1u, // celestial 0x01001348 + 0x080000D2u, // sun-like 0x01001F67 + 0x080000D6u, 0x080000D7u, // moon 0x01001F6A + 0x080000D4u, // cloud 0x01004C36/37 + 0x08000023u, // cloud 0x01004C35 + 0x08000024u, 0x08000025u, // cloud 0x01004C39/3A + 0x080000D5u, // dome variant 0x010015B6 + 0x080000C5u, // RAIN — control row, expected NO Luminous +}; +foreach (uint sid in skySurfaceIds) ProbeSkySurface(dats, sid); + return 0; +static void ProbeSkySurface(DatCollection dats, uint sid) +{ + if (!dats.TryGet(sid, out var s) || s is null) + { Console.WriteLine($" Surface 0x{sid:X8} (NOT FOUND)"); return; } + uint t = (uint)s.Type; + bool luminous = (t & 0x40u) != 0u; + Console.Write($" Surface 0x{sid:X8} Type=0x{t:X8} Luminous={(luminous ? "YES" : "no ")} Lum={s.Luminosity:F4} Trans={s.Translucency:F4} "); + // Decode bits inline. + var bits = new (uint mask, string n)[] { + (0x01u,"B1Solid"),(0x02u,"B1Image"),(0x04u,"B1ClipMap"),(0x10u,"Translucent"), + (0x20u,"Diffuse"),(0x40u,"Luminous"),(0x100u,"Alpha"),(0x200u,"InvAlpha"), + (0x10000u,"Additive"),(0x20000u,"Detail"), + }; + Console.WriteLine(string.Join("|", bits.Where(b => (t & b.mask) != 0).Select(b => b.n))); +} + static void ProbeRain(DatCollection dats, uint gid) { Console.WriteLine();