| 307 | } |
| 308 | |
| 309 | void Player::UpdateInput() { |
| 310 | // Input Logic: |
| 311 | if (Input::IsSystemTriggered(Input::TOGGLE_FPS)) { |
| 312 | DisplayUi->ToggleShowFps(); |
| 313 | } |
| 314 | if (Input::IsSystemTriggered(Input::TAKE_SCREENSHOT)) { |
| 315 | Output::TakeScreenshot(); |
| 316 | } |
| 317 | if (Input::IsSystemTriggered(Input::SHOW_LOG)) { |
| 318 | Output::ToggleLog(); |
| 319 | } |
| 320 | if (Input::IsSystemTriggered(Input::TOGGLE_ZOOM)) { |
| 321 | DisplayUi->ToggleZoom(); |
| 322 | } |
| 323 | float speed = 1.0; |
| 324 | if (Input::IsSystemPressed(Input::FAST_FORWARD_A)) { |
| 325 | speed = Input::GetInputSource()->GetConfig().speed_modifier_a.Get(); |
| 326 | } |
| 327 | if (Input::IsSystemPressed(Input::FAST_FORWARD_B)) { |
| 328 | speed = Input::GetInputSource()->GetConfig().speed_modifier_b.Get(); |
| 329 | } |
| 330 | Game_Clock::SetGameSpeedFactor(speed); |
| 331 | |
| 332 | if (Main_Data::game_quit) { |
| 333 | reset_flag |= Main_Data::game_quit->ShouldQuit(); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | void Player::Update(bool update_scene) { |
| 338 | std::shared_ptr<Scene> old_instance = Scene::instance; |
nothing calls this directly
no test coverage detected