• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionbe5a3ca5ea259911cc3dd4e550cecccdc9f5e243 (tree)
Time2019-05-02 23:18:45
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 feat_prob 構造体と関連変数を feature.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -16,6 +16,7 @@
1616 #include "chest.h"
1717 #include "trap.h"
1818 #include "dungeon.h"
19+#include "feature.h"
1920 #include "floor.h"
2021 #include "melee.h"
2122 #include "object-hook.h"
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -47,6 +47,7 @@
4747 #include "cmd-pet.h"
4848 #include "cmd-spell.h"
4949 #include "dungeon.h"
50+#include "feature.h"
5051 #include "world.h"
5152 #include "player-effects.h"
5253 #include "player-status.h"
--- a/src/core.c
+++ b/src/core.c
@@ -31,6 +31,7 @@
3131 #include "cmd-basic.h"
3232 #include "snipe.h"
3333 #include "dungeon.h"
34+#include "feature.h"
3435 #include "floor.h"
3536 #include "floor-events.h"
3637 #include "floor-town.h"
--- a/src/dungeon.h
+++ b/src/dungeon.h
@@ -1,4 +1,5 @@
11 #pragma once
2+#include "feature.h"
23
34 /* A structure for the != dungeon types */
45 typedef struct dungeon_type dungeon_type;
--- a/src/feature.h
+++ b/src/feature.h
@@ -13,6 +13,12 @@ struct feature_state
1313 FEAT_IDX result; /*!< 変化先ID / Result (f_info ID) */
1414 };
1515
16+typedef struct
17+{
18+ FEAT_IDX feat; /* Feature tile */
19+ PERCENTAGE percent; /* Chance of type */
20+}
21+feat_prob;
1622
1723 /*!
1824 * @struct feature_type
--- a/src/types.h
+++ b/src/types.h
@@ -72,12 +72,3 @@ typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
7272 * This seems like a pretty standard "typedef"
7373 */
7474 typedef int (*inven_func)(object_type *);
75-
76-
77-typedef struct
78-{
79- FEAT_IDX feat; /* Feature tile */
80- PERCENTAGE percent; /* Chance of type */
81-}
82-feat_prob;
83-
Show on old repository browser