• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionbc3ec90a45da735963b3e40ab5979f4e447194f9 (tree)
Time2019-05-18 19:41:45
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 update_playtime() を core.c/h に移動.

Change Summary

Incremental Difference

--- a/src/autopick.c
+++ b/src/autopick.c
@@ -14,6 +14,7 @@
1414 #include "angband.h"
1515 #include "util.h"
1616 #include "autopick.h"
17+#include "core.h"
1718
1819 #include "mind.h"
1920
--- a/src/core.h
+++ b/src/core.h
@@ -22,6 +22,7 @@ extern bool can_save;
2222 extern COMMAND_CODE now_message;
2323
2424 extern void play_game(bool new_game);
25+extern void update_playtime(void);
2526 extern s32b turn_real(s32b hoge);
2627 extern void prevent_turn_overflow(void);
27-extern void close_game(void);
\ No newline at end of file
28+extern void close_game(void);
--- a/src/externs.h
+++ b/src/externs.h
@@ -95,7 +95,6 @@ extern bool use_menu;
9595 extern void handle_stuff(void);
9696 extern void update_output(void);
9797 extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
98-extern void update_playtime(void);
9998
10099 #ifdef MACINTOSH
101100 /* main-mac.c */
--- a/src/quest.c
+++ b/src/quest.c
@@ -1,6 +1,7 @@
11 #include "angband.h"
22 #include "util.h"
33
4+#include "core.h"
45 #include "floor.h"
56 #include "floor-save.h"
67 #include "floor-events.h"
--- a/src/save.c
+++ b/src/save.c
@@ -17,6 +17,7 @@
1717 #include "load.h"
1818 #include "report.h"
1919
20+#include "core.h"
2021 #include "artifact.h"
2122 #include "sort.h"
2223 #include "dungeon.h"
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -2360,22 +2360,6 @@ void update_output(void)
23602360 }
23612361
23622362 /*!
2363- * @brief 実ゲームプレイ時間を更新する
2364- */
2365-void update_playtime(void)
2366-{
2367- /* Check if the game has started */
2368- if (start_time != 0)
2369- {
2370- u32b tmp = (u32b)time(NULL);
2371- current_world_ptr->play_time += (tmp - start_time);
2372- start_time = tmp;
2373- }
2374-}
2375-
2376-
2377-
2378-/*!
23792363 * @brief コンソールのリサイズに合わせてマップを再描画する /
23802364 * Map resizing whenever the main term changes size
23812365 * @return なし
@@ -3890,3 +3874,18 @@ void object_kind_track(KIND_OBJECT_IDX k_idx)
38903874 p_ptr->window |= (PW_OBJECT);
38913875 }
38923876
3877+
3878+/*!
3879+ * @brief 実ゲームプレイ時間を更新する
3880+ */
3881+void update_playtime(void)
3882+{
3883+ /* Check if the game has started */
3884+ if (start_time != 0)
3885+ {
3886+ u32b tmp = (u32b)time(NULL);
3887+ current_world_ptr->play_time += (tmp - start_time);
3888+ start_time = tmp;
3889+ }
3890+}
3891+
Show on old repository browser