変愚蛮怒のメインリポジトリです
Revision | f2f30fa709412594b662c28db73b0b4488ac9e3a (tree) |
---|---|
Time | 2019-02-14 13:16:30 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
[Refactor] #37353 set_gametime() を spells-world.c/h に移動。 / Move set_gametime() to spells-world.c/h.
@@ -242,6 +242,7 @@ | ||
242 | 242 | <ClCompile Include="..\..\src\spells-object.c" /> |
243 | 243 | <ClCompile Include="..\..\src\spells-status.c" /> |
244 | 244 | <ClCompile Include="..\..\src\spells-summon.c" /> |
245 | + <ClCompile Include="..\..\src\spells-world.c" /> | |
245 | 246 | <ClCompile Include="..\..\src\spells1.c" /> |
246 | 247 | <ClCompile Include="..\..\src\spells2.c" /> |
247 | 248 | <ClCompile Include="..\..\src\spells3.c" /> |
@@ -331,6 +332,7 @@ | ||
331 | 332 | <ClInclude Include="..\..\src\spells-summon.h" /> |
332 | 333 | <ClInclude Include="..\..\src\floor-streams.h" /> |
333 | 334 | <ClInclude Include="..\..\src\projection.h" /> |
335 | + <ClInclude Include="..\..\src\spells-world.h" /> | |
334 | 336 | <ClInclude Include="..\..\src\spells.h" /> |
335 | 337 | <ClInclude Include="..\..\src\store.h" /> |
336 | 338 | <ClInclude Include="..\..\src\trap.h" /> |
@@ -0,0 +1,24 @@ | ||
1 | +#include "angband.h" | |
2 | + | |
3 | +/*! | |
4 | + * @brief プレイ日数を変更する / Set gametime. | |
5 | + * @return 実際に変更を行ったらTRUEを返す | |
6 | + */ | |
7 | +bool set_gametime(void) | |
8 | +{ | |
9 | + int tmp_int = 0; | |
10 | + char ppp[80], tmp_val[40]; | |
11 | + | |
12 | + sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)dungeon_turn_limit); | |
13 | + sprintf(tmp_val, "%ld", (long)dungeon_turn); | |
14 | + if (!get_string(ppp, tmp_val, 10)) return (FALSE); | |
15 | + tmp_int = atoi(tmp_val); | |
16 | + | |
17 | + /* Verify */ | |
18 | + if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1; | |
19 | + else if (tmp_int < 0) tmp_int = 0; | |
20 | + dungeon_turn = turn = tmp_int; | |
21 | + return (TRUE); | |
22 | + | |
23 | +} | |
24 | + |
@@ -0,0 +1 @@ | ||
1 | +extern bool set_gametime(void); |
@@ -23,6 +23,7 @@ | ||
23 | 23 | #include "spells-object.h" |
24 | 24 | #include "spells-summon.h" |
25 | 25 | #include "spells-status.h" |
26 | +#include "spells-world.h" | |
26 | 27 | #include "object-hook.h" |
27 | 28 | |
28 | 29 | #ifdef ALLOW_WIZARD |
@@ -39,30 +40,6 @@ static bool wiz_dimension_door(void) | ||
39 | 40 | return (TRUE); |
40 | 41 | } |
41 | 42 | |
42 | - | |
43 | -/*! | |
44 | - * @brief プレイ日数を変更する / Set gametime. | |
45 | - * @return 実際に変更を行ったらTRUEを返す | |
46 | - */ | |
47 | -static bool set_gametime(void) | |
48 | -{ | |
49 | - int tmp_int = 0; | |
50 | - char ppp[80], tmp_val[40]; | |
51 | - | |
52 | - sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)dungeon_turn_limit); | |
53 | - sprintf(tmp_val, "%ld", (long)dungeon_turn); | |
54 | - if (!get_string(ppp, tmp_val, 10)) return (FALSE); | |
55 | - tmp_int = atoi(tmp_val); | |
56 | - | |
57 | - /* Verify */ | |
58 | - if (tmp_int >= dungeon_turn_limit) tmp_int = dungeon_turn_limit - 1; | |
59 | - else if (tmp_int < 0) tmp_int = 0; | |
60 | - dungeon_turn = turn = tmp_int; | |
61 | - return (TRUE); | |
62 | - | |
63 | -} | |
64 | - | |
65 | - | |
66 | 43 | /*! |
67 | 44 | * @brief 指定されたIDの固定アーティファクトを生成する / Create the artifact of the specified number |
68 | 45 | * @return なし |