MCPcopy Create free account
hub / github.com/EasyRPG/Player / Push

Method Push

src/game_interpreter.cpp:103–133  ·  view source on GitHub ↗

Setup.

Source from the content-addressed store, hash-verified

101
102// Setup.
103void Game_Interpreter::Push(
104 std::vector<lcf::rpg::EventCommand> _list,
105 int event_id,
106 bool started_by_decision_key,
107 int event_page_id
108) {
109 if (_list.empty()) {
110 return;
111 }
112
113 if ((int)_state.stack.size() > call_stack_limit) {
114 Output::Error("Call Event limit ({}) has been exceeded", call_stack_limit);
115 }
116
117 lcf::rpg::SaveEventExecFrame frame;
118 frame.ID = _state.stack.size() + 1;
119 frame.commands = std::move(_list);
120 frame.current_command = 0;
121 frame.triggered_by_decision_key = started_by_decision_key;
122 frame.event_id = event_id;
123 frame.maniac_event_id = event_id;
124 frame.maniac_event_page_id = event_page_id;
125
126 if (_state.stack.empty() && main_flag && !Game_Battle::IsBattleRunning()) {
127 Main_Data::game_system->ClearMessageFace();
128 Main_Data::game_player->SetMenuCalling(false);
129 Main_Data::game_player->SetEncounterCalling(false);
130 }
131
132 _state.stack.push_back(std::move(frame));
133}
134
135
136void Game_Interpreter::KeyInputState::fromSave(const lcf::rpg::SaveEventExecState& save) {

Callers

nothing calls this directly

Calls 8

ClearMessageFaceMethod · 0.80
SetMenuCallingMethod · 0.80
SetEncounterCallingMethod · 0.80
GetActivePageMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected