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
/
cmd1.c
diff --git
a/src/cmd1.c
b/src/cmd1.c
index
92d1334
..
65c9f1d
100644
(file)
--- a/
src/cmd1.c
+++ b/
src/cmd1.c
@@
-279,7
+279,7
@@
static MULTIPLY mult_brand(MULTIPLY mult, const BIT_FLAGS* flgs, const monster_t
* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
-
s16b tot_dam_aux(object_type *o_ptr, int
tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
+
HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT
tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
{
MULTIPLY mult = 10;
{
MULTIPLY mult = 10;
@@
-368,7
+368,6
@@
static void discover_hidden_things(POSITION y, POSITION x)
/* Pick a trap */
disclose_grid(y, x);
/* Pick a trap */
disclose_grid(y, x);
- /* Message */
msg_print(_("トラップを発見した。", "You have found a trap."));
/* Disturb */
msg_print(_("トラップを発見した。", "You have found a trap."));
/* Disturb */
@@
-378,7
+377,6
@@
static void discover_hidden_things(POSITION y, POSITION x)
/* Secret door */
if (is_hidden_door(c_ptr))
{
/* Secret door */
if (is_hidden_door(c_ptr))
{
- /* Message */
msg_print(_("隠しドアを発見した。", "You have found a secret door."));
/* Disclose */
msg_print(_("隠しドアを発見した。", "You have found a secret door."));
/* Disclose */
@@
-408,7
+406,6
@@
static void discover_hidden_things(POSITION y, POSITION x)
/* Identify once */
if (!object_is_known(o_ptr))
{
/* Identify once */
if (!object_is_known(o_ptr))
{
- /* Message */
msg_print(_("箱に仕掛けられたトラップを発見した!", "You have discovered a trap on the chest!"));
/* Know the trap */
msg_print(_("箱に仕掛けられたトラップを発見した!", "You have discovered a trap on the chest!"));
/* Know the trap */
@@
-508,7
+505,6
@@
void py_pickup_aux(OBJECT_IDX o_idx)
/* Describe the object */
object_desc(o_name, o_ptr, 0);
/* Describe the object */
object_desc(o_name, o_ptr, 0);
- /* Message */
#ifdef JP
if ((o_ptr->name1 == ART_CRIMSON) && (p_ptr->pseikaku == SEIKAKU_COMBAT))
{
#ifdef JP
if ((o_ptr->name1 == ART_CRIMSON) && (p_ptr->pseikaku == SEIKAKU_COMBAT))
{
@@
-557,20
+553,18
@@
void carry(bool pickup)
{
cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
{
cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
-
s16b
this_o_idx, next_o_idx = 0;
+
OBJECT_IDX
this_o_idx, next_o_idx = 0;
char o_name[MAX_NLEN];
/* Recenter the map around the player */
verify_panel();
char o_name[MAX_NLEN];
/* Recenter the map around the player */
verify_panel();
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
p_ptr->update |= (PU_MONSTERS);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
/* Handle stuff */
p_ptr->window |= (PW_OVERHEAD);
/* Handle stuff */
@@
-626,7
+620,6
@@
void carry(bool pickup)
/* Delete the gold */
delete_object_idx(this_o_idx);
/* Delete the gold */
delete_object_idx(this_o_idx);
- /* Message */
msg_format(_(" $%ld の価値がある%sを見つけた。", "You collect %ld gold pieces worth of %s."),
(long)value, o_name);
msg_format(_(" $%ld の価値がある%sを見つけた。", "You collect %ld gold pieces worth of %s."),
(long)value, o_name);
@@
-638,7
+631,6
@@
void carry(bool pickup)
/* Redraw gold */
p_ptr->redraw |= (PR_GOLD);
/* Redraw gold */
p_ptr->redraw |= (PR_GOLD);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
}
p_ptr->window |= (PW_PLAYER);
}
@@
-696,7
+688,7
@@
void carry(bool pickup)
* @param n_x プレイヤーの移動先X座標
* @return 移動処理が可能である場合(可能な場合に選択した場合)TRUEを返す。
*/
* @param n_x プレイヤーの移動先X座標
* @return 移動処理が可能である場合(可能な場合に選択した場合)TRUEを返す。
*/
-bool pattern_seq(
int c_y, int c_x, int n_y, int
n_x)
+bool pattern_seq(
POSITION c_y, POSITION c_x, POSITION n_y, POSITION
n_x)
{
feature_type *cur_f_ptr = &f_info[cave[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[cave[n_y][n_x].feat];
{
feature_type *cur_f_ptr = &f_info[cave[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[cave[n_y][n_x].feat];
@@
-853,7
+845,7
@@
bool player_can_enter(s16b feature, u16b mode)
* @param mpe_mode 移動オプションフラグ
* @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
*/
* @param mpe_mode 移動オプションフラグ
* @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
*/
-bool move_player_effect(POSITION ny, POSITION nx,
u32b
mpe_mode)
+bool move_player_effect(POSITION ny, POSITION nx,
BIT_FLAGS
mpe_mode)
{
cave_type *c_ptr = &cave[ny][nx];
feature_type *f_ptr = &f_info[c_ptr->feat];
{
cave_type *c_ptr = &cave[ny][nx];
feature_type *f_ptr = &f_info[c_ptr->feat];
@@
-914,10
+906,8
@@
bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
p_ptr->redraw |= (PR_MAP);
}
p_ptr->redraw |= (PR_MAP);
}
- /* Update stuff */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_DISTANCE);
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_DISTANCE);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
/* Remove "unsafe" flag */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
/* Remove "unsafe" flag */
@@
-1032,7
+1022,6
@@
bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
/* Hidden trap */
if (c_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
{
/* Hidden trap */
if (c_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
{
- /* Message */
msg_print(_("トラップだ!", "You found a trap!"));
/* Pick a trap */
msg_print(_("トラップだ!", "You found a trap!"));
/* Pick a trap */
@@
-1423,7
+1412,7
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
else if (!p_can_enter && !p_can_kill_walls)
{
/* Feature code (applying "mimic" field) */
else if (!p_can_enter && !p_can_kill_walls)
{
/* Feature code (applying "mimic" field) */
-
s16b
feat = get_feat_mimic(c_ptr);
+
FEAT_IDX
feat = get_feat_mimic(c_ptr);
feature_type *mimic_f_ptr = &f_info[feat];
cptr name = f_name + mimic_f_ptr->name;
feature_type *mimic_f_ptr = &f_info[feat];
cptr name = f_name + mimic_f_ptr->name;
@@
-1492,7
+1481,6
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
/* Disturb the player */
disturb(0, 1);
/* Disturb the player */
disturb(0, 1);
- /* Sound */
if (!boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL);
}
if (!boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL);
}
@@
-1548,7
+1536,6
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
p_ptr->update |= (PU_FLOW);
}
p_ptr->update |= (PU_FLOW);
}
- /* Sound */
/* sound(SOUND_WALK); */
#ifdef ALLOW_EASY_DISARM /* TNB */
/* sound(SOUND_WALK); */
#ifdef ALLOW_EASY_DISARM /* TNB */
@@
-1579,9
+1566,9
@@
static bool ignore_avoid_run;
* @param x 移動元のX座標
* @return 移動先が既知の壁ならばTRUE
*/
* @param x 移動元のX座標
* @return 移動先が既知の壁ならばTRUE
*/
-static
int see_wall(int dir, int y, int
x)
+static
bool see_wall(DIRECTION dir, POSITION y, POSITION
x)
{
{
- cave_type
*c_ptr;
+ cave_type *c_ptr;
/* Get the new location */
y += ddy[dir];
/* Get the new location */
y += ddy[dir];
@@
-1624,7
+1611,7
@@
static int see_wall(int dir, int y, int x)
* @param x 移動元のX座標
* @return 移動先が未知の地形ならばTRUE
*/
* @param x 移動元のX座標
* @return 移動先が未知の地形ならばTRUE
*/
-static
int see_nothing(int dir, int y, int
x)
+static
bool see_nothing(DIRECTION dir, POSITION y, POSITION
x)
{
/* Get the new location */
y += ddy[dir];
{
/* Get the new location */
y += ddy[dir];
@@
-1699,7
+1686,7
@@
static bool find_breakleft;
* \#x\# \@x\#\n
* \@\@p. p\n
*/
* \#x\# \@x\#\n
* \@\@p. p\n
*/
-static void run_init(
int
dir)
+static void run_init(
DIRECTION
dir)
{
int row, col, deepleft, deepright;
int i, shortleft, shortright;
{
int row, col, deepleft, deepright;
int i, shortleft, shortright;
@@
-1806,7
+1793,7
@@
static bool run_test(void)
int i, max, inv;
int option = 0, option2 = 0;
cave_type *c_ptr;
int i, max, inv;
int option = 0, option2 = 0;
cave_type *c_ptr;
-
s16b
feat;
+
FEAT_IDX
feat;
feature_type *f_ptr;
/* Where we came from */
feature_type *f_ptr;
/* Where we came from */
@@
-1842,7
+1829,7
@@
static bool run_test(void)
/* Look at every newly adjacent square. */
for (i = -max; i <= max; i++)
{
/* Look at every newly adjacent square. */
for (i = -max; i <= max; i++)
{
-
s16b
this_o_idx, next_o_idx = 0;
+
OBJECT_IDX
this_o_idx, next_o_idx = 0;
/* New direction */
new_dir = cycle[chome[prev_dir] + i];
/* New direction */
new_dir = cycle[chome[prev_dir] + i];
@@
-2136,7
+2123,7
@@
static bool run_test(void)
* @param dir 移動を試みる方向ID
* @return なし
*/
* @param dir 移動を試みる方向ID
* @return なし
*/
-void run_step(
int
dir)
+void run_step(
DIRECTION
dir)
{
/* Start running */
if (dir)
{
/* Start running */
if (dir)
@@
-2149,13
+2136,11
@@
void run_step(int dir)
{
sound(SOUND_HITWALL);
{
sound(SOUND_HITWALL);
- /* Message */
msg_print(_("その方向には走れません。", "You cannot run in that direction."));
/* Disturb */
disturb(0, 0);
msg_print(_("その方向には走れません。", "You cannot run in that direction."));
/* Disturb */
disturb(0, 0);
- /* Done */
return;
}
return;
}
@@
-2172,7
+2157,6
@@
void run_step(int dir)
/* Disturb */
disturb(0, 0);
/* Disturb */
disturb(0, 0);
- /* Done */
return;
}
}
return;
}
}
@@
-2209,9
+2193,9
@@
void run_step(int dir)
* @brief トラベル機能の判定処理 /
* Test for traveling
* @param prev_dir 前回移動を行った元の方角ID
* @brief トラベル機能の判定処理 /
* Test for traveling
* @param prev_dir 前回移動を行った元の方角ID
- * @return
なし
+ * @return
次の方向
*/
*/
-static
int travel_test(int
prev_dir)
+static
DIRECTION travel_test(DIRECTION
prev_dir)
{
int new_dir = 0;
int i, max;
{
int new_dir = 0;
int i, max;
@@
-2255,7
+2239,7
@@
static int travel_test(int prev_dir)
for (i = -max; i <= max; i++)
{
/* New direction */
for (i = -max; i <= max; i++)
{
/* New direction */
-
int
dir = cycle[chome[prev_dir] + i];
+
DIRECTION
dir = cycle[chome[prev_dir] + i];
/* New location */
int row = p_ptr->y + ddy[dir];
/* New location */
int row = p_ptr->y + ddy[dir];