wolfrpg_map_parser/command/sound_command/
operation.rs1#[cfg(feature = "serde")]
2use serde::{Serialize, Deserialize};
3
4#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5#[derive(PartialEq, Clone)]
6pub enum Operation {
7 SetBGM = 0x00,
8 SetBGS = 0x01,
9 SetSE = 0x02,
10 Unknown
11}
12
13impl Operation {
14 pub const fn new(operation: u8) -> Self {
15 match operation {
16 0x00 => Operation::SetBGM,
17 0x01 => Operation::SetBGS,
18 0x02 => Operation::SetSE,
19 _ => Operation::Unknown
20 }
21 }
22}