• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision090f683efa2aa6c1c97085284ee1f25b4dcb9126 (tree)
Time2019-04-21 00:03:24
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 scores.h を作成して宣言を externs.h から分離。

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -348,6 +348,7 @@
348348 <ClInclude Include="..\..\src\rooms-vault.h" />
349349 <ClInclude Include="..\..\src\rooms.h" />
350350 <ClInclude Include="..\..\src\rumor.h" />
351+ <ClInclude Include="..\..\src\scores.h" />
351352 <ClInclude Include="..\..\src\selfinfo.h" />
352353 <ClInclude Include="..\..\src\shoot.h" />
353354 <ClInclude Include="..\..\src\snipe.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -585,6 +585,7 @@
585585 <ClInclude Include="..\..\src\mind.h">
586586 <Filter>spells</Filter>
587587 </ClInclude>
588+ <ClInclude Include="..\..\src\scores.h" />
588589 </ItemGroup>
589590 <ItemGroup>
590591 <ResourceCompile Include="..\..\src\angband.rc" />
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,12 +29,12 @@ hengband_SOURCES = \
2929 geometry.c geometry.h \
3030 \
3131 gameoption.c gameoption.h gamevalue.h \
32- generate.h grid.c grid.h h-basic.h h-config.h h-define.h \
32+ grid.c grid.h h-basic.h h-config.h h-define.h \
3333 history.h history.c \
3434 h-system.h h-type.h inet.c init.c init.h japanese.c load.c \
3535 dungeon-file.c dungeon-file.h \
3636 main.c main-x11.c main-gcu.c \
37- melee.h melee1.c mind.c \
37+ melee.h melee1.c mind.c mind.h \
3838 \
3939 monster.h \
4040 monsterrace-hook.c monsterrace-hook.h monster-process.c \
@@ -68,7 +68,7 @@ hengband_SOURCES = \
6868 report.c rooms.c rooms-city.c rooms-city.h rooms-fractal.c rooms-fractal.h \
6969 rooms.h rooms-normal.c rooms-normal.h rooms-pitnest.c rooms-pitnest.h \
7070 rooms-special.c rooms-special.h rooms-trap.c rooms-trap.h rooms-vault.c \
71- rooms-vault.h save.c scores.c selfinfo.c selfinfo.h \
71+ rooms-vault.h save.c scores.c scores.h selfinfo.c selfinfo.h \
7272 shoot.c shoot.h snipe.c snipe.h \
7373 \
7474 rumor.h rumor.c \
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -40,6 +40,7 @@
4040
4141 #include "files.h"
4242 #include "player-effects.h"
43+#include "scores.h"
4344
4445 /*!
4546 * @brief 闘技場のモンスターID及び報酬アイテムテーブル
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -59,6 +59,7 @@
5959 #include "dungeon-file.h"
6060 #include "files.h"
6161 #include "player-effects.h"
62+#include "scores.h"
6263
6364 static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
6465 static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
--- a/src/externs.h
+++ b/src/externs.h
@@ -894,17 +894,6 @@ extern bool tgt_pt(POSITION *x, POSITION *y);
894894 extern void do_poly_wounds(void);
895895 extern void change_race(CHARACTER_IDX new_race, concptr effect_msg);
896896
897-/* scores.c */
898-extern void display_scores_aux(int from, int to, int note, high_score *score);
899-extern void display_scores(int from, int to);
900-extern void kingly(void);
901-extern bool send_world_score(bool do_send);
902-extern errr top_twenty(void);
903-extern errr predict_score(void);
904-extern void race_legends(void);
905-extern void race_score(int race_num);
906-extern void show_highclass(void);
907-
908897 /* mspells1.c */
909898 extern bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
910899 extern bool summon_possible(POSITION y1, POSITION x1);
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -102,6 +102,7 @@
102102 #include "floor-events.h"
103103 #include "init.h"
104104 #include "files.h"
105+#include "scores.h"
105106
106107 #ifdef WINDOWS
107108 #include <windows.h>
--- a/src/scores.c
+++ b/src/scores.c
@@ -13,6 +13,7 @@
1313 #include "angband.h"
1414 #include "player-status.h"
1515 #include "files.h"
16+#include "scores.h"
1617
1718 /*!
1819 * @brief i番目のスコア情報にバッファ位置をシークする / Seek score 'i' in the highscore file
--- /dev/null
+++ b/src/scores.h
@@ -0,0 +1,48 @@
1+#pragma once
2+
3+/*
4+ * Semi-Portable High Score List Entry (128 bytes) -- BEN
5+ *
6+ * All fields listed below are null terminated ascii strings.
7+ *
8+ * In addition, the "number" fields are right justified, and
9+ * space padded, to the full available length (minus the "null").
10+ *
11+ * Note that "string comparisons" are thus valid on "pts".
12+ */
13+
14+typedef struct high_score high_score;
15+
16+struct high_score
17+{
18+ GAME_TEXT what[8]; /* Version info (string) */
19+ GAME_TEXT pts[10]; /* Total Score (number) */
20+ GAME_TEXT gold[10]; /* Total Gold (number) */
21+ GAME_TEXT turns[10]; /* Turns Taken (number) */
22+ GAME_TEXT day[10]; /* Time stamp (string) */
23+ GAME_TEXT who[16]; /* Player Name (string) */
24+ GAME_TEXT uid[8]; /* Player UID (number) */
25+ GAME_TEXT sex[2]; /* Player Sex (string) */
26+ GAME_TEXT p_r[3]; /* Player Race (number) */
27+ GAME_TEXT p_c[3]; /* Player Class (number) */
28+ GAME_TEXT p_a[3]; /* Player Seikaku (number) */
29+
30+ GAME_TEXT cur_lev[4]; /* Current Player Level (number) */
31+ GAME_TEXT cur_dun[4]; /* Current Dungeon Level (number) */
32+ GAME_TEXT max_lev[4]; /* Max Player Level (number) */
33+ GAME_TEXT max_dun[4]; /* Max Dungeon Level (number) */
34+
35+ GAME_TEXT how[40]; /* Method of death (string) */
36+};
37+
38+/* scores.c */
39+extern void display_scores_aux(int from, int to, int note, high_score *score);
40+extern void display_scores(int from, int to);
41+extern void kingly(void);
42+extern bool send_world_score(bool do_send);
43+extern errr top_twenty(void);
44+extern errr predict_score(void);
45+extern void race_legends(void);
46+extern void race_score(int race_num);
47+extern void show_highclass(void);
48+
--- a/src/types.h
+++ b/src/types.h
@@ -2041,42 +2041,6 @@ typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
20412041 typedef int (*inven_func)(object_type *);
20422042
20432043
2044-/*
2045- * Semi-Portable High Score List Entry (128 bytes) -- BEN
2046- *
2047- * All fields listed below are null terminated ascii strings.
2048- *
2049- * In addition, the "number" fields are right justified, and
2050- * space padded, to the full available length (minus the "null").
2051- *
2052- * Note that "string comparisons" are thus valid on "pts".
2053- */
2054-
2055-typedef struct high_score high_score;
2056-
2057-struct high_score
2058-{
2059- GAME_TEXT what[8]; /* Version info (string) */
2060- GAME_TEXT pts[10]; /* Total Score (number) */
2061- GAME_TEXT gold[10]; /* Total Gold (number) */
2062- GAME_TEXT turns[10]; /* Turns Taken (number) */
2063- GAME_TEXT day[10]; /* Time stamp (string) */
2064- GAME_TEXT who[16]; /* Player Name (string) */
2065- GAME_TEXT uid[8]; /* Player UID (number) */
2066- GAME_TEXT sex[2]; /* Player Sex (string) */
2067- GAME_TEXT p_r[3]; /* Player Race (number) */
2068- GAME_TEXT p_c[3]; /* Player Class (number) */
2069- GAME_TEXT p_a[3]; /* Player Seikaku (number) */
2070-
2071- GAME_TEXT cur_lev[4]; /* Current Player Level (number) */
2072- GAME_TEXT cur_dun[4]; /* Current Dungeon Level (number) */
2073- GAME_TEXT max_lev[4]; /* Max Player Level (number) */
2074- GAME_TEXT max_dun[4]; /* Max Dungeon Level (number) */
2075-
2076- GAME_TEXT how[40]; /* Method of death (string) */
2077-};
2078-
2079-
20802044 typedef struct
20812045 {
20822046 FEAT_IDX feat; /* Feature tile */
Show on old repository browser