From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/core/IniFile.java | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 NET/worlds/core/IniFile.java (limited to 'NET/worlds/core/IniFile.java') diff --git a/NET/worlds/core/IniFile.java b/NET/worlds/core/IniFile.java new file mode 100644 index 0000000..0502e08 --- /dev/null +++ b/NET/worlds/core/IniFile.java @@ -0,0 +1,55 @@ +package NET.worlds.core; + +public class IniFile { + String file; + String section; + static boolean initialized = false; + private static IniFile gamma_ = null; + private static IniFile override_ = null; + + public IniFile(String section) { + this.file = null; + this.section = section; + } + + public IniFile(String inifileName, String section) { + this.file = inifileName; + this.section = section; + } + + public static IniFile gamma() { + if (gamma_ == null) { + gamma_ = new IniFile("Gamma"); + } + + if (!initialized) { + nativeInit(); + initialized = true; + } + + return gamma_; + } + + public static IniFile override() { + if (!initialized) { + nativeInit(); + initialized = true; + } + + if (override_ == null) { + override_ = new IniFile(".\\override.ini", "Runtime"); + } + + return override_; + } + + public native int getIniInt(String var1, int var2); + + public native void setIniInt(String var1, int var2); + + public native String getIniString(String var1, String var2); + + public native void setIniString(String var1, String var2); + + public static native void nativeInit(); +} -- cgit v1.2.3