OSDN Git Service

[Add] @return を不要に書き込んだことによる警告をひとまず置換で修正.
[hengbandforosx/hengbandosx.git] / src / floor / floor-leaver.cpp
index 2527f53..4aad5e4 100644 (file)
@@ -7,10 +7,12 @@
 #include "floor/floor-mode-changer.h"
 #include "floor/floor-save-util.h"
 #include "floor/floor-save.h"
+#include "floor/geometry.h"
 #include "floor/line-of-sight.h"
 #include "game-option/birth-options.h"
 #include "game-option/play-record-options.h"
 #include "grid/feature.h"
+#include "grid/grid.h"
 #include "inventory/inventory-slot-types.h"
 #include "io/write-diary.h"
 #include "mind/mind-mirror-master.h"
 #include "object-hook/hook-checker.h"
 #include "object-hook/hook-enchant.h"
 #include "pet/pet-util.h"
+#include "player/player-status.h"
 #include "player/special-defense-types.h"
 #include "save/floor-writer.h"
 #include "system/artifact-type-definition.h"
 #include "system/floor-type-definition.h"
+#include "system/monster-race-definition.h"
 #include "system/monster-type-definition.h"
+#include "system/player-type-definition.h"
 #include "target/projection-path-calculator.h"
 #include "util/bit-flags-calculator.h"
 #include "view/display-messages.h"
@@ -109,7 +114,6 @@ static void record_pet_diary(player_type *master_ptr)
 /*!
  * @brief フロア移動時のペット保存処理 / Preserve_pets
  * @param master_ptr プレーヤーへの参照ポインタ
- * @return なし
  */
 static void preserve_pet(player_type *master_ptr)
 {
@@ -137,7 +141,6 @@ static void preserve_pet(player_type *master_ptr)
 /*!
  * @brief 新フロアに移動元フロアに繋がる階段を配置する / Virtually teleport onto the stairs that is connecting between two floors.
  * @param sf_ptr 移動元の保存フロア構造体参照ポインタ
- * @return なし
  */
 static void locate_connected_stairs(player_type *creature_ptr, floor_type *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
 {
@@ -202,7 +205,6 @@ static void locate_connected_stairs(player_type *creature_ptr, floor_type *floor
 
 /*!
  * @brief フロア移動時、プレイヤーの移動先モンスターが既にいた場合ランダムな近隣に移動させる / When a monster is at a place where player will return,
- * @return なし
  */
 static void get_out_monster(player_type *protected_ptr)
 {
@@ -242,7 +244,6 @@ static void get_out_monster(player_type *protected_ptr)
 /*!
  * @brief クエスト・フロア内のモンスター・インベントリ情報を保存する
  * @param creature_ptr プレーヤーへの参照ポインタ
- * @return なし
  */
 static void preserve_info(player_type *creature_ptr)
 {
@@ -307,7 +308,7 @@ static void jump_floors(player_type *creature_ptr)
         move_num += SGN(move_num);
 
     if (creature_ptr->change_floor_mode & CFM_DOWN) {
-        if (!creature_ptr->current_floor_ptr->dun_level)
+        if (!is_in_dungeon(creature_ptr))
             move_num = d_info[creature_ptr->dungeon_idx].mindepth;
     } else if (creature_ptr->change_floor_mode & CFM_UP) {
         if (creature_ptr->current_floor_ptr->dun_level + move_num < d_info[creature_ptr->dungeon_idx].mindepth)
@@ -319,7 +320,7 @@ static void jump_floors(player_type *creature_ptr)
 
 static void exit_to_wilderness(player_type *creature_ptr)
 {
-    if ((creature_ptr->current_floor_ptr->dun_level != 0) || (creature_ptr->dungeon_idx == 0))
+    if (is_in_dungeon(creature_ptr) || (creature_ptr->dungeon_idx == 0))
         return;
 
     creature_ptr->leaving_dungeon = TRUE;
@@ -400,7 +401,6 @@ static void exe_leave_floor(player_type *creature_ptr, saved_floor_type *sf_ptr)
  * @brief 現在のフロアを離れるに伴って行なわれる保存処理
  * / Maintain quest monsters, mark next floor_id at stairs, save current floor, and prepare to enter next floor.
  * @param creature_ptr プレーヤーへの参照ポインタ
- * @return なし
  */
 void leave_floor(player_type *creature_ptr)
 {