OSDN Git Service

[Refactor] #38993 floor_type 構造体作成。 / Create floor_type structure.
[hengbandforosx/hengbandosx.git] / src / wizard2.c
index 5fbcbc9..c4bad84 100644 (file)
 #include "spells-object.h"
 #include "spells-summon.h"
 #include "spells-status.h"
+#include "spells-world.h"
+#include "spells-floor.h"
+
+#include "object-hook.h"
 
 #ifdef ALLOW_WIZARD
 
@@ -38,30 +42,6 @@ static bool wiz_dimension_door(void)
        return (TRUE);
 }
 
-
-/*!
- * @brief プレイ日数を変更する / Set gametime.
- * @return 実際に変更を行ったらTRUEを返す
- */
-static bool set_gametime(void)
-{
-       int tmp_int = 0;
-       char ppp[80], tmp_val[40];
-
-       sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)dungeon_turn_limit);
-       sprintf(tmp_val, "%ld", (long)dungeon_turn);
-       if (!get_string(ppp, tmp_val, 10)) return (FALSE);
-       tmp_int = atoi(tmp_val);
-
-       /* Verify */
-       if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1;
-       else if (tmp_int < 0) tmp_int = 0;
-       dungeon_turn = turn = tmp_int;
-       return (TRUE);
-
-}
-
-
 /*!
  * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number
  * @return なし
@@ -86,17 +66,6 @@ static void wiz_create_named_art(void)
        msg_print("Allocated.");
 }
 
-
-/*!
- * @brief ウィザードモード用モンスター調査 / Hack -- quick debugging hook
- * @return なし
- */
-static void do_cmd_wiz_hack_ben(void)
-{
-       msg_print("Oops.");
-       (void)probing();
-}
-
 /*!
  * @brief ウィザードモード用モンスターの群れ生成 / Summon a horde of monsters
  * @return なし
@@ -1581,7 +1550,7 @@ static void do_cmd_wiz_create_feature(void)
 
        if (!tgt_pt(&x, &y)) return;
 
-       g_ptr = &grid_array[y][x];
+       g_ptr = &current_floor->grid_array[y][x];
 
        /* Default */
        sprintf(tmp_val, "%d", prev_feat);
@@ -1831,7 +1800,7 @@ void do_cmd_debug(void)
 
        /* Hitpoint rerating */
        case 'h':
-               roll_hitdice(SPOP_DISPLAY_MES | SPOP_DEBUG);
+               roll_hitdice(p_ptr, SPOP_DISPLAY_MES | SPOP_DEBUG);
                break;
 
        case 'H':
@@ -1948,7 +1917,7 @@ void do_cmd_debug(void)
                {
                        for (x = 0; x < cur_wid; x++)
                        {
-                               grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
+                               current_floor->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
                        }
                }
                wiz_lite(FALSE);
@@ -2005,7 +1974,7 @@ void do_cmd_debug(void)
 
        /* Hack -- whatever I desire */
        case '_':
-               do_cmd_wiz_hack_ben();
+               probing();
                break;
 
        /* For temporary test. */