-#include "spell-realm/spells-song.h"
+#include "spell-realm/spells-song.h"
#include "core/disturbance.h"
-#include "core/player-redraw-types.h"
#include "core/stuff-handler.h"
#include "core/window-redrawer.h"
#include "game-option/disturbance-options.h"
if (s64b_cmp(player_ptr->csp, player_ptr->csp_frac, need_mana, need_mana_frac) < 0) {
stop_singing(player_ptr);
return;
- } else {
- s64b_sub(&(player_ptr->csp), &(player_ptr->csp_frac), need_mana, need_mana_frac);
-
- player_ptr->redraw |= PR_MP;
- if (interupting_song_effect != 0) {
- set_singing_song_effect(player_ptr, interupting_song_effect);
- set_interrupting_song_effect(player_ptr, MUSIC_NONE);
- msg_print(_("歌を再開した。", "You resume singing."));
- player_ptr->action = ACTION_SING;
- auto &rfu = RedrawingFlagsUpdater::get_instance();
- const auto flags_srf = {
- StatusRedrawingFlag::BONUS,
- StatusRedrawingFlag::HP,
- StatusRedrawingFlag::MONSTER_STATUSES,
- };
- rfu.set_flags(flags_srf);
- player_ptr->redraw |= (PR_MAP | PR_TIMED_EFFECT | PR_ACTION);
- player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
- }
}
- PlayerSkill(player_ptr).gain_continuous_spell_skill_exp(REALM_MUSIC, spell);
+ s64b_sub(&(player_ptr->csp), &(player_ptr->csp_frac), need_mana, need_mana_frac);
+ auto &rfu = RedrawingFlagsUpdater::get_instance();
+ rfu.set_flag(MainWindowRedrawingFlag::MP);
+ if (interupting_song_effect != 0) {
+ set_singing_song_effect(player_ptr, interupting_song_effect);
+ set_interrupting_song_effect(player_ptr, MUSIC_NONE);
+ msg_print(_("歌を再開した。", "You resume singing."));
+ player_ptr->action = ACTION_SING;
+ static constexpr auto flags_srf = {
+ StatusRecalculatingFlag::BONUS,
+ StatusRecalculatingFlag::HP,
+ StatusRecalculatingFlag::MONSTER_STATUSES,
+ };
+ rfu.set_flags(flags_srf);
+ static constexpr auto flags_mwrf = {
+ MainWindowRedrawingFlag::MAP,
+ MainWindowRedrawingFlag::TIMED_EFFECT,
+ MainWindowRedrawingFlag::ACTION,
+ };
+ rfu.set_flags(flags_mwrf);
+ static constexpr auto flags_swrf = {
+ SubWindowRedrawingFlag::OVERHEAD,
+ SubWindowRedrawingFlag::DUNGEON,
+ };
+ rfu.set_flags(flags_swrf);
+ }
+ PlayerSkill(player_ptr).gain_continuous_spell_skill_exp(REALM_MUSIC, spell);
exe_spell(player_ptr, REALM_MUSIC, spell, SpellProcessType::CONTNUATION);
}
player_ptr->tim_stealth = v;
auto &rfu = RedrawingFlagsUpdater::get_instance();
- player_ptr->redraw |= (PR_TIMED_EFFECT);
-
+ rfu.set_flag(MainWindowRedrawingFlag::TIMED_EFFECT);
if (!notice) {
return false;
}
disturb(player_ptr, false, false);
}
- rfu.set_flag(StatusRedrawingFlag::BONUS);
+ rfu.set_flag(StatusRecalculatingFlag::BONUS);
handle_stuff(player_ptr);
return true;
}
set_singing_song_effect(player_ptr, MUSIC_NONE);
set_singing_song_id(player_ptr, 0);
auto &rfu = RedrawingFlagsUpdater::get_instance();
- rfu.set_flag(StatusRedrawingFlag::BONUS);
- set_bits(player_ptr->redraw, PR_TIMED_EFFECT);
+ rfu.set_flag(StatusRecalculatingFlag::BONUS);
+ rfu.set_flag(MainWindowRedrawingFlag::TIMED_EFFECT);
}
bool music_singing(PlayerType *player_ptr, int music_songs)