• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

修订版dd14461d9d396d79e1553cae6db99f0df42bcf2b (tree)
时间2020-02-01 13:42:15
作者Hourier <hourier@user...>
CommiterHourier

Log Message

[Refactor] #37353 dungeon-file.c のヘッダー重複除去と、一部のコメント削除 / Removed duplication of including headers and some comments per line

更改概述

差异

--- a/src/dungeon-file.c
+++ b/src/dungeon-file.c
@@ -1,32 +1,4 @@
1-
2-#include "angband.h"
3-#include "util.h"
4-#include "core.h"
5-
6-#include "files.h"
7-#include "dungeon-file.h"
8-#include "rooms-vault.h"
9-#include "feature.h"
10-#include "grid.h"
11-#include "quest.h"
12-#include "monster.h"
13-#include "files.h"
14-#include "player-skill.h"
15-#include "player-race.h"
16-#include "dungeon.h"
17-#include "floor.h"
18-#include "bldg.h"
19-#include "world.h"
20-#include "rooms-vault.h"
21-#include "objectkind.h"
22-#include "object-ego.h"
23-#include "monsterrace.h"
24-#include "floor-town.h"
25-#include "realm.h"
26-
27-dungeon_grid letter[255];
28-
29-/*!
1+/*!
302 * @file init1.c
313 * @brief ゲームデータ初期化1 / Initialization (part 1) -BEN-
324 * @date 2014/01/28
@@ -60,20 +32,42 @@ dungeon_grid letter[255];
6032 */
6133
6234 #include "angband.h"
35+#include "util.h"
36+#include "core.h"
37+
38+#include "files.h"
6339 #include "dungeon-file.h"
64-#include "trap.h"
40+#include "rooms-vault.h"
41+#include "feature.h"
6542 #include "grid.h"
43+#include "quest.h"
6644 #include "monster.h"
45+#include "files.h"
46+#include "player-skill.h"
47+#include "player-race.h"
48+#include "dungeon.h"
49+#include "floor.h"
50+#include "bldg.h"
51+#include "world.h"
52+#include "rooms-vault.h"
53+#include "objectkind.h"
54+#include "object-ego.h"
55+#include "monsterrace.h"
56+#include "floor-town.h"
57+#include "realm.h"
58+
59+#include "trap.h"
6760 #include "artifact.h"
6861 #include "cmd-activate.h"
6962 #include "term.h"
7063 #include "wild.h"
71-#include "quest.h"
7264 #include "view-mainwindow.h"
7365 #include "player-class.h"
7466
7567 #include "init.h"
7668
69+dungeon_grid letter[255];
70+
7771 /*** Helper arrays for parsing ascii template files ***/
7872
7973 /*!
@@ -926,18 +920,13 @@ static concptr d_info_flags1[] =
926920 */
927921 static bool add_text(u32b *offset, header *head, concptr buf, bool normal_text)
928922 {
929- /* Hack -- Verify space */
930923 if (head->text_size + strlen(buf) + 8 > FAKE_TEXT_SIZE)
931924 return FALSE;
932925
933- /* New text? */
934926 if (*offset == 0)
935927 {
936- /* Advance and save the text index */
937928 *offset = ++head->text_size;
938929 }
939-
940- /* Additional text */
941930 else if (normal_text)
942931 {
943932 /*
@@ -956,10 +945,7 @@ static bool add_text(u32b *offset, header *head, concptr buf, bool normal_text)
956945 #endif
957946 )
958947 {
959- /* Append a space */
960948 *(head->text_ptr + head->text_size) = ' ';
961-
962- /* Advance the index */
963949 head->text_size++;
964950 }
965951 }
@@ -983,24 +969,16 @@ static bool add_text(u32b *offset, header *head, concptr buf, bool normal_text)
983969 */
984970 static bool add_name(u32b *offset, header *head, concptr buf)
985971 {
986- /* Hack -- Verify space */
987972 if (head->name_size + strlen(buf) + 8 > FAKE_NAME_SIZE)
988973 return FALSE;
989974
990- /* New name? */
991975 if (*offset == 0)
992976 {
993- /* Advance and save the name index */
994977 *offset = ++head->name_size;
995978 }
996979
997- /* Append chars to the names */
998980 strcpy(head->name_ptr + head->name_size, buf);
999-
1000- /* Advance the index */
1001981 head->name_size += strlen(buf);
1002-
1003- /* Success */
1004982 return TRUE;
1005983 }
1006984