diff options
author | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-10 15:53:15 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-10 15:53:15 +0100 |
commit | 6c875082474431a39596b1547b436a9bec1f5533 (patch) | |
tree | bafa770893e6a5a1daea8b57cc5a3f3574da3cb6 /src/to_clt/env.rs | |
download | mt_net-6c875082474431a39596b1547b436a9bec1f5533.tar.xz |
Initial commit
Diffstat (limited to 'src/to_clt/env.rs')
-rw-r--r-- | src/to_clt/env.rs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/to_clt/env.rs b/src/to_clt/env.rs new file mode 100644 index 0000000..f242298 --- /dev/null +++ b/src/to_clt/env.rs @@ -0,0 +1,44 @@ +use super::*; + +#[mt_derive(to = "clt")] +pub struct ObjAdd; // TODO + +#[mt_derive(to = "clt")] +pub struct ObjMsg; // TODO + +#[mt_derive(to = "clt", repr = "u8", enumset)] +pub enum MapBlockFlag { + IsUnderground = 0, + DayNightDiff, + LightExpired, + NotGenerated, +} + +pub const ALWAYS_LIT_FROM: u16 = 0xf000; + +#[mt_derive(to = "clt")] +pub struct MapBlock { + pub flags: EnumSet<MapBlockFlag>, + pub lit_from: u16, + + #[mt(const8 = 2)] + #[serde(skip)] + pub param0_size: (), + + #[mt(const8 = 2)] + #[serde(skip)] + pub param12_size: (), + + #[serde(with = "serde_arrays")] + pub param_0: [u16; 4096], + #[serde(with = "serde_arrays")] + pub param_1: [u8; 4096], + #[serde(with = "serde_arrays")] + pub param_2: [u8; 4096], + + pub node_metas: HashMap<u16, NodeMeta>, + + #[mt(const8 = 2)] + #[serde(skip)] + pub version: (), +} |