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: