summaryrefslogtreecommitdiff
path: root/src/to_clt/env.rs
diff options
context:
space:
mode:
authorLizzy Fleckenstein <eliasfleckenstein@web.de>2023-02-06 19:56:53 +0100
committerLizzy Fleckenstein <eliasfleckenstein@web.de>2023-02-06 19:56:53 +0100
commitbe0db6761c344a53a13f569a934b33d01eb54147 (patch)
tree2668dbbab1b2ff9ebc12866d8af48e0bc8b771e5 /src/to_clt/env.rs
downloadmt_ser-be0db6761c344a53a13f569a934b33d01eb54147.tar.xz
Initial commit
Diffstat (limited to 'src/to_clt/env.rs')
-rw-r--r--src/to_clt/env.rs44
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: (),
+}