<ClInclude Include="..\..\src\term.h" />\r
<ClInclude Include="..\..\src\trap.h" />\r
<ClInclude Include="..\..\src\types.h" />\r
+ <ClInclude Include="..\..\src\view-mainwindow.h" />\r
<ClInclude Include="..\..\src\warning.h" />\r
<ClInclude Include="..\..\src\wild.h" />\r
<ClInclude Include="..\..\src\world.h" />\r
<ClInclude Include="..\..\src\cmd-basic.h">
<Filter>cmd</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\view-mainwindow.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\angband.rc" />
variable.c wild.h wild.c wizard1.c wizard2.c \
warning.c warning.h world.c world.h \
\
- view-mainwindow.c\
+ view-mainwindow.c view-mainwindow.h\
\
xtra2.c z-config.h \
z-form.c z-form.h z-rand.c z-rand.h z-term.c z-term.h z-util.c z-util.h \
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);
extern void display_map(int *cy, int *cx);
extern void do_cmd_view_map(void);
#include "monster-status.h"
#include "player-status.h"
#include "spells.h"
+#include "view-mainwindow.h"
static byte display_autopick; /*!< 自動拾い状態の設定フラグ */
static int match_autopick;
/*
- * Calculate panel colum of a location in the map
- */
-static int panel_col_of(int col)
-{
- col -= panel_col_min;
- if (use_bigtile) col *= 2;
- return col + 13;
-}
-
-
-/*
* Moves the cursor to a given MAP (y,x) location
*/
void move_cursor_relative(int row, int col)
/*
- * Prints the map of the dungeon
- *
- * Note that, for efficiency, we contain an "optimized" version
- * of both "lite_spot()" and "print_rel()", and that we use the
- * "lite_spot()" function to display the player grid, if needed.
- */
-void prt_map(void)
-{
- POSITION x, y;
- int v;
-
- /* map bounds */
- POSITION xmin, xmax, ymin, ymax;
-
- TERM_LEN wid, hgt;
-
- Term_get_size(&wid, &hgt);
-
- /* Remove map offset */
- wid -= COL_MAP + 2;
- hgt -= ROW_MAP + 2;
-
- /* Access the cursor state */
- (void)Term_get_cursor(&v);
-
- /* Hide the cursor */
- (void)Term_set_cursor(0);
-
- /* Get bounds */
- xmin = (0 < panel_col_min) ? panel_col_min : 0;
- xmax = (current_floor_ptr->width - 1 > panel_col_max) ? panel_col_max : current_floor_ptr->width - 1;
- ymin = (0 < panel_row_min) ? panel_row_min : 0;
- ymax = (current_floor_ptr->height - 1 > panel_row_max) ? panel_row_max : current_floor_ptr->height - 1;
-
- /* Bottom section of screen */
- for (y = 1; y <= ymin - panel_row_prt; y++)
- {
- /* Erase the section */
- Term_erase(COL_MAP, y, wid);
- }
-
- /* Top section of screen */
- for (y = ymax - panel_row_prt; y <= hgt; y++)
- {
- /* Erase the section */
- Term_erase(COL_MAP, y, wid);
- }
-
- /* Dump the map */
- for (y = ymin; y <= ymax; y++)
- {
- /* Scan the columns of row "y" */
- for (x = xmin; x <= xmax; x++)
- {
- TERM_COLOR a;
- SYMBOL_CODE c;
-
- TERM_COLOR ta;
- SYMBOL_CODE tc;
-
- /* Determine what is there */
- 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;
- }
-
- /* Efficiency -- Redraw that grid of the map */
- Term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
- }
- }
-
- /* Display player */
- lite_spot(p_ptr->y, p_ptr->x);
-
- /* Restore the cursor */
- (void)Term_set_cursor(v);
-}
-
-
-
-/*
* print project path
*/
void prt_path(POSITION y, POSITION x)
#include "player-status.h"
#include "monster.h"
#include "realm-hex.h"
+#include "view-mainwindow.h"
/*
* Some screen locations for various display routines
*wid_p -= COL_MAP + 2;
if (use_bigtile) *wid_p /= 2;
}
+
+/*
+ * Calculate panel colum of a location in the map
+ */
+int panel_col_of(int col)
+{
+ col -= panel_col_min;
+ if (use_bigtile) col *= 2;
+ return col + 13;
+}
+
+/*
+ * Prints the map of the dungeon
+ *
+ * Note that, for efficiency, we contain an "optimized" version
+ * of both "lite_spot()" and "print_rel()", and that we use the
+ * "lite_spot()" function to display the player grid, if needed.
+ */
+void prt_map(void)
+{
+ POSITION x, y;
+ int v;
+
+ /* map bounds */
+ POSITION xmin, xmax, ymin, ymax;
+
+ TERM_LEN wid, hgt;
+
+ Term_get_size(&wid, &hgt);
+
+ /* Remove map offset */
+ wid -= COL_MAP + 2;
+ hgt -= ROW_MAP + 2;
+
+ /* Access the cursor state */
+ (void)Term_get_cursor(&v);
+
+ /* Hide the cursor */
+ (void)Term_set_cursor(0);
+
+ /* Get bounds */
+ xmin = (0 < panel_col_min) ? panel_col_min : 0;
+ xmax = (current_floor_ptr->width - 1 > panel_col_max) ? panel_col_max : current_floor_ptr->width - 1;
+ ymin = (0 < panel_row_min) ? panel_row_min : 0;
+ ymax = (current_floor_ptr->height - 1 > panel_row_max) ? panel_row_max : current_floor_ptr->height - 1;
+
+ /* Bottom section of screen */
+ for (y = 1; y <= ymin - panel_row_prt; y++)
+ {
+ /* Erase the section */
+ Term_erase(COL_MAP, y, wid);
+ }
+
+ /* Top section of screen */
+ for (y = ymax - panel_row_prt; y <= hgt; y++)
+ {
+ /* Erase the section */
+ Term_erase(COL_MAP, y, wid);
+ }
+
+ /* Dump the map */
+ for (y = ymin; y <= ymax; y++)
+ {
+ /* Scan the columns of row "y" */
+ for (x = xmin; x <= xmax; x++)
+ {
+ TERM_COLOR a;
+ SYMBOL_CODE c;
+
+ TERM_COLOR ta;
+ SYMBOL_CODE tc;
+
+ /* Determine what is there */
+ 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;
+ }
+
+ /* Efficiency -- Redraw that grid of the map */
+ Term_queue_bigchar(panel_col_of(x), y - panel_row_prt, a, c, ta, tc);
+ }
+ }
+
+ /* Display player */
+ lite_spot(p_ptr->y, p_ptr->x);
+
+ /* Restore the cursor */
+ (void)Term_set_cursor(v);
+}
+
+
--- /dev/null
+#pragma once
+
+extern int panel_col_of(int col);
+extern void prt_map(void);