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;
#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 } } }
};
/*!
while (--attempts)
{
scatter(caster_ptr, &wy, &wx, caster_ptr->y, caster_ptr->x, 3, 0);
- if (cave_empty_bold(caster_ptr->current_floor_ptr, wy, wx)) break;
+ if (is_cave_empty_bold(caster_ptr, wy, wx)) break;
}
- (void)alloc_horde(wy, wx);
+ (void)alloc_horde(caster_ptr, wy, wx);
}
/*!
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);
/*!
* @brief アイテムの詳細ステータスを表示する /
* Change various "permanent" player variables.
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param o_ptr 詳細を表示するアイテム情報の参照ポインタ
* @return なし
* @details
* Originally by David Reeve Sward <sward+@CMU.EDU>
* Verbose item flags by -Bernd-
*/
-static void wiz_display_item(object_type *o_ptr)
+static void wiz_display_item(player_type *player_ptr, object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
/* Describe fully */
char buf[256];
- object_desc(buf, o_ptr, OD_STORE);
+ object_desc(player_ptr, buf, o_ptr, OD_STORE);
prt(buf, 2, j);
/*!
* @briefアイテムの基礎能力値を調整する / Tweak an item
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param o_ptr 調整するアイテムの参照ポインタ
* @return なし
*/
-static void wiz_tweak_item(object_type *o_ptr)
+static void wiz_tweak_item(player_type *player_ptr, object_type *o_ptr)
{
if (object_is_artifact(o_ptr)) return;
sprintf(tmp_val, "%d", o_ptr->pval);
if (!get_string(p, tmp_val, 5)) return;
o_ptr->pval = (s16b)atoi(tmp_val);
- wiz_display_item(o_ptr);
+ wiz_display_item(player_ptr, o_ptr);
p = "Enter new 'to_a' setting: ";
sprintf(tmp_val, "%d", o_ptr->to_a);
if (!get_string(p, tmp_val, 5)) return;
o_ptr->to_a = (s16b)atoi(tmp_val);
- wiz_display_item(o_ptr);
+ wiz_display_item(player_ptr, o_ptr);
p = "Enter new 'to_h' setting: ";
sprintf(tmp_val, "%d", o_ptr->to_h);
if (!get_string(p, tmp_val, 5)) return;
o_ptr->to_h = (s16b)atoi(tmp_val);
- wiz_display_item(o_ptr);
+ wiz_display_item(player_ptr, o_ptr);
p = "Enter new 'to_d' setting: ";
sprintf(tmp_val, "%d", (int)o_ptr->to_d);
if (!get_string(p, tmp_val, 5)) return;
o_ptr->to_d = (s16b)atoi(tmp_val);
- wiz_display_item(o_ptr);
+ wiz_display_item(player_ptr, o_ptr);
}
while (TRUE)
{
/* Display full item debug information */
- wiz_display_item(q_ptr);
+ wiz_display_item(owner_ptr, q_ptr);
/* Ask wizard what to do. */
if (!get_com("[a]ccept, [w]orthless, [c]ursed, [n]ormal, [g]ood, [e]xcellent, [s]pecial? ", &ch, FALSE))
concptr pmt = "Roll for [n]ormal, [g]ood, or [e]xcellent treasure? ";
/* Display item */
- wiz_display_item(o_ptr);
+ wiz_display_item(caster_ptr, o_ptr);
/* Get choices */
if (!get_com(pmt, &ch, FALSE)) break;
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)
while (TRUE)
{
/* Display the item */
- wiz_display_item(q_ptr);
+ wiz_display_item(creature_ptr, q_ptr);
/* Get choice */
if (!get_com("[a]ccept [s]tatistics [r]eroll [t]weak [q]uantity? ", &ch, FALSE))
if (ch == 't' || ch == 'T')
{
- wiz_tweak_item(q_ptr);
+ wiz_tweak_item(creature_ptr, q_ptr);
}
if (ch == 'q' || ch == 'Q')
{
for (int i = 0; i < num; i++)
{
- (void)summon_specific(0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ (void)summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
*/
static void do_cmd_wiz_named(player_type *summoner_ptr, MONRACE_IDX r_idx)
{
- (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ (void)summon_named_creature(summoner_ptr, 0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
}
*/
static void do_cmd_wiz_named_friendly(player_type *summoner_ptr, MONRACE_IDX r_idx)
{
- (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_named_creature(summoner_ptr, 0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
}
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
}
- delete_monster_idx(i);
+ delete_monster_idx(caster_ptr, i);
}
}
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_WIZ_ZAP, m_name);
}
/* Delete this monster */
- delete_monster_idx(i);
+ delete_monster_idx(caster_ptr, i);
}
}
else if (have_flag(f_ptr->flags, FF_MIRROR))
g_ptr->info |= (CAVE_GLOW | CAVE_OBJECT);
- note_spot(y, x);
- lite_spot(y, x);
+ note_spot(creature_ptr, y, x);
+ lite_spot(creature_ptr, y, x);
creature_ptr->update |= (PU_FLOW);
prev_feat = tmp_feat;
case '\r':
break;
-#ifdef ALLOW_SPOILERS
/* Hack -- Generate Spoilers */
case '"':
do_cmd_spoilers(creature_ptr);
break;
-#endif /* ALLOW_SPOILERS */
/* Hack -- Help */
case '?':
break;
}
}
-
-#else
-
-#ifdef MACINTOSH
-static int i = 0;
-#endif
-
-#endif