else
{
/* Extract the "percent" of health */
- int pct = 100L * m_ptr->hp / m_ptr->maxhp;
- int pct2 = 100L * m_ptr->hp / m_ptr->max_maxhp;
+ int pct = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->maxhp : 0;
+ int pct2 = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->max_maxhp: 0;
/* Convert percent into "health" */
int len = (pct2 < 10) ? 1 : (pct2 < 90) ? (pct2 / 10 + 1) : 10;
Term_activate(angband_term[j]);
update_playtime();
-
- /* Display player */
display_player(0);
Term_fresh();
* @return なし
* @details 更新処理の対象はアイテムの自動破壊/アイテムの結合/アイテムの並び替え。
*/
-void notice_stuff(void)
+static void notice_stuff(void)
{
if(!p_ptr->notice) return;
* @return なし
* @details 更新処理の対象はプレイヤーの能力修正/光源寿命/HP/MP/魔法の学習状態、他多数の外界の状態判定。
*/
-void update_stuff(void)
+static void update_stuff(void)
{
if (!p_ptr->update) return;
* @return なし
* @details 更新処理の対象はゲーム中の全描画処理
*/
-void redraw_stuff(void)
+static void redraw_stuff(void)
{
if (!p_ptr->redraw) return;
* @return なし
* @details 更新処理の対象はサブウィンドウ全般
*/
-void window_stuff(void)
+static void window_stuff(void)
{
int j;
BIT_FLAGS mask = 0L;
*/
void handle_stuff(void)
{
+ if (p_ptr->notice) notice_stuff();
if (p_ptr->update) update_stuff();
if (p_ptr->redraw) redraw_stuff();
if (p_ptr->window) window_stuff();