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

Method Start

src/scene_map.cpp:74–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void Scene_Map::Start() {
75 Scene_Debug::ResetPrevIndices();
76 spriteset.reset(new Spriteset_Map());
77 message_window.reset(new Window_Message(Player::message_box_offset_x, Player::screen_height - MESSAGE_BOX_HEIGHT, MESSAGE_BOX_WIDTH, MESSAGE_BOX_HEIGHT));
78
79 Game_Message::SetWindow(message_window.get());
80
81 // Called here instead of Scene Load, otherwise wrong graphic stack
82 // is used.
83 if (from_save_id > 0) {
84 auto current_music = Main_Data::game_system->GetCurrentBGM();
85 Main_Data::game_system->BgmStop();
86 Main_Data::game_system->BgmPlay(current_music);
87 Main_Data::game_dynrpg->Load(from_save_id);
88 } else {
89 Game_Map::PlayBgm();
90 }
91
92 Main_Data::game_screen->InitGraphics();
93 Main_Data::game_pictures->InitGraphics();
94 Game_Clock::ResetFrame(Game_Clock::now());
95
96 Start2(MapUpdateAsyncContext());
97}
98
99void Scene_Map::StartFromSave(int from_save_id) {
100 this->from_save_id = from_save_id;

Callers

nothing calls this directly

Calls 7

BgmStopMethod · 0.80
BgmPlayMethod · 0.80
resetMethod · 0.45
getMethod · 0.45
LoadMethod · 0.45
InitGraphicsMethod · 0.45

Tested by

no test coverage detected