diff options
-rw-r--r-- | global.bmx | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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
|