OSDN Git Service

[Refactor] #40709 Merge status-reseter.c/h into status/buff-settet.c/h.
authordeskull <deskull@users.sourceforge.jp>
Sun, 6 Sep 2020 01:42:58 +0000 (10:42 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 6 Sep 2020 01:42:58 +0000 (10:42 +0900)
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/core/game-play.c
src/core/status-reseter.c [deleted file]
src/core/status-reseter.h [deleted file]
src/market/arena.c
src/mspell/mspell-dispel.c
src/status/buff-setter.c
src/status/buff-setter.h

index 345e319..194ba03 100644 (file)
     <ClCompile Include="..\..\src\core\asking-player.c" />\r
     <ClCompile Include="..\..\src\core\disturbance.c" />\r
     <ClCompile Include="..\..\src\core\object-compressor.c" />\r
-    <ClCompile Include="..\..\src\core\status-reseter.c" />\r
     <ClCompile Include="..\..\src\core\visuals-reseter.c" />\r
     <ClCompile Include="..\..\src\core\window-redrawer.c" />\r
     <ClCompile Include="..\..\src\dungeon\quest-completion-checker.c" />\r
     <ClInclude Include="..\..\src\core\disturbance.h" />\r
     <ClInclude Include="..\..\src\core\object-compressor.h" />\r
     <ClInclude Include="..\..\src\core\player-redraw-types.h" />\r
-    <ClInclude Include="..\..\src\core\status-reseter.h" />\r
     <ClInclude Include="..\..\src\core\visuals-reseter.h" />\r
     <ClInclude Include="..\..\src\core\window-redrawer.h" />\r
     <ClInclude Include="..\..\src\dungeon\dungeon-flag-types.h" />\r
index 9f2e764..19e1322 100644 (file)
     <ClCompile Include="..\..\src\io\screen-util.c">
       <Filter>io</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\core\status-reseter.c">
-      <Filter>core</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\realm\realm-demon.c">
       <Filter>realm</Filter>
     </ClCompile>
     <ClInclude Include="..\..\src\player\special-defense-types.h">
       <Filter>player</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\core\status-reseter.h">
-      <Filter>core</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\realm\realm-demon.h">
       <Filter>realm</Filter>
     </ClInclude>
index cf67d4f..76bf538 100644 (file)
@@ -167,7 +167,6 @@ hengband_SOURCES = \
        core/show-file.c core/show-file.h \
        core/special-internal-keys.h \
        core/speed-table.c core/speed-table.h \
-       core/status-reseter.c core/status-reseter.h \
        core/stuff-handler.c core/stuff-handler.h \
        core/turn-compensator.c core/turn-compensator.h \
        core/visuals-reseter.c core/visuals-reseter.h \
index 320d514..5ec641c 100644 (file)
@@ -22,7 +22,7 @@
 #include "core/player-update-types.h"
 #include "core/scores.h"
 #include "core/speed-table.h"
-#include "core/status-reseter.h"
+#include "status/buff-setter.h"
 #include "core/stuff-handler.h"
 #include "core/visuals-reseter.h"
 #include "core/window-redrawer.h"
diff --git a/src/core/status-reseter.c b/src/core/status-reseter.c
deleted file mode 100644 (file)
index 7517584..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "core/status-reseter.h"
-#include "core/speed-table.h"
-#include "monster/monster-status-setter.h"
-#include "player/attack-defense-types.h"
-#include "player/player-race.h"
-
-/*!
- * @brief プレイヤーの全ての時限効果をリセットする。 / reset timed flags
- * @return なし
- */
-void reset_tim_flags(player_type *creature_ptr)
-{
-    creature_ptr->fast = 0; /* Timed -- Fast */
-    creature_ptr->lightspeed = 0;
-    creature_ptr->slow = 0; /* Timed -- Slow */
-    creature_ptr->blind = 0; /* Timed -- Blindness */
-    creature_ptr->paralyzed = 0; /* Timed -- Paralysis */
-    creature_ptr->confused = 0; /* Timed -- Confusion */
-    creature_ptr->afraid = 0; /* Timed -- Fear */
-    creature_ptr->image = 0; /* Timed -- Hallucination */
-    creature_ptr->poisoned = 0; /* Timed -- Poisoned */
-    creature_ptr->cut = 0; /* Timed -- Cut */
-    creature_ptr->stun = 0; /* Timed -- Stun */
-
-    creature_ptr->protevil = 0; /* Timed -- Protection */
-    creature_ptr->invuln = 0; /* Timed -- Invulnerable */
-    creature_ptr->ult_res = 0;
-    creature_ptr->hero = 0; /* Timed -- Heroism */
-    creature_ptr->shero = 0; /* Timed -- Super Heroism */
-    creature_ptr->shield = 0; /* Timed -- Shield Spell */
-    creature_ptr->blessed = 0; /* Timed -- Blessed */
-    creature_ptr->tim_invis = 0; /* Timed -- Invisibility */
-    creature_ptr->tim_infra = 0; /* Timed -- Infra Vision */
-    creature_ptr->tim_regen = 0; /* Timed -- Regeneration */
-    creature_ptr->tim_stealth = 0; /* Timed -- Stealth */
-    creature_ptr->tim_esp = 0;
-    creature_ptr->wraith_form = 0; /* Timed -- Wraith Form */
-    creature_ptr->tim_levitation = 0;
-    creature_ptr->tim_sh_touki = 0;
-    creature_ptr->tim_sh_fire = 0;
-    creature_ptr->tim_sh_holy = 0;
-    creature_ptr->tim_eyeeye = 0;
-    creature_ptr->magicdef = 0;
-    creature_ptr->resist_magic = 0;
-    creature_ptr->tsuyoshi = 0;
-    creature_ptr->tim_pass_wall = 0;
-    creature_ptr->tim_res_nether = 0;
-    creature_ptr->tim_res_time = 0;
-    creature_ptr->tim_mimic = 0;
-    creature_ptr->mimic_form = 0;
-    creature_ptr->tim_reflect = 0;
-    creature_ptr->multishadow = 0;
-    creature_ptr->dustrobe = 0;
-    creature_ptr->action = ACTION_NONE;
-
-    creature_ptr->oppose_acid = 0; /* Timed -- oppose acid */
-    creature_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
-    creature_ptr->oppose_fire = 0; /* Timed -- oppose heat */
-    creature_ptr->oppose_cold = 0; /* Timed -- oppose cold */
-    creature_ptr->oppose_pois = 0; /* Timed -- oppose poison */
-
-    creature_ptr->word_recall = 0;
-    creature_ptr->alter_reality = 0;
-    creature_ptr->sutemi = FALSE;
-    creature_ptr->counter = FALSE;
-    creature_ptr->ele_attack = 0;
-    creature_ptr->ele_immune = 0;
-    creature_ptr->special_attack = 0L;
-    creature_ptr->special_defense = 0L;
-
-    while (creature_ptr->energy_need < 0)
-        creature_ptr->energy_need += ENERGY_NEED();
-
-    creature_ptr->timewalk = FALSE;
-
-    if (is_specific_player_race(creature_ptr, RACE_BALROG) && (creature_ptr->lev > 44))
-        creature_ptr->oppose_fire = 1;
-    if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44))
-        creature_ptr->oppose_pois = 1;
-
-    if (creature_ptr->riding) {
-        (void)set_monster_fast(creature_ptr, creature_ptr->riding, 0);
-        (void)set_monster_slow(creature_ptr, creature_ptr->riding, 0);
-        (void)set_monster_invulner(creature_ptr, creature_ptr->riding, 0, FALSE);
-    }
-
-    if (creature_ptr->pclass == CLASS_BARD) {
-        SINGING_SONG_EFFECT(creature_ptr) = 0;
-        SINGING_SONG_ID(creature_ptr) = 0;
-    }
-}
diff --git a/src/core/status-reseter.h b/src/core/status-reseter.h
deleted file mode 100644 (file)
index fcaf6b5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-#include "system/angband.h"
-
-void reset_tim_flags(player_type *creature_ptr);
index 7fa6126..f022231 100644 (file)
@@ -2,7 +2,7 @@
 #include "cmd-building/cmd-building.h"
 #include "core/asking-player.h"
 #include "core/show-file.h"
-#include "core/status-reseter.h"
+#include "status/buff-setter.h"
 #include "core/stuff-handler.h"
 #include "core/window-redrawer.h"
 #include "dungeon/dungeon.h"
index 84253ee..b152a3c 100644 (file)
 #include "status/temporary-resistance.h"
 #include "view/display-messages.h"
 
+#include "status/buff-setter.h"
+#include "core/speed-table.h"
+#include "monster/monster-status-setter.h"
+#include "player/attack-defense-types.h"
+#include "player/player-race.h"
+
 /*!
  * @brief プレイヤーに魔力消去効果を与える。
  * @return なし
index 2e5ebb7..ac5419f 100644 (file)
 #include "core/player-redraw-types.h"
 #include "core/player-update-types.h"
 #include "core/stuff-handler.h"
+#include "core/speed-table.h"
+#include "status/buff-setter.h"
 #include "game-option/disturbance-options.h"
 #include "player-info/avatar.h"
 #include "player/player-race.h"
 #include "player/player-class.h"
+#include "player/attack-defense-types.h"
 #include "realm/realm-song-numbers.h"
 #include "view/display-messages.h"
 #include "core/window-redrawer.h"
 #include "status/element-resistance.h"
 #include "status/base-status.h"
+#include "monster/monster-status-setter.h"
+
+/*!
+ * @brief プレイヤーの全ての時限効果をリセットする。 / reset timed flags
+ * @return なし
+ */
+void reset_tim_flags(player_type *creature_ptr)
+{
+    creature_ptr->fast = 0; /* Timed -- Fast */
+    creature_ptr->lightspeed = 0;
+    creature_ptr->slow = 0; /* Timed -- Slow */
+    creature_ptr->blind = 0; /* Timed -- Blindness */
+    creature_ptr->paralyzed = 0; /* Timed -- Paralysis */
+    creature_ptr->confused = 0; /* Timed -- Confusion */
+    creature_ptr->afraid = 0; /* Timed -- Fear */
+    creature_ptr->image = 0; /* Timed -- Hallucination */
+    creature_ptr->poisoned = 0; /* Timed -- Poisoned */
+    creature_ptr->cut = 0; /* Timed -- Cut */
+    creature_ptr->stun = 0; /* Timed -- Stun */
+
+    creature_ptr->protevil = 0; /* Timed -- Protection */
+    creature_ptr->invuln = 0; /* Timed -- Invulnerable */
+    creature_ptr->ult_res = 0;
+    creature_ptr->hero = 0; /* Timed -- Heroism */
+    creature_ptr->shero = 0; /* Timed -- Super Heroism */
+    creature_ptr->shield = 0; /* Timed -- Shield Spell */
+    creature_ptr->blessed = 0; /* Timed -- Blessed */
+    creature_ptr->tim_invis = 0; /* Timed -- Invisibility */
+    creature_ptr->tim_infra = 0; /* Timed -- Infra Vision */
+    creature_ptr->tim_regen = 0; /* Timed -- Regeneration */
+    creature_ptr->tim_stealth = 0; /* Timed -- Stealth */
+    creature_ptr->tim_esp = 0;
+    creature_ptr->wraith_form = 0; /* Timed -- Wraith Form */
+    creature_ptr->tim_levitation = 0;
+    creature_ptr->tim_sh_touki = 0;
+    creature_ptr->tim_sh_fire = 0;
+    creature_ptr->tim_sh_holy = 0;
+    creature_ptr->tim_eyeeye = 0;
+    creature_ptr->magicdef = 0;
+    creature_ptr->resist_magic = 0;
+    creature_ptr->tsuyoshi = 0;
+    creature_ptr->tim_pass_wall = 0;
+    creature_ptr->tim_res_nether = 0;
+    creature_ptr->tim_res_time = 0;
+    creature_ptr->tim_mimic = 0;
+    creature_ptr->mimic_form = 0;
+    creature_ptr->tim_reflect = 0;
+    creature_ptr->multishadow = 0;
+    creature_ptr->dustrobe = 0;
+    creature_ptr->action = ACTION_NONE;
+
+    creature_ptr->oppose_acid = 0; /* Timed -- oppose acid */
+    creature_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
+    creature_ptr->oppose_fire = 0; /* Timed -- oppose heat */
+    creature_ptr->oppose_cold = 0; /* Timed -- oppose cold */
+    creature_ptr->oppose_pois = 0; /* Timed -- oppose poison */
+
+    creature_ptr->word_recall = 0;
+    creature_ptr->alter_reality = 0;
+    creature_ptr->sutemi = FALSE;
+    creature_ptr->counter = FALSE;
+    creature_ptr->ele_attack = 0;
+    creature_ptr->ele_immune = 0;
+    creature_ptr->special_attack = 0L;
+    creature_ptr->special_defense = 0L;
+
+    while (creature_ptr->energy_need < 0)
+        creature_ptr->energy_need += ENERGY_NEED();
+
+    creature_ptr->timewalk = FALSE;
+
+    if (is_specific_player_race(creature_ptr, RACE_BALROG) && (creature_ptr->lev > 44))
+        creature_ptr->oppose_fire = 1;
+    if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44))
+        creature_ptr->oppose_pois = 1;
+
+    if (creature_ptr->riding) {
+        (void)set_monster_fast(creature_ptr, creature_ptr->riding, 0);
+        (void)set_monster_slow(creature_ptr, creature_ptr->riding, 0);
+        (void)set_monster_invulner(creature_ptr, creature_ptr->riding, 0, FALSE);
+    }
+
+    if (creature_ptr->pclass == CLASS_BARD) {
+        SINGING_SONG_EFFECT(creature_ptr) = 0;
+        SINGING_SONG_ID(creature_ptr) = 0;
+    }
+}
 
 /*!
  * @brief 加速の継続時間をセットする / Set "fast", notice observable changes
index a0f10da..efe83d1 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "system/angband.h"
 
+void reset_tim_flags(player_type *creature_ptr);
 bool set_fast(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
 bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
 bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);