Skip to content

Commit 0c11500

Browse files
committed
remove duplicated functions
1 parent 4a04931 commit 0c11500

6 files changed

+2
-16
lines changed

src/game_interpreter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ lcf::rpg::MoveCommand Game_Interpreter::DecodeMove(lcf::DBArray<int32_t>::const_
615615
bool Game_Interpreter::ExecuteCommand() {
616616
auto& frame = GetFrame();
617617
const auto& com = frame.commands[frame.current_command];
618-
return Game_Interpreter::ExecuteCommand(com);
618+
return ExecuteCommand(com);
619619
}
620620

621621
bool Game_Interpreter::ExecuteCommand(lcf::rpg::EventCommand const& com) {

src/game_interpreter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Game_Interpreter
7575
void InputButton();
7676
void SetupChoices(const std::vector<std::string>& choices, int indent, PendingMessage& pm);
7777

78-
virtual bool ExecuteCommand();
78+
bool ExecuteCommand();
7979
virtual bool ExecuteCommand(lcf::rpg::EventCommand const& com);
8080

8181

src/game_interpreter_battle.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::Flag
154154
}
155155

156156
// Execute Command.
157-
bool Game_Interpreter_Battle::ExecuteCommand() {
158-
auto& frame = GetFrame();
159-
const auto& com = frame.commands[frame.current_command];
160-
return Game_Interpreter_Battle::ExecuteCommand(com);
161-
}
162-
163157
bool Game_Interpreter_Battle::ExecuteCommand(lcf::rpg::EventCommand const& com) {
164158
switch (static_cast<Cmd>(com.code)) {
165159
case Cmd::CallCommonEvent:

src/game_interpreter_battle.h

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class Game_Interpreter_Battle : public Game_Interpreter
5757

5858
bool IsForceFleeEnabled() const;
5959

60-
bool ExecuteCommand() override;
6160
bool ExecuteCommand(lcf::rpg::EventCommand const& com) override;
6261

6362
private:

src/game_interpreter_map.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ void Game_Interpreter_Map::OnMapChange() {
8686
/**
8787
* Execute Command.
8888
*/
89-
bool Game_Interpreter_Map::ExecuteCommand() {
90-
auto& frame = GetFrame();
91-
const auto& com = frame.commands[frame.current_command];
92-
return Game_Interpreter_Map::ExecuteCommand(com);
93-
}
94-
9589
bool Game_Interpreter_Map::ExecuteCommand(lcf::rpg::EventCommand const& com) {
9690
switch (static_cast<Cmd>(com.code)) {
9791
case Cmd::RecallToLocation:

src/game_interpreter_map.h

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class Game_Interpreter_Map : public Game_Interpreter
5151
*/
5252
void OnMapChange();
5353

54-
bool ExecuteCommand() override;
5554
bool ExecuteCommand(lcf::rpg::EventCommand const& com) override;
5655

5756
private:

0 commit comments

Comments
 (0)