From 4a4f78a0fef498ee1f198821e3013ec3db579413 Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 12 Dec 2017 01:20:25 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92=E7=B6=99=E7=B6=9A=E4=B8=AD?= =?utf8?q?=E3=80=82=20/=20Ongoing=20type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main-win.c | 34 +++++++++++++++++----------------- src/racial.c | 4 ++-- src/spells3.c | 2 +- src/types.h | 2 +- src/util.c | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main-win.c b/src/main-win.c index 689d7b317..129a4ba43 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -374,8 +374,8 @@ struct _term_data uint keys; - uint rows; /* int -> uint */ - uint cols; + TERM_POSITION rows; /* int -> uint */ + TERM_POSITION cols; uint pos_x; uint pos_y; @@ -400,11 +400,11 @@ struct _term_data HFONT font_id; - uint font_wid; - uint font_hgt; + int font_wid; + int font_hgt; - uint tile_wid; - uint tile_hgt; + int tile_wid; + int tile_hgt; uint map_tile_wid; uint map_tile_hgt; @@ -605,8 +605,8 @@ static bool Term_no_press = FALSE; */ static bool mouse_down = FALSE; static bool paint_rect = FALSE; -static int mousex = 0, mousey = 0; -static int oldx, oldy; +static TERM_POSITION mousex = 0, mousey = 0; +static TERM_POSITION oldx, oldy; /* @@ -2314,7 +2314,7 @@ static errr Term_xtra_win_react(void) term_data *td = &data[i]; /* Update resized windows */ - if ((td->cols != (uint)td->t.wid) || (td->rows != (uint)td->t.hgt)) + if ((td->cols != td->t.wid) || (td->rows != td->t.hgt)) { /* Activate */ Term_activate(&td->t); @@ -4739,10 +4739,10 @@ LRESULT FAR PASCAL AngbandWndProc(HWND hWnd, UINT uMsg, HGLOBAL hGlobal; LPSTR lpStr; int j, sz; - int dx = abs(oldx - mousex) + 1; - int dy = abs(oldy - mousey) + 1; - int ox = (oldx > mousex) ? mousex : oldx; - int oy = (oldy > mousey) ? mousey : oldy; + TERM_POSITION dx = abs(oldx - mousex) + 1; + TERM_POSITION dy = abs(oldy - mousey) + 1; + TERM_POSITION ox = (oldx > mousex) ? mousex : oldx; + TERM_POSITION oy = (oldy > mousey) ? mousey : oldy; mouse_down = FALSE; paint_rect = FALSE; @@ -4947,8 +4947,8 @@ LRESULT FAR PASCAL AngbandWndProc(HWND hWnd, UINT uMsg, case SIZE_RESTORED: { - uint cols = (LOWORD(lParam) - td->size_ow1) / td->tile_wid; - uint rows = (HIWORD(lParam) - td->size_oh1) / td->tile_hgt; + TERM_POSITION cols = (LOWORD(lParam) - td->size_ow1) / td->tile_wid; + TERM_POSITION rows = (HIWORD(lParam) - td->size_oh1) / td->tile_hgt; /* New size */ if ((td->cols != cols) || (td->rows != rows)) @@ -5125,8 +5125,8 @@ LRESULT FAR PASCAL AngbandListProc(HWND hWnd, UINT uMsg, case WM_SIZE: { - uint cols; - uint rows; + TERM_POSITION cols; + TERM_POSITION rows; /* this message was sent before WM_NCCREATE */ if (!td) return 1; diff --git a/src/racial.c b/src/racial.c index 5173afaea..2a67f8546 100644 --- a/src/racial.c +++ b/src/racial.c @@ -318,7 +318,7 @@ bool gain_magic(void) if (o_ptr->tval == TV_ROD) { - p_ptr->magic_num2[o_ptr->sval + ext] += o_ptr->number; + p_ptr->magic_num2[o_ptr->sval + ext] += (MAGIC_NUM2)o_ptr->number; if (p_ptr->magic_num2[o_ptr->sval + ext] > 99) p_ptr->magic_num2[o_ptr->sval + ext] = 99; } else @@ -334,7 +334,7 @@ bool gain_magic(void) gain_num = (gain_num/3 + randint0(gain_num/3)) / 256; if (gain_num < 1) gain_num = 1; } - p_ptr->magic_num2[o_ptr->sval + ext] += gain_num; + p_ptr->magic_num2[o_ptr->sval + ext] += (MAGIC_NUM2)gain_num; if (p_ptr->magic_num2[o_ptr->sval + ext] > 99) p_ptr->magic_num2[o_ptr->sval + ext] = 99; p_ptr->magic_num1[o_ptr->sval + ext] += pval * 0x10000; if (p_ptr->magic_num1[o_ptr->sval + ext] > 99 * 0x10000) p_ptr->magic_num1[o_ptr->sval + ext] = 99 * 0x10000; diff --git a/src/spells3.c b/src/spells3.c index bd819d6c8..9c7ffe366 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -3026,7 +3026,7 @@ bool recharge(int power) */ if ((o_ptr->tval == TV_STAFF) && (o_ptr->number > 1)) { - recharge_amount /= o_ptr->number; + recharge_amount /= (TIME_EFFECT)o_ptr->number; if (recharge_amount < 1) recharge_amount = 1; } diff --git a/src/types.h b/src/types.h index 74a2324e2..54b18de33 100644 --- a/src/types.h +++ b/src/types.h @@ -1115,7 +1115,7 @@ struct player_type SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */ MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */ - MAGIC_NUM2 magic_num2[108]; /*!< Flags for non-spellbook type magics */ + MAGIC_NUM2 magic_num2[108]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */ SPELL_IDX mane_spell[MAX_MANE]; HIT_POINT mane_dam[MAX_MANE]; diff --git a/src/util.c b/src/util.c index fb7cc6c48..f11e077b2 100644 --- a/src/util.c +++ b/src/util.c @@ -4405,7 +4405,7 @@ void request_command(int shopping) int i; char cmd; - BIT_FLAGS mode; + int mode; cptr act; -- 2.11.0