diff options
Diffstat (limited to 'src/misc.ads')
-rw-r--r-- | src/misc.ads | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/misc.ads b/src/misc.ads index fb99d95..ad64b46 100644 --- a/src/misc.ads +++ b/src/misc.ads @@ -1,22 +1,21 @@ -with +private with - Ada.Command_Line, - Ada.Directories; + Ada.Directories, + Here_I_Am; package Misc is - Origin : constant String; + Origin, Image_Path, Level_Path : constant String; function Max (A, B : in Integer) return Integer; - function Min (A, B : in Integer) return Integer; @@ -25,9 +24,24 @@ package Misc is private - Origin : constant String := Ada.Directories.Containing_Directory - (Ada.Directories.Full_Name (Ada.Command_Line.Command_Name)); + package ADir renames Ada.Directories; + + + Origin : constant String := ADir.Containing_Directory (Here_I_Am.Executable); + + Image_Path : constant String := + ADir.Compose + (ADir.Compose + (ADir.Compose + (ADir.Compose (Origin, ".."), "share"), "sokoban"), "img"); + + Level_Path : constant String := + ADir.Compose + (ADir.Compose + (ADir.Compose + (ADir.Compose (Origin, ".."), "share"), "sokoban"), "level"); end Misc; + |