aboutsummaryrefslogtreecommitdiff
path: root/src/misc.ads
blob: ad64b46f1940727b184e16482e94571a4d3ba5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47


private with

    Ada.Directories,
    Here_I_Am;


package Misc is


    Origin, Image_Path, Level_Path : constant String;


    function Max
           (A, B : in Integer)
        return Integer;

    function Min
           (A, B : in Integer)
        return Integer;


private


    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;