V-Gears 0
Free Final Fantasy VII engine.
WorldEngine.h
Go to the documentation of this file.
1/*
2 * V-Gears
3 * Copyright (C) 2022 V-Gears Team
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include <string>
22#include <vector>
23
24#include "decompiler/Engine.h"
25
29class WorldEngine : public Engine{
30
31 public:
32
38 class BankValue : public VarValue{
39
40 public:
41
47 BankValue(std::string name);
48 };
49
55 WorldEngine(int script_number);
56
63 std::unique_ptr<Disassembler> GetDisassembler(InstVec &insts) override;
64
72 std::unique_ptr<CodeGenerator> GetCodeGenerator(
73 const InstVec& insts, std::ostream &output
74 ) override;
75
84 virtual void PostCFG(InstVec &insts, Graph graph) override;
85
91 virtual void GetVariants(std::vector<std::string> &variants) const override;
92
98 virtual bool UsePureGrouping() const override;
99
100 private:
101
106
110 std::vector<std::string> text_strings_;
111};
boost::adjacency_list< boost::setS, boost::listS, boost::bidirectionalS, GraphProperty, EdgeProperty > Graph
Definition: Graph.h:169
std::vector< InstPtr > InstVec
Type representing a vector of InstPtrs.
Definition: Instruction.h:382
Base class for engines.
Definition: Engine.h:34
Value representing a variable.
Definition: Value.h:560
A bank value.
Definition: WorldEngine.h:38
BankValue(std::string name)
Constructor.
Definition: WorldEngine.cpp:31
Represents the FF7 world map engine.
Definition: WorldEngine.h:29
virtual bool UsePureGrouping() const override
Indicates if instructions are purely grouped.
Definition: WorldEngine.cpp:61
virtual void GetVariants(std::vector< std::string > &variants) const override
Retrieves the variants.
Definition: WorldEngine.cpp:59
std::unique_ptr< CodeGenerator > GetCodeGenerator(const InstVec &insts, std::ostream &output) override
Retrieves the code generator.
Definition: WorldEngine.cpp:41
virtual void PostCFG(InstVec &insts, Graph graph) override
Post-processing actions to apply to the scripts.
Definition: WorldEngine.cpp:46
int script_number_
The script number.
Definition: WorldEngine.h:105
std::unique_ptr< Disassembler > GetDisassembler(InstVec &insts) override
Retrieves the disassembler.
Definition: WorldEngine.cpp:37
WorldEngine(int script_number)
Constructor.
Definition: WorldEngine.cpp:33
std::vector< std::string > text_strings_
Container for strings from the TEXT chunk.
Definition: WorldEngine.h:110