OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git]
/
src
/
xtra1.c
diff --git
a/src/xtra1.c
b/src/xtra1.c
index
7c70cc5
..
5797b2d
100644
(file)
--- a/
src/xtra1.c
+++ b/
src/xtra1.c
@@
-1539,8
+1539,8
@@
static void health_redraw(bool riding)
else
{
/* Extract the "percent" of health */
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;
/* Convert percent into "health" */
int len = (pct2 < 10) ? 1 : (pct2 < 90) ? (pct2 / 10 + 1) : 10;
@@
-1940,8
+1940,6
@@
static void fix_player(void)
Term_activate(angband_term[j]);
update_playtime();
Term_activate(angband_term[j]);
update_playtime();
-
- /* Display player */
display_player(0);
Term_fresh();
display_player(0);
Term_fresh();
@@
-5748,7
+5746,7
@@
void calc_bonuses(void)
* @return なし
* @details 更新処理の対象はアイテムの自動破壊/アイテムの結合/アイテムの並び替え。
*/
* @return なし
* @details 更新処理の対象はアイテムの自動破壊/アイテムの結合/アイテムの並び替え。
*/
-void notice_stuff(void)
+
static
void notice_stuff(void)
{
if(!p_ptr->notice) return;
{
if(!p_ptr->notice) return;
@@
-5780,7
+5778,7
@@
void notice_stuff(void)
* @return なし
* @details 更新処理の対象はプレイヤーの能力修正/光源寿命/HP/MP/魔法の学習状態、他多数の外界の状態判定。
*/
* @return なし
* @details 更新処理の対象はプレイヤーの能力修正/光源寿命/HP/MP/魔法の学習状態、他多数の外界の状態判定。
*/
-void update_stuff(void)
+
static
void update_stuff(void)
{
if (!p_ptr->update) return;
{
if (!p_ptr->update) return;
@@
-5890,7
+5888,7
@@
void update_stuff(void)
* @return なし
* @details 更新処理の対象はゲーム中の全描画処理
*/
* @return なし
* @details 更新処理の対象はゲーム中の全描画処理
*/
-void redraw_stuff(void)
+
static
void redraw_stuff(void)
{
if (!p_ptr->redraw) return;
{
if (!p_ptr->redraw) return;
@@
-6075,7
+6073,7
@@
void redraw_stuff(void)
* @return なし
* @details 更新処理の対象はサブウィンドウ全般
*/
* @return なし
* @details 更新処理の対象はサブウィンドウ全般
*/
-void window_stuff(void)
+
static
void window_stuff(void)
{
int j;
BIT_FLAGS mask = 0L;
{
int j;
BIT_FLAGS mask = 0L;
@@
-6175,6
+6173,7
@@
void window_stuff(void)
*/
void handle_stuff(void)
{
*/
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();
if (p_ptr->update) update_stuff();
if (p_ptr->redraw) redraw_stuff();
if (p_ptr->window) window_stuff();