| 179 | } |
| 180 | |
| 181 | void 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 | |
| 225 | void Scene_Map::DrawBackground(Bitmap& dst) { |
| 226 | if (spriteset->RequireClear(GetDrawableList())) { |
nothing calls this directly
no test coverage detected