pub struct Disasm<'a> {
reader: MemReaderRef<'a>,
label_offsets: Vec<u32>,
user_message_functions: HashMap<u32, UserMessageFunction>,
variables: HashMap<u32, Operand>,
stack: Vec<Operand>,
strs: Vec<PalString>,
pre_is_hover_text_move: bool,
pre_is_hover_text_push: bool,
pre_is_hover_text_binxor: bool,
hover_text: Option<u32>,
}Available on crate feature
softpal only.Fields§
§reader: MemReaderRef<'a>§label_offsets: Vec<u32>§user_message_functions: HashMap<u32, UserMessageFunction>§variables: HashMap<u32, Operand>§stack: Vec<Operand>§strs: Vec<PalString>§pre_is_hover_text_move: bool§pre_is_hover_text_push: bool§pre_is_hover_text_binxor: bool§hover_text: Option<u32>Implementations§
Source§impl<'a> Disasm<'a>
impl<'a> Disasm<'a>
pub fn new(data: &'a [u8], label_offsets: &[u32]) -> Result<Self>
pub fn disassemble<W: Write + ?Sized>( self, writer: Option<&mut W>, ) -> Result<Vec<PalString>>
fn read_instruction(&mut self) -> Result<Instruction>
fn write_instruction_to( &self, instr: &Instruction, writer: &mut dyn Write, ) -> Result<()>
fn find_user_message_functions(&mut self) -> Result<()>
fn handle_mov_instruction(&mut self, instr: Instruction) -> Result<()>
fn handle_push_instruction(&mut self, instr: Instruction) -> Result<bool>
fn handle_call_instruction(&mut self, instr: Instruction) -> Result<()>
fn handle_call_instruction_internal(&mut self, instr: Instruction) -> Result<()>
fn handle_syscall_instruction(&mut self, instr: Instruction) -> Result<()>
fn handle_message_instruction(&mut self) -> Result<()>
fn handle_another_message(&mut self) -> Result<()>
fn handle_label(&mut self) -> Result<()>
fn handle_message_instruction_internal(&mut self) -> Result<()>
fn handle_select_choice_instruction(&mut self) -> Result<()>
fn handle_select_choice_instruction_internal(&mut self) -> Result<()>
Auto Trait Implementations§
impl<'a> Freeze for Disasm<'a>
impl<'a> RefUnwindSafe for Disasm<'a>
impl<'a> Send for Disasm<'a>
impl<'a> Sync for Disasm<'a>
impl<'a> Unpin for Disasm<'a>
impl<'a> UnwindSafe for Disasm<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more