• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision04812911169d6a831a5c3c08c84ec57666b4ea1e (tree)
Time2019-07-11 23:58:43
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 player_place() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -1032,7 +1032,7 @@ static void build_arena(void)
10321032 j = xval;
10331033 current_floor_ptr->grid_array[i][j].feat = f_tag_to_index("ARENA_GATE");
10341034 current_floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
1035- player_place(i, j);
1035+ player_place(p_ptr, i, j);
10361036 }
10371037
10381038 /*!
@@ -1143,7 +1143,7 @@ static void build_battle(void)
11431143 j = xval;
11441144 current_floor_ptr->grid_array[i][j].feat = f_tag_to_index("BUILDING_3");
11451145 current_floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
1146- player_place(i, j);
1146+ player_place(p_ptr, i, j);
11471147 }
11481148
11491149 /*!
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -5145,14 +5145,14 @@ void free_turn(player_type *creature_ptr)
51455145 * @param y 配置先Y座標
51465146 * @return 配置に成功したらTRUE
51475147 */
5148-bool player_place(POSITION y, POSITION x)
5148+bool player_place(player_type *creature_ptr, POSITION y, POSITION x)
51495149 {
51505150 /* Paranoia XXX XXX */
51515151 if (current_floor_ptr->grid_array[y][x].m_idx != 0) return FALSE;
51525152
51535153 /* Save player location */
5154- p_ptr->y = y;
5155- p_ptr->x = x;
5154+ creature_ptr->y = y;
5155+ creature_ptr->x = x;
51565156
51575157 /* Success */
51585158 return TRUE;
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -744,7 +744,7 @@ extern bool player_has_no_spellbooks(player_type *creature_ptr);
744744 extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
745745 extern void free_turn(player_type *creature_ptr);
746746
747-extern bool player_place(POSITION y, POSITION x);
747+extern bool player_place(player_type *creature_ptr, POSITION y, POSITION x);
748748 extern void sanity_blast(monster_type *m_ptr, bool necro);
749749
750750 extern void check_experience(void);
--- a/src/wild.c
+++ b/src/wild.c
@@ -671,7 +671,7 @@ void wilderness_gen(void)
671671 p_ptr->teleport_town = FALSE;
672672 }
673673
674- player_place(p_ptr->oldpy, p_ptr->oldpx);
674+ player_place(p_ptr, p_ptr->oldpy, p_ptr->oldpx);
675675 /* p_ptr->leaving_dungeon = FALSE;*/
676676
677677 lim = (generate_encounter == TRUE) ? 40 : MIN_M_ALLOC_TN;
Show on old repository browser