From 4e1ed431612d30633fb9e556100696880ebec084 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 5 Aug 2024 18:42:52 -0700 Subject: [PATCH] read bot debug function --- src/bot.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bot.rs b/src/bot.rs index b1b1355..0f50c2c 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -43,6 +43,14 @@ impl BotDebug{ } } +pub fn read_bot_debug(mut reader:impl BinReaderExt)->Result>,binrw::Error>{ + let mut instructions=Vec::new(); + while let Ok(ins)=reader.read_le::(){ + instructions.push(ins.try_into().unwrap()); + } + Ok(instructions) +} + /* block types BLOCK_BOT_HEADER: