#include "bldg.h"
+#include "cmd-magiceat.h"
#include "cmd-dump.h"
#include "world.h"
#include "player-race.h"
#include "objectkind.h"
#include "autopick.h"
#include "save.h"
+#include "realm-song.h"
concptr ANGBAND_DIR; //!< Path name: The main "lib" directory This variable is not actually used anywhere in the code
concptr ANGBAND_DIR_APEX; //!< High score files (binary) These files may be portable between platforms
# ifdef SAFE_SETUID_POSIX
- if (setuid(player_euid) != 0)
+ if (setuid(p_ptr->player_egid) != 0)
{
quit(_("setuid(): 正しく許可が取れません!", "setuid(): cannot set permissions correctly!"));
}
- if (setgid(player_egid) != 0)
+ if (setgid(p_ptr->player_egid) != 0)
{
quit(_("setgid(): 正しく許可が取れません!", "setgid(): cannot set permissions correctly!"));
}
if (IS_FAST() || p_ptr->slow)
add_flag(flgs, TR_SPEED);
- if (IS_OPPOSE_ACID() && !(p_ptr->special_defense & DEFENSE_ACID) && !(prace_is_(RACE_YEEK) && (p_ptr->lev > 19)))
+ if (IS_OPPOSE_ACID() && !(p_ptr->special_defense & DEFENSE_ACID) && !(PRACE_IS_(p_ptr, RACE_YEEK) && (p_ptr->lev > 19)))
add_flag(flgs, TR_RES_ACID);
if (IS_OPPOSE_ELEC() && !(p_ptr->special_defense & DEFENSE_ELEC))
add_flag(flgs, TR_RES_ELEC);
for (i = 0; i < TR_FLAG_SIZE; i++)
flgs[i] = 0L;
- if (prace_is_(RACE_SPECTRE))
+ if (PRACE_IS_(p_ptr, RACE_SPECTRE))
add_flag(flgs, TR_RES_NETHER);
- if (p_ptr->mimic_form == MIMIC_VAMPIRE || prace_is_(RACE_VAMPIRE))
+ if (p_ptr->mimic_form == MIMIC_VAMPIRE || PRACE_IS_(p_ptr, RACE_VAMPIRE))
add_flag(flgs, TR_RES_DARK);
if (p_ptr->mimic_form == MIMIC_DEMON_LORD)
add_flag(flgs, TR_RES_FIRE);
- else if (prace_is_(RACE_YEEK) && p_ptr->lev > 19)
+ else if (PRACE_IS_(p_ptr, RACE_YEEK) && p_ptr->lev > 19)
add_flag(flgs, TR_RES_ACID);
}
add_flag(flgs, TR_RES_FIRE);
add_flag(flgs, TR_RES_COLD);
}
- if (prace_is_(RACE_ANDROID))
+ if (PRACE_IS_(p_ptr, RACE_ANDROID))
add_flag(flgs, TR_RES_ELEC);
- if (prace_is_(RACE_ENT))
+ if (PRACE_IS_(p_ptr, RACE_ENT))
add_flag(flgs, TR_RES_FIRE);
- if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) ||
+ if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || PRACE_IS_(p_ptr, RACE_S_FAIRY) ||
(p_ptr->mimic_form == MIMIC_VAMPIRE))
add_flag(flgs, TR_RES_LITE);
}
}
else if (flag1 == TR_LITE_1)
{
- if (have_dark_flag(flgs))
+ if (HAVE_DARK_FLAG(flgs))
{
c_put_str(TERM_L_DARK, "+", row, col);
header_color = TERM_WHITE;
}
- else if (have_lite_flag(flgs))
+ else if (HAVE_LITE_FLAG(flgs))
{
c_put_str(TERM_WHITE, "+", row, col);
header_color = TERM_WHITE;
if ((p_ptr->stat_max[i] > 18) && (p_ptr->stat_top[i] <= 18))
e_adj = p_ptr->stat_top[i] - (p_ptr->stat_max[i] - 19) / 10 - 19;
- if (prace_is_(RACE_ENT))
+ if (PRACE_IS_(p_ptr, RACE_ENT))
{
switch (i)
{
strcpy(savefile_base, p_ptr->base_name);
#ifdef SAVEFILE_USE_UID
- /* Rename the savefile, using the player_uid and p_ptr->base_name */
- (void)sprintf(temp, "%d.%s", player_uid, p_ptr->base_name);
+ /* Rename the savefile, using the p_ptr->player_uid and p_ptr->base_name */
+ (void)sprintf(temp, "%d.%s", p_ptr->player_uid, p_ptr->base_name);
#else
/* Rename the savefile, using the p_ptr->base_name */
(void)sprintf(temp, "%s", p_ptr->base_name);
if (p_ptr->equip_cnt)
{
Term_clear();
- (void)show_equip(0, USE_FULL);
+ (void)show_equip(0, USE_FULL, 0);
prt(_("装備していたアイテム: -続く-", "You are using: -more-"), 0, 0);
if (inkey() == ESCAPE) return;
if (p_ptr->inven_cnt)
{
Term_clear();
- (void)show_inven(0, USE_FULL);
+ (void)show_inven(0, USE_FULL, 0);
prt(_("持っていたアイテム: -続く-", "You are carrying: -more-"), 0, 0);
if (inkey() == ESCAPE) return;
int i;
#ifdef SAVEFILE_USE_UID
- (void)sprintf(temp1, "%d.%s.%d%d%d", player_uid, savefile_base, p_ptr->pclass, p_ptr->pseikaku, p_ptr->age);
+ (void)sprintf(temp1, "%d.%s.%d%d%d", p_ptr->player_uid, savefile_base, p_ptr->pclass, p_ptr->pseikaku, p_ptr->age);
#else
(void)sprintf(temp1, "%s.%d%d%d", savefile_base, p_ptr->pclass, p_ptr->pseikaku, p_ptr->age);
#endif