]> git.lizzy.rs Git - mt_net.git/commitdiff
Implement TileAnim
authorLizzy Fleckenstein <eliasfleckenstein@web.de>
Tue, 14 Feb 2023 15:25:05 +0000 (16:25 +0100)
committerLizzy Fleckenstein <eliasfleckenstein@web.de>
Tue, 14 Feb 2023 15:25:05 +0000 (16:25 +0100)
src/to_clt/media.rs

index 2cd516b4f796a59db8e99a7850c18bdc5f39bf1e..1ec1fd6441304e263a7e2dc6fcf51c92a1f7dcd8 100644 (file)
@@ -1,7 +1,17 @@
 use super::*;
 
-#[mt_derive(to = "clt")]
-pub struct TileAnim; // TODO
+#[mt_derive(to = "clt", repr = "u8", tag = "type")]
+pub enum TileAnim {
+    None = 0,
+    VerticalFrame {
+        n_frames: [u16; 2],
+        duration: f32,
+    },
+    SpriteSheet {
+        aspect_ratio: [u8; 2],
+        duration: f32,
+    },
+}
 
 #[mt_derive(to = "clt")]
 pub struct ItemDef; // TODO