Skip to content

Commit

Permalink
Debug fix: some intepreter state flags were incorrectly applied to fr…
Browse files Browse the repository at this point in the history
…ame instead of state
  • Loading branch information
florianessl committed Jun 6, 2024
1 parent 15ff028 commit 32b4185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,18 +595,18 @@ void Game_Interpreter::Update(bool reset_loop_count) {
// Setup Starting Event
void Game_Interpreter::Push(Game_Event* ev) {
Push(ev->GetList(), ev->GetId(), ev->WasStartedByDecisionKey(), ev->GetActivePage() ? ev->GetActivePage()->ID : 0, eEx_Normal);
GetFrame().easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_map_event;
_state.easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_map_event;
}

void Game_Interpreter::Push(Game_Event* ev, const lcf::rpg::EventPage* page, bool triggered_by_decision_key, ExecutionType exType) {
Push(page->event_commands, ev->GetId(), triggered_by_decision_key, page->ID, exType);
GetFrame().easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_map_event;
_state.easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_map_event;
}

void Game_Interpreter::Push(Game_CommonEvent* ev, ExecutionType exType) {
Push(ev->GetList(), 0, false, 0, exType);
GetFrame().maniac_event_id = ev->GetIndex();
GetFrame().easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_common_event;
_state.easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_common_event;
}

bool Game_Interpreter::CheckGameOver() {
Expand Down
2 changes: 1 addition & 1 deletion src/game_interpreter_battle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::Flag
}
Clear();
Push(page.event_commands, 0);
GetFrame().easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_battle_event;
_state.easyrpg_runtime_flags |= lcf::rpg::SaveEventExecState::RuntimeFlags_battle_event;
executed[i] = true;
return i + 1;
}
Expand Down

0 comments on commit 32b4185

Please sign in to comment.