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

Method UpdateEvents

src/scene_battle.cpp:273–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273bool Scene_Battle::UpdateEvents() {
274 auto& interp = Game_Battle::GetInterpreterBattle();
275 interp.Update();
276 status_window->Refresh();
277
278 if (interp.IsForceFleeEnabled()) {
279 if (state != State_Escape) {
280 SetState(State_Escape);
281 }
282 }
283
284 auto call = TakeRequestedScene();
285 if (call && (call->type == Scene::Gameover || call->type == Scene::Settings)) {
286 Scene::Push(std::move(call));
287 }
288
289 if (interp.IsAsyncPending()) {
290 auto aop = interp.GetAsyncOp();
291
292 if (aop.GetType() == AsyncOp::eTerminateBattle) {
293 EndBattle(static_cast<BattleResult>(aop.GetBattleResult()));
294 return false;
295 }
296
297 if (CheckSceneExit(aop)) {
298 return false;
299 }
300 }
301
302 return true;
303}
304
305bool Scene_Battle::UpdateTimers() {
306 const int timer1 = Main_Data::game_party->GetTimerSeconds(Game_Party::Timer1);

Callers

nothing calls this directly

Calls 7

IsForceFleeEnabledMethod · 0.80
GetBattleResultMethod · 0.80
UpdateMethod · 0.45
RefreshMethod · 0.45
IsAsyncPendingMethod · 0.45
GetAsyncOpMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected