summaryrefslogtreecommitdiff
path: root/src/constants.rs
blob: dcda1d571805db4e6825d76f676af9becc4afede (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
pub const MAP_SIZE: usize = 33;
pub const MAP_ROW_SIZE: [MapRow; MAP_SIZE] = [
    MapRow { start_bit: 0, x_offset: 11 },
    MapRow { start_bit: 11, x_offset: 8 },
    MapRow { start_bit: 28, x_offset: 7 },
    MapRow { start_bit: 47, x_offset: 6 },
    MapRow { start_bit: 68, x_offset: 4 },
    MapRow { start_bit: 93, x_offset: 4 },
    MapRow { start_bit: 118, x_offset: 3 },
    MapRow { start_bit: 145, x_offset: 2 },
    MapRow { start_bit: 174, x_offset: 1 },
    MapRow { start_bit: 205, x_offset: 1 },
    MapRow { start_bit: 236, x_offset: 1 },
    MapRow { start_bit: 267, x_offset: 0 },
    MapRow { start_bit: 300, x_offset: 0 },
    MapRow { start_bit: 333, x_offset: 0 },
    MapRow { start_bit: 366, x_offset: 0 },
    MapRow { start_bit: 399, x_offset: 0 },
    MapRow { start_bit: 432, x_offset: 0 },
    MapRow { start_bit: 465, x_offset: 0 },
    MapRow { start_bit: 498, x_offset: 0 },
    MapRow { start_bit: 531, x_offset: 0 },
    MapRow { start_bit: 564, x_offset: 0 },
    MapRow { start_bit: 597, x_offset: 0 },
    MapRow { start_bit: 630, x_offset: 1 },
    MapRow { start_bit: 661, x_offset: 1 },
    MapRow { start_bit: 692, x_offset: 1 },
    MapRow { start_bit: 723, x_offset: 2 },
    MapRow { start_bit: 752, x_offset: 3 },
    MapRow { start_bit: 779, x_offset: 4 },
    MapRow { start_bit: 804, x_offset: 4 },
    MapRow { start_bit: 829, x_offset: 6 },
    MapRow { start_bit: 850, x_offset: 7 },
    MapRow { start_bit: 869, x_offset: 8 },
    MapRow { start_bit: 886, x_offset: 11 },
];
pub const MAP_BITSIZE: usize = 897;
pub const MAP_U64S: usize = 15;

pub struct MapRow {
    pub start_bit: usize,
    pub x_offset: usize
}

impl MapRow {
    pub fn len(&self) -> usize {
        MAP_SIZE - 2 * self.x_offset
    }
}