diff options
| author | 2026-10-29 23:01:05 -0400 | |
|---|---|---|
| committer | 2026-10-29 23:01:05 -0400 | |
| commit | b1dfe847f742aa7079a819090ba36d606e7af4db (patch) | |
| tree | fa5d1f7a02f7b29f28ef54d051c34ffa10b9cc7b /LUT.cs | |
| parent | 504e6e7ab767894b5f9f9276dfe9361979d5bcf2 (diff) | |
| download | WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.tar.gz WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.tar.bz2 WorldTuningTool-b1dfe847f742aa7079a819090ba36d606e7af4db.zip | |
LUT tweaks
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'LUT.cs')
| -rw-r--r-- | LUT.cs | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -157,11 +157,10 @@ namespace WorldTuningTool fixed (byte *dataPointer = (byte[])data) { // DXGI_FORMAT_R16G16B16A16_FLOAT = 10 - return new Texture(texture).Replace(dataPointer, 10, 32, 32, 32); + new Texture(texture).Replace(dataPointer, 10, 32, 32, 32); } -#else - return true; #endif + return true; } private static bool overwriteFromFile(nint texture, string path) @@ -176,13 +175,10 @@ namespace WorldTuningTool private static bool overwriteFromMtFile(nint texture, string path) { MtFileStream? file = MtFileStream.FromPath(path, OpenMode.Read, false); - bool success = false; - if (file != null) - { - success = overwriteFromStream(texture, new MemoryStream(file.Read(file.Length))); - file.Close(); - } - return success; + if (file == null) return false; + MemoryStream stream = new MemoryStream(file.Read(file.Length)); + file.Close(); + return overwriteFromStream(texture, stream); } private static void reloadBlendLut(nint lightingObject) |