From b7222ed47c60567a9fcbb9abb2a9467f28d8ff56 Mon Sep 17 00:00:00 2001 From: Ian Ling Date: Mon, 16 Feb 2026 22:51:12 -0800 Subject: [PATCH] Add IgnoreAbsentBattleAnimationFlash to Player config --- .gitignore | 13 +++++++++++++ src/battle_animation.cpp | 1 + src/game_config.cpp | 2 ++ src/game_config.h | 1 + 4 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index 1cc1f3f63c..06e12bd69f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /easyrpg-player /Player.app +/EasyRPG Player.app *.a *.elf *.o @@ -8,6 +9,7 @@ *.bak # cmake +.cmake/ /Makefile CMakeFiles/ CMakeScripts/ @@ -19,6 +21,17 @@ CPackSourceConfig.cmake CTestTestfile.cmake cmake_install.cmake install_manifest.txt +.deps/ +.dirstamp +.version-append +.version-git +aclocal.m4 +autom4te.cache/ +builds/autoconf/ +config.h +config.h.in +config.status +stamp-h1 # msvc / Windows *.vcxproj* diff --git a/src/battle_animation.cpp b/src/battle_animation.cpp index d6f92e4bc8..c73a26f536 100644 --- a/src/battle_animation.cpp +++ b/src/battle_animation.cpp @@ -208,6 +208,7 @@ void BattleAnimation::UpdateScreenFlash() { } void BattleAnimation::UpdateTargetFlash() { + if (Player::player_config.ignore_absent_battle_animation_flash.Get() && target_flash_timing == -1) return; int r, g, b, p; UpdateFlashGeneric(target_flash_timing, r, g, b, p); FlashTargets(r, g, b, p); diff --git a/src/game_config.cpp b/src/game_config.cpp index 4f94cb7098..bc7d60f75b 100644 --- a/src/game_config.cpp +++ b/src/game_config.cpp @@ -684,6 +684,7 @@ void Game_Config::LoadFromStream(Filesystem_Stream::InputStream& is) { player.automatic_screenshots.FromIni(ini); player.automatic_screenshots_interval.FromIni(ini); player.prefer_easyrpg_map_files.FromIni(ini); + player.ignore_absent_battle_animation_flash.FromIni(ini); } void Game_Config::WriteToStream(Filesystem_Stream::OutputStream& os) const { @@ -778,6 +779,7 @@ void Game_Config::WriteToStream(Filesystem_Stream::OutputStream& os) const { player.automatic_screenshots.ToIni(os); player.automatic_screenshots_interval.ToIni(os); player.prefer_easyrpg_map_files.ToIni(os); + player.ignore_absent_battle_animation_flash.ToIni(os); os << "\n"; } diff --git a/src/game_config.h b/src/game_config.h index bfcddde403..69455bd441 100644 --- a/src/game_config.h +++ b/src/game_config.h @@ -109,6 +109,7 @@ struct Game_ConfigPlayer { BoolConfigParam automatic_screenshots{ "Automatic screenshots", "Periodically take screenshots", "Player", "AutomaticScreenshots", false }; RangeConfigParam automatic_screenshots_interval{ "Screenshot interval", "The interval between automatic screenshots (seconds)", "Player", "AutomaticScreenshotsInterval", 30, 1, 999999 }; BoolConfigParam prefer_easyrpg_map_files{ "Prefer EasyRPG map files", "Attempt to load EasyRPG map files (.emu) first and fall back to RPG Maker map files (.lmu)", "Player", "PreferEasyRpgMapFiles", true }; + BoolConfigParam ignore_absent_battle_animation_flash{ "Ignore absent battle animation flash", "In RPG Maker, Battle Animations may override flashes on an event, even if the animation does not utilize flashes. Disables that behavior if true.", "Player", "IgnoreAbsentBattleAnimationFlash", false }; void Hide(); };