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

Method Scene_Battle

src/scene_battle.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49#include "feature.h"
50
51Scene_Battle::Scene_Battle(const BattleArgs& args)
52 : troop_id(args.troop_id),
53 allow_escape(args.allow_escape),
54 first_strike(args.first_strike),
55 on_battle_end(args.on_battle_end)
56{
57 SetUseSharedDrawables(true);
58
59 Scene::type = Scene::Battle;
60
61 // Face graphic is cleared when battle scene is created.
62 // Even if the battle gets interrupted by another scene and never starts.
63 Main_Data::game_system->ClearMessageFace();
64 Main_Data::game_system->SetBeforeBattleMusic(Main_Data::game_system->GetCurrentBGM());
65 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_BeginBattle));
66 Main_Data::game_system->BgmPlay(Main_Data::game_system->GetSystemBGM(Main_Data::game_system->BGM_Battle));
67
68 Game_Battle::SetTerrainId(args.terrain_id);
69 Game_Battle::ChangeBackground(args.background);
70 Game_Battle::SetBattleCondition(args.condition);
71 Game_Battle::SetBattleFormation(args.formation);
72}
73
74Scene_Battle::~Scene_Battle() {
75 Game_Battle::Quit();

Callers

nothing calls this directly

Calls 4

ClearMessageFaceMethod · 0.80
SetBeforeBattleMusicMethod · 0.80
SePlayMethod · 0.80
BgmPlayMethod · 0.80

Tested by

no test coverage detected