gd_icon_renderer/
constants.rs

1use std::{collections::HashMap, sync::LazyLock};
2
3use maplit::hashmap;
4
5/// Colors used in the game stored as floats from 0 to 1.
6pub const COLORS: &'static [[f32; 3]] = &[
7    [125.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0],
8    [0.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0],
9    [0.0 / 255.0, 255.0 / 255.0, 125.0 / 255.0],
10    [0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0],
11    [0.0 / 255.0, 125.0 / 255.0, 255.0 / 255.0],
12    [0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0],
13    [125.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0],
14    [255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0],
15    [255.0 / 255.0, 0.0 / 255.0, 125.0 / 255.0],
16    [255.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0],
17    [255.0 / 255.0, 125.0 / 255.0, 0.0 / 255.0],
18    [255.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0],
19    [255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0],
20    [185.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0],
21    [255.0 / 255.0, 185.0 / 255.0, 0.0 / 255.0],
22    [0.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0],
23    [0.0 / 255.0, 200.0 / 255.0, 255.0 / 255.0],
24    [175.0 / 255.0, 175.0 / 255.0, 175.0 / 255.0],
25    [90.0 / 255.0, 90.0 / 255.0, 90.0 / 255.0],
26    [255.0 / 255.0, 125.0 / 255.0, 125.0 / 255.0],
27    [0.0 / 255.0, 175.0 / 255.0, 75.0 / 255.0],
28    [0.0 / 255.0, 125.0 / 255.0, 125.0 / 255.0],
29    [0.0 / 255.0, 75.0 / 255.0, 175.0 / 255.0],
30    [75.0 / 255.0, 0.0 / 255.0, 175.0 / 255.0],
31    [125.0 / 255.0, 0.0 / 255.0, 125.0 / 255.0],
32    [175.0 / 255.0, 0.0 / 255.0, 75.0 / 255.0],
33    [175.0 / 255.0, 75.0 / 255.0, 0.0 / 255.0],
34    [125.0 / 255.0, 125.0 / 255.0, 0.0 / 255.0],
35    [75.0 / 255.0, 175.0 / 255.0, 0.0 / 255.0],
36    [255.0 / 255.0, 75.0 / 255.0, 0.0 / 255.0],
37    [150.0 / 255.0, 50.0 / 255.0, 0.0 / 255.0],
38    [150.0 / 255.0, 100.0 / 255.0, 0.0 / 255.0],
39    [100.0 / 255.0, 150.0 / 255.0, 0.0 / 255.0],
40    [0.0 / 255.0, 150.0 / 255.0, 100.0 / 255.0],
41    [0.0 / 255.0, 100.0 / 255.0, 150.0 / 255.0],
42    [100.0 / 255.0, 0.0 / 255.0, 150.0 / 255.0],
43    [150.0 / 255.0, 0.0 / 255.0, 100.0 / 255.0],
44    [150.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0],
45    [0.0 / 255.0, 150.0 / 255.0, 0.0 / 255.0],
46    [0.0 / 255.0, 0.0 / 255.0, 150.0 / 255.0],
47    [125.0 / 255.0, 255.0 / 255.0, 175.0 / 255.0],
48    [125.0 / 255.0, 125.0 / 255.0, 255.0 / 255.0]
49];
50
51/// `zany` = uses 2.0 gamemode render system w/ multiple moving parts
52pub struct Gamemode {
53    pub prefix: String,
54    pub zany: bool
55}
56
57/// Gamemodes used in the game. `zany` = uses 2.0 gamemode render system w/ multiple moving parts
58pub static GAMEMODES: LazyLock<HashMap<&str, Gamemode>> = LazyLock::new(|| { hashmap! {
59    "cube" => Gamemode { prefix: "player_".to_string(), zany: false },
60    "ship" => Gamemode { prefix: "ship_".to_string(), zany: false },
61    "ball" => Gamemode { prefix: "player_ball_".to_string(), zany: false },
62    "ufo" => Gamemode { prefix: "bird_".to_string(), zany: false },
63    "wave" => Gamemode { prefix: "dart_".to_string(), zany: false },
64    "robot" => Gamemode { prefix: "robot_".to_string(), zany: true },
65    "spider" => Gamemode { prefix: "spider_".to_string(), zany: true }
66}});