aboutsummaryrefslogtreecommitdiff
path: root/src/sokoban.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/sokoban.adb')
-rw-r--r--src/sokoban.adb12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sokoban.adb b/src/sokoban.adb
index ad17090..8b7ecdb 100644
--- a/src/sokoban.adb
+++ b/src/sokoban.adb
@@ -2,6 +2,7 @@
with
+ Ada.Directories,
FLTK.Widgets,
Displays,
Grids,
@@ -22,6 +23,11 @@ use
package body Sokoban is
+ package ADir renames Ada.Directories;
+
+
+
+
-- Forward declarations of helper functions.
procedure Add_New_Grid_Item
@@ -40,8 +46,6 @@ package body Sokoban is
type Game_State is (Loading, Play, Complete);
- Level_Dir : String := Misc.Origin & "/../share/sokoban/level";
-
Loading_Message : String := "Loading...";
Play_Message : String := "Move with the arrow keys. Press u for undo." & ASCII.LF &
@@ -84,8 +88,8 @@ package body Sokoban is
use Ada.Strings, Ada.Strings.Fixed, Ada.Strings.Maps;
Data_File : File_Type;
- Filename : String :=
- Level_Dir & "/level" & Trim (LevelID'Image (Number), Both) & ".data";
+ Filename : String := ADir.Compose
+ (Misc.Level_Path, "level" & Trim (LevelID'Image (Number), Both) & ".data");
Rows, Cols : Natural;
begin