summaryrefslogtreecommitdiff
path: root/src/content/vfx/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/vfx/mod.rs')
-rw-r--r--src/content/vfx/mod.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/content/vfx/mod.rs b/src/content/vfx/mod.rs
new file mode 100644
index 0000000..8843bf1
--- /dev/null
+++ b/src/content/vfx/mod.rs
@@ -0,0 +1,29 @@
+#[repr(u8)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
+pub enum VfxMaterialId {
+ Tracer = 0,
+}
+
+pub struct VfxMaterialDef {
+ pub name: &'static str,
+ pub color: (u8, u8, u8, u8),
+ pub length: f32,
+}
+
+static MATERIALS: [VfxMaterialDef; 1] = [VfxMaterialDef {
+ name: "Tracer",
+ color: (0xFF, 0xAA, 0xAA, 0xFF),
+ length: 15.0,
+}];
+
+impl VfxMaterialId {
+ pub const ALL: [VfxMaterialId; 1] = [VfxMaterialId::Tracer];
+ #[inline]
+ pub fn def(self) -> &'static VfxMaterialDef {
+ &MATERIALS[self as usize]
+ }
+
+ pub fn from_index(idx: u8) -> VfxMaterialId {
+ VfxMaterialId::ALL[idx as usize]
+ }
+}