summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--global.bmx18
1 files changed, 16 insertions, 2 deletions
diff --git a/global.bmx b/global.bmx
index ed55299..131799d 100644
--- a/global.bmx
+++ b/global.bmx
@@ -23,6 +23,7 @@
Strict
Import brl.pngloader
Import brl.timerdefault
+Import brl.volumes
Import noddybox.bitmapfont
Import noddybox.gfxmenu
@@ -113,9 +114,20 @@ Type GameConfig
Global hiscore:Int
Global maxlevel:Int
Global accepted:Int
+ Global path:String
+
+ Function InitPath()
+ If path = "" Then
+ path = GetUserAppDir() + "/MissileLock"
+ CreateDir path
+ path = path + "/missile_lock.config"
+ End If
+ End Function
Function Load()
- Local s:TStream=ReadStream("mlock.config")
+ InitPath()
+
+ Local s:TStream=ReadStream(path)
If s=Null
kleft=KEY_LEFT
@@ -142,7 +154,9 @@ Type GameConfig
End Function
Function Save()
- Local s:TStream=WriteStream("mlock.config")
+ InitPath()
+
+ Local s:TStream=WriteStream(path)
If s=Null
Return