• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionac11db5d244b62930283a06a9c6e81a188233c1c (tree)
Time2018-12-04 07:59:21
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -1539,7 +1539,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
15391539 {
15401540 POSITION y, x;
15411541 POSITION tmp_row, tmp_col;
1542- DIRECTION row_dir, col_dir;
1542+ POSITION row_dir, col_dir;
15431543 POSITION start_row, start_col;
15441544 int main_loop_count = 0;
15451545
--- a/src/grid.c
+++ b/src/grid.c
@@ -572,24 +572,19 @@ void vault_objects(POSITION y, POSITION x, int num)
572572 break;
573573 }
574574
575-
576575 if (dummy >= SAFE_MAX_ATTEMPTS && cheat_room)
577576 {
578577 msg_print(_("警告!地下室のアイテムを配置できません!", "Warning! Could not place vault object!"));
579578 }
580579
581-
582580 /* Require "clean" floor space */
583581 c_ptr = &cave[j][k];
584582 if (!is_floor_grid(c_ptr) || c_ptr->o_idx) continue;
585583
586- /* Place an item */
587584 if (randint0(100) < 75)
588585 {
589586 place_object(j, k, 0L);
590587 }
591-
592- /* Place gold */
593588 else
594589 {
595590 place_gold(j, k);
@@ -717,7 +712,7 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
717712 * @param x2 終点X座標
718713 * @return なし
719714 */
720-void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
715+void correct_dir(POSITION *rdir, POSITION *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
721716 {
722717 /* Extract vertical and horizontal directions */
723718 *rdir = (y1 == y2) ? 0 : (y1 < y2) ? 1 : -1;
@@ -739,7 +734,7 @@ void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, PO
739734 * @param cdir X方向に取るべきベクトル値を返す参照ポインタ
740735 * @return なし
741736 */
742-void rand_dir(int *rdir, int *cdir)
737+void rand_dir(POSITION *rdir, POSITION *cdir)
743738 {
744739 /* Pick a random direction */
745740 int i = randint0(4);
--- a/src/grid.h
+++ b/src/grid.h
@@ -279,9 +279,9 @@ extern void vault_objects(POSITION y, POSITION x, int num);
279279 extern void vault_trap_aux(POSITION y, POSITION x, POSITION yd, POSITION xd);
280280 extern void vault_traps(POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
281281
282-extern void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
282+extern void correct_dir(POSITION *rdir, POSITION *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
283283
284-extern void rand_dir(int *rdir, int *cdir);
284+extern void rand_dir(POSITION *rdir, POSITION *cdir);
285285
286286 extern bool get_is_floor(POSITION x, POSITION y);
287287 extern void set_floor(POSITION x, POSITION y);
--- a/src/object1.c
+++ b/src/object1.c
@@ -2566,9 +2566,7 @@ static bool verify(cptr prompt, INVENTORY_IDX item)
25662566 static bool get_item_allow(INVENTORY_IDX item)
25672567 {
25682568 cptr s;
2569-
25702569 object_type *o_ptr;
2571-
25722570 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
25732571
25742572 /* Inventory */
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -3166,11 +3166,9 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
31663166 {
31673167 /* Display rough information about items */
31683168 #ifdef JP
3169- sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]",
3170- s1, (int)floor_num, s2, s3, info);
3169+ sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]", s1, (int)floor_num, s2, s3, info);
31713170 #else
3172- sprintf(out_val, "%s%s%sa pile of %d items [x,%s]",
3173- s1, s2, s3, (int)floor_num, info);
3171+ sprintf(out_val, "%s%s%sa pile of %d items [x,%s]", s1, s2, s3, (int)floor_num, info);
31743172 #endif
31753173
31763174 prt(out_val, 0, 0);
@@ -3200,16 +3198,12 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
32003198
32013199 /* Prompt */
32023200 #ifdef JP
3203- sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]",
3204- s1, (int)floor_num, s2, s3, info);
3201+ sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]", s1, (int)floor_num, s2, s3, info);
32053202 #else
3206- sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]",
3207- s1, s2, s3, (int)floor_num, info);
3203+ sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]", s1, s2, s3, (int)floor_num, info);
32083204 #endif
32093205 prt(out_val, 0, 0);
32103206
3211-
3212- /* Wait */
32133207 query = inkey();
32143208 screen_load();
32153209
Show on old repository browser