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

Method vUpdate

src/scene_title.cpp:130–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void Scene_Title::vUpdate() {
131 if (Game_Battle::battle_test.enabled) {
132 Player::SetupBattleTest();
133 return;
134 }
135
136 if (!Check2k3ShowTitle() || Player::game_config.new_game.Get()) {
137 Player::SetupNewGame();
138 if (Player::debug_flag && Player::hide_title_flag) {
139 Scene::Push(std::make_shared<Scene_Load>());
140 }
141 return;
142 }
143
144 command_window->Update();
145
146 if (Input::IsTriggered(Input::DECISION)) {
147 int index = command_window->GetIndex();
148 if (index == indices.new_game) { // New Game
149 CommandNewGame();
150 } else if (index == indices.continue_game) { // Load Game
151 CommandContinue();
152 } else if (index == indices.import) { // Import (multi-part games)
153 CommandImport();
154 } else if (index == indices.settings) {
155 CommandSettings();
156 } else if (index == indices.translate) { // Choose a Translation (Language)
157 CommandTranslation();
158 } else if (index == indices.exit) { // Exit Game
159 CommandShutdown();
160 }
161 } else if (Input::IsTriggered(Input::SHIFT)) {
162 // For emscripten: Allow accessing the load scene for file upload with Shift
163 int index = command_window->GetIndex();
164 if (index == indices.continue_game) {
165 CommandContinue();
166 }
167 }
168}
169
170void Scene_Title::Refresh() {
171 // Enable load game if available

Callers

nothing calls this directly

Calls 3

GetMethod · 0.45
UpdateMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected