V-Gears 0
Free Final Fantasy VII engine.
WorldEngine Class Reference

Represents the FF7 world map engine. More...

#include <WorldEngine.h>

Inheritance diagram for WorldEngine:
Collaboration diagram for WorldEngine:

Classes

class  BankValue
 A bank value. More...
 

Public Member Functions

 WorldEngine (int script_number)
 Constructor. More...
 
std::unique_ptr< DisassemblerGetDisassembler (InstVec &insts) override
 Retrieves the disassembler. More...
 
std::unique_ptr< CodeGeneratorGetCodeGenerator (const InstVec &insts, std::ostream &output) override
 Retrieves the code generator. More...
 
virtual void PostCFG (InstVec &insts, Graph graph) override
 Post-processing actions to apply to the scripts. More...
 
virtual void GetVariants (std::vector< std::string > &variants) const override
 Retrieves the variants. More...
 
virtual bool UsePureGrouping () const override
 Indicates if instructions are purely grouped. More...
 
- Public Member Functions inherited from Engine
virtual ~Engine ()=default
 
virtual std::unique_ptr< DisassemblerGetDisassembler (InstVec &insts, const std::vector< unsigned char > &c)
 
virtual std::unique_ptr< DisassemblerGetDisassembler (InstVec &insts)=0
 Retrieve the disassembler for the engine. More...
 
virtual std::unique_ptr< CodeGeneratorGetCodeGenerator (const InstVec &insts, std::ostream &output)=0
 Retrieve the code generator for the engine. More...
 
virtual void PostCFG (InstVec &insts, Graph graph)
 Post-processing step after CFG analysis. More...
 
virtual bool SupportsCodeFlow () const
 Whether or not code flow analysis is supported for this engine. More...
 
virtual bool SupportsCodeGen () const
 Whether or not code generation is supported for this engine. More...
 
virtual void GetVariants (std::vector< std::string > &variants) const
 Retrieves the names of all variants supported for this engine. More...
 
virtual bool UsePureGrouping () const
 Whether or not to use "pure" grouping during code flow analysis. More...
 

Private Attributes

int script_number_
 The script number. More...
 
std::vector< std::string > text_strings_
 Container for strings from the TEXT chunk. More...
 

Additional Inherited Members

- Public Attributes inherited from Engine
FuncMap functions
 Map to functions in the current script, indexed by start address. More...
 
- Protected Attributes inherited from Engine
std::string variant_
 Engine variant to use for the script. More...
 

Detailed Description

Represents the FF7 world map engine.

Constructor & Destructor Documentation

◆ WorldEngine()

WorldEngine::WorldEngine ( int  script_number)

Constructor.

Parameters
[in]script_numberThe script number.

Member Function Documentation

◆ GetCodeGenerator()

std::unique_ptr< CodeGenerator > WorldEngine::GetCodeGenerator ( const InstVec insts,
std::ostream &  output 
)
overridevirtual

Retrieves the code generator.

Parameters
[in]instsList of instructions. Unused.
[in]outputPointer to the output (file, stream...).
Returns
Pointer to the generator.

Implements Engine.

◆ GetDisassembler()

std::unique_ptr< Disassembler > WorldEngine::GetDisassembler ( InstVec insts)
overridevirtual

Retrieves the disassembler.

Parameters
[in]instsList of instructions.
Returns
Pointer to the disassembler.

Implements Engine.

◆ GetVariants()

void WorldEngine::GetVariants ( std::vector< std::string > &  variants) const
overridevirtual

Retrieves the variants.

Todo:
Variants of what? What is this supposed to do?

Reimplemented from Engine.

◆ PostCFG()

void WorldEngine::PostCFG ( InstVec insts,
Graph  graph 
)
overridevirtual

Post-processing actions to apply to the scripts.

It actually does nothing. CFG stands for control flow group.

Parameters
[in]instsInstruction list.
[in]graphCode graph.

Reimplemented from Engine.

◆ UsePureGrouping()

bool WorldEngine::UsePureGrouping ( ) const
overridevirtual

Indicates if instructions are purely grouped.

Returns
True if instructions are purely grouped. Always false.

Reimplemented from Engine.

Member Data Documentation

◆ script_number_

int WorldEngine::script_number_
private

The script number.

◆ text_strings_

std::vector<std::string> WorldEngine::text_strings_
private

Container for strings from the TEXT chunk.


The documentation for this class was generated from the following files: