リビジョン | 924ccf7dec90442b9f1dc29743203792b11fdd3d (tree) |
---|---|
日時 | 2017-10-26 09:18:57 |
作者 | Deskull <desull@user...> |
コミッター | Deskull |
@@ -2232,8 +2232,9 @@ static bool activate_dragon_breath(object_type *o_ptr) | ||
2232 | 2232 | */ |
2233 | 2233 | bool activate_random_artifact(object_type *o_ptr) |
2234 | 2234 | { |
2235 | - int plev = p_ptr->lev; | |
2236 | - int k, dir, dummy = 0; | |
2235 | + PLAYER_LEVEL plev = p_ptr->lev; | |
2236 | + int k, dummy = 0; | |
2237 | + DIRECTION dir; | |
2237 | 2238 | cptr name = k_name + k_info[o_ptr->k_idx].name; |
2238 | 2239 | const activation_type* const act_ptr = find_activation_info(o_ptr); |
2239 | 2240 |
@@ -1503,7 +1503,7 @@ extern bool target_able(MONSTER_IDX m_idx); | ||
1503 | 1503 | extern bool target_okay(void); |
1504 | 1504 | extern bool target_set(int mode); |
1505 | 1505 | extern void target_set_prepare_look(void); |
1506 | -extern bool get_aim_dir(int *dp); | |
1506 | +extern bool get_aim_dir(DIRECTION *dp); | |
1507 | 1507 | extern bool get_hack_dir(int *dp); |
1508 | 1508 | extern bool get_rep_dir(int *dp, bool under); |
1509 | 1509 | extern bool get_rep_dir2(int *dp); |
@@ -113,15 +113,21 @@ typedef s16b REALM_IDX; /*!< ゲーム中の魔法領域ID型を定義 */ | ||
113 | 113 | typedef s16b ARTIFACT_IDX; /*!< ゲーム中のアーティファクトID型を定義 */ |
114 | 114 | typedef s16b VIRTUES_IDX; /*!< ゲーム中の徳ID型を定義 */ |
115 | 115 | typedef s16b QUEST_IDX; /*!< ゲーム中のクエストID型を定義 */ |
116 | + | |
116 | 117 | typedef s16b INVENTORY_IDX; /*!< ゲーム中の所持品ID型を定義 */ |
117 | 118 | typedef s16b OBJECT_IDX; /*!< ゲーム中のアイテムID型を定義 */ |
118 | 119 | |
120 | +typedef s16b KIND_OBJECT_IDX; /*!< ゲーム中のベースアイテムID型を定義 */ | |
121 | + | |
119 | 122 | typedef s32b POSITION; /*!< ゲーム中の座標型を定義 */ |
120 | 123 | typedef s32b HIT_POINT; /*!< ゲーム中のHP/ダメージ型を定義 */ |
121 | 124 | typedef s32b MANA_POINT; /*!< ゲーム中のMP型を定義 */ |
122 | 125 | typedef s16b HIT_PROB; /*!< ゲーム中の命中修正値を定義 */ |
123 | 126 | typedef s16b BASE_STATUS; /*!< ゲーム中の基礎能力値型を定義 */ |
124 | -typedef s32b ITEM_NUMBER; /*!< ゲーム中のアイテム数型を定義 */ | |
127 | + | |
128 | +typedef s32b MONSTER_NUMBER; /*!< ゲーム中のモンスター数型を定義 */ | |
129 | +typedef s32b ITEM_NUMBER; /*!< ゲーム中のアイテム数型を定義 */ | |
130 | + | |
125 | 131 | typedef s16b ACTION_ENERGY; /*!< ゲーム中の行動エネルギー型を定義 */ |
126 | 132 | typedef s16b ARMOUR_CLASS; /*!< ゲーム中の行動アーマークラス型を定義 */ |
127 | 133 | typedef s16b TIME_EFFECT; /*!< ゲーム中の時限期間の型を定義 */ |
@@ -276,10 +276,10 @@ static int get_mane_power(int *sn, bool baigaesi) | ||
276 | 276 | */ |
277 | 277 | static bool use_mane(int spell) |
278 | 278 | { |
279 | - int dir; | |
280 | - int plev = p_ptr->lev; | |
281 | - u32b mode = (PM_ALLOW_GROUP | PM_FORCE_PET); | |
282 | - u32b u_mode = 0L; | |
279 | + DIRECTION dir; | |
280 | + PLAYER_LEVEL plev = p_ptr->lev; | |
281 | + BIT_FLAGS mode = (PM_ALLOW_GROUP | PM_FORCE_PET); | |
282 | + BIT_FLAGS u_mode = 0L; | |
283 | 283 | |
284 | 284 | if (randint1(50+plev) < plev/10) u_mode = PM_ALLOW_UNIQUE; |
285 | 285 |
@@ -567,7 +567,7 @@ static bool cast_sniper_spell(int spell) | ||
567 | 567 | */ |
568 | 568 | void do_cmd_snipe(void) |
569 | 569 | { |
570 | - int n = 0; | |
570 | + COMMAND_CODE n = 0; | |
571 | 571 | bool cast; |
572 | 572 | |
573 | 573 |
@@ -1198,11 +1198,11 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ) | ||
1198 | 1198 | * We return "TRUE" if the effect of the projection is "obvious". |
1199 | 1199 | * </pre> |
1200 | 1200 | */ |
1201 | -static bool project_o(int who, int r, int y, int x, int dam, int typ) | |
1201 | +static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, int typ) | |
1202 | 1202 | { |
1203 | 1203 | cave_type *c_ptr = &cave[y][x]; |
1204 | 1204 | |
1205 | - s16b this_o_idx, next_o_idx = 0; | |
1205 | + OBJECT_IDX this_o_idx, next_o_idx = 0; | |
1206 | 1206 | |
1207 | 1207 | bool obvious = FALSE; |
1208 | 1208 | bool known = player_has_los_bold(y, x); |
@@ -947,7 +947,7 @@ bool recall_player(TIME_EFFECT turns) | ||
947 | 947 | { |
948 | 948 | if (!dun_level) |
949 | 949 | { |
950 | - int select_dungeon; | |
950 | + DUNGEON_IDX select_dungeon; | |
951 | 951 | select_dungeon = choose_dungeon(_("に帰還", "recall"), 2, 14); |
952 | 952 | if (!select_dungeon) return FALSE; |
953 | 953 | p_ptr->recall_dungeon = select_dungeon; |
@@ -695,14 +695,14 @@ struct quest_type | ||
695 | 695 | s16b type; /*!< クエストの種別 / The quest type */ |
696 | 696 | |
697 | 697 | char name[60]; /*!< クエスト名 / Quest name */ |
698 | - DEPTH level; /*!< 処理階層 / Dungeon level */ | |
699 | - MONRACE_IDX r_idx; /*!< クエスト対象のモンスターID / Monster race */ | |
700 | - | |
701 | - s16b cur_num; /*!< 撃破したモンスターの数 / Number killed */ | |
702 | - s16b max_num; /*!< 求められるモンスターの撃破数 / Number required */ | |
703 | - | |
704 | - IDX k_idx; /*!< クエスト対象のアイテムID / object index */ | |
705 | - s16b num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */ | |
698 | + DEPTH level; /*!< 処理階層 / Dungeon level */ | |
699 | + MONRACE_IDX r_idx; /*!< クエスト対象のモンスターID / Monster race */ | |
700 | + | |
701 | + MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */ | |
702 | + MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */ | |
703 | + | |
704 | + IDX k_idx; /*!< クエスト対象のアイテムID / object index */ | |
705 | + MONSTER_NUMBER num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */ | |
706 | 706 | |
707 | 707 | byte flags; /*!< クエストに関するフラグビット / quest flags */ |
708 | 708 | byte dungeon; /*!< クエスト対象のダンジョンID / quest dungeon */ |
@@ -1272,7 +1272,7 @@ static void do_cmd_wiz_blue_mage(void) | ||
1272 | 1272 | */ |
1273 | 1273 | static void do_cmd_wiz_play(void) |
1274 | 1274 | { |
1275 | - int item; | |
1275 | + OBJECT_IDX item; | |
1276 | 1276 | |
1277 | 1277 | object_type forge; |
1278 | 1278 | object_type *q_ptr; |
@@ -1555,7 +1555,8 @@ static void do_cmd_wiz_jump(void) | ||
1555 | 1555 | if (!d_info[tmp_dungeon_type].maxdepth || (tmp_dungeon_type > max_d_idx)) tmp_dungeon_type = DUNGEON_ANGBAND; |
1556 | 1556 | |
1557 | 1557 | /* Prompt */ |
1558 | - sprintf(ppp, "Jump to level (0, %d-%d): ", d_info[tmp_dungeon_type].mindepth, d_info[tmp_dungeon_type].maxdepth); | |
1558 | + sprintf(ppp, "Jump to level (0, %d-%d): ", | |
1559 | + (int)d_info[tmp_dungeon_type].mindepth, (int)d_info[tmp_dungeon_type].maxdepth); | |
1559 | 1560 | |
1560 | 1561 | /* Default */ |
1561 | 1562 | sprintf(tmp_val, "%d", (int)dun_level); |
@@ -4091,12 +4091,10 @@ bool target_set(int mode) | ||
4091 | 4091 | * |
4092 | 4092 | * Note that confusion over-rides any (explicit?) user choice. |
4093 | 4093 | */ |
4094 | -bool get_aim_dir(int *dp) | |
4094 | +bool get_aim_dir(DIRECTION *dp) | |
4095 | 4095 | { |
4096 | - int dir; | |
4097 | - | |
4096 | + DIRECTION dir; | |
4098 | 4097 | char command; |
4099 | - | |
4100 | 4098 | cptr p; |
4101 | 4099 | |
4102 | 4100 | /* Initialize */ |