• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision35ec8c1c207ba335dda70821c5bf3fe989125cea (tree)
Time2019-04-24 22:43:53
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 option_type 構造体を gameoption.h へ移動。

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -100,10 +100,6 @@ extern const mbe_info_type mbe_info[];
100100 extern const byte feature_action_flags[FF_FLAG_MAX];
101101 extern const dragonbreath_type dragonbreath_info[];
102102
103-extern const option_type option_info[];
104-extern const option_type cheat_info[CHEAT_MAX];
105-extern const option_type autosave_info[2];
106-
107103 /* variable.c */
108104 extern const concptr copyright[5];
109105 extern byte h_ver_major;
--- a/src/gameoption.h
+++ b/src/gameoption.h
@@ -1,4 +1,5 @@
1-
1+#pragma once
2+
23 /*** Option Definitions ***/
34
45 #define OPT_PAGE_INPUT 1
@@ -182,3 +183,36 @@ extern byte delay_factor;
182183 extern s16b autosave_freq;
183184 extern bool autosave_t;
184185 extern bool autosave_l;
186+
187+/*
188+ * Available "options"
189+ *
190+ * - Address of actual option variable (or NULL)
191+ *
192+ * - Normal Value (TRUE or FALSE)
193+ *
194+ * - Option Page Number (or zero)
195+ *
196+ * - Savefile Set (or zero)
197+ * - Savefile Bit in that set
198+ *
199+ * - Textual name (or NULL)
200+ * - Textual description
201+ */
202+
203+typedef struct option_type option_type;
204+
205+struct option_type
206+{
207+ bool *o_var;
208+ byte o_norm;
209+ byte o_page;
210+ byte o_set;
211+ byte o_bit;
212+ concptr o_text;
213+ concptr o_desc;
214+};
215+
216+extern const option_type option_info[];
217+extern const option_type cheat_info[CHEAT_MAX];
218+extern const option_type autosave_info[2];
\ No newline at end of file
--- a/src/types.h
+++ b/src/types.h
@@ -1000,41 +1000,6 @@ struct alloc_entry
10001000 };
10011001
10021002
1003-
1004-/*
1005- * Available "options"
1006- *
1007- * - Address of actual option variable (or NULL)
1008- *
1009- * - Normal Value (TRUE or FALSE)
1010- *
1011- * - Option Page Number (or zero)
1012- *
1013- * - Savefile Set (or zero)
1014- * - Savefile Bit in that set
1015- *
1016- * - Textual name (or NULL)
1017- * - Textual description
1018- */
1019-
1020-typedef struct option_type option_type;
1021-
1022-struct option_type
1023-{
1024- bool *o_var;
1025-
1026- byte o_norm;
1027-
1028- byte o_page;
1029-
1030- byte o_set;
1031- byte o_bit;
1032-
1033- concptr o_text;
1034- concptr o_desc;
1035-};
1036-
1037-
10381003 /*
10391004 * A store owner
10401005 */
Show on old repository browser