aboutsummaryrefslogtreecommitdiff
path: root/src/ansi_terminal.ads
blob: 9167f1f87724fb35cb0a3135180efb445f823c93 (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


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

--  See license.txt for further details


with

    Datatypes;


package ANSI_Terminal is

    function Clear_Screen
        return String;

    function Reset_Cursor
        return String;

    procedure Clear_Screen;
    procedure Reset_Cursor;

    function BG_Color_Code
           (Value : in Natural)
        return String;

    function Marching_Squares
           (Input : in Datatypes.Particle_Vector)
        return String;

private

    use Datatypes;

    Liquid_Chars : constant String (1 .. 16) := " ,.-`[//'\]\-\/#";

    type Liquidex is mod 2**4;

    type March_Cell is record
        Index   : Liquidex := 0;
        Density : Quantity := 0.0;
    end record;

    type March_Cell_Grid is array (Integer range <>, Integer range <>) of March_Cell;

end ANSI_Terminal;