![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
#include <WorldDisassembler.h>
Public Member Functions | |
WorldDisassembler (WorldEngine *engine, InstVec &insts, int script_number) | |
CConstructor. More... | |
~WorldDisassembler () | |
Destructor. More... | |
void | DoDisassemble () override |
Disassembles the instructions. More... | |
![]() | |
Disassembler (InstVec &insts) | |
Constructor for Disassembler. More... | |
virtual | ~Disassembler ()=default |
Destructor. More... | |
virtual void | Open (const char *filename) |
Open a file for disassembly. More... | |
void | Disassemble () |
Request disassembled instructions. More... | |
void | DumpDisassembly (std::ostream &output) |
Outputs the disassembled code. More... | |
Private Member Functions | |
template<typename T > | |
void | ParseOpcode (int opcode, std::string name, T instruction, int stack_change, const char *argument_format) |
Parses an opcode. More... | |
Private Attributes | |
int | script_number_ = 0 |
The script number. More... | |
Additional Inherited Members | |
![]() | |
virtual void | DoDisassemble ()=0 |
Performs disassembly. More... | |
virtual void | DoDumpDisassembly (std::ostream &output) |
Outputs the disassembled code. More... | |
void | ReadParams (InstPtr inst, const char *types) |
Read parameters and associate them with an instruction. More... | |
void | ReadParams (InstPtr inst, const char *types, const std::vector< std::string > ¶ms) |
Read parameters but it doesn't associate them with an instruction. More... | |
virtual ValuePtr | ReadParameter (InstPtr inst, std::string type) |
Reads data for a single parameter. More... | |
![]() | |
std::unique_ptr< BinaryReader > | stream_ |
Used to perform file I/O. More... | |
InstVec & | insts_ |
List of disassembled instructions. More... | |
uint32 | address_base_ |
Base address where the script starts. More... | |
uint32 | address_ |
The current address. More... | |
WorldDisassembler::WorldDisassembler | ( | WorldEngine * | engine, |
InstVec & | insts, | ||
int | script_number | ||
) |
CConstructor.
[in] | engine | The engine to use to disassemble. |
[in] | insts | The list of instructions. |
[in] | script_number | The script number to process. |
WorldDisassembler::~WorldDisassembler | ( | ) |
Destructor.
|
overridevirtual |
Disassembles the instructions.
Implements Disassembler.
|
inlineprivate |
Parses an opcode.
Adds properties to an instruction, and adds the instruction to the list.
[in] | opcode | The opcode code. |
[in] | name | the opcode name. |
[in] | instruction | A newly created instruction of the type the opcode belongs to. |
[in] | stack_change | Indicates how much the instruction changes the stack pointer by. |
[in] | argument_format | The opcode argument format. |
|
private |
The script number.