• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision6b5f06995c275120b429c0d40ec96f91a90d2b46 (tree)
Time2019-05-13 21:31:23
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 inkey_* を util.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/bldg.c
+++ b/src/bldg.c
@@ -1549,10 +1549,10 @@ static bool kakutoujou(void)
15491549 char out_val[160], tmp_str[80];
15501550 concptr p;
15511551
1552- if ((current_world_ptr->game_turn - old_battle) > TURNS_PER_TICK * 250)
1552+ if ((current_world_ptr->game_turn - current_world_ptr->arena_start_turn) > TURNS_PER_TICK * 250)
15531553 {
15541554 update_gambling_monsters();
1555- old_battle = current_world_ptr->game_turn;
1555+ current_world_ptr->arena_start_turn = current_world_ptr->game_turn;
15561556 }
15571557
15581558 screen_save();
--- a/src/core.c
+++ b/src/core.c
@@ -5747,8 +5747,8 @@ void prevent_turn_overflow(void)
57475747 else current_world_ptr->game_turn = 1;
57485748 if (current_floor_ptr->generated_turn > rollback_turns) current_floor_ptr->generated_turn -= rollback_turns;
57495749 else current_floor_ptr->generated_turn = 1;
5750- if (old_battle > rollback_turns) old_battle -= rollback_turns;
5751- else old_battle = 1;
5750+ if (current_world_ptr->arena_start_turn > rollback_turns) current_world_ptr->arena_start_turn -= rollback_turns;
5751+ else current_world_ptr->arena_start_turn = 1;
57525752 if (p_ptr->feeling_turn > rollback_turns) p_ptr->feeling_turn -= rollback_turns;
57535753 else p_ptr->feeling_turn = 1;
57545754
--- a/src/externs.h
+++ b/src/externs.h
@@ -56,13 +56,8 @@ extern s16b command_new;
5656 extern bool msg_flag;
5757 extern s16b running;
5858
59-extern GAME_TURN old_battle;
60-
6159 extern s16b signal_count;
62-extern bool inkey_base;
63-extern bool inkey_xtra;
64-extern bool inkey_scan;
65-extern bool inkey_flag;
60+
6661 extern bool get_com_no_macros;
6762 extern OBJECT_SUBTYPE_VALUE coin_type;
6863
--- a/src/load.c
+++ b/src/load.c
@@ -2322,9 +2322,9 @@ static void rd_extra(void)
23222322
23232323 if (z_older_than(10, 3, 13))
23242324 {
2325- old_battle = current_world_ptr->game_turn;
2325+ current_world_ptr->arena_start_turn = current_world_ptr->game_turn;
23262326 }
2327- else rd_s32b(&old_battle);
2327+ else rd_s32b(&current_world_ptr->arena_start_turn);
23282328
23292329 if (z_older_than(10,0,3))
23302330 {
--- a/src/save.c
+++ b/src/save.c
@@ -847,7 +847,7 @@ static void wr_extra(void)
847847
848848 wr_s32b(current_world_ptr->dungeon_turn);
849849
850- wr_s32b(old_battle);
850+ wr_s32b(current_world_ptr->arena_start_turn);
851851
852852 wr_s16b(today_mon);
853853 wr_s16b(p_ptr->today_mon);
--- a/src/util.c
+++ b/src/util.c
@@ -62,6 +62,11 @@ u32b *message__ptr;
6262 */
6363 char *message__buf;
6464
65+bool inkey_base; /* See the "inkey()" function */
66+bool inkey_xtra; /* See the "inkey()" function */
67+bool inkey_scan; /* See the "inkey()" function */
68+bool inkey_flag; /* See the "inkey()" function */
69+
6570 static int num_more = 0;
6671
6772 /* Save macro trigger string for use in inkey_special() */
--- a/src/util.h
+++ b/src/util.h
@@ -46,6 +46,11 @@ extern concptr *macro__act;
4646 extern bool *macro__cmd;
4747 extern char *macro__buf;
4848
49+extern bool inkey_base;
50+extern bool inkey_xtra;
51+extern bool inkey_scan;
52+extern bool inkey_flag;
53+
4954 /*
5055 * Automatically generated "variable" declarations
5156 */
--- a/src/variable.c
+++ b/src/variable.c
@@ -30,14 +30,8 @@ bool msg_flag; /* Used in msg_print() for "buffering" */
3030
3131 s16b running; /* Current counter for running, if any */
3232
33-GAME_TURN old_battle;
34-
3533 s16b signal_count; /* Hack -- Count interupts */
3634
37-bool inkey_base; /* See the "inkey()" function */
38-bool inkey_xtra; /* See the "inkey()" function */
39-bool inkey_scan; /* See the "inkey()" function */
40-bool inkey_flag; /* See the "inkey()" function */
4135 bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
4236
4337 OBJECT_SUBTYPE_VALUE coin_type; /* Hack -- force coin type */
--- a/src/world.h
+++ b/src/world.h
@@ -1,12 +1,15 @@
11 #pragma once
22
33 typedef struct {
4+
45 POSITION max_wild_x; /*!< Maximum size of the wilderness */
56 POSITION max_wild_y; /*!< Maximum size of the wilderness */
67 GAME_TURN game_turn; /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
78 GAME_TURN game_turn_limit; /*!< game_turnの最大値 / Limit of game_turn */
89 GAME_TURN dungeon_turn; /*!< NASTY生成の計算に関わる内部ターン値 / Game current_world_ptr->game_turn in dungeon */
910 GAME_TURN dungeon_turn_limit; /*!< dungeon_turnの最大値 / Limit of game_turn in dungeon */
11+ GAME_TURN arena_start_turn; /*!< 闘技場賭博の開始ターン値 */
12+
1013 MONSTER_IDX timewalk_m_idx; /*!< 現在時間停止を行っているモンスターのID */
1114
1215 MONRACE_IDX bounty_r_idx[MAX_KUBI];
Show on old repository browser