aboutsummaryrefslogtreecommitdiff
path: root/src/misc.ads
blob: 679f3f566362352351356c6e29478eaaa5cac45e (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
48
49
50
51
52
53


--  Programmed by Jedidiah Barber
--  Licensed under the Sunset License v1.0

--  See license.txt for further details


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;