• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision17b3575a6e82cf6f7ee28a39229ddd56f026d3b0 (tree)
Time2019-05-01 13:47:24
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 travel 構造体と関連変数を player-move.c/h に移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -734,9 +734,4 @@ extern void prepare_browse_movie(concptr filename);
734734 extern void browse_movie(void);
735735 extern bool browsing_movie;
736736
737-#ifdef TRAVEL
738-/* for travel */
739-extern travel_type travel;
740-#endif
741-
742737 extern void kamaenaoshi(INVENTORY_IDX item);
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -167,6 +167,10 @@
167167 #include "objectkind.h"
168168
169169
170+#ifdef TRAVEL
171+ /* for travel */
172+travel_type travel;
173+#endif
170174
171175 /*!
172176 * @brief 地形やその上のアイテムの隠された要素を明かす /
--- a/src/player-move.h
+++ b/src/player-move.h
@@ -1,4 +1,5 @@
1-
1+#pragma once
2+
23 extern void disturb(bool stop_search, bool flush_output);
34 extern void move_player(DIRECTION dir, bool do_pickup, bool break_trap);
45 extern void run_step(DIRECTION dir);
@@ -35,3 +36,22 @@ extern void travel_step(void);
3536 #define MPE_DO_PICKUP 0x00000020
3637 #define MPE_BREAK_TRAP 0x00000040
3738 #define MPE_DONT_SWAP_MON 0x00000080
39+
40+
41+
42+#ifdef TRAVEL
43+ /*
44+ * A structure type for travel command
45+ */
46+typedef struct {
47+ int run; /* Remaining grid number */
48+ int cost[MAX_HGT][MAX_WID];
49+ POSITION x; /* Target X */
50+ POSITION y; /* Target Y */
51+ DIRECTION dir; /* Running direction */
52+} travel_type;
53+
54+/* for travel */
55+extern travel_type travel;
56+#endif
57+
--- a/src/types.h
+++ b/src/types.h
@@ -420,19 +420,6 @@ typedef struct
420420 } cave_template_type;
421421
422422
423-#ifdef TRAVEL
424-/*
425- * A structure type for travel command
426- */
427-typedef struct {
428- int run; /* Remaining grid number */
429- int cost[MAX_HGT][MAX_WID];
430- POSITION x; /* Target X */
431- POSITION y; /* Target Y */
432- DIRECTION dir; /* Running direction */
433-} travel_type;
434-#endif
435-
436423 typedef struct {
437424 int flag;
438425 int type;
--- a/src/variable.c
+++ b/src/variable.c
@@ -680,10 +680,6 @@ int server_port;
680680 /* for movie */
681681 bool browsing_movie;
682682
683-#ifdef TRAVEL
684-/* for travel */
685-travel_type travel;
686-#endif
687683
688684 /* for snipers */
689685 bool reset_concent = FALSE; /* Concentration reset flag */
Show on old repository browser