summaryrefslogtreecommitdiff
path: root/NET/worlds/core/IniFile.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/core/IniFile.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/core/IniFile.java')
-rw-r--r--NET/worlds/core/IniFile.java55
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();
+}