summaryrefslogtreecommitdiff
path: root/LUT.cs
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-10-29 23:01:05 -0400
committerAndrew Opalach <andrew@akon.city> 2026-10-29 23:01:05 -0400
commitb1dfe847f742aa7079a819090ba36d606e7af4db (patch)
treefa5d1f7a02f7b29f28ef54d051c34ffa10b9cc7b /LUT.cs
parent504e6e7ab767894b5f9f9276dfe9361979d5bcf2 (diff)
downloadWorldTuningTool-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.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/LUT.cs b/LUT.cs
index 941e4a6..a037618 100644
--- a/LUT.cs
+++ b/LUT.cs
@@ -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)