• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

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


コミットメタ情報

リビジョン6cf96c6b1c3341ee94382b482f969b4b7f9d5858 (tree)
日時2017-12-13 01:02:50
作者Deskull <desull@user...>
コミッターDeskull

ログメッセージ

#37287 #37353 (2.2.0.89) BACT_IDX, BACT_RESTRICT_IDX 型を定義し、型の置換を継続中。LNK4075を修正。 / Define BACT_IDX, BACT_RESTRICT_IDX ongoing type replacement. Fix LNK4075.

変更サマリ

差分

--- a/Hengband_vcs2015/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2015/Hengband/Hengband.vcxproj
@@ -1,5 +1,17 @@
11 <?xml version="1.0" encoding="utf-8"?>
2-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+ <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4+ <ConfigurationType>StaticLibrary</ConfigurationType>
5+ <UseDebugLibraries>true</UseDebugLibraries>
6+ <PlatformToolset>v120</PlatformToolset>
7+ <CharacterSet>Unicode</CharacterSet>
8+ </PropertyGroup>
9+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
10+ <ConfigurationType>StaticLibrary</ConfigurationType>
11+ <UseDebugLibraries>false</UseDebugLibraries>
12+ <PlatformToolset>v120</PlatformToolset>
13+ <CharacterSet>Unicode</CharacterSet>
14+ </PropertyGroup>
315 <ItemGroup Label="ProjectConfigurations">
416 <ProjectConfiguration Include="Debug|Win32">
517 <Configuration>Debug</Configuration>
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -4293,8 +4293,8 @@ static bool research_mon(void)
42934293 */
42944294 static void bldg_process_command(building_type *bldg, int i)
42954295 {
4296- int bact = bldg->actions[i];
4297- int bcost;
4296+ BACT_IDX bact = bldg->actions[i];
4297+ PRICE bcost;
42984298 bool paid = FALSE;
42994299 int amt;
43004300
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -113,6 +113,8 @@ typedef s16b CLASS_IDX; /*!< ゲーム中のプレイヤー職業ID型を定
113113 typedef s16b MIMIC_RACE_IDX; /*!< ゲーム中のプレイヤー変身種族ID型を定義 */
114114 typedef s16b PATRON_IDX; /*!< ゲーム中のプレイヤーパトロンID型を定義 */
115115 typedef s32b ACTION_IDX; /*!< プレイヤーが現在取っている常時行動のID定義 */
116+typedef s16b BACT_IDX; /*!< 町の施設処理のID定義 */
117+typedef s16b BACT_RESTRICT_IDX; /*!< 町の施設処理の規制処理ID定義 */
116118
117119 typedef s16b MONRACE_IDX; /*!< ゲーム中のモンスター種族ID型を定義 */
118120 typedef s16b MONSTER_IDX; /*!< ゲーム中のモンスター個体ID型を定義 */
--- a/src/init1.c
+++ b/src/init1.c
@@ -3864,10 +3864,10 @@ static errr parse_line_building(char *buf)
38643864 building[index].letters[action_index] = zz[4][0];
38653865
38663866 /* Action code */
3867- building[index].actions[action_index] = atoi(zz[5]);
3867+ building[index].actions[action_index] = (BACT_IDX)atoi(zz[5]);
38683868
38693869 /* Action restriction */
3870- building[index].action_restr[action_index] = atoi(zz[6]);
3870+ building[index].action_restr[action_index] = (BACT_RESTRICT_IDX)atoi(zz[6]);
38713871
38723872 break;
38733873 }
--- a/src/types.h
+++ b/src/types.h
@@ -1463,8 +1463,8 @@ struct building_type
14631463 PRICE member_costs[8]; /* Costs for class members of building */
14641464 PRICE other_costs[8]; /* Costs for nonguild members */
14651465 char letters[8]; /* action letters */
1466- s16b actions[8]; /* action codes */
1467- s16b action_restr[8]; /* action restrictions */
1466+ BACT_IDX actions[8]; /* action codes */
1467+ BACT_RESTRICT_IDX action_restr[8]; /* action restrictions */
14681468
14691469 CLASS_IDX member_class[MAX_CLASS]; /* which classes are part of guild */
14701470 RACE_IDX member_race[MAX_RACES]; /* which classes are part of guild */
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -1539,9 +1539,8 @@ static void do_cmd_wiz_jump(void)
15391539 if (command_arg <= 0)
15401540 {
15411541 char ppp[80];
1542-
15431542 char tmp_val[160];
1544- int tmp_dungeon_type;
1543+ DUNGEON_IDX tmp_dungeon_type;
15451544
15461545 /* Prompt */
15471546 sprintf(ppp, "Jump which dungeon : ");
@@ -1552,7 +1551,7 @@ static void do_cmd_wiz_jump(void)
15521551 /* Ask for a level */
15531552 if (!get_string(ppp, tmp_val, 2)) return;
15541553
1555- tmp_dungeon_type = atoi(tmp_val);
1554+ tmp_dungeon_type = (DUNGEON_IDX)atoi(tmp_val);
15561555 if (!d_info[tmp_dungeon_type].maxdepth || (tmp_dungeon_type > max_d_idx)) tmp_dungeon_type = DUNGEON_ANGBAND;
15571556
15581557 /* Prompt */
@@ -1566,9 +1565,9 @@ static void do_cmd_wiz_jump(void)
15661565 if (!get_string(ppp, tmp_val, 10)) return;
15671566
15681567 /* Extract request */
1569- command_arg = (s16b)atoi(tmp_val);
1568+ command_arg = (COMMAND_ARG)atoi(tmp_val);
15701569
1571- dungeon_type = (byte_hack)tmp_dungeon_type;
1570+ dungeon_type = tmp_dungeon_type;
15721571 }
15731572
15741573 /* Paranoia */
旧リポジトリブラウザで表示