<ClCompile Include="..\..\src\info-reader\skill-reader.c" />\r
<ClCompile Include="..\..\src\info-reader\vault-reader.c" />\r
<ClCompile Include="..\..\src\io\command-repeater.c" />\r
+ <ClCompile Include="..\..\src\io\cursor.c" />\r
<ClCompile Include="..\..\src\io\input-key-acceptor.c" />\r
<ClCompile Include="..\..\src\io\input-key-requester.c" />\r
<ClCompile Include="..\..\src\locale\vowel-checker.c" />\r
<ClInclude Include="..\..\src\info-reader\skill-reader.h" />\r
<ClInclude Include="..\..\src\info-reader\vault-reader.h" />\r
<ClInclude Include="..\..\src\io\command-repeater.h" />\r
+ <ClInclude Include="..\..\src\io\cursor.h" />\r
<ClInclude Include="..\..\src\io\input-key-acceptor.h" />\r
<ClInclude Include="..\..\src\io\input-key-requester.h" />\r
<ClInclude Include="..\..\src\locale\language-switcher.h" />\r
<ClCompile Include="..\..\src\grid\lighting-colors-table.c">
<Filter>grid</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\io\cursor.c">
+ <Filter>io</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\grid\lighting-colors-table.h">
<Filter>grid</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\io\cursor.h">
+ <Filter>io</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
\
io/chuukei.c io/chuukei.h \
io/command-repeater.c io/command-repeater.h \
+ io/cursor.c io/cursor.h \
io/exit-panic.c io/exit-panic.h \
io/files-util.c io/files-util.h \
io/gf-descriptions.c io/gf-descriptions.h \
#include "cmd-io/cmd-dump.h"
#include "cmd/cmd-basic.h"
#include "core/asking-player.h"
-#include "util/sort.h"
#include "core/stuff-handler.h"
#include "effect/spells-effect-util.h"
#include "floor/floor.h"
#include "grid/feature.h"
#include "grid/grid.h"
#include "io/command-repeater.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/input-key-requester.h"
#include "io/targeting.h"
#include "io/write-diary.h"
#include "main/sound-of-music.h"
+#include "monster-floor/monster-object.h"
+#include "monster-floor/monster-remover.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags1.h"
#include "monster-race/race-flags7.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-info.h"
-#include "monster-floor/monster-object.h"
-#include "monster-floor/monster-remover.h"
#include "monster/monster-status.h"
#include "monster/smart-learn-types.h"
#include "object/object-hook.h"
#include "player/player-move.h"
#include "player/player-skill.h"
#include "player/player-status.h"
-#include "view/display-main-window.h"
+#include "term/screen-processor.h"
#include "util/bit-flags-calculator.h"
#include "util/int-char-converter.h"
#include "util/quarks.h"
-#include "term/screen-processor.h"
+#include "util/sort.h"
#include "view/display-messages.h"
#include "world/world.h"
#include "game-option/keymap-directory-getter.h"
#include "inventory/inventory-object.h"
#include "inventory/player-inventory.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/input-key-requester.h"
#include "io/targeting.h"
#include "info-reader/fixed-map-parser.h"
#include "inventory/inventory-object.h"
#include "inventory/player-inventory.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/input-key-requester.h"
#include "io/targeting.h"
#include "grid/feature.h"
#include "grid/grid.h"
#include "inventory/inventory-object.h"
+#include "io/cursor.h"
#include "io/targeting.h"
#include "main/sound-definitions-table.h"
#include "main/sound-of-music.h"
#include "game-option/map-screen-options.h"
#include "grid/grid.h"
#include "inventory/pack-overflow.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/input-key-processor.h"
#include "io/input-key-requester.h"
#include "spell-kind/spells-random.h"
#include "spell-realm/spells-hex.h"
#include "term/screen-processor.h"
-#include "view/display-main-window.h"
#include "view/display-messages.h"
#include "world/world-turn-processor.h"
#include "floor/floor-save.h"
#include "game-option/map-screen-options.h"
#include "game-option/play-record-options.h"
+#include "io/cursor.h"
#include "io/input-key-requester.h"
#include "io/targeting.h"
#include "io/write-diary.h"
#include "player/player-move.h"
#include "realm/realm-song-numbers.h"
#include "realm/realm-song.h"
-#include "view/display-main-window.h"
#include "view/display-messages.h"
#include "world/world-turn-processor.h"
#include "world/world.h"
--- /dev/null
+#include "io/cursor.h"
+#include "core/stuff-handler.h"
+#include "effect/effect-characteristics.h"
+#include "effect/spells-effect-util.h"
+#include "floor/floor.h"
+#include "game-option/map-screen-options.h"
+#include "game-option/special-options.h"
+#include "grid/feature.h"
+#include "grid/grid.h"
+#include "io/targeting.h"
+#include "term/term-color-types.h"
+#include "util/bit-flags-calculator.h"
+#include "view/display-main-window.h" // todo 暫定.
+#include "view/display-map.h"
+#include "view/main-window-util.h"
+#include "world/world.h"
+
+/*
+ * Moves the cursor to a given MAP (y,x) location
+ */
+void move_cursor_relative(int row, int col)
+{
+ row -= panel_row_prt;
+ Term_gotoxy(panel_col_of(col), row);
+}
+
+/*
+ * @brief 矢などの軌跡を*で表示する / print project path
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @param y 目標地点のY座標
+ * @param x 目標地点のX座標
+ * @return なし
+ */
+void print_path(player_type *player_ptr, POSITION y, POSITION x)
+{
+ int path_n;
+ u16b path_g[512];
+ byte default_color = TERM_SLATE;
+
+ if (!display_path)
+ return;
+ if (project_length == -1)
+ return;
+
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ path_n = project_path(player_ptr, path_g, (project_length ? project_length : MAX_RANGE), player_ptr->y, player_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
+ player_ptr->redraw |= (PR_MAP);
+ handle_stuff(player_ptr);
+ for (int i = 0; i < path_n; i++) {
+ POSITION ny = GRID_Y(path_g[i]);
+ POSITION nx = GRID_X(path_g[i]);
+ grid_type *g_ptr = &floor_ptr->grid_array[ny][nx];
+ if (panel_contains(ny, nx)) {
+ TERM_COLOR a = default_color;
+ SYMBOL_CODE c;
+
+ TERM_COLOR ta = default_color;
+ SYMBOL_CODE tc = '*';
+
+ if (g_ptr->m_idx && floor_ptr->m_list[g_ptr->m_idx].ml) {
+ map_info(player_ptr, ny, nx, &a, &c, &ta, &tc);
+
+ if (!is_ascii_graphics(a))
+ a = default_color;
+ else if (c == '.' && (a == TERM_WHITE || a == TERM_L_WHITE))
+ a = default_color;
+ else if (a == default_color)
+ a = TERM_WHITE;
+ }
+
+ if (!use_graphics) {
+ if (current_world_ptr->timewalk_m_idx)
+ a = TERM_DARK;
+ else if (is_invuln(player_ptr) || player_ptr->timewalk)
+ a = TERM_WHITE;
+ else if (player_ptr->wraith_form)
+ a = TERM_L_DARK;
+ }
+
+ c = '*';
+ Term_queue_bigchar(panel_col_of(nx), ny - panel_row_prt, a, c, ta, tc);
+ }
+
+ if ((g_ptr->info & CAVE_MARK) && !cave_have_flag_grid(g_ptr, FF_PROJECT))
+ break;
+
+ if (nx == x && ny == y)
+ default_color = TERM_L_DARK;
+ }
+}
+
+/*!
+ * @brief フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン)
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @param dy 変更先のフロアY座標
+ * @param dx 変更先のフロアX座標
+ * Handle a request to change the current panel
+ * Return TRUE if the panel was changed.
+ * Also used in do_cmd_locate
+ * @return 実際に再描画が必要だった場合TRUEを返す
+ */
+bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx)
+{
+ TERM_LEN wid, hgt;
+ get_screen_size(&wid, &hgt);
+
+ POSITION y = panel_row_min + dy * hgt / 2;
+ POSITION x = panel_col_min + dx * wid / 2;
+
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ if (y > floor_ptr->height - hgt)
+ y = floor_ptr->height - hgt;
+ if (y < 0)
+ y = 0;
+
+ if (x > floor_ptr->width - wid)
+ x = floor_ptr->width - wid;
+ if (x < 0)
+ x = 0;
+
+ if ((y == panel_row_min) && (x == panel_col_min))
+ return FALSE;
+
+ panel_row_min = y;
+ panel_col_min = x;
+ panel_bounds_center();
+
+ player_ptr->update |= (PU_MONSTERS);
+ player_ptr->redraw |= (PR_MAP);
+ handle_stuff(player_ptr);
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+void move_cursor_relative(int row, int col);
+void print_path(player_type *player_ptr, POSITION y, POSITION x);
+bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx);
#include "core/asking-player.h" // todo 相互依存している、後で何とかする.
#include "floor/floor.h"
#include "game-option/input-options.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "main/sound-of-music.h"
#include "term/screen-processor.h" // todo 相互依存している、後で何とかする.
#include "util/int-char-converter.h"
#include "util/quarks.h"
#include "util/string-processor.h"
-#include "view/display-main-window.h" // todo move_cursor_relative() が依存している。後で移設を検討する.
#include "view/display-messages.h"
#include "view/main-window-util.h"
#include "grid/grid.h"
#include "inventory/player-inventory.h"
#include "io/command-repeater.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/input-key-requester.h"
#include "locale/vowel-checker.h"
#include "floor/floor.h"
#include "game-option/special-options.h"
#include "grid/feature.h"
+#include "io/cursor.h"
#include "io/targeting.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "game-option/play-record-options.h"
#include "game-option/special-options.h"
#include "grid/grid.h"
+#include "io/cursor.h"
#include "io/write-diary.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags1.h"
#include "monster/monster-status.h"
#include "player/avatar.h"
#include "player/player-damage.h"
-#include "view/display-main-window.h"
#include "view/display-messages.h"
/*!
#include "floor/floor.h"
#include "game-option/birth-options.h"
#include "grid/grid.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "locale/english.h"
#include "lore/lore-store.h"
#include "spell/process-effect.h"
#include "spell/spell-types.h"
#include "term/screen-processor.h"
-#include "view/display-main-window.h"
#include "view/display-messages.h"
/*!
#include "floor/floor.h"
#include "game-option/special-options.h"
#include "grid/feature.h"
+#include "io/cursor.h"
#include "main/sound-definitions-table.h"
#include "main/sound-of-music.h"
#include "monster-race/monster-race.h"
#include "game-option/special-options.h"
#include "grid/feature.h"
#include "grid/grid.h"
+#include "io/cursor.h"
#include "io/input-key-acceptor.h"
#include "io/targeting.h"
#include "monster/monster-update.h"
}
/*!
- * @brief フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン)
- * @param creature_ptr プレーヤーへの参照ポインタ
- * @param dy 変更先のフロアY座標
- * @param dx 変更先のフロアX座標
- * Handle a request to change the current panel
- * Return TRUE if the panel was changed.
- * Also used in do_cmd_locate
- * @return 実際に再描画が必要だった場合TRUEを返す
- */
-bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx)
-{
- TERM_LEN wid, hgt;
- get_screen_size(&wid, &hgt);
-
- POSITION y = panel_row_min + dy * hgt / 2;
- POSITION x = panel_col_min + dx * wid / 2;
-
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- if (y > floor_ptr->height - hgt)
- y = floor_ptr->height - hgt;
- if (y < 0)
- y = 0;
-
- if (x > floor_ptr->width - wid)
- x = floor_ptr->width - wid;
- if (x < 0)
- x = 0;
-
- if ((y == panel_row_min) && (x == panel_col_min))
- return FALSE;
-
- panel_row_min = y;
- panel_col_min = x;
- panel_bounds_center();
-
- player_ptr->update |= (PU_MONSTERS);
- player_ptr->redraw |= (PR_MAP);
- handle_stuff(player_ptr);
- return TRUE;
-}
-
-/*!
* @brief 現在のコンソール表示の縦横を返す。 /
* Get term size and calculate screen size
* @param wid_p コンソールの表示幅文字数を返す
}
/*
- * Moves the cursor to a given MAP (y,x) location
- */
-void move_cursor_relative(int row, int col)
-{
- row -= panel_row_prt;
- Term_gotoxy(panel_col_of(col), row);
-}
-
-/*
- * print project path
- */
-void print_path(player_type *player_ptr, POSITION y, POSITION x)
-{
- int path_n;
- u16b path_g[512];
- byte default_color = TERM_SLATE;
-
- if (!display_path)
- return;
- if (project_length == -1)
- return;
-
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- path_n = project_path(player_ptr, path_g, (project_length ? project_length : MAX_RANGE), player_ptr->y, player_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
- player_ptr->redraw |= (PR_MAP);
- handle_stuff(player_ptr);
- for (int i = 0; i < path_n; i++) {
- POSITION ny = GRID_Y(path_g[i]);
- POSITION nx = GRID_X(path_g[i]);
- grid_type *g_ptr = &floor_ptr->grid_array[ny][nx];
- if (panel_contains(ny, nx)) {
- TERM_COLOR a = default_color;
- SYMBOL_CODE c;
-
- TERM_COLOR ta = default_color;
- SYMBOL_CODE tc = '*';
-
- if (g_ptr->m_idx && floor_ptr->m_list[g_ptr->m_idx].ml) {
- map_info(player_ptr, ny, nx, &a, &c, &ta, &tc);
-
- if (!is_ascii_graphics(a))
- a = default_color;
- else if (c == '.' && (a == TERM_WHITE || a == TERM_L_WHITE))
- a = default_color;
- else if (a == default_color)
- a = TERM_WHITE;
- }
-
- if (!use_graphics) {
- if (current_world_ptr->timewalk_m_idx)
- a = TERM_DARK;
- else if (is_invuln(player_ptr) || player_ptr->timewalk)
- a = TERM_WHITE;
- else if (player_ptr->wraith_form)
- a = TERM_L_DARK;
- }
-
- c = '*';
- Term_queue_bigchar(panel_col_of(nx), ny - panel_row_prt, a, c, ta, tc);
- }
-
- if ((g_ptr->info & CAVE_MARK) && !cave_have_flag_grid(g_ptr, FF_PROJECT))
- break;
-
- if (nx == x && ny == y)
- default_color = TERM_L_DARK;
- }
-}
-
-/*
* Determines if a map location is currently "on screen" -RAK-
* Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
*/
#include "system/angband.h"
void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p);
-void move_cursor_relative(int row, int col);
-void print_path(player_type *player_ptr, POSITION y, POSITION x);
void resize_map(void);
-bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx);
bool panel_contains(POSITION y, POSITION x);