From fe5919199e81832ca1a6c7f08f31f623b95cf0b5 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 16 Feb 2023 00:04:17 +0000 Subject: [PATCH] right-side screen text --- src/packet/ship.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/packet/ship.rs b/src/packet/ship.rs index 9d63a17..b5eef91 100644 --- a/src/packet/ship.rs +++ b/src/packet/ship.rs @@ -285,6 +285,25 @@ impl SmallDialog { } } +// this is literally the same struct as 0x01. +#[pso_packet(0xB0)] +pub struct RightText { + padding: [u32; 0x02], + msg: String, +} + +impl RightText { + pub fn new(mut msg: String) -> RightText { + if !msg.ends_with('\0') { + msg.push('\0'); + } + RightText { + padding: [0; 0x02], + msg: msg, + } + } +} + #[pso_packet(0x11)] pub struct SmallLeftDialog { padding: [u32; 0x02], -- 2.36.0