OSDN Git Service

[Refactor] #37353 display_dungeon() を view-mainwindow.c へ移動。
authordeskull <deskull@users.sourceforge.jp>
Sun, 21 Apr 2019 12:57:55 +0000 (21:57 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 21 Apr 2019 12:57:55 +0000 (21:57 +0900)
src/externs.h
src/grid.c
src/grid.h
src/view-mainwindow.c

index e216932..86d84b3 100644 (file)
@@ -363,7 +363,6 @@ extern bool cave_valid_bold(POSITION y, POSITION x);
 extern bool no_lite(void);
 extern void move_cursor_relative(int row, int col);
 extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
-extern void display_dungeon(void);
 extern void prt_path(POSITION y, POSITION x);
 extern void delayed_visual_update(void);
 extern void forget_flow(void);
index 44cf741..8d6545e 100644 (file)
@@ -1242,56 +1242,6 @@ void note_spot(POSITION y, POSITION x)
        g_ptr->info |= (CAVE_KNOWN);
 }
 
-
-void display_dungeon(void)
-{
-       TERM_LEN x, y;
-       TERM_COLOR a;
-       SYMBOL_CODE c;
-
-       TERM_COLOR ta = 0;
-       SYMBOL_CODE tc = '\0';
-
-       for (x = p_ptr->x - Term->wid / 2 + 1; x <= p_ptr->x + Term->wid / 2; x++)
-       {
-               for (y = p_ptr->y - Term->hgt / 2 + 1; y <= p_ptr->y + Term->hgt / 2; y++)
-               {
-                       if (in_bounds2(y, x))
-                       {
-                               map_info(y, x, &a, &c, &ta, &tc);
-
-                               /* Hack -- fake monochrome */
-                               if (!use_graphics)
-                               {
-                                       if (current_world_ptr->timewalk_m_idx) a = TERM_DARK;
-                                       else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
-                                       else if (p_ptr->wraith_form) a = TERM_L_DARK;
-                               }
-
-                               /* Hack -- Queue it */
-                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
-                       }
-                       else
-                       {
-                               /* Clear out-of-bound tiles */
-
-                               /* Access darkness */
-                               feature_type *f_ptr = &f_info[feat_none];
-
-                               /* Normal attr */
-                               a = f_ptr->x_attr[F_LIT_STANDARD];
-
-                               /* Normal char */
-                               c = f_ptr->x_char[F_LIT_STANDARD];
-
-                               /* Hack -- Queue it */
-                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
-                       }
-               }
-       }
-}
-
-
 /*
  * Redraw (on the screen) a given MAP location
  *
index 351efc9..4d3b135 100644 (file)
@@ -338,7 +338,6 @@ extern void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TE
 extern void move_cursor_relative(int row, int col);
 extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
 extern void note_spot(POSITION y, POSITION x);
-extern void display_dungeon(void);
 extern void lite_spot(POSITION y, POSITION x);
 extern void prt_map(void);
 extern void prt_path(POSITION y, POSITION x);
index ae95eba..7604723 100644 (file)
@@ -1891,6 +1891,53 @@ static void fix_overhead(void)
        }
 }
 
+static void display_dungeon(void)
+{
+       TERM_LEN x, y;
+       TERM_COLOR a;
+       SYMBOL_CODE c;
+
+       TERM_COLOR ta = 0;
+       SYMBOL_CODE tc = '\0';
+
+       for (x = p_ptr->x - Term->wid / 2 + 1; x <= p_ptr->x + Term->wid / 2; x++)
+       {
+               for (y = p_ptr->y - Term->hgt / 2 + 1; y <= p_ptr->y + Term->hgt / 2; y++)
+               {
+                       if (in_bounds2(y, x))
+                       {
+                               map_info(y, x, &a, &c, &ta, &tc);
+
+                               /* Hack -- fake monochrome */
+                               if (!use_graphics)
+                               {
+                                       if (current_world_ptr->timewalk_m_idx) a = TERM_DARK;
+                                       else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
+                                       else if (p_ptr->wraith_form) a = TERM_L_DARK;
+                               }
+
+                               /* Hack -- Queue it */
+                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+                       }
+                       else
+                       {
+                               /* Clear out-of-bound tiles */
+
+                               /* Access darkness */
+                               feature_type *f_ptr = &f_info[feat_none];
+
+                               /* Normal attr */
+                               a = f_ptr->x_attr[F_LIT_STANDARD];
+
+                               /* Normal char */
+                               c = f_ptr->x_char[F_LIT_STANDARD];
+
+                               /* Hack -- Queue it */
+                               Term_queue_char(x - p_ptr->x + Term->wid / 2 - 1, y - p_ptr->y + Term->hgt / 2 - 1, a, c, ta, tc);
+                       }
+               }
+       }
+}
 
 /*!
  * @brief ダンジョンの地形をサブウィンドウに表示する /