OSDN Git Service

[Refactor] #39962 Separated cmd-help.c/h from files.c
[hengband/hengband.git] / src / wizard2.c
index 30c8dc4..94bbbe0 100644 (file)
@@ -15,7 +15,8 @@
 #include "term.h"
 
 #include "dungeon.h"
-#include "cmd-dump.h"
+#include "cmd/cmd-dump.h"
+#include "cmd/cmd-help.h"
 #include "util.h"
 #include "birth.h"
 #include "selfinfo.h"
 
 extern void do_cmd_debug(player_type *creature_ptr);
 
-#ifdef ALLOW_WIZARD
-/*
-typedef struct debug_spell_commands1
-{
-       int type;
-       char *command;
-       bool(*spell_function_type1)(player_type *);
-} debug_spell_commands1;
-
-typedef struct debug_spell_commands2
-{
-       int type;
-       char *command;
-       bool(*spell_function_type2)(player_type *, floor_type *);
-} debug_spell_commands2;
-
-typedef struct debug_spell_commands3
-{
-       int type;
-       char *command;
-       bool(*spell_function_type3)(player_type *, HIT_POINT);
-} debug_spell_commands3;
-
-typedef union debug_spell_commands {
-       debug_spell_commands1 command1;
-       debug_spell_commands2 command2;
-       debug_spell_commands3 command3;
-} debug_spell_commands;
-
-debug_spell_commands debug_spell_commands_list[] =
-{
-       .command3 = {3, "true healing", true_healing}
-};
-*/
-
 typedef union spell_functions {
        struct debug_spell_type1 { bool(*spell_function)(player_type *, floor_type *); } spell1;
        struct debug_spell_type2 { bool(*spell_function)(player_type *); } spell2;
@@ -108,8 +74,8 @@ typedef struct debug_spell_command
 #define SPELL_MAX 2
 debug_spell_command debug_spell_commands_list[SPELL_MAX] =
 {
-       { 2, "vanish dungeon", {.spell2 = vanish_dungeon} },
-       { 3, "true healing", {.spell3 = true_healing} }
+       { 2, "vanish dungeon", {.spell2 = { vanish_dungeon } } },
+       { 3, "true healing", {.spell3 = { true_healing } } }
 };
 
 /*!
@@ -345,7 +311,7 @@ static void do_cmd_wiz_reset_class(player_type *creature_ptr)
        if (tmp_int < 0 || tmp_int >= MAX_CLASS) return;
 
        /* Save it */
-       creature_ptr->pclass = (byte_hack)tmp_int;
+       creature_ptr->pclass = (byte)tmp_int;
 
        /* Redraw inscription */
        creature_ptr->window |= (PW_PLAYER);
@@ -1148,7 +1114,7 @@ static void wiz_quantity_item(object_type *o_ptr)
                if (tmp_int > 99) tmp_int = 99;
 
                /* Accept modifications */
-               o_ptr->number = (byte_hack)tmp_int;
+               o_ptr->number = (byte)tmp_int;
        }
 
        if (o_ptr->tval == TV_ROD)
@@ -1727,12 +1693,10 @@ void do_cmd_debug(player_type *creature_ptr)
        case '\r':
                break;
 
-#ifdef ALLOW_SPOILERS
                /* Hack -- Generate Spoilers */
        case '"':
                do_cmd_spoilers(creature_ptr);
                break;
-#endif /* ALLOW_SPOILERS */
 
                /* Hack -- Help */
        case '?':
@@ -2013,11 +1977,3 @@ void do_cmd_debug(player_type *creature_ptr)
                break;
        }
 }
-
-#else
-
-#ifdef MACINTOSH
-static int i = 0;
-#endif
-
-#endif