diff --git a/src/audio.cpp b/src/audio.cpp index 094265d14b..a9eff9f18d 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -18,6 +18,7 @@ // Headers #include "audio.h" #include "audio_midi.h" +#include "options.h" #include "system.h" #include "baseui.h" #include "player.h" @@ -48,7 +49,7 @@ int EmptyAudio::BGM_GetTicks() const { } // Time since BGM_Play was called, works for everything except MIDI - return (Player::GetFrames() - bgm_starttick + 1) / Game_Clock::GetTargetGameFps(); + return (Player::GetFrames() - bgm_starttick + 1) / DEFAULT_FPS; } void EmptyAudio::vGetConfig(Game_ConfigAudio&) const { @@ -57,7 +58,7 @@ void EmptyAudio::vGetConfig(Game_ConfigAudio&) const { bool EmptyAudio::BGM_PlayedOnce() const { // 5 seconds, arbitrary - return BGM_GetTicks() > (Game_Clock::GetTargetGameFps() * 5); + return BGM_GetTicks() > (DEFAULT_FPS * 5); } EmptyAudio::EmptyAudio(const Game_ConfigAudio& cfg) : AudioInterface(cfg) { diff --git a/src/fps_overlay.cpp b/src/fps_overlay.cpp index 8a99bacb5b..0ca1abd609 100644 --- a/src/fps_overlay.cpp +++ b/src/fps_overlay.cpp @@ -20,6 +20,7 @@ #include "fps_overlay.h" #include "game_clock.h" #include "bitmap.h" +#include "options.h" #include "utils.h" #include "input.h" #include "font.h" @@ -39,7 +40,12 @@ FpsOverlay::FpsOverlay() : void FpsOverlay::UpdateText() { auto fps = Utils::RoundTo(Game_Clock::GetFPS()); - text = "FPS: " + std::to_string(fps); + text = fmt::format("FPS: {}", fps); + + if (Game_Clock::GetTargetGameFps() != DEFAULT_FPS) { + text += fmt::format(" | TPS: {}", Game_Clock::GetTargetGameFps()); + } + fps_dirty = true; } diff --git a/src/game_clock.h b/src/game_clock.h index c277cf2d9d..6a273aded3 100644 --- a/src/game_clock.h +++ b/src/game_clock.h @@ -45,14 +45,25 @@ class Game_Clock { template static void SleepFor(std::chrono::duration dt); - /** Get the target frames per second for the game simulation */ - static constexpr int GetTargetGameFps(); + /** + * Get the target frames per second for the game simulation. + * Use this for everything that must run at the speed of the game. + * Use DEFAULT_FPS for framerate independent behaviours such as global + * timers. + */ + static int GetTargetGameFps(); + + /** + * Set the target frames per second for the game simulation + * @param fps new game fps + */ + static void SetTargetGameFps(int fps); /** Get the amount of time each logical frame should take */ - static constexpr duration GetTargetGameTimeStep(); + static duration GetTargetGameTimeStep(); /** Get the timestep for a given frames per second value */ - static constexpr duration TimeStepFromFps(int fps); + static duration TimeStepFromFps(int fps); /** Get the name of the underlying clock type */ static constexpr const char* Name(); @@ -114,6 +125,7 @@ class Game_Clock { time_point frame_time; duration frame_accumulator; duration max_frame_accumulator = std::chrono::duration_cast(std::chrono::milliseconds(200)); + int target_fps = DEFAULT_FPS; float speed = 1.0; float fps = 0.0; int frame = 0; @@ -125,15 +137,21 @@ inline Game_Clock::time_point Game_Clock::now() { return clock::now(); } -constexpr int Game_Clock::GetTargetGameFps() { - return DEFAULT_FPS; +inline int Game_Clock::GetTargetGameFps() { + return data.target_fps; +} + +inline void Game_Clock::SetTargetGameFps(int fps) { + // Prevent game from becoming unplayable + fps = std::clamp(fps, 10, 500); + data.target_fps = fps; } -constexpr Game_Clock::duration Game_Clock::GetTargetGameTimeStep() { +inline Game_Clock::duration Game_Clock::GetTargetGameTimeStep() { return TimeStepFromFps(GetTargetGameFps()); } -constexpr Game_Clock::duration Game_Clock::TimeStepFromFps(int fps) { +inline Game_Clock::duration Game_Clock::TimeStepFromFps(int fps) { auto ns = std::chrono::nanoseconds(std::chrono::seconds(1)) / fps; return std::chrono::duration_cast(ns); } @@ -160,7 +178,7 @@ inline float Game_Clock::GetFPS() { } inline bool Game_Clock::NextGameTimeStep() { - constexpr auto dt = GetTargetGameTimeStep(); + auto dt = GetTargetGameTimeStep(); if (data.frame_accumulator < dt) { return false; } diff --git a/src/game_interpreter.cpp b/src/game_interpreter.cpp index deb29dd6d8..119c4475a9 100644 --- a/src/game_interpreter.cpp +++ b/src/game_interpreter.cpp @@ -48,6 +48,7 @@ #include "game_windows.h" #include "json_helper.h" #include "maniac_patch.h" +#include "options.h" #include "spriteset_map.h" #include "sprite_character.h" #include "scene_gameover.h" @@ -479,7 +480,7 @@ void Game_Interpreter::Update(bool reset_loop_count) { if (_keyinput.timed) { // 10 per second Main_Data::game_variables->Set(_keyinput.time_variable, - (_keyinput.wait_frames * 10) / Game_Clock::GetTargetGameFps()); + (_keyinput.wait_frames * 10) / DEFAULT_FPS); Game_Map::SetNeedRefreshForVarChange(_keyinput.time_variable); RuntimePatches::OnVariableChanged(_keyinput.time_variable); } @@ -5056,17 +5057,102 @@ bool Game_Interpreter::CommandManiacSetGameOption(lcf::rpg::EventCommand const& return true; } - int operation = com.parameters[1]; - //int value = ValueOrVariable(com.parameters[0], com.parameters[2]); + const auto option_type = com.parameters[1]; - switch (operation) { - case 2: // Change Picture Limit (noop, we support arbitrary amount of pictures) + switch (option_type) { + case 0: { // .runWhenInactive or .pauseWhenInactive + const bool run_when_inactive = (ValueOrVariable(com.parameters[0], com.parameters[2]) != 0); + + if (DisplayUi) { + DisplayUi->SetPauseWhenFocusLost(!run_when_inactive); + } + return true; + } + case 1: { // FatalMix: .fatal fps, testPlayMode, fastForwardText + int fps = ValueOrVariable(com.parameters[0], com.parameters[2]); // Game Speed + const int test_play_mode = com.parameters[3] & 3; // 0: Keep, 1: Off, 2: On + const bool enable_fast_forward_text = (com.parameters[3] & 16) != 0; + + // Implementation difference: We reset the frame rate when the game ends + if (fps > 0) { + Game_Clock::SetTargetGameFps(fps); + } + + switch (test_play_mode) { + case 1: + Player::debug_flag = false; break; - default: - Output::Warning("Maniac SetGameOption: Operation {} not supported", operation); + case 2: + Player::debug_flag = true; + break; + } + + // Implementation difference: We always enable this while in TestPlay mode + // This option only configures the behaviour outside of TestPlay + Main_Data::game_system->SetFastForwardText(enable_fast_forward_text); + return true; + } + case 2: { // .picLimit limit + // Change Picture Limit (noop, we support arbitrary amount of pictures) + const int pic_limit = ValueOrVariable(com.parameters[0], com.parameters[2]); + Output::Debug("Maniac SetGameOption: Picture Limit set to {}", pic_limit); + return true; + } + case 3: { // .fullFrame, .oneFifth, .oneThird, .oneHalf + // Frame Skip + const int skip_mode = com.parameters[2]; + int percentage = 100; + switch (skip_mode) { + case 1: + percentage = 20; + break; // 1/5 + case 2: + percentage = 33; + break; // 1/3 + case 3: + percentage = 50; + break; // 1/2 + } + Player::SetFrameSkip(percentage); + return true; } + case 4: { // .mouse.disableMsgProcession value + // Left Mouse button can continue messages + const bool enable_mouse_for_messages = (ValueOrVariable(com.parameters[0], com.parameters[2]) == 0); + Main_Data::game_system->SetMessageMouseEnabled(enable_mouse_for_messages); + return true; + } + case 5: { // .btlOrigin position + // Battle UI position + // 0: center, 1: topLeft, 2: bottomLeft, 3: topRight, 4: bottomRight, + // 5: top, 6: bottom, 7: left, 8: right + const int battle_origin = com.parameters[2]; - return true; + // TODO: This sets the rendering location for the battle scene + // Needs modifying all the drawing code in the battle system + Output::Warning("Maniac SetGameOption: Reposition Battle UI (position: {}) not implemented.", battle_origin); + Main_Data::game_system->SetBattleOrigin(battle_origin); + return true; + } + case 6: { // .animLimit limit + // Battle Animation Limit + Output::Warning("Maniac SetGameOption: Battle Animation limit not implemented."); + return true; + } + case 7: { // .winFaceSize width, height + const int width = ValueOrVariable(com.parameters[0], com.parameters[2]); + const int height = ValueOrVariable(com.parameters[0], com.parameters[3]); + + Output::Warning("Maniac SetGameOption: Custom WinFaceSize ({}x{}) not implemented.", width, height); + // TODO: Values must be used in OnFaceReady. Maniacs appears to not hardcode 4 faces per line so this needs + // further testing + Main_Data::game_system->SetMessageFaceSize(width, height); + return true; + } + default: + Output::Warning("Maniac SetGameOption: Unknown Operation {}", static_cast(option_type)); + return true; + } } bool Game_Interpreter::CommandManiacControlStrings(lcf::rpg::EventCommand const& com) { diff --git a/src/game_quit.cpp b/src/game_quit.cpp index 5c8a1eb178..3b35045641 100644 --- a/src/game_quit.cpp +++ b/src/game_quit.cpp @@ -38,20 +38,18 @@ Game_Quit::Game_Quit() void Game_Quit::Update() { if (Scene::instance == nullptr || Scene::instance->type == Scene::Title || !Scene::Find(Scene::Title) || !Input::IsPressed(Input::RESET)) { - if (time_left != start_time) { - Reset(); - } + Reset(); return; } window.SetVisible(true); if (time_left > 0) { - --time_left; + time_left -= static_cast(DEFAULT_FPS) / Game_Clock::GetTargetGameFps(); } // FIXME Need to write the text every frame in case system graphic changes.. - auto s = (time_left + DEFAULT_FPS - 1) / DEFAULT_FPS; + auto s = static_cast(time_left + DEFAULT_FPS - 1) / DEFAULT_FPS; window.SetText("Restarting in " + std::to_string(s) + " sec ..."); window.Update(); } @@ -63,5 +61,5 @@ void Game_Quit::OnResolutionChange() { void Game_Quit::Reset() { window.SetVisible(false); - time_left = DEFAULT_FPS * num_seconds; + time_left = DEFAULT_FPS * num_seconds + (Player::debug_flag ? 0 : 1); } diff --git a/src/game_quit.h b/src/game_quit.h index 053a4465fe..643d07e2ea 100644 --- a/src/game_quit.h +++ b/src/game_quit.h @@ -31,11 +31,11 @@ class Game_Quit { void Reset(); Window_Help window; - int time_left = 0; + double time_left = 0; }; inline bool Game_Quit::ShouldQuit() const { - return time_left == 0; + return time_left <= 0; } #endif diff --git a/src/game_system.cpp b/src/game_system.cpp index 3482f7f07c..eb1fc0f777 100644 --- a/src/game_system.cpp +++ b/src/game_system.cpp @@ -648,4 +648,3 @@ bool Game_System::IsMessageTransparent() { return data.message_transparent != 0; } - diff --git a/src/game_system.h b/src/game_system.h index a15e006c83..d333a647f0 100644 --- a/src/game_system.h +++ b/src/game_system.h @@ -436,6 +436,19 @@ class Game_System { /** @return Whether the game was loaded from a savegame in the current frame */ bool IsLoadedThisFrame() const; + void SetFastForwardText(bool enabled); + bool IsFastForwardText() const; + + void SetMessageMouseEnabled(bool disabled); + bool IsMessageMouseEnabled() const; + + void SetBattleOrigin(int origin); + int GetBattleOrigin() const; + + void SetMessageFaceSize(int width, int height); + int GetMessageFaceWidth() const; + int GetMessageFaceHeight() const; + private: std::string InelukiReadLink(Filesystem_Stream::InputStream& stream); @@ -453,6 +466,10 @@ class Game_System { Color bg_color = Color{ 0, 0, 0, 255 }; bool bgm_pending = false; int loaded_frame_count = 0; + + // Game options that are not saved + bool maniac_fast_forward_text = false; + bool message_mouse = false; }; inline bool Game_System::HasSystemGraphic() { @@ -662,5 +679,41 @@ inline bool Game_System::GetAllowMenu() { return data.menu_allowed; } +inline void Game_System::SetFastForwardText(bool enabled) { + maniac_fast_forward_text = enabled; +} + +inline bool Game_System::IsFastForwardText() const { + return maniac_fast_forward_text; +} + +inline void Game_System::SetMessageMouseEnabled(bool enabled) { + message_mouse = enabled; +} + +inline bool Game_System::IsMessageMouseEnabled() const { + return message_mouse; +} + +inline void Game_System::SetBattleOrigin(int origin) { + data.maniac_battle_origin = origin; +} + +inline int Game_System::GetBattleOrigin() const { + return data.maniac_battle_origin; +} + +inline void Game_System::SetMessageFaceSize(int width, int height) { + data.maniac_message_face_width = width; + data.maniac_message_face_height = height; +} + +inline int Game_System::GetMessageFaceWidth() const { + return data.maniac_message_face_width; +} + +inline int Game_System::GetMessageFaceHeight() const { + return data.maniac_message_face_height; +} #endif diff --git a/src/input_buttons.h b/src/input_buttons.h index 6524062927..97f237b69a 100644 --- a/src/input_buttons.h +++ b/src/input_buttons.h @@ -69,6 +69,7 @@ namespace Input { DEBUG_THROUGH, DEBUG_SAVE, DEBUG_ABORT_EVENT, + DEBUG_MESSAGE_FAST_FORWARD, SETTINGS_MENU, TOGGLE_FPS, TAKE_SCREENSHOT, @@ -115,6 +116,7 @@ namespace Input { "DEBUG_THROUGH", "DEBUG_SAVE", "DEBUG_ABORT_EVENT", + "DEBUG_MESSAGE_FAST_FORWARD", "SETTINGS_MENU", "TOGGLE_FPS", "TAKE_SCREENSHOT", @@ -160,6 +162,7 @@ namespace Input { "(Test Play) Walk through walls", "(Test Play) Open the save menu", "(Test Play) Aborts current active event", + "(Test Play) Fast forward through messages", "Open this settings menu", "Toggle the FPS display", "Take a screenshot", diff --git a/src/input_buttons_desktop.cpp b/src/input_buttons_desktop.cpp index 9fb6bc7726..7e03e4f204 100644 --- a/src/input_buttons_desktop.cpp +++ b/src/input_buttons_desktop.cpp @@ -91,6 +91,7 @@ Input::ButtonMappingArray Input::GetDefaultButtonMappings() { {DEBUG_THROUGH, Keys::RCTRL}, {DEBUG_SAVE, Keys::F11}, {DEBUG_ABORT_EVENT, Keys::F10}, + {DEBUG_MESSAGE_FAST_FORWARD, Keys::RSHIFT}, {TAKE_SCREENSHOT, Keys::F7}, {TOGGLE_FPS, Keys::F2}, {SHOW_LOG, Keys::F3}, diff --git a/src/message_overlay.cpp b/src/message_overlay.cpp index e5f8c5b38d..2cdf8e08ac 100644 --- a/src/message_overlay.cpp +++ b/src/message_overlay.cpp @@ -104,7 +104,7 @@ void MessageOverlay::Update() { } if (IsAnyMessageVisible()) { - ++counter; + counter += static_cast(DEFAULT_FPS) / Game_Clock::GetTargetGameFps(); if (counter > 150) { counter = 0; for (auto& message : messages) { diff --git a/src/message_overlay.h b/src/message_overlay.h index 0c87d555a5..3f31314ff3 100644 --- a/src/message_overlay.h +++ b/src/message_overlay.h @@ -71,7 +71,7 @@ class MessageOverlay : public Drawable { bool dirty = false; - int counter = 0; + double counter = 0; bool show_all = false; }; diff --git a/src/platform/libretro/audio.cpp b/src/platform/libretro/audio.cpp index d4dc29e1d1..c00b726576 100644 --- a/src/platform/libretro/audio.cpp +++ b/src/platform/libretro/audio.cpp @@ -66,7 +66,7 @@ LibretroAudio::LibretroAudio(const Game_ConfigAudio& cfg) : SetFormat(AUDIO_SAMPLERATE, AudioDecoder::Format::S16, 2); - samples_per_frame = AUDIO_SAMPLERATE / Game_Clock::GetTargetGameFps(); + samples_per_frame = AUDIO_SAMPLERATE / DEFAULT_FPS; } LibretroAudio::~LibretroAudio() { diff --git a/src/platform/libretro/ui.cpp b/src/platform/libretro/ui.cpp index e05087ed97..75f4c46e62 100644 --- a/src/platform/libretro/ui.cpp +++ b/src/platform/libretro/ui.cpp @@ -284,7 +284,7 @@ RETRO_API void retro_set_environment(retro_environment_t cb) { static retro_frame_time_callback frame_time_definition = { retro_time_update, - 1000000 / Game_Clock::GetTargetGameFps() + 1000000 / DEFAULT_FPS }; static retro_audio_callback audio_callback_definition = { @@ -387,7 +387,7 @@ RETRO_API void retro_get_system_av_info(struct retro_system_av_info* info) { info->geometry.max_width = fb_max_width; info->geometry.max_height = fb_max_height; info->geometry.aspect_ratio = 0.0f; - info->timing.fps = Game_Clock::GetTargetGameFps(); + info->timing.fps = DEFAULT_FPS; info->timing.sample_rate = AUDIO_SAMPLERATE; } diff --git a/src/player.cpp b/src/player.cpp index 1ff38f8c6c..fe711da0bf 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -135,6 +135,10 @@ namespace Player { int rng_seed = -1; Game_ConfigPlayer player_config; Game_ConfigGame game_config; + + int frame_draw_accumulator = 0; + int frame_draw_percentage = 100; + #ifdef __EMSCRIPTEN__ std::string emscripten_game_name; #endif @@ -296,6 +300,11 @@ void Player::MainLoop() { } } +void Player::SetFrameSkip(int percentage) { + frame_draw_percentage = percentage; + frame_draw_accumulator = 0; +} + void Player::Pause() { Audio().BGM_Pause(); } @@ -391,7 +400,13 @@ void Player::Update(bool update_scene) { void Player::Draw() { Graphics::Update(); - Graphics::Draw(*DisplayUi->GetDisplaySurface()); + + frame_draw_accumulator += frame_draw_percentage; + if (frame_draw_accumulator >= 100) { + frame_draw_accumulator -= 100; + Graphics::Draw(*DisplayUi->GetDisplaySurface()); + } + DisplayUi->UpdateDisplay(); } @@ -988,6 +1003,11 @@ void Player::ResetGameObjects() { RuntimePatches::OnResetGameObjects(); Input::ResetMask(); + + // Reset SetGameOption global settings + // Differs from Maniac Patch which simply keeps them upon reset + Player::SetFrameSkip(100); + Game_Clock::SetTargetGameFps(DEFAULT_FPS); } static bool DefaultLmuStartFileExists(const FilesystemView& fs) { diff --git a/src/player.h b/src/player.h index 0e0680167e..f6785f1f4f 100644 --- a/src/player.h +++ b/src/player.h @@ -431,6 +431,12 @@ namespace Player { /** game specific configuration */ extern Game_ConfigGame game_config; + /** + * Sets the percentage of how many frames to draw per second + * @param percentage 100 skips no frames, 50 skip half etc. + */ + void SetFrameSkip(int percentage); + #ifdef __EMSCRIPTEN__ /** Name of game emscripten uses */ extern std::string emscripten_game_name; diff --git a/src/scene_settings.cpp b/src/scene_settings.cpp index 2597aef33e..70909d9e9a 100644 --- a/src/scene_settings.cpp +++ b/src/scene_settings.cpp @@ -560,7 +560,7 @@ void Scene_Settings::UpdateButtonAdd() { int& started = frame.scratch; int& cancel_timer = frame.scratch2; - if (cancel_timer == Game_Clock::GetTargetGameFps() * 3) { + if (cancel_timer == DEFAULT_FPS * 3) { options_window->Pop(); input_window->Refresh(); return; @@ -607,9 +607,10 @@ bool Scene_Settings::RefreshInputEmergencyReset() { Output::InfoStr("Input emergency reset started"); Output::InfoStr("Hold the keys for 3 seconds"); } - input_reset_counter++; - if (input_reset_counter == Game_Clock::GetTargetGameFps() * 3) { + input_reset_counter += static_cast(DEFAULT_FPS) / Game_Clock::GetTargetGameFps(); + + if (input_reset_counter >= DEFAULT_FPS * 3) { if (input_window->GetInputButton() == Input::InputButton::BUTTON_COUNT) { // No last button yet: reset everything Output::InfoStr("All buttons reset to default"); @@ -625,7 +626,7 @@ bool Scene_Settings::RefreshInputEmergencyReset() { } input_window->ResetMapping(); } - } else if (input_reset_counter == Game_Clock::GetTargetGameFps() * 6) { + } else if (input_reset_counter >= DEFAULT_FPS * 6) { Output::InfoStr("All buttons reset to default"); if (input_window->GetActive()) { input_window->SetIndex(0); diff --git a/src/scene_settings.h b/src/scene_settings.h index d62b488daa..204cd55687 100644 --- a/src/scene_settings.h +++ b/src/scene_settings.h @@ -87,7 +87,7 @@ class Scene_Settings : public Scene { std::unique_ptr title; FileRequestBinding request_id; - int input_reset_counter = 0; + double input_reset_counter = 0; Window_Settings::UiMode mode = Window_Settings::eNone; diff --git a/src/window_message.cpp b/src/window_message.cpp index cfd2139cb4..3658320ebe 100644 --- a/src/window_message.cpp +++ b/src/window_message.cpp @@ -21,6 +21,8 @@ #include #include "compiler.h" +#include "input_buttons.h" +#include "main_data.h" #include "utils.h" #include "window_message.h" #include "game_actors.h" @@ -133,6 +135,13 @@ Window_Message::~Window_Message() { } } +namespace { + bool IsDecisionOrMouseTriggered() { + return Input::IsTriggered(Input::DECISION) || + (Main_Data::game_system->IsMessageMouseEnabled() && Input::IsTriggered(Input::MOUSE_LEFT)); + } +} + void Window_Message::StartMessageProcessing(PendingMessage pm) { text.clear(); pending_message = std::move(pm); @@ -207,7 +216,11 @@ void Window_Message::OnFinishPage() { StartNumberInputProcessing(); } else if (!kill_page) { DebugLog("{}: SET PAUSE"); - SetPause(true); + + if (!((Player::debug_flag || Main_Data::game_system->IsFastForwardText()) && + Input::IsPressed(Input::DEBUG_MESSAGE_FAST_FORWARD))) { + SetPause(true); + } } line_count = 0; @@ -479,9 +492,10 @@ void Window_Message::UpdateMessage() { // Message Box Show Message rendering loop bool instant_speed_forced = false; - if (Player::debug_flag && Input::IsPressed(Input::SHIFT)) { - instant_speed = true; - instant_speed_forced = true; + if ((Player::debug_flag || Main_Data::game_system->IsFastForwardText()) && + (Input::IsPressed(Input::SHIFT) || Input::IsPressed(Input::DEBUG_MESSAGE_FAST_FORWARD))) { + instant_speed = true; + instant_speed_forced = true; } auto system = Cache::SystemOrBlack(); @@ -810,7 +824,7 @@ void Window_Message::UpdateCursorRect() { } void Window_Message::WaitForInput() { - if (Input::IsTriggered(Input::DECISION) || + if (IsDecisionOrMouseTriggered() || Input::IsTriggered(Input::CANCEL)) { SetPause(false); } @@ -824,7 +838,7 @@ void Window_Message::InputChoice() { Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Cancel)); choice_result = pending_message.GetChoiceCancelType() - 1; // Cancel } - } else if (Input::IsTriggered(Input::DECISION)) { + } else if (IsDecisionOrMouseTriggered()) { if (!pending_message.IsChoiceEnabled(index)) { Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Buzzer)); return; @@ -846,7 +860,7 @@ void Window_Message::InputChoice() { void Window_Message::InputNumber() { number_input_window->SetVisible(true); - if (Input::IsTriggered(Input::DECISION)) { + if (IsDecisionOrMouseTriggered()) { Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); Main_Data::game_variables->Set(pending_message.GetNumberInputVariable(), number_input_window->GetNumber()); Game_Map::SetNeedRefresh(true); diff --git a/src/window_settings.cpp b/src/window_settings.cpp index 40ee892dd1..305fd9c21e 100644 --- a/src/window_settings.cpp +++ b/src/window_settings.cpp @@ -665,7 +665,7 @@ void Window_Settings::RefreshButtonList() { break; case 2: buttons = { Input::DEBUG_MENU, Input::DEBUG_THROUGH, Input::DEBUG_SAVE, Input::DEBUG_ABORT_EVENT, - Input::SHOW_LOG }; + Input::DEBUG_MESSAGE_FAST_FORWARD, Input::SHOW_LOG }; break; }