Setup.
| 101 | |
| 102 | // Setup. |
| 103 | void 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 | |
| 136 | void Game_Interpreter::KeyInputState::fromSave(const lcf::rpg::SaveEventExecState& save) { |
nothing calls this directly
no test coverage detected