OSDN Git Service

[Refactor] #38997 print_path() にplayer_type * 引数を追加 / Added player_type * argument...
[hengband/hengband.git] / src / view-mainwindow.c
index 4bf471d..d63ade5 100644 (file)
@@ -49,7 +49,6 @@
   */
 #define IS_ASCII_GRAPHICS(A) (!((A) & 0x80))
 
-
 static int feat_priority; /*!< マップ縮小表示時に表示すべき地形の優先度を保管する */
 static byte display_autopick; /*!< 自動拾い状態の設定フラグ */
 static int match_autopick;
@@ -144,7 +143,9 @@ POSITION panel_col_prt, panel_row_prt;
 #define COL_STATBAR              0
 #define MAX_COL_STATBAR         (-26)
 
-
+void print_equippy(player_type *creature_ptr);
+void print_map(player_type *player_ptr);
+void display_map(player_type *player_ptr, int *cy, int *cx);
 
 /*!
  * @brief 画面左の能力値表示を行うために指定位置から13キャラ分を空白消去後指定のメッセージを明るい青で描画する /
@@ -154,7 +155,7 @@ POSITION panel_col_prt, panel_row_prt;
  * @param col 描画行
  * @return なし
  */
-static void prt_field(concptr info, TERM_LEN row, TERM_LEN col)
+static void print_field(concptr info, TERM_LEN row, TERM_LEN col)
 {
        /* Dump 13 spaces to clear */
        c_put_str(TERM_WHITE, "             ", row, col);
@@ -168,7 +169,7 @@ static void prt_field(concptr info, TERM_LEN row, TERM_LEN col)
  * Print time
  * @return なし
  */
-void prt_time(void)
+void print_time(void)
 {
        int day, hour, min;
 
@@ -186,30 +187,33 @@ void prt_time(void)
 
 /*!
  * @brief 現在のマップ名を返す /
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return マップ名の文字列参照ポインタ
  */
-concptr map_name(void)
+concptr map_name(player_type *creature_ptr)
 {
-       if (p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)
-           && (quest[p_ptr->inside_quest].flags & QUEST_FLAG_PRESET))
+       floor_type *floor_ptr = creature_ptr->current_floor_ptr;
+       if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest)
+           && (quest[floor_ptr->inside_quest].flags & QUEST_FLAG_PRESET))
                return _("クエスト", "Quest");
-       else if (p_ptr->wild_mode)
+       else if (creature_ptr->wild_mode)
                return _("地上", "Surface");
-       else if (p_ptr->inside_arena)
+       else if (creature_ptr->current_floor_ptr->inside_arena)
                return _("アリーナ", "Arena");
-       else if (p_ptr->phase_out)
+       else if (creature_ptr->phase_out)
                return _("闘技場", "Monster Arena");
-       else if (!p_ptr->current_floor_ptr->dun_level && p_ptr->town_num)
-               return town_info[p_ptr->town_num].name;
+       else if (!floor_ptr->dun_level && creature_ptr->town_num)
+               return town_info[creature_ptr->town_num].name;
        else
-               return d_name+d_info[p_ptr->dungeon_idx].name;
+               return d_name+d_info[creature_ptr->dungeon_idx].name;
 }
 
 /*!
  * @brief 現在のマップ名を描画する / Print dungeon
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_dungeon(void)
+static void print_dungeon(player_type *creature_ptr)
 {
        concptr dungeon_name;
        TERM_LEN col;
@@ -217,7 +221,7 @@ static void prt_dungeon(void)
        /* Dump 13 spaces to clear */
        c_put_str(TERM_WHITE, "             ", ROW_DUNGEON, COL_DUNGEON);
 
-       dungeon_name = map_name();
+       dungeon_name = map_name(creature_ptr);
 
        col = COL_DUNGEON + 6 - strlen(dungeon_name)/2;
        if (col < 0) col = 0;
@@ -233,15 +237,15 @@ static void prt_dungeon(void)
  * @param stat 描画するステータスのID
  * @return なし
  */
-static void prt_stat(int stat)
+static void print_stat(player_type *creature_ptr, int stat)
 {
        GAME_TEXT tmp[32];
 
        /* Display "injured" stat */
-       if (p_ptr->stat_cur[stat] < p_ptr->stat_max[stat])
+       if (creature_ptr->stat_cur[stat] < creature_ptr->stat_max[stat])
        {
                put_str(stat_names_reduced[stat], ROW_STAT + stat, 0);
-               cnv_stat(p_ptr->stat_use[stat], tmp);
+               cnv_stat(creature_ptr->stat_use[stat], tmp);
                c_put_str(TERM_YELLOW, tmp, ROW_STAT + stat, COL_STAT + 6);
        }
 
@@ -249,12 +253,12 @@ static void prt_stat(int stat)
        else
        {
                put_str(stat_names[stat], ROW_STAT + stat, 0);
-               cnv_stat(p_ptr->stat_use[stat], tmp);
+               cnv_stat(creature_ptr->stat_use[stat], tmp);
                c_put_str(TERM_L_GREEN, tmp, ROW_STAT + stat, COL_STAT + 6);
        }
 
        /* Indicate natural maximum */
-       if (p_ptr->stat_max[stat] == p_ptr->stat_max_max[stat])
+       if (creature_ptr->stat_max[stat] == creature_ptr->stat_max_max[stat])
        {
 #ifdef JP
                /* 日本語にかぶらないように表示位置を変更 */
@@ -506,7 +510,7 @@ static struct {
  * @brief 下部に状態表示を行う / Show status bar
  * @return なし
  */
-static void prt_status(void)
+static void print_status(player_type *creature_ptr)
 {
        BIT_FLAGS bar_flags[3];
        TERM_LEN wid, hgt, row_statbar, max_col_statbar;
@@ -523,138 +527,138 @@ static void prt_status(void)
        bar_flags[0] = bar_flags[1] = bar_flags[2] = 0L;
 
        /* Tsuyoshi  */
-       if (p_ptr->tsuyoshi) ADD_FLG(BAR_TSUYOSHI);
+       if (creature_ptr->tsuyoshi) ADD_FLG(BAR_TSUYOSHI);
 
        /* Hallucinating */
-       if (p_ptr->image) ADD_FLG(BAR_HALLUCINATION);
+       if (creature_ptr->image) ADD_FLG(BAR_HALLUCINATION);
 
        /* Blindness */
-       if (p_ptr->blind) ADD_FLG(BAR_BLINDNESS);
+       if (creature_ptr->blind) ADD_FLG(BAR_BLINDNESS);
 
        /* Paralysis */
-       if (p_ptr->paralyzed) ADD_FLG(BAR_PARALYZE);
+       if (creature_ptr->paralyzed) ADD_FLG(BAR_PARALYZE);
 
        /* Confusion */
-       if (p_ptr->confused) ADD_FLG(BAR_CONFUSE);
+       if (creature_ptr->confused) ADD_FLG(BAR_CONFUSE);
 
        /* Posioned */
-       if (p_ptr->poisoned) ADD_FLG(BAR_POISONED);
+       if (creature_ptr->poisoned) ADD_FLG(BAR_POISONED);
 
        /* Times see-invisible */
-       if (p_ptr->tim_invis) ADD_FLG(BAR_SENSEUNSEEN);
+       if (creature_ptr->tim_invis) ADD_FLG(BAR_SENSEUNSEEN);
 
        /* Timed esp */
-       if (IS_TIM_ESP()) ADD_FLG(BAR_TELEPATHY);
+       if (is_time_limit_esp(creature_ptr)) ADD_FLG(BAR_TELEPATHY);
 
        /* Timed regenerate */
-       if (p_ptr->tim_regen) ADD_FLG(BAR_REGENERATION);
+       if (creature_ptr->tim_regen) ADD_FLG(BAR_REGENERATION);
 
        /* Timed infra-vision */
-       if (p_ptr->tim_infra) ADD_FLG(BAR_INFRAVISION);
+       if (creature_ptr->tim_infra) ADD_FLG(BAR_INFRAVISION);
 
        /* Protection from evil */
-       if (p_ptr->protevil) ADD_FLG(BAR_PROTEVIL);
+       if (creature_ptr->protevil) ADD_FLG(BAR_PROTEVIL);
 
        /* Invulnerability */
-       if (IS_INVULN()) ADD_FLG(BAR_INVULN);
+       if (IS_INVULN(creature_ptr)) ADD_FLG(BAR_INVULN);
 
        /* Wraith form */
-       if (p_ptr->wraith_form) ADD_FLG(BAR_WRAITH);
+       if (creature_ptr->wraith_form) ADD_FLG(BAR_WRAITH);
 
        /* Kabenuke */
-       if (p_ptr->kabenuke) ADD_FLG(BAR_PASSWALL);
+       if (creature_ptr->kabenuke) ADD_FLG(BAR_PASSWALL);
 
-       if (p_ptr->tim_reflect) ADD_FLG(BAR_REFLECTION);
+       if (creature_ptr->tim_reflect) ADD_FLG(BAR_REFLECTION);
 
        /* Heroism */
-       if (IS_HERO()) ADD_FLG(BAR_HEROISM);
+       if (IS_HERO(creature_ptr)) ADD_FLG(BAR_HEROISM);
 
        /* Super Heroism / berserk */
-       if (p_ptr->shero) ADD_FLG(BAR_BERSERK);
+       if (creature_ptr->shero) ADD_FLG(BAR_BERSERK);
 
        /* Blessed */
-       if (IS_BLESSED()) ADD_FLG(BAR_BLESSED);
+       if (is_blessed(creature_ptr)) ADD_FLG(BAR_BLESSED);
 
        /* Shield */
-       if (p_ptr->magicdef) ADD_FLG(BAR_MAGICDEFENSE);
+       if (creature_ptr->magicdef) ADD_FLG(BAR_MAGICDEFENSE);
 
-       if (p_ptr->tsubureru) ADD_FLG(BAR_EXPAND);
+       if (creature_ptr->tsubureru) ADD_FLG(BAR_EXPAND);
 
-       if (p_ptr->shield) ADD_FLG(BAR_STONESKIN);
+       if (creature_ptr->shield) ADD_FLG(BAR_STONESKIN);
        
-       if (p_ptr->special_defense & NINJA_KAWARIMI) ADD_FLG(BAR_KAWARIMI);
+       if (creature_ptr->special_defense & NINJA_KAWARIMI) ADD_FLG(BAR_KAWARIMI);
 
        /* Oppose Acid */
-       if (p_ptr->special_defense & DEFENSE_ACID) ADD_FLG(BAR_IMMACID);
-       if (IS_OPPOSE_ACID()) ADD_FLG(BAR_RESACID);
+       if (creature_ptr->special_defense & DEFENSE_ACID) ADD_FLG(BAR_IMMACID);
+       if (is_oppose_acid(creature_ptr)) ADD_FLG(BAR_RESACID);
 
        /* Oppose Lightning */
-       if (p_ptr->special_defense & DEFENSE_ELEC) ADD_FLG(BAR_IMMELEC);
-       if (IS_OPPOSE_ELEC()) ADD_FLG(BAR_RESELEC);
+       if (creature_ptr->special_defense & DEFENSE_ELEC) ADD_FLG(BAR_IMMELEC);
+       if (is_oppose_elec (creature_ptr)) ADD_FLG(BAR_RESELEC);
 
        /* Oppose Fire */
-       if (p_ptr->special_defense & DEFENSE_FIRE) ADD_FLG(BAR_IMMFIRE);
-       if (IS_OPPOSE_FIRE()) ADD_FLG(BAR_RESFIRE);
+       if (creature_ptr->special_defense & DEFENSE_FIRE) ADD_FLG(BAR_IMMFIRE);
+       if (is_oppose_fire(creature_ptr)) ADD_FLG(BAR_RESFIRE);
 
        /* Oppose Cold */
-       if (p_ptr->special_defense & DEFENSE_COLD) ADD_FLG(BAR_IMMCOLD);
-       if (IS_OPPOSE_COLD()) ADD_FLG(BAR_RESCOLD);
+       if (creature_ptr->special_defense & DEFENSE_COLD) ADD_FLG(BAR_IMMCOLD);
+       if (is_oppose_cold(creature_ptr)) ADD_FLG(BAR_RESCOLD);
 
        /* Oppose Poison */
-       if (IS_OPPOSE_POIS()) ADD_FLG(BAR_RESPOIS);
+       if (is_oppose_pois(creature_ptr)) ADD_FLG(BAR_RESPOIS);
 
        /* Word of Recall */
-       if (p_ptr->word_recall) ADD_FLG(BAR_RECALL);
+       if (creature_ptr->word_recall) ADD_FLG(BAR_RECALL);
 
        /* Alter realiry */
-       if (p_ptr->alter_reality) ADD_FLG(BAR_ALTER);
+       if (creature_ptr->alter_reality) ADD_FLG(BAR_ALTER);
 
        /* Afraid */
-       if (p_ptr->afraid) ADD_FLG(BAR_AFRAID);
+       if (creature_ptr->afraid) ADD_FLG(BAR_AFRAID);
 
        /* Resist time */
-       if (p_ptr->tim_res_time) ADD_FLG(BAR_RESTIME);
+       if (creature_ptr->tim_res_time) ADD_FLG(BAR_RESTIME);
 
-       if (p_ptr->multishadow) ADD_FLG(BAR_MULTISHADOW);
+       if (creature_ptr->multishadow) ADD_FLG(BAR_MULTISHADOW);
 
        /* Confusing Hands */
-       if (p_ptr->special_attack & ATTACK_CONFUSE) ADD_FLG(BAR_ATTKCONF);
+       if (creature_ptr->special_attack & ATTACK_CONFUSE) ADD_FLG(BAR_ATTKCONF);
 
-       if (p_ptr->resist_magic) ADD_FLG(BAR_REGMAGIC);
+       if (creature_ptr->resist_magic) ADD_FLG(BAR_REGMAGIC);
 
        /* Ultimate-resistance */
-       if (p_ptr->ult_res) ADD_FLG(BAR_ULTIMATE);
+       if (creature_ptr->ult_res) ADD_FLG(BAR_ULTIMATE);
 
        /* tim levitation */
-       if (p_ptr->tim_levitation) ADD_FLG(BAR_LEVITATE);
+       if (creature_ptr->tim_levitation) ADD_FLG(BAR_LEVITATE);
 
-       if (p_ptr->tim_res_nether) ADD_FLG(BAR_RESNETH);
+       if (creature_ptr->tim_res_nether) ADD_FLG(BAR_RESNETH);
 
-       if (p_ptr->dustrobe) ADD_FLG(BAR_DUSTROBE);
+       if (creature_ptr->dustrobe) ADD_FLG(BAR_DUSTROBE);
 
        /* Mahouken */
-       if (p_ptr->special_attack & ATTACK_FIRE) ADD_FLG(BAR_ATTKFIRE);
-       if (p_ptr->special_attack & ATTACK_COLD) ADD_FLG(BAR_ATTKCOLD);
-       if (p_ptr->special_attack & ATTACK_ELEC) ADD_FLG(BAR_ATTKELEC);
-       if (p_ptr->special_attack & ATTACK_ACID) ADD_FLG(BAR_ATTKACID);
-       if (p_ptr->special_attack & ATTACK_POIS) ADD_FLG(BAR_ATTKPOIS);
-       if (p_ptr->special_defense & NINJA_S_STEALTH) ADD_FLG(BAR_SUPERSTEALTH);
+       if (creature_ptr->special_attack & ATTACK_FIRE) ADD_FLG(BAR_ATTKFIRE);
+       if (creature_ptr->special_attack & ATTACK_COLD) ADD_FLG(BAR_ATTKCOLD);
+       if (creature_ptr->special_attack & ATTACK_ELEC) ADD_FLG(BAR_ATTKELEC);
+       if (creature_ptr->special_attack & ATTACK_ACID) ADD_FLG(BAR_ATTKACID);
+       if (creature_ptr->special_attack & ATTACK_POIS) ADD_FLG(BAR_ATTKPOIS);
+       if (creature_ptr->special_defense & NINJA_S_STEALTH) ADD_FLG(BAR_SUPERSTEALTH);
 
-       if (p_ptr->tim_sh_fire) ADD_FLG(BAR_SHFIRE);
+       if (creature_ptr->tim_sh_fire) ADD_FLG(BAR_SHFIRE);
 
        /* tim stealth */
-       if (IS_TIM_STEALTH()) ADD_FLG(BAR_STEALTH);
+       if (is_time_limit_stealth(creature_ptr)) ADD_FLG(BAR_STEALTH);
 
-       if (p_ptr->tim_sh_touki) ADD_FLG(BAR_TOUKI);
+       if (creature_ptr->tim_sh_touki) ADD_FLG(BAR_TOUKI);
 
        /* Holy aura */
-       if (p_ptr->tim_sh_holy) ADD_FLG(BAR_SHHOLY);
+       if (creature_ptr->tim_sh_holy) ADD_FLG(BAR_SHHOLY);
 
        /* An Eye for an Eye */
-       if (p_ptr->tim_eyeeye) ADD_FLG(BAR_EYEEYE);
+       if (creature_ptr->tim_eyeeye) ADD_FLG(BAR_EYEEYE);
 
        /* Hex spells */
-       if (p_ptr->realm1 == REALM_HEX)
+       if (creature_ptr->realm1 == REALM_HEX)
        {
                if (hex_spelling(HEX_BLESS)) ADD_FLG(BAR_BLESSED);
                if (hex_spelling(HEX_DEMON_AURA)) { ADD_FLG(BAR_SHFIRE); ADD_FLG(BAR_REGENERATION); }
@@ -675,10 +679,10 @@ static void prt_status(void)
                        hex_spelling(HEX_CURE_SERIOUS) ||
                        hex_spelling(HEX_CURE_CRITICAL)) ADD_FLG(BAR_CURE);
 
-               if (HEX_REVENGE_TURN(p_ptr))
+               if (HEX_REVENGE_TURN(creature_ptr))
                {
-                       if (HEX_REVENGE_TYPE(p_ptr) == 1) ADD_FLG(BAR_PATIENCE);
-                       if (HEX_REVENGE_TYPE(p_ptr) == 2) ADD_FLG(BAR_REVENGE);
+                       if (HEX_REVENGE_TYPE(creature_ptr) == 1) ADD_FLG(BAR_PATIENCE);
+                       if (HEX_REVENGE_TYPE(creature_ptr) == 2) ADD_FLG(BAR_REVENGE);
                }
        }
 
@@ -740,7 +744,7 @@ static void prt_status(void)
  * @brief プレイヤーの称号を表示する / Prints "title", including "wizard" or "winner" as needed.
  * @return なし
  */
-static void prt_title(void)
+static void print_title(player_type *creature_ptr)
 {
        concptr p = "";
        GAME_TEXT str[14];
@@ -749,9 +753,9 @@ static void prt_title(void)
        {
                p = _("[ウィザード]", "[=-WIZARD-=]");
        }
-       else if (p_ptr->total_winner || (p_ptr->lev > PY_MAX_LEVEL))
+       else if (current_world_ptr->total_winner || (creature_ptr->lev > PY_MAX_LEVEL))
        {
-               if (p_ptr->arena_number > MAX_ARENA_MONS + 2)
+               if (creature_ptr->arena_number > MAX_ARENA_MONS + 2)
                {
                        p = _("*真・勝利者*", "*TRUEWINNER*");
                }
@@ -764,11 +768,11 @@ static void prt_title(void)
        /* Normal */
        else
        {
-               my_strcpy(str, player_title[p_ptr->pclass][(p_ptr->lev - 1) / 5], sizeof(str));
+               my_strcpy(str, player_title[creature_ptr->pclass][(creature_ptr->lev - 1) / 5], sizeof(str));
                p = str;
        }
 
-       prt_field(p, ROW_TITLE, COL_TITLE);
+       print_field(p, ROW_TITLE, COL_TITLE);
 }
 
 
@@ -776,13 +780,11 @@ static void prt_title(void)
  * @brief プレイヤーのレベルを表示する / Prints level
  * @return なし
  */
-static void prt_level(void)
+static void print_level(player_type *creature_ptr)
 {
        char tmp[32];
-
-       sprintf(tmp, _("%5d", "%6d"), p_ptr->lev);
-
-       if (p_ptr->lev >= p_ptr->max_plv)
+       sprintf(tmp, "%5d", creature_ptr->lev);
+       if (creature_ptr->lev >= creature_ptr->max_plv)
        {
                put_str(_("レベル ", "LEVEL "), ROW_LEVEL, 0);
                c_put_str(TERM_L_GREEN, tmp, ROW_LEVEL, COL_LEVEL + 7);
@@ -799,29 +801,29 @@ static void prt_level(void)
  * @brief プレイヤーの経験値を表示する / Display the experience
  * @return なし
  */
-static void prt_exp(void)
+static void print_exp(player_type *creature_ptr)
 {
        char out_val[32];
 
-       if ((!exp_need)||(p_ptr->prace == RACE_ANDROID))
+       if ((!exp_need)||(creature_ptr->prace == RACE_ANDROID))
        {
-               (void)sprintf(out_val, "%8ld", (long)p_ptr->exp);
+               (void)sprintf(out_val, "%8ld", (long)creature_ptr->exp);
        }
        else
        {
-               if (p_ptr->lev >= PY_MAX_LEVEL)
+               if (creature_ptr->lev >= PY_MAX_LEVEL)
                {
                        (void)sprintf(out_val, "********");
                }
                else
                {
-                       (void)sprintf(out_val, "%8ld", (long)(player_exp [p_ptr->lev - 1] * p_ptr->expfact / 100L) - p_ptr->exp);
+                       (void)sprintf(out_val, "%8ld", (long)(player_exp [creature_ptr->lev - 1] * creature_ptr->expfact / 100L) - creature_ptr->exp);
                }
        }
 
-       if (p_ptr->exp >= p_ptr->max_exp)
+       if (creature_ptr->exp >= creature_ptr->max_exp)
        {
-               if (p_ptr->prace == RACE_ANDROID) put_str(_("強化 ", "Cst "), ROW_EXP, 0);
+               if (creature_ptr->prace == RACE_ANDROID) put_str(_("強化 ", "Cst "), ROW_EXP, 0);
                else put_str(_("経験 ", "EXP "), ROW_EXP, 0);
                c_put_str(TERM_L_GREEN, out_val, ROW_EXP, COL_EXP + 4);
        }
@@ -832,15 +834,17 @@ static void prt_exp(void)
        }
 }
 
+
 /*!
  * @brief プレイヤーの所持金を表示する / Prints current gold
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_gold(void)
+static void print_gold(player_type *creature_ptr)
 {
        char tmp[32];
        put_str(_("$ ", "AU "), ROW_GOLD, COL_GOLD);
-       sprintf(tmp, "%9ld", (long)p_ptr->au);
+       sprintf(tmp, "%9ld", (long)creature_ptr->au);
        c_put_str(TERM_L_GREEN, tmp, ROW_GOLD, COL_GOLD + 3);
 }
 
@@ -849,18 +853,18 @@ static void prt_gold(void)
  * @brief プレイヤーのACを表示する / Prints current AC
  * @return なし
  */
-static void prt_ac(void)
+static void print_ac(player_type *creature_ptr)
 {
        char tmp[32];
 
 #ifdef JP
 /* AC の表示方式を変更している */
        put_str(" AC(     )", ROW_AC, COL_AC);
-       sprintf(tmp, "%5d", p_ptr->dis_ac + p_ptr->dis_to_a);
+       sprintf(tmp, "%5d", creature_ptr->dis_ac + creature_ptr->dis_to_a);
        c_put_str(TERM_L_GREEN, tmp, ROW_AC, COL_AC + 6);
 #else
        put_str("Cur AC ", ROW_AC, COL_AC);
-       sprintf(tmp, "%5d", p_ptr->dis_ac + p_ptr->dis_to_a);
+       sprintf(tmp, "%5d", creature_ptr->dis_ac + creature_ptr->dis_to_a);
        c_put_str(TERM_L_GREEN, tmp, ROW_AC, COL_AC + 7);
 #endif
 
@@ -871,7 +875,7 @@ static void prt_ac(void)
  * @brief プレイヤーのHPを表示する / Prints Cur/Max hit points
  * @return なし
  */
-static void prt_hp(void)
+static void print_hp(player_type *creature_ptr)
 {
        /* ヒットポイントの表示方法を変更 */
        char tmp[32];
@@ -882,13 +886,13 @@ static void prt_hp(void)
        put_str("HP", ROW_CURHP, COL_CURHP);
 
        /* 現在のヒットポイント */
-       sprintf(tmp, "%4ld", (long int)p_ptr->chp);
+       sprintf(tmp, "%4ld", (long int)creature_ptr->chp);
 
-       if (p_ptr->chp >= p_ptr->mhp)
+       if (creature_ptr->chp >= creature_ptr->mhp)
        {
                color = TERM_L_GREEN;
        }
-       else if (p_ptr->chp > (p_ptr->mhp * hitpoint_warn) / 10)
+       else if (creature_ptr->chp > (creature_ptr->mhp * hitpoint_warn) / 10)
        {
                color = TERM_YELLOW;
        }
@@ -903,7 +907,7 @@ static void prt_hp(void)
        put_str( "/", ROW_CURHP, COL_CURHP + 7 );
 
        /* 最大ヒットポイント */
-       sprintf(tmp, "%4ld", (long int)p_ptr->mhp);
+       sprintf(tmp, "%4ld", (long int)creature_ptr->mhp);
        color = TERM_L_GREEN;
 
        c_put_str(color, tmp, ROW_CURHP, COL_CURHP + 8 );
@@ -914,7 +918,7 @@ static void prt_hp(void)
  * @brief プレイヤーのMPを表示する / Prints players max/cur spell points
  * @return なし
  */
-static void prt_sp(void)
+static void print_sp(player_type *creature_ptr)
 {
 /* マジックポイントの表示方法を変更している */
        char tmp[32];
@@ -928,13 +932,13 @@ static void prt_sp(void)
        put_str(_("MP", "SP"), ROW_CURSP, COL_CURSP);
 
        /* 現在のマジックポイント */
-       sprintf(tmp, "%4ld", (long int)p_ptr->csp);
+       sprintf(tmp, "%4ld", (long int)creature_ptr->csp);
 
-       if (p_ptr->csp >= p_ptr->msp)
+       if (creature_ptr->csp >= creature_ptr->msp)
        {
                color = TERM_L_GREEN;
        }
-       else if (p_ptr->csp > (p_ptr->msp * mana_warn) / 10)
+       else if (creature_ptr->csp > (creature_ptr->msp * mana_warn) / 10)
        {
                color = TERM_YELLOW;
        }
@@ -949,7 +953,7 @@ static void prt_sp(void)
        put_str( "/", ROW_CURSP, COL_CURSP + 7 );
 
        /* 最大マジックポイント */
-       sprintf(tmp, "%4ld", (long int)p_ptr->msp);
+       sprintf(tmp, "%4ld", (long int)creature_ptr->msp);
        color = TERM_L_GREEN;
 
        c_put_str(color, tmp, ROW_CURSP, COL_CURSP + 8);
@@ -958,9 +962,10 @@ static void prt_sp(void)
 
 /*!
  * @brief 現在のフロアの深さを表示する / Prints depth in stat area
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_depth(void)
+static void print_depth(player_type *creature_ptr)
 {
        char depths[32];
        TERM_LEN wid, hgt, row_depth, col_depth;
@@ -970,21 +975,22 @@ static void prt_depth(void)
        col_depth = wid + COL_DEPTH;
        row_depth = hgt + ROW_DEPTH;
 
-       if (!p_ptr->current_floor_ptr->dun_level)
+       floor_type *floor_ptr = creature_ptr->current_floor_ptr;
+       if (!floor_ptr->dun_level)
        {
                strcpy(depths, _("地上", "Surf."));
        }
-       else if (p_ptr->inside_quest && !p_ptr->dungeon_idx)
+       else if (floor_ptr->inside_quest && !creature_ptr->dungeon_idx)
        {
                strcpy(depths, _("地上", "Quest"));
        }
        else
        {
-               if (depth_in_feet) (void)sprintf(depths, _("%d ft", "%d ft"), (int)p_ptr->current_floor_ptr->dun_level * 50);
-               else (void)sprintf(depths, _("%d 階", "Lev %d"), (int)p_ptr->current_floor_ptr->dun_level);
+               if (depth_in_feet) (void)sprintf(depths, _("%d ft", "%d ft"), (int)floor_ptr->dun_level * 50);
+               else (void)sprintf(depths, _("%d 階", "Lev %d"), (int)floor_ptr->dun_level);
 
                /* Get color of level based on feeling  -JSV- */
-               switch (p_ptr->feeling)
+               switch (creature_ptr->feeling)
                {
                case  0: attr = TERM_SLATE;   break; /* Unknown */
                case  1: attr = TERM_L_BLUE;  break; /* Special */
@@ -1007,38 +1013,39 @@ static void prt_depth(void)
 
 /*!
  * @brief プレイヤーの空腹状態を表示する / Prints status of hunger
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_hunger(void)
+static void print_hunger(player_type *player_ptr)
 {
-       if(current_world_ptr->wizard && p_ptr->inside_arena) return;
+       if(current_world_ptr->wizard && player_ptr->current_floor_ptr->inside_arena) return;
 
        /* Fainting / Starving */
-       if (p_ptr->food < PY_FOOD_FAINT)
+       if (player_ptr->food < PY_FOOD_FAINT)
        {
                c_put_str(TERM_RED, _("衰弱  ", "Weak  "), ROW_HUNGRY, COL_HUNGRY);
        }
 
        /* Weak */
-       else if (p_ptr->food < PY_FOOD_WEAK)
+       else if (player_ptr->food < PY_FOOD_WEAK)
        {
                c_put_str(TERM_ORANGE, _("衰弱  ", "Weak  "), ROW_HUNGRY, COL_HUNGRY);
        }
 
        /* Hungry */
-       else if (p_ptr->food < PY_FOOD_ALERT)
+       else if (player_ptr->food < PY_FOOD_ALERT)
        {
                c_put_str(TERM_YELLOW, _("空腹  ", "Hungry"), ROW_HUNGRY, COL_HUNGRY);
        }
 
        /* Normal */
-       else if (p_ptr->food < PY_FOOD_FULL)
+       else if (player_ptr->food < PY_FOOD_FULL)
        {
                c_put_str(TERM_L_GREEN, "      ", ROW_HUNGRY, COL_HUNGRY);
        }
 
        /* Full */
-       else if (p_ptr->food < PY_FOOD_MAX)
+       else if (player_ptr->food < PY_FOOD_MAX)
        {
                c_put_str(TERM_L_GREEN, _("満腹  ", "Full  "), ROW_HUNGRY, COL_HUNGRY);
        }
@@ -1053,13 +1060,14 @@ static void prt_hunger(void)
 
 /*!
  * @brief プレイヤーの行動状態を表示する / Prints Searching, Resting, Paralysis, or 'count' status
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  * @details
  * Display is always exactly 10 characters wide (see below)
  * This function was a major bottleneck when resting, so a lot of
  * the text formatting code was optimized in place below.
  */
-static void prt_state(void)
+static void print_state(player_type *player_ptr)
 {
        TERM_COLOR attr = TERM_WHITE;
        GAME_TEXT text[16];
@@ -1080,7 +1088,7 @@ static void prt_state(void)
        /* Action */
        else
        {
-               switch(p_ptr->action)
+               switch(player_ptr->action)
                {
                        case ACTION_SEARCH:
                        {
@@ -1091,15 +1099,15 @@ static void prt_state(void)
                                /* Start with "Rest" */
                                strcpy(text, _("    ", "    "));
 
-                               if (p_ptr->resting > 0)
+                               if (player_ptr->resting > 0)
                                {
-                                       sprintf(text, "%4d", p_ptr->resting);
+                                       sprintf(text, "%4d", player_ptr->resting);
                                }
-                               else if (p_ptr->resting == COMMAND_ARG_REST_FULL_HEALING)
+                               else if (player_ptr->resting == COMMAND_ARG_REST_FULL_HEALING)
                                {
                                        text[0] = text[1] = text[2] = text[3] = '*';
                                }
-                               else if (p_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE)
+                               else if (player_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE)
                                {
                                        text[0] = text[1] = text[2] = text[3] = '&';
                                }
@@ -1108,7 +1116,7 @@ static void prt_state(void)
                        case ACTION_LEARN:
                        {
                                strcpy(text, _("学習", "lear"));
-                               if (p_ptr->new_mane) attr = TERM_L_RED;
+                               if (player_ptr->new_mane) attr = TERM_L_RED;
                                break;
                        }
                        case ACTION_FISH:
@@ -1120,7 +1128,7 @@ static void prt_state(void)
                        {
                                int i;
                                for (i = 0; i < MAX_KAMAE; i++)
-                                       if (p_ptr->special_defense & (KAMAE_GENBU << i)) break;
+                                       if (player_ptr->special_defense & (KAMAE_GENBU << i)) break;
                                switch (i)
                                {
                                        case 0: attr = TERM_GREEN;break;
@@ -1135,7 +1143,7 @@ static void prt_state(void)
                        {
                                int i;
                                for (i = 0; i < MAX_KATA; i++)
-                                       if (p_ptr->special_defense & (KATA_IAI << i)) break;
+                                       if (player_ptr->special_defense & (KATA_IAI << i)) break;
                                strcpy(text, kata_shurui[i].desc);
                                break;
                        }
@@ -1169,12 +1177,13 @@ static void prt_state(void)
 
 /*!
  * @brief プレイヤーの行動速度を表示する / Prints the speed of a character.                     -CJS-
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_speed(void)
+static void print_speed(player_type *player_ptr)
 {
-       int i = p_ptr->pspeed;
-       bool is_fast = IS_FAST();
+       int i = player_ptr->pspeed;
+       bool is_fast = IS_FAST(player_ptr);
 
        TERM_COLOR attr = TERM_WHITE;
        char buf[32] = "";
@@ -1185,40 +1194,41 @@ static void prt_speed(void)
        row_speed = hgt + ROW_SPEED;
 
        /* Hack -- Visually "undo" the Search Mode Slowdown */
-       if (p_ptr->action == ACTION_SEARCH && !p_ptr->lightspeed) i += 10;
+       if (player_ptr->action == ACTION_SEARCH && !player_ptr->lightspeed) i += 10;
 
+       floor_type *floor_ptr = player_ptr->current_floor_ptr;
        /* Fast */
        if (i > 110)
        {
-               if (p_ptr->riding)
+               if (player_ptr->riding)
                {
-                       monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[p_ptr->riding];
+                       monster_type *m_ptr = &floor_ptr->m_list[player_ptr->riding];
                        if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
                        else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
                        else attr = TERM_GREEN;
                }
-               else if ((is_fast && !p_ptr->slow) || p_ptr->lightspeed) attr = TERM_YELLOW;
-               else if (p_ptr->slow && !is_fast) attr = TERM_VIOLET;
+               else if ((is_fast && !player_ptr->slow) || player_ptr->lightspeed) attr = TERM_YELLOW;
+               else if (player_ptr->slow && !is_fast) attr = TERM_VIOLET;
                else attr = TERM_L_GREEN;
-               sprintf(buf, "%s(+%d)", (p_ptr->riding ? _("乗馬", "Ride") : _("加速", "Fast")), (i - 110));
+               sprintf(buf, "%s(+%d)", (player_ptr->riding ? _("乗馬", "Ride") : _("加速", "Fast")), (i - 110));
        }
 
        /* Slow */
        else if (i < 110)
        {
-               if (p_ptr->riding)
+               if (player_ptr->riding)
                {
-                       monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[p_ptr->riding];
+                       monster_type *m_ptr = &floor_ptr->m_list[player_ptr->riding];
                        if (MON_FAST(m_ptr) && !MON_SLOW(m_ptr)) attr = TERM_L_BLUE;
                        else if (MON_SLOW(m_ptr) && !MON_FAST(m_ptr)) attr = TERM_VIOLET;
                        else attr = TERM_RED;
                }
-               else if (is_fast && !p_ptr->slow) attr = TERM_YELLOW;
-               else if (p_ptr->slow && !is_fast) attr = TERM_VIOLET;
+               else if (is_fast && !player_ptr->slow) attr = TERM_YELLOW;
+               else if (player_ptr->slow && !is_fast) attr = TERM_VIOLET;
                else attr = TERM_L_UMBER;
-               sprintf(buf, "%s(-%d)", (p_ptr->riding ? _("乗馬", "Ride") : _("減速", "Slow")), (110 - i));
+               sprintf(buf, "%s(-%d)", (player_ptr->riding ? _("乗馬", "Ride") : _("減速", "Slow")), (110 - i));
        }
-       else if (p_ptr->riding)
+       else if (player_ptr->riding)
        {
                attr = TERM_GREEN;
                strcpy(buf, _("乗馬中", "Riding"));
@@ -1231,9 +1241,10 @@ static void prt_speed(void)
 
 /*!
  * @brief プレイヤーの呪文学習可能状態を表示する
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_study(void)
+static void print_study(player_type *player_ptr)
 {
        TERM_LEN wid, hgt, row_study, col_study;
 
@@ -1241,7 +1252,7 @@ static void prt_study(void)
        col_study = wid + COL_STUDY;
        row_study = hgt + ROW_STUDY;
 
-       if (p_ptr->new_spells)
+       if (player_ptr->new_spells)
        {
                put_str(_("学習", "Stud"), row_study, col_study);
        }
@@ -1254,9 +1265,10 @@ static void prt_study(void)
 
 /*!
  * @brief プレイヤーのものまね可能状態を表示する
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_imitation(void)
+static void print_imitation(player_type *player_ptr)
 {
        TERM_LEN wid, hgt, row_study, col_study;
 
@@ -1264,12 +1276,12 @@ static void prt_imitation(void)
        col_study = wid + COL_STUDY;
        row_study = hgt + ROW_STUDY;
 
-       if (p_ptr->pclass == CLASS_IMITATOR)
+       if (player_ptr->pclass == CLASS_IMITATOR)
        {
-               if (p_ptr->mane_num)
+               if (player_ptr->mane_num)
                {
                        TERM_COLOR attr;
-                       if (p_ptr->new_mane) attr = TERM_L_RED;
+                       if (player_ptr->new_mane) attr = TERM_L_RED;
                        else attr = TERM_WHITE;
                        c_put_str(attr, _("まね", "Imit"), row_study, col_study);
                }
@@ -1284,9 +1296,9 @@ static void prt_imitation(void)
  * @brief プレイヤーの負傷状態を表示する
  * @return なし
  */
-static void prt_cut(void)
+static void print_cut(player_type *creature_ptr)
 {
-       int c = p_ptr->cut;
+       int c = creature_ptr->cut;
 
        if (c > 1000)
        {
@@ -1327,9 +1339,9 @@ static void prt_cut(void)
  * @brief プレイヤーの朦朧状態を表示する
  * @return なし
  */
-static void prt_stun(void)
+static void print_stun(player_type *creature_ptr)
 {
-       int s = p_ptr->stun;
+       int s = creature_ptr->stun;
 
        if (s > 100)
        {
@@ -1350,7 +1362,6 @@ static void prt_stun(void)
 }
 
 
-
 /*!
  * @brief モンスターの体力ゲージを表示する
  * @param riding TRUEならば騎乗中のモンスターの体力、FALSEならターゲットモンスターの体力を表示する。表示位置は固定。
@@ -1371,7 +1382,7 @@ static void prt_stun(void)
  * health-bar stops tracking any monster that "disappears".
  * </pre>
  */
-static void health_redraw(bool riding)
+static void health_redraw(player_type *creature_ptr, bool riding)
 {
        s16b health_who;
        int row, col;
@@ -1379,20 +1390,20 @@ static void health_redraw(bool riding)
 
        if (riding)
        {
-               health_who = p_ptr->riding;
+               health_who = creature_ptr->riding;
                row = ROW_RIDING_INFO;
                col = COL_RIDING_INFO;
        }
        else
        {
-               health_who = p_ptr->health_who;
+               health_who = creature_ptr->health_who;
                row = ROW_INFO;
                col = COL_INFO;
        }
 
-       m_ptr = &p_ptr->current_floor_ptr->m_list[health_who];
+       m_ptr = &creature_ptr->current_floor_ptr->m_list[health_who];
 
-       if (current_world_ptr->wizard && p_ptr->phase_out)
+       if (current_world_ptr->wizard && creature_ptr->phase_out)
        {
                row = ROW_INFO - 2;
                col = COL_INFO + 2;
@@ -1402,32 +1413,32 @@ static void health_redraw(bool riding)
                Term_putstr(col - 2, row + 2, 12, TERM_WHITE, "      /     ");
                Term_putstr(col - 2, row + 3, 12, TERM_WHITE, "      /     ");
 
-               if(p_ptr->current_floor_ptr->m_list[1].r_idx)
+               if(creature_ptr->current_floor_ptr->m_list[1].r_idx)
                {
-                       Term_putstr(col - 2, row, 2, r_info[p_ptr->current_floor_ptr->m_list[1].r_idx].x_attr, format("%c", r_info[p_ptr->current_floor_ptr->m_list[1].r_idx].x_char));
-                       Term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[1].hp));
-                       Term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[1].max_maxhp));
+                       Term_putstr(col - 2, row, 2, r_info[creature_ptr->current_floor_ptr->m_list[1].r_idx].x_attr, format("%c", r_info[creature_ptr->current_floor_ptr->m_list[1].r_idx].x_char));
+                       Term_putstr(col - 1, row, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].hp));
+                       Term_putstr(col + 5, row, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[1].max_maxhp));
                }
 
-               if(p_ptr->current_floor_ptr->m_list[2].r_idx)
+               if(creature_ptr->current_floor_ptr->m_list[2].r_idx)
                {
-                       Term_putstr(col - 2, row + 1, 2, r_info[p_ptr->current_floor_ptr->m_list[2].r_idx].x_attr, format("%c", r_info[p_ptr->current_floor_ptr->m_list[2].r_idx].x_char));
-                       Term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[2].hp));
-                       Term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[2].max_maxhp));
+                       Term_putstr(col - 2, row + 1, 2, r_info[creature_ptr->current_floor_ptr->m_list[2].r_idx].x_attr, format("%c", r_info[creature_ptr->current_floor_ptr->m_list[2].r_idx].x_char));
+                       Term_putstr(col - 1, row + 1, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].hp));
+                       Term_putstr(col + 5, row + 1, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[2].max_maxhp));
                }
 
-               if(p_ptr->current_floor_ptr->m_list[3].r_idx)
+               if(creature_ptr->current_floor_ptr->m_list[3].r_idx)
                {
-                       Term_putstr(col - 2, row + 2, 2, r_info[p_ptr->current_floor_ptr->m_list[3].r_idx].x_attr, format("%c", r_info[p_ptr->current_floor_ptr->m_list[3].r_idx].x_char));
-                       Term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[3].hp));
-                       Term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[3].max_maxhp));
+                       Term_putstr(col - 2, row + 2, 2, r_info[creature_ptr->current_floor_ptr->m_list[3].r_idx].x_attr, format("%c", r_info[creature_ptr->current_floor_ptr->m_list[3].r_idx].x_char));
+                       Term_putstr(col - 1, row + 2, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].hp));
+                       Term_putstr(col + 5, row + 2, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[3].max_maxhp));
                }
 
-               if(p_ptr->current_floor_ptr->m_list[4].r_idx)
+               if(creature_ptr->current_floor_ptr->m_list[4].r_idx)
                {
-                       Term_putstr(col - 2, row + 3, 2, r_info[p_ptr->current_floor_ptr->m_list[4].r_idx].x_attr, format("%c", r_info[p_ptr->current_floor_ptr->m_list[4].r_idx].x_char));
-                       Term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[4].hp));
-                       Term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", p_ptr->current_floor_ptr->m_list[4].max_maxhp));
+                       Term_putstr(col - 2, row + 3, 2, r_info[creature_ptr->current_floor_ptr->m_list[4].r_idx].x_attr, format("%c", r_info[creature_ptr->current_floor_ptr->m_list[4].r_idx].x_char));
+                       Term_putstr(col - 1, row + 3, 5, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].hp));
+                       Term_putstr(col + 5, row + 3, 6, TERM_WHITE, format("%5d", creature_ptr->current_floor_ptr->m_list[4].max_maxhp));
                }
        }
        else
@@ -1448,7 +1459,7 @@ static void health_redraw(bool riding)
                }
 
                /* Tracking a hallucinatory monster */
-               else if (p_ptr->image)
+               else if (creature_ptr->image)
                {
                        /* Indicate that the monster health is "unknown" */
                        Term_putstr(col, row, 12, TERM_WHITE, "[----------]");
@@ -1508,56 +1519,59 @@ static void health_redraw(bool riding)
 
 /*!
  * @brief プレイヤーのステータスを一括表示する(左側部分) / Display basic info (mostly left of map)
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_frame_basic(void)
+static void print_frame_basic(player_type *creature_ptr)
 {
        int i;
-       if (p_ptr->mimic_form)
-               prt_field(mimic_info[p_ptr->mimic_form].title, ROW_RACE, COL_RACE);
+       if (creature_ptr->mimic_form)
+               print_field(mimic_info[creature_ptr->mimic_form].title, ROW_RACE, COL_RACE);
        else
        {
                char str[14];
                my_strcpy(str, rp_ptr->title, sizeof(str));
-               prt_field(str, ROW_RACE, COL_RACE);
-       }
-
-       prt_title();
-       prt_level();
-       prt_exp();
-       for (i = 0; i < A_MAX; i++) prt_stat(i);
-       prt_ac();
-       prt_hp();
-       prt_sp();
-       prt_gold();
-       prt_depth();
-       health_redraw(FALSE);
-       health_redraw(TRUE);
+               print_field(str, ROW_RACE, COL_RACE);
+       }
+
+       print_title(creature_ptr);
+       print_level(creature_ptr);
+       print_exp(creature_ptr);
+       for (i = 0; i < A_MAX; i++) print_stat(creature_ptr, i);
+       print_ac(creature_ptr);
+       print_hp(creature_ptr);
+       print_sp(creature_ptr);
+       print_gold(creature_ptr);
+       print_depth(creature_ptr);
+       health_redraw(creature_ptr, FALSE);
+       health_redraw(creature_ptr, TRUE);
 }
 
 
 /*!
  * @brief プレイヤーのステータスを一括表示する(下部分) / Display extra info (mostly below map)
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void prt_frame_extra(void)
+static void print_frame_extra(player_type *player_ptr)
 {
-       prt_cut();
-       prt_stun();
-       prt_hunger();
-       prt_state();
-       prt_speed();
-       prt_study();
-       prt_imitation();
-       prt_status();
+       print_cut(player_ptr);
+       print_stun(player_ptr);
+       print_hunger(player_ptr);
+       print_state(player_ptr);
+       print_speed(player_ptr);
+       print_study(player_ptr);
+       print_imitation(player_ptr);
+       print_status(player_ptr);
 }
 
 
 /*!
- * @brief サブウィンドウに所持品一覧を表示する / Hack -- display p_ptr->inventory_list in sub-windows
+ * @brief サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_inven(void)
+static void fix_inventory(player_type *player_ptr)
 {
        int j;
 
@@ -1575,8 +1589,7 @@ static void fix_inven(void)
                /* Activate */
                Term_activate(angband_term[j]);
 
-               /* Display p_ptr->inventory_list */
-               display_inven(item_tester_tval);
+               display_inven(player_ptr, item_tester_tval);
                Term_fresh();
                Term_activate(old);
        }
@@ -1609,14 +1622,14 @@ static void print_monster_line(TERM_LEN x, TERM_LEN y, monster_type* m_ptr, int
        if(!r_ptr)return;
        //Number of 'U'nique
        if(r_ptr->flags1&RF1_UNIQUE){//unique
-               bool is_kubi = FALSE;
-               for(i=0;i<MAX_KUBI;i++){
+               bool is_bounty = FALSE;
+               for(i=0;i<MAX_BOUNTY;i++){
                        if(current_world_ptr->bounty_r_idx[i] == r_idx){
-                               is_kubi = TRUE;
+                               is_bounty = TRUE;
                                break;
                        }
                }
-               Term_addstr(-1, TERM_WHITE, is_kubi?"  W":"  U");
+               Term_addstr(-1, TERM_WHITE, is_bounty?"  W":"  U");
        }else{
                sprintf(buf, "%3d", n_same);
                Term_addstr(-1, TERM_WHITE, buf);
@@ -1646,7 +1659,7 @@ static void print_monster_line(TERM_LEN x, TERM_LEN y, monster_type* m_ptr, int
  * @param y 表示行
  * @param max_lines 最大何行描画するか
  */
-void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
+void print_monster_list(floor_type *floor_ptr, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
        TERM_LEN line = y;
        monster_type* last_mons = NULL;
        monster_type* m_ptr = NULL;
@@ -1654,9 +1667,9 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
        int i;
 
        for(i=0;i<tmp_pos.n;i++){
-               grid_type* g_ptr = &p_ptr->current_floor_ptr->grid_array[tmp_pos.y[i]][tmp_pos.x[i]];
-               if(!g_ptr->m_idx || !p_ptr->current_floor_ptr->m_list[g_ptr->m_idx].ml)continue;//no mons or cannot look
-               m_ptr = &p_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
+               grid_type* g_ptr = &floor_ptr->grid_array[tmp_pos.y[i]][tmp_pos.x[i]];
+               if(!g_ptr->m_idx || !floor_ptr->m_list[g_ptr->m_idx].ml)continue;//no mons or cannot look
+               m_ptr = &floor_ptr->m_list[g_ptr->m_idx];
                if(is_pet(m_ptr))continue;//pet
                if(!m_ptr->r_idx)continue;//dead?
                {
@@ -1704,11 +1717,13 @@ void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines){
        }
 }
 
+
 /*!
  * @brief 出現中モンスターのリストをサブウィンドウに表示する / Hack -- display monster list in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_monster_list(void)
+static void fix_monster_list(player_type *player_ptr)
 {
        int j;
        int w, h;
@@ -1731,20 +1746,20 @@ static void fix_monster_list(void)
                Term_clear();
 
                target_set_prepare_look();//モンスター一覧を生成,ソート
-               print_monster_list(0, 0, h);
+               print_monster_list(player_ptr->current_floor_ptr, 0, 0, h);
                Term_fresh();
                Term_activate(old);
        }
 }
 
 
-
 /*!
  * @brief 現在の装備品をサブウィンドウに表示する / 
  * Hack -- display equipment in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_equip(void)
+static void fix_equip(player_type *player_ptr)
 {
        int j;
 
@@ -1763,7 +1778,7 @@ static void fix_equip(void)
                Term_activate(angband_term[j]);
 
                /* Display equipment */
-               display_equip(item_tester_tval);
+               display_equip(player_ptr, item_tester_tval);
                Term_fresh();
                Term_activate(old);
        }
@@ -1772,10 +1787,11 @@ static void fix_equip(void)
 
 /*!
  * @brief 現在の習得済魔法をサブウィンドウに表示する / 
+ * @param player_ptr プレーヤーへの参照ポインタ
  * Hack -- display spells in sub-windows
  * @return なし
  */
-static void fix_spell(void)
+static void fix_spell(player_type *player_ptr)
 {
        int j;
 
@@ -1794,7 +1810,7 @@ static void fix_spell(void)
                Term_activate(angband_term[j]);
 
                /* Display spell list */
-               display_spell_list(p_ptr);
+               display_spell_list(player_ptr);
                Term_fresh();
                Term_activate(old);
        }
@@ -1803,10 +1819,11 @@ static void fix_spell(void)
 
 /*!
  * @brief 現在のプレイヤーステータスをサブウィンドウに表示する / 
+ * @param player_ptr プレーヤーへの参照ポインタ
  * Hack -- display character in sub-windows
  * @return なし
  */
-static void fix_player(void)
+static void fix_player(player_type *player_ptr)
 {
        int j;
 
@@ -1825,7 +1842,7 @@ static void fix_player(void)
                Term_activate(angband_term[j]);
 
                update_playtime();
-               display_player(p_ptr, 0);
+               display_player(player_ptr, 0);
                Term_fresh();
                Term_activate(old);
        }
@@ -1881,11 +1898,12 @@ static void fix_message(void)
  * @brief 簡易マップをサブウィンドウに表示する / 
  * Hack -- display overhead view in sub-windows
  * Adjust for width and split messages
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  * @details
  * Note that the "player" symbol does NOT appear on the map.
  */
-static void fix_overhead(void)
+static void fix_overhead(player_type *player_ptr)
 {
        int j;
        int cy, cx;
@@ -1910,14 +1928,15 @@ static void fix_overhead(void)
                if (wid > COL_MAP + 2 && hgt > ROW_MAP + 2)
                {
 
-                       display_map(p_ptr->current_floor_ptr, &cy, &cx);
+                       display_map(player_ptr, &cy, &cx);
                        Term_fresh();
                }
+
                Term_activate(old);
        }
 }
 
-static void display_dungeon(void)
+static void display_dungeon(player_type *player_ptr)
 {
        TERM_LEN x, y;
        TERM_COLOR a;
@@ -1926,11 +1945,11 @@ static void display_dungeon(void)
        TERM_COLOR ta = 0;
        SYMBOL_CODE tc = '\0';
 
-       for (x = p_ptr->x - Term->wid / 2 + 1; x <= p_ptr->x + Term->wid / 2; x++)
+       for (x = player_ptr->x - Term->wid / 2 + 1; x <= player_ptr->x + Term->wid / 2; x++)
        {
-               for (y = p_ptr->y - Term->hgt / 2 + 1; y <= p_ptr->y + Term->hgt / 2; y++)
+               for (y = player_ptr->y - Term->hgt / 2 + 1; y <= player_ptr->y + Term->hgt / 2; y++)
                {
-                       if (in_bounds2(p_ptr->current_floor_ptr, y, x))
+                       if (in_bounds2(player_ptr->current_floor_ptr, y, x))
                        {
                                map_info(y, x, &a, &c, &ta, &tc);
 
@@ -1938,12 +1957,12 @@ static void display_dungeon(void)
                                if (!use_graphics)
                                {
                                        if (current_world_ptr->timewalk_m_idx) a = TERM_DARK;
-                                       else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
-                                       else if (p_ptr->wraith_form) a = TERM_L_DARK;
+                                       else if (IS_INVULN(player_ptr) || player_ptr->timewalk) a = TERM_WHITE;
+                                       else if (player_ptr->wraith_form) a = TERM_L_DARK;
                                }
 
                                /* Hack -- Queue it */
-                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+                               Term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
                        }
                        else
                        {
@@ -1959,7 +1978,7 @@ static void display_dungeon(void)
                                c = f_ptr->x_char[F_LIT_STANDARD];
 
                                /* Hack -- Queue it */
-                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+                               Term_queue_char(x - player_ptr->x + Term->wid / 2 - 1, y - player_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
                        }
                }
        }
@@ -1968,9 +1987,10 @@ static void display_dungeon(void)
 /*!
  * @brief ダンジョンの地形をサブウィンドウに表示する / 
  * Hack -- display dungeon view in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_dungeon(void)
+static void fix_dungeon(player_type *player_ptr)
 {
        int j;
 
@@ -1989,7 +2009,7 @@ static void fix_dungeon(void)
                Term_activate(angband_term[j]);
 
                /* Redraw dungeon view */
-               display_dungeon();
+               display_dungeon(player_ptr);
                Term_fresh();
                Term_activate(old);
        }
@@ -1999,9 +2019,10 @@ static void fix_dungeon(void)
 /*!
  * @brief モンスターの思い出をサブウィンドウに表示する / 
  * Hack -- display dungeon view in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_monster(void)
+static void fix_monster(player_type *player_ptr)
 {
        int j;
 
@@ -2020,7 +2041,7 @@ static void fix_monster(void)
                Term_activate(angband_term[j]);
 
                /* Display monster race info */
-               if (p_ptr->monster_race_idx) display_roff(p_ptr->monster_race_idx);
+               if (player_ptr->monster_race_idx) display_roff(player_ptr->monster_race_idx);
                Term_fresh();
                Term_activate(old);
        }
@@ -2030,9 +2051,10 @@ static void fix_monster(void)
 /*!
  * @brief ベースアイテム情報をサブウィンドウに表示する / 
  * Hack -- display object recall in sub-windows
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void fix_object(void)
+static void fix_object(player_type *player_ptr)
 {
        int j;
 
@@ -2051,7 +2073,7 @@ static void fix_object(void)
                Term_activate(angband_term[j]);
 
                /* Display monster race info */
-               if (p_ptr->object_kind_idx) display_koff(p_ptr->object_kind_idx);
+               if (player_ptr->object_kind_idx) display_koff(player_ptr, player_ptr->object_kind_idx);
                Term_fresh();
                Term_activate(old);
        }
@@ -2073,13 +2095,13 @@ bool is_heavy_shoot(player_type *creature_ptr, object_type *o_ptr)
 
 
 /*! 
- * @brief p_ptr->redraw のフラグに応じた更新をまとめて行う / Handle "p_ptr->redraw"
+ * @brief redraw のフラグに応じた更新をまとめて行う / Handle "redraw"
  * @return なし
  * @details 更新処理の対象はゲーム中の全描画処理
  */
-void redraw_stuff(void)
+void redraw_stuff(player_type *creature_ptr)
 {
-       if (!p_ptr->redraw) return;
+       if (!creature_ptr->redraw) return;
 
        /* Character is not ready yet, no screen updates */
        if (!current_world_ptr->character_generated) return;
@@ -2088,187 +2110,188 @@ void redraw_stuff(void)
        if (current_world_ptr->character_icky) return;
 
        /* Hack -- clear the screen */
-       if (p_ptr->redraw & (PR_WIPE))
+       if (creature_ptr->redraw & (PR_WIPE))
        {
-               p_ptr->redraw &= ~(PR_WIPE);
+               creature_ptr->redraw &= ~(PR_WIPE);
                msg_print(NULL);
                Term_clear();
        }
 
-       if (p_ptr->redraw & (PR_MAP))
+       if (creature_ptr->redraw & (PR_MAP))
        {
-               p_ptr->redraw &= ~(PR_MAP);
-               prt_map();
+               creature_ptr->redraw &= ~(PR_MAP);
+               print_map(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_BASIC))
+       if (creature_ptr->redraw & (PR_BASIC))
        {
-               p_ptr->redraw &= ~(PR_BASIC);
-               p_ptr->redraw &= ~(PR_MISC | PR_TITLE | PR_STATS);
-               p_ptr->redraw &= ~(PR_LEV | PR_EXP | PR_GOLD);
-               p_ptr->redraw &= ~(PR_ARMOR | PR_HP | PR_MANA);
-               p_ptr->redraw &= ~(PR_DEPTH | PR_HEALTH | PR_UHEALTH);
-               prt_frame_basic();
-               prt_time();
-               prt_dungeon();
+               creature_ptr->redraw &= ~(PR_BASIC);
+               creature_ptr->redraw &= ~(PR_MISC | PR_TITLE | PR_STATS);
+               creature_ptr->redraw &= ~(PR_LEV | PR_EXP | PR_GOLD);
+               creature_ptr->redraw &= ~(PR_ARMOR | PR_HP | PR_MANA);
+               creature_ptr->redraw &= ~(PR_DEPTH | PR_HEALTH | PR_UHEALTH);
+               print_frame_basic(creature_ptr);
+               print_time();
+               print_dungeon(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_EQUIPPY))
+       if (creature_ptr->redraw & (PR_EQUIPPY))
        {
-               p_ptr->redraw &= ~(PR_EQUIPPY);
-               print_equippy(); /* To draw / delete equippy chars */
+               creature_ptr->redraw &= ~(PR_EQUIPPY);
+               print_equippy(creature_ptr); /* To draw / delete equippy chars */
        }
 
-       if (p_ptr->redraw & (PR_MISC))
+       if (creature_ptr->redraw & (PR_MISC))
        {
-               p_ptr->redraw &= ~(PR_MISC);
-               prt_field(rp_ptr->title, ROW_RACE, COL_RACE);
-/*             prt_field(cp_ptr->title, ROW_CLASS, COL_CLASS); */
+               creature_ptr->redraw &= ~(PR_MISC);
+               print_field(rp_ptr->title, ROW_RACE, COL_RACE);
        }
 
-       if (p_ptr->redraw & (PR_TITLE))
+       if (creature_ptr->redraw & (PR_TITLE))
        {
-               p_ptr->redraw &= ~(PR_TITLE);
-               prt_title();
+               creature_ptr->redraw &= ~(PR_TITLE);
+               print_title(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_LEV))
+       if (creature_ptr->redraw & (PR_LEV))
        {
-               p_ptr->redraw &= ~(PR_LEV);
-               prt_level();
+               creature_ptr->redraw &= ~(PR_LEV);
+               print_level(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_EXP))
+       if (creature_ptr->redraw & (PR_EXP))
        {
-               p_ptr->redraw &= ~(PR_EXP);
-               prt_exp();
+               creature_ptr->redraw &= ~(PR_EXP);
+               print_exp(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_STATS))
+       if (creature_ptr->redraw & (PR_STATS))
        {
-               p_ptr->redraw &= ~(PR_STATS);
-               prt_stat(A_STR);
-               prt_stat(A_INT);
-               prt_stat(A_WIS);
-               prt_stat(A_DEX);
-               prt_stat(A_CON);
-               prt_stat(A_CHR);
+               creature_ptr->redraw &= ~(PR_STATS);
+               print_stat(creature_ptr, A_STR);
+               print_stat(creature_ptr, A_INT);
+               print_stat(creature_ptr, A_WIS);
+               print_stat(creature_ptr, A_DEX);
+               print_stat(creature_ptr, A_CON);
+               print_stat(creature_ptr, A_CHR);
        }
 
-       if (p_ptr->redraw & (PR_STATUS))
+       if (creature_ptr->redraw & (PR_STATUS))
        {
-               p_ptr->redraw &= ~(PR_STATUS);
-               prt_status();
+               creature_ptr->redraw &= ~(PR_STATUS);
+               print_status(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_ARMOR))
+       if (creature_ptr->redraw & (PR_ARMOR))
        {
-               p_ptr->redraw &= ~(PR_ARMOR);
-               prt_ac();
+               creature_ptr->redraw &= ~(PR_ARMOR);
+               print_ac(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_HP))
+       if (creature_ptr->redraw & (PR_HP))
        {
-               p_ptr->redraw &= ~(PR_HP);
-               prt_hp();
+               creature_ptr->redraw &= ~(PR_HP);
+               print_hp(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_MANA))
+       if (creature_ptr->redraw & (PR_MANA))
        {
-               p_ptr->redraw &= ~(PR_MANA);
-               prt_sp();
+               creature_ptr->redraw &= ~(PR_MANA);
+               print_sp(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_GOLD))
+       if (creature_ptr->redraw & (PR_GOLD))
        {
-               p_ptr->redraw &= ~(PR_GOLD);
-               prt_gold();
+               creature_ptr->redraw &= ~(PR_GOLD);
+               print_gold(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_DEPTH))
+       if (creature_ptr->redraw & (PR_DEPTH))
        {
-               p_ptr->redraw &= ~(PR_DEPTH);
-               prt_depth();
+               creature_ptr->redraw &= ~(PR_DEPTH);
+               print_depth(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_HEALTH))
+       if (creature_ptr->redraw & (PR_HEALTH))
        {
-               p_ptr->redraw &= ~(PR_HEALTH);
-               health_redraw(FALSE);
+               creature_ptr->redraw &= ~(PR_HEALTH);
+               health_redraw(creature_ptr, FALSE);
        }
 
-       if (p_ptr->redraw & (PR_UHEALTH))
+       if (creature_ptr->redraw & (PR_UHEALTH))
        {
-               p_ptr->redraw &= ~(PR_UHEALTH);
-               health_redraw(TRUE);
+               creature_ptr->redraw &= ~(PR_UHEALTH);
+               health_redraw(creature_ptr, TRUE);
        }
 
-       if (p_ptr->redraw & (PR_EXTRA))
+       if (creature_ptr->redraw & (PR_EXTRA))
        {
-               p_ptr->redraw &= ~(PR_EXTRA);
-               p_ptr->redraw &= ~(PR_CUT | PR_STUN);
-               p_ptr->redraw &= ~(PR_HUNGER);
-               p_ptr->redraw &= ~(PR_STATE | PR_SPEED | PR_STUDY | PR_IMITATION | PR_STATUS);
-               prt_frame_extra();
+               creature_ptr->redraw &= ~(PR_EXTRA);
+               creature_ptr->redraw &= ~(PR_CUT | PR_STUN);
+               creature_ptr->redraw &= ~(PR_HUNGER);
+               creature_ptr->redraw &= ~(PR_STATE | PR_SPEED | PR_STUDY | PR_IMITATION | PR_STATUS);
+               print_frame_extra(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_CUT))
+       if (creature_ptr->redraw & (PR_CUT))
        {
-               p_ptr->redraw &= ~(PR_CUT);
-               prt_cut();
+               creature_ptr->redraw &= ~(PR_CUT);
+               print_cut(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_STUN))
+       if (creature_ptr->redraw & (PR_STUN))
        {
-               p_ptr->redraw &= ~(PR_STUN);
-               prt_stun();
+               creature_ptr->redraw &= ~(PR_STUN);
+               print_stun(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_HUNGER))
+       if (creature_ptr->redraw & (PR_HUNGER))
        {
-               p_ptr->redraw &= ~(PR_HUNGER);
-               prt_hunger();
+               creature_ptr->redraw &= ~(PR_HUNGER);
+               print_hunger(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_STATE))
+       if (creature_ptr->redraw & (PR_STATE))
        {
-               p_ptr->redraw &= ~(PR_STATE);
-               prt_state();
+               creature_ptr->redraw &= ~(PR_STATE);
+               print_state(creature_ptr);
        }
 
-       if (p_ptr->redraw & (PR_SPEED))
+       if (creature_ptr->redraw & (PR_SPEED))
        {
-               p_ptr->redraw &= ~(PR_SPEED);
-               prt_speed();
+               creature_ptr->redraw &= ~(PR_SPEED);
+               print_speed(creature_ptr);
        }
 
-       if (p_ptr->pclass == CLASS_IMITATOR)
+       if (creature_ptr->pclass == CLASS_IMITATOR)
        {
-               if (p_ptr->redraw & (PR_IMITATION))
+               if (creature_ptr->redraw & (PR_IMITATION))
                {
-                       p_ptr->redraw &= ~(PR_IMITATION);
-                       prt_imitation();
+                       creature_ptr->redraw &= ~(PR_IMITATION);
+                       print_imitation(creature_ptr);
                }
        }
-       else if (p_ptr->redraw & (PR_STUDY))
+       else if (creature_ptr->redraw & (PR_STUDY))
        {
-               p_ptr->redraw &= ~(PR_STUDY);
-               prt_study();
+               creature_ptr->redraw &= ~(PR_STUDY);
+               print_study(creature_ptr);
        }
 }
 
+
 /*! 
- * @brief p_ptr->window のフラグに応じた更新をまとめて行う / Handle "p_ptr->window"
+ * @brief player_ptr->window のフラグに応じた更新をまとめて行う / Handle "player_ptr->window"
+ * @param player_ptr プレーヤーへの参照ポインタ
  * @return なし
  * @details 更新処理の対象はサブウィンドウ全般
  */
-void window_stuff(void)
+void window_stuff(player_type *player_ptr)
 {
        int j;
        BIT_FLAGS mask = 0L;
 
        /* Nothing to do */
-       if (!p_ptr->window) return;
+       if (!player_ptr->window) return;
 
        /* Scan windows */
        for (j = 0; j < 8; j++)
@@ -2278,83 +2301,84 @@ void window_stuff(void)
        }
 
        /* Apply usable flags */
-       p_ptr->window &= mask;
+       player_ptr->window &= mask;
 
        /* Nothing to do */
-       if (!p_ptr->window) return;
+       if (!player_ptr->window) return;
 
-       /* Display p_ptr->inventory_list */
-       if (p_ptr->window & (PW_INVEN))
+       if (player_ptr->window & (PW_INVEN))
        {
-               p_ptr->window &= ~(PW_INVEN);
-               fix_inven();
+               player_ptr->window &= ~(PW_INVEN);
+               fix_inventory(player_ptr);
        }
 
        /* Display equipment */
-       if (p_ptr->window & (PW_EQUIP))
+       if (player_ptr->window & (PW_EQUIP))
        {
-               p_ptr->window &= ~(PW_EQUIP);
-               fix_equip();
+               player_ptr->window &= ~(PW_EQUIP);
+               fix_equip(player_ptr);
        }
 
        /* Display spell list */
-       if (p_ptr->window & (PW_SPELL))
+       if (player_ptr->window & (PW_SPELL))
        {
-               p_ptr->window &= ~(PW_SPELL);
-               fix_spell();
+               player_ptr->window &= ~(PW_SPELL);
+               fix_spell(player_ptr);
        }
 
        /* Display player */
-       if (p_ptr->window & (PW_PLAYER))
+       if (player_ptr->window & (PW_PLAYER))
        {
-               p_ptr->window &= ~(PW_PLAYER);
-               fix_player();
+               player_ptr->window &= ~(PW_PLAYER);
+               fix_player(player_ptr);
        }
        
        /* Display monster list */
-       if (p_ptr->window & (PW_MONSTER_LIST))
+       if (player_ptr->window & (PW_MONSTER_LIST))
        {
-               p_ptr->window &= ~(PW_MONSTER_LIST);
-               fix_monster_list();
+               player_ptr->window &= ~(PW_MONSTER_LIST);
+               fix_monster_list(player_ptr);
        }
        
        /* Display overhead view */
-       if (p_ptr->window & (PW_MESSAGE))
+       if (player_ptr->window & (PW_MESSAGE))
        {
-               p_ptr->window &= ~(PW_MESSAGE);
+               player_ptr->window &= ~(PW_MESSAGE);
                fix_message();
        }
 
        /* Display overhead view */
-       if (p_ptr->window & (PW_OVERHEAD))
+       if (player_ptr->window & (PW_OVERHEAD))
        {
-               p_ptr->window &= ~(PW_OVERHEAD);
-               fix_overhead();
+               player_ptr->window &= ~(PW_OVERHEAD);
+               fix_overhead(player_ptr);
        }
 
        /* Display overhead view */
-       if (p_ptr->window & (PW_DUNGEON))
+       if (player_ptr->window & (PW_DUNGEON))
        {
-               p_ptr->window &= ~(PW_DUNGEON);
-               fix_dungeon();
+               player_ptr->window &= ~(PW_DUNGEON);
+               fix_dungeon(player_ptr);
        }
 
        /* Display monster recall */
-       if (p_ptr->window & (PW_MONSTER))
+       if (player_ptr->window & (PW_MONSTER))
        {
-               p_ptr->window &= ~(PW_MONSTER);
-               fix_monster();
+               player_ptr->window &= ~(PW_MONSTER);
+               fix_monster(player_ptr);
        }
 
        /* Display object recall */
-       if (p_ptr->window & (PW_OBJECT))
+       if (player_ptr->window & (PW_OBJECT))
        {
-               p_ptr->window &= ~(PW_OBJECT);
-               fix_object();
+               player_ptr->window &= ~(PW_OBJECT);
+               fix_object(player_ptr);
        }
 }
 
+
 /*!
+ * todo ここにplayer_type を追加するとz-termに影響が行くので保留
  * @brief コンソールのリサイズに合わせてマップを再描画する /
  * Map resizing whenever the main term changes size
  * @return なし
@@ -2380,7 +2404,7 @@ void resize_map(void)
        p_ptr->update |= (PU_MONSTERS);
        p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
 
-       handle_stuff();
+       handle_stuff(p_ptr);
        Term_redraw();
 
        /*
@@ -2392,7 +2416,9 @@ void resize_map(void)
        Term_fresh();
 }
 
+
 /*!
+ * todo ここにplayer_type を追加するとz-termに影響が行くので保留
  * @brief コンソールを再描画する /
  * Redraw a term when it is resized
  * @return なし
@@ -2405,13 +2431,14 @@ void redraw_window(void)
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
        p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
 
-       handle_stuff();
+       handle_stuff(p_ptr);
        Term_redraw();
 }
 
 
 /*!
  * @brief フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン)
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @param dy 変更先のフロアY座標
  * @param dx 変更先のフロアX座標
  * Handle a request to change the current panel
@@ -2419,7 +2446,7 @@ void redraw_window(void)
  * Also used in do_cmd_locate
  * @return 実際に再描画が必要だった場合TRUEを返す
  */
-bool change_panel(POSITION dy, POSITION dx)
+bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx)
 {
        POSITION y, x;
        TERM_LEN wid, hgt;
@@ -2431,11 +2458,12 @@ bool change_panel(POSITION dy, POSITION dx)
        x = panel_col_min + dx * wid / 2;
 
        /* Verify the row */
-       if (y > p_ptr->current_floor_ptr->height - hgt) y = p_ptr->current_floor_ptr->height - hgt;
+       floor_type *floor_ptr = player_ptr->current_floor_ptr;
+       if (y > floor_ptr->height - hgt) y = floor_ptr->height - hgt;
        if (y < 0) y = 0;
 
        /* Verify the col */
-       if (x > p_ptr->current_floor_ptr->width - wid) x = p_ptr->current_floor_ptr->width - wid;
+       if (x > floor_ptr->width - wid) x = floor_ptr->width - wid;
        if (x < 0) x = 0;
 
        /* Handle "changes" */
@@ -2447,25 +2475,26 @@ bool change_panel(POSITION dy, POSITION dx)
 
                panel_bounds_center();
 
-               p_ptr->update |= (PU_MONSTERS);
-               p_ptr->redraw |= (PR_MAP);
-               handle_stuff();
+               player_ptr->update |= (PU_MONSTERS);
+               player_ptr->redraw |= (PR_MAP);
+               handle_stuff(player_ptr);
 
                /* Success */
-               return (TRUE);
+               return TRUE;
        }
 
        /* No change */
-       return (FALSE);
+       return FALSE;
 }
 
 /*!
  * @brief プレイヤーの装備一覧シンボルを固定位置に表示する
+ * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-void print_equippy(void)
+void print_equippy(player_type *creature_ptr)
 {
-       display_player_equippy(ROW_EQUIPPY, COL_EQUIPPY, 0);
+       display_player_equippy(creature_ptr, ROW_EQUIPPY, COL_EQUIPPY, 0);
 }
 
 /*!
@@ -2500,7 +2529,7 @@ int panel_col_of(int col)
  * of both "lite_spot()" and "print_rel()", and that we use the
  * "lite_spot()" function to display the player grid, if needed.
  */
-void prt_map(void)
+void print_map(player_type *player_ptr)
 {
        POSITION x, y;
        int v;
@@ -2523,10 +2552,11 @@ void prt_map(void)
        (void)Term_set_cursor(0);
 
        /* Get bounds */
+       floor_type *floor_ptr = player_ptr->current_floor_ptr;
        xmin = (0 < panel_col_min) ? panel_col_min : 0;
-       xmax = (p_ptr->current_floor_ptr->width - 1 > panel_col_max) ? panel_col_max : p_ptr->current_floor_ptr->width - 1;
+       xmax = (floor_ptr->width - 1 > panel_col_max) ? panel_col_max : floor_ptr->width - 1;
        ymin = (0 < panel_row_min) ? panel_row_min : 0;
-       ymax = (p_ptr->current_floor_ptr->height - 1 > panel_row_max) ? panel_row_max : p_ptr->current_floor_ptr->height - 1;
+       ymax = (floor_ptr->height - 1 > panel_row_max) ? panel_row_max : floor_ptr->height - 1;
 
        /* Bottom section of screen */
        for (y = 1; y <= ymin - panel_row_prt; y++)
@@ -2561,8 +2591,8 @@ void prt_map(void)
                        if (!use_graphics)
                        {
                                if (current_world_ptr->timewalk_m_idx) a = TERM_DARK;
-                               else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
-                               else if (p_ptr->wraith_form) a = TERM_L_DARK;
+                               else if (IS_INVULN(player_ptr) || player_ptr->timewalk) a = TERM_WHITE;
+                               else if (player_ptr->wraith_form) a = TERM_L_DARK;
                        }
 
                        /* Efficiency -- Redraw that grid of the map */
@@ -2571,7 +2601,7 @@ void prt_map(void)
        }
 
        /* Display player */
-       lite_spot(p_ptr->y, p_ptr->x);
+       lite_spot(player_ptr->y, player_ptr->x);
 
        /* Restore the cursor */
        (void)Term_set_cursor(v);
@@ -2753,6 +2783,7 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
 
 
 /*!
+ * todo main-gnuにも影響があるのでplayer_typeの追加は保留
  * @brief Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location
  * @details
  * Basically, we "paint" the chosen attr/char in several passes, starting\n
@@ -2783,7 +2814,7 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
  * not any.  If there were, they would have to set "shimmer_objects"\n
  * when they were created, and then new "shimmer" code in "dungeon.c"\n
  * would have to be created handle the "shimmer" effect, and the code\n
- * in "p_ptr->current_floor_ptr->grid_array.c" would have to be updated to create the shimmer effect.\n
+ * in floor would have to be updated to create the shimmer effect.\n
  *\n
  * Note the effects of hallucination.  Objects always appear as random\n
  * "objects", monsters as random "monsters", and normal grids occasionally\n
@@ -2872,7 +2903,6 @@ void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_cha
  */
 void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
 {
-       /* Get the p_ptr->current_floor_ptr->grid_array */
        grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
 
        OBJECT_IDX this_o_idx, next_o_idx = 0;
@@ -3074,7 +3104,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLO
                                        }
 
                                        /* Not glowing correctly */
-                                       else if (!have_flag(f_ptr->flags, FF_LOS) && !check_local_illumination(y, x))
+                                       else if (!have_flag(f_ptr->flags, FF_LOS) && !check_local_illumination(p_ptr, y, x))
                                        {
                                                /* Use a darkened colour/tile */
                                                a = f_ptr->x_attr[F_LIT_DARK];
@@ -3132,7 +3162,7 @@ void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLO
                        {
                                byte act;
 
-                               match_autopick = is_autopick(o_ptr);
+                               match_autopick = is_autopick(p_ptr, o_ptr);
                                if (match_autopick == -1)
                                        continue;
 
@@ -3317,7 +3347,7 @@ static concptr simplify_list[][2] =
 };
 
 
-static void display_shortened_item_name(object_type *o_ptr, int y)
+static void display_shortened_item_name(player_type *player_ptr, object_type *o_ptr, int y)
 {
        char buf[MAX_NLEN];
        char *c = buf;
@@ -3327,7 +3357,7 @@ static void display_shortened_item_name(object_type *o_ptr, int y)
        object_desc(buf, o_ptr, (OD_NO_FLAVOR | OD_OMIT_PREFIX | OD_NAME_ONLY));
        attr = tval_to_attr[o_ptr->tval % 128];
 
-       if (p_ptr->image)
+       if (player_ptr->image)
        {
                attr = TERM_WHITE;
                strcpy(buf, _("何か奇妙な物", "something strange"));
@@ -3386,10 +3416,11 @@ static void display_shortened_item_name(object_type *o_ptr, int y)
        Term_putstr(0, y, 12, attr, buf);
 }
 
+
 /*
  * Display a "small-scale" map of the dungeon in the active Term
  */
-void display_map(floor_type *floor_ptr, int *cy, int *cx)
+void display_map(player_type *player_ptr, int *cy, int *cx)
 {
        int i, j, x, y;
 
@@ -3420,6 +3451,7 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
        wid -= 14;
        if (use_bigtile) wid /= 2;
 
+       floor_type *floor_ptr = player_ptr->current_floor_ptr;
        yrat = (floor_ptr->height + hgt - 1) / hgt;
        xrat = (floor_ptr->width + wid - 1) / wid;
 
@@ -3585,8 +3617,8 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
                        if (!use_graphics)
                        {
                                if (current_world_ptr->timewalk_m_idx) ta = TERM_DARK;
-                               else if (IS_INVULN() || p_ptr->timewalk) ta = TERM_WHITE;
-                               else if (p_ptr->wraith_form) ta = TERM_L_DARK;
+                               else if (IS_INVULN(player_ptr) || player_ptr->timewalk) ta = TERM_WHITE;
+                               else if (player_ptr->wraith_form) ta = TERM_L_DARK;
                        }
 
                        /* Add the character */
@@ -3594,7 +3626,6 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
                }
        }
 
-
        for (y = 1; y < hgt + 1; ++y)
        {
                match_autopick = -1;
@@ -3612,7 +3643,7 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
 
                if (match_autopick != -1)
 #if 1
-                       display_shortened_item_name(autopick_obj, y);
+                       display_shortened_item_name(player_ptr, autopick_obj, y);
 #else
                {
                        char buf[13] = "\0";
@@ -3625,11 +3656,11 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
        }
 
        /* Player location */
-       (*cy) = p_ptr->y / yrat + 1 + ROW_MAP;
+       (*cy) = player_ptr->y / yrat + 1 + ROW_MAP;
        if (!use_bigtile)
-               (*cx) = p_ptr->x / xrat + 1 + COL_MAP;
+               (*cx) = player_ptr->x / xrat + 1 + COL_MAP;
        else
-               (*cx) = (p_ptr->x / xrat + 1) * 2 + COL_MAP;
+               (*cx) = (player_ptr->x / xrat + 1) * 2 + COL_MAP;
 
        /* Restore lighting effects */
        view_special_lite = old_view_special_lite;
@@ -3674,7 +3705,7 @@ void display_map(floor_type *floor_ptr, int *cy, int *cx)
  *
  * Currently, the "player" is displayed on the map.
  */
-void do_cmd_view_map(void)
+void do_cmd_view_map(player_type *player_ptr)
 {
        int cy, cx;
 
@@ -3688,14 +3719,14 @@ void do_cmd_view_map(void)
        display_autopick = 0;
 
        /* Display the map */
-       display_map(p_ptr->current_floor_ptr, &cy, &cx);
+       display_map(player_ptr, &cy, &cx);
 
        /* Wait for it */
-       if (max_autopick && !p_ptr->wild_mode)
+       if (max_autopick && !player_ptr->wild_mode)
        {
                display_autopick = ITEM_DISPLAY;
 
-               while (1)
+               while (TRUE)
                {
                        int i;
                        byte flag;
@@ -3731,7 +3762,7 @@ void do_cmd_view_map(void)
                        else
                                display_autopick &= ~flag;
                        /* Display the map */
-                       display_map(p_ptr->current_floor_ptr, &cy, &cx);
+                       display_map(player_ptr, &cy, &cx);
                }
 
                display_autopick = 0;
@@ -3745,22 +3776,27 @@ void do_cmd_view_map(void)
                /* Get any key */
                inkey();
        }
+
        screen_load();
 }
 
+
 /*
  * Track a new monster
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @param m_idx トラッキング対象のモンスターID。0の時キャンセル
+ * @param なし
  */
-void health_track(MONSTER_IDX m_idx)
+void health_track(player_type *player_ptr, MONSTER_IDX m_idx)
 {
        /* Mount monster is already tracked */
-       if (m_idx && m_idx == p_ptr->riding) return;
+       if (m_idx && m_idx == player_ptr->riding) return;
 
        /* Track a new guy */
-       p_ptr->health_who = m_idx;
+       player_ptr->health_who = m_idx;
 
        /* Redraw (later) */
-       p_ptr->redraw |= (PR_HEALTH);
+       player_ptr->redraw |= (PR_HEALTH);
 }
 
 
@@ -3780,7 +3816,7 @@ void move_cursor_relative(int row, int col)
 /*
  * print project path
  */
-void prt_path(POSITION y, POSITION x)
+void print_path(player_type *player_ptr, POSITION y, POSITION x)
 {
        int i;
        int path_n;
@@ -3792,17 +3828,18 @@ void prt_path(POSITION y, POSITION x)
                return;
 
        /* Get projection path */
-       path_n = project_path(path_g, (project_length ? project_length : MAX_RANGE), p_ptr->y, p_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
+       floor_type *floor_ptr = player_ptr->current_floor_ptr;
+       path_n = project_path(floor_ptr, path_g, (project_length ? project_length : MAX_RANGE), player_ptr->y, player_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
 
-       p_ptr->redraw |= (PR_MAP);
-       handle_stuff();
+       player_ptr->redraw |= (PR_MAP);
+       handle_stuff(player_ptr);
 
        /* Draw path */
        for (i = 0; i < path_n; i++)
        {
                POSITION ny = GRID_Y(path_g[i]);
                POSITION nx = GRID_X(path_g[i]);
-               grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[ny][nx];
+               grid_type *g_ptr = &floor_ptr->grid_array[ny][nx];
 
                if (panel_contains(ny, nx))
                {
@@ -3812,7 +3849,7 @@ void prt_path(POSITION y, POSITION x)
                        TERM_COLOR ta = default_color;
                        char tc = '*';
 
-                       if (g_ptr->m_idx && p_ptr->current_floor_ptr->m_list[g_ptr->m_idx].ml)
+                       if (g_ptr->m_idx && floor_ptr->m_list[g_ptr->m_idx].ml)
                        {
                                /* Determine what is there */
                                map_info(ny, nx, &a, &c, &ta, &tc);
@@ -3828,8 +3865,8 @@ void prt_path(POSITION y, POSITION x)
                        if (!use_graphics)
                        {
                                if (current_world_ptr->timewalk_m_idx) a = TERM_DARK;
-                               else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
-                               else if (p_ptr->wraith_form) a = TERM_L_DARK;
+                               else if (IS_INVULN(player_ptr) || player_ptr->timewalk) a = TERM_WHITE;
+                               else if (player_ptr->wraith_form) a = TERM_L_DARK;
                        }
 
                        c = '*';
@@ -3884,3 +3921,39 @@ void update_playtime(void)
        }
 }
 
+/*
+ * Mega-Hack -- Delayed visual update
+ * Only used if update_view(), update_lite() or update_mon_lite() was called
+ */
+void delayed_visual_update(floor_type *floor_ptr)
+{
+       int i;
+       POSITION y, x;
+       grid_type *g_ptr;
+
+       /* Update needed grids */
+       for (i = 0; i < floor_ptr->redraw_n; i++)
+       {
+               y = floor_ptr->redraw_y[i];
+               x = floor_ptr->redraw_x[i];
+               g_ptr = &floor_ptr->grid_array[y][x];
+
+               /* Update only needed grids (prevent multiple updating) */
+               if (!(g_ptr->info & CAVE_REDRAW)) continue;
+
+               /* If required, note */
+               if (g_ptr->info & CAVE_NOTE) note_spot(y, x);
+
+               lite_spot(y, x);
+
+               /* Hack -- Visual update of monster on this grid */
+               if (g_ptr->m_idx) update_monster(p_ptr, g_ptr->m_idx, FALSE);
+
+               /* No longer in the array */
+               g_ptr->info &= ~(CAVE_NOTE | CAVE_REDRAW);
+       }
+
+       /* None left */
+       floor_ptr->redraw_n = 0;
+}
+