summaryrefslogtreecommitdiff
path: root/src/sim/materials.rs
blob: 8b2161824425d38347ce9e6af94685938157032f (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
#[derive(Clone, Copy)]
pub struct Material<'a> {
    pub name: &'a str,
    pub r: u8,
    pub g: u8,
    pub b: u8,

    pub density: u8,
}

#[repr(u8)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum MaterialId {
    Void,
    Sand,
    Water,
}

pub static MATERIALS: [Material; 3] = [
    Material {
        name: "Void",
        r: 0x00,
        g: 0x00,
        b: 0x00,
        density: 0,
    },
    Material {
        name: "Sand",
        r: 0xDE,
        g: 0xCB,
        b: 0x85,
        density: 50,
    },
    Material {
        name: "Water",
        r: 0x38,
        g: 0xA9,
        b: 0xFF,
        density: 40,
    },
];