OSDN Git Service

[Refactor] #38997 update_view() からfloor_type * 引数削除 / Removed floor_type * argument...
authorHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 05:07:50 +0000 (14:07 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 14:01:52 +0000 (23:01 +0900)
src/floor-events.c
src/floor-events.h
src/player-status.c

index d0d46f5..bd2645f 100644 (file)
@@ -807,7 +807,7 @@ static bool update_view_aux(player_type *subject_ptr, POSITION y, POSITION x, PO
  * just use an optimized hack of "you see me, so I see you", and then use the
  * actual "projectable()" function to check spell attacks.
  */
-void update_view(player_type *subject_ptr, floor_type *floor_ptr)
+void update_view(player_type *subject_ptr)
 {
        int n, m, d, k, z;
        POSITION y, x;
@@ -816,6 +816,7 @@ void update_view(player_type *subject_ptr, floor_type *floor_ptr)
 
        int full, over;
 
+       floor_type *floor_ptr = subject_ptr->current_floor_ptr;
        POSITION y_max = floor_ptr->height - 1;
        POSITION x_max = floor_ptr->width - 1;
 
index 52bb153..9f10dba 100644 (file)
@@ -8,6 +8,6 @@ extern void glow_deep_lava_and_bldg(player_type *subject_ptr);
 extern void forget_lite(floor_type *floor_ptr);
 extern void update_lite(player_type *subject_ptr);
 extern void forget_view(floor_type *floor_ptr);
-extern void update_view(player_type *subject_ptr, floor_type *floor_ptr);
+extern void update_view(player_type *subject_ptr);
 extern void update_mon_lite(player_type *subject_ptr);
 extern void clear_mon_lite(floor_type *floor_ptr);
index e103ab4..da1e896 100644 (file)
@@ -4973,7 +4973,7 @@ void update_creature(player_type *creature_ptr)
        if (creature_ptr->update & (PU_VIEW))
        {
                creature_ptr->update &= ~(PU_VIEW);
-               update_view(creature_ptr, floor_ptr);
+               update_view(creature_ptr);
        }
 
        if (creature_ptr->update & (PU_LITE))