+/*!
+ * @brief アイテムの所持種類数が超えた場合にアイテムを床に落とす処理 / Hack -- Pack Overflow
+ * @return なし
+ */
+static void pack_overflow(void)
+{
+ if (inventory[INVEN_PACK].k_idx)
+ {
+ char o_name[MAX_NLEN];
+ object_type *o_ptr;
+
+ /* Is auto-destroy done? */
+ notice_stuff();
+ if (!inventory[INVEN_PACK].k_idx) return;
+
+ /* Access the slot to be dropped */
+ o_ptr = &inventory[INVEN_PACK];
+
+ /* Disturbing */
+ disturb(0, 1);
+
+ /* Warning */
+ msg_print(_("ザックからアイテムがあふれた!", "Your pack overflows!"));
+
+ /* Describe */
+ object_desc(o_name, o_ptr, 0);
+
+ /* Message */
+ msg_format(_("%s(%c)を落とした。", "You drop %s (%c)."), o_name, index_to_label(INVEN_PACK));
+
+ /* Drop it (carefully) near the player */
+ (void)drop_near(o_ptr, 0, p_ptr->y, p_ptr->x);
+
+ /* Modify, Describe, Optimize */
+ inven_item_increase(INVEN_PACK, -255);
+ inven_item_describe(INVEN_PACK);
+ inven_item_optimize(INVEN_PACK);
+
+ /* Handle "p_ptr->notice" */
+ notice_stuff();
+
+ /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */
+ handle_stuff();
+ }
+}
+
+/*!
+ * @brief プレイヤーの行動エネルギーが充填される(=プレイヤーのターンが回る)毎に行われる処理 / process the effects per 100 energy at player speed.
+ * @return なし
+ */
+static void process_upkeep_with_speed(void)
+{
+ /* Give the player some energy */
+ if (!load && p_ptr->enchant_energy_need > 0 && !p_ptr->leaving)
+ {
+ p_ptr->enchant_energy_need -= SPEED_TO_ENERGY(p_ptr->pspeed);
+ }
+
+ /* No turn yet */
+ if (p_ptr->enchant_energy_need > 0) return;
+
+ while (p_ptr->enchant_energy_need <= 0)
+ {
+ /* Handle the player song */
+ if (!load) check_music();
+
+ /* Hex - Handle the hex spells */
+ if (!load) check_hex();
+ if (!load) revenge_spell();
+
+ /* There is some randomness of needed energy */
+ p_ptr->enchant_energy_need += ENERGY_NEED();
+ }
+}
+
+/*!
+ * @brief プレイヤーの行動処理 / Process the player
+ * @return なし
+ * @note
+ * Notice the annoying code to handle "pack overflow", which\n
+ * must come first just in case somebody manages to corrupt\n
+ * the savefiles by clever use of menu commands or something.\n