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

Method TransitionOut

src/scene_map.cpp:181–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void Scene_Map::TransitionOut(SceneType next_scene) {
182 auto& transition = Transition::instance();
183
184 if (next_scene != Scene::Battle
185 && next_scene != Scene::Debug
186 && next_scene != Scene::Settings
187 && next_scene != Scene::LanguageMenu) {
188 screen_erased_by_event = false;
189 }
190
191 if (next_scene == Scene::Debug) {
192 transition.InitErase(Transition::TransitionCutOut, this);
193 return;
194 }
195
196 if (next_scene == Scene::Battle) {
197 if (!transition.IsErasedNotActive()) {
198 auto tt = Main_Data::game_system->GetTransition(Main_Data::game_system->Transition_BeginBattleErase);
199 if (tt == Transition::TransitionNone) {
200 // If transition type is none, RPG_RT flashes and then waits 40 frames before starting the battle.
201 transition.InitErase(Transition::TransitionCutOut, this, 40);
202 } else {
203 transition.InitErase(tt, this);
204 }
205 transition.PrependFlashes(31, 31, 31, 31, 10, 2);
206 } else {
207 // If screen is already erased, RPG_RT does nothing for 40 frames.
208 transition.InitErase(Transition::TransitionNone, this, 40);
209 }
210 return;
211 }
212
213 if (next_scene == Scene::Gameover) {
214 transition.InitErase(Transition::TransitionFadeOut, this);
215 return;
216 }
217
218 if (next_scene == Scene::Title) {
219 Main_Data::game_system->BgmStop();
220 }
221
222 Scene::TransitionOut(next_scene);
223}
224
225void Scene_Map::DrawBackground(Bitmap& dst) {
226 if (spriteset->RequireClear(GetDrawableList())) {

Callers

nothing calls this directly

Calls 5

InitEraseMethod · 0.80
IsErasedNotActiveMethod · 0.80
GetTransitionMethod · 0.80
PrependFlashesMethod · 0.80
BgmStopMethod · 0.80

Tested by

no test coverage detected