diff options
Diffstat (limited to 'NET/worlds/core/IniFile.java')
| -rw-r--r-- | NET/worlds/core/IniFile.java | 55 |
1 files changed, 55 insertions, 0 deletions
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(); +} |