変愚蛮怒のメインリポジトリです
Revision | 75d7d011a54e8227db45c77ed312a25f10b3e48e (tree) |
---|---|
Time | 2018-11-26 21:15:18 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
[Refactor] #37353 型の置換。 / Type replacement.
@@ -1065,10 +1065,10 @@ extern int set_elec_destroy(object_type *o_ptr); | ||
1065 | 1065 | extern int set_fire_destroy(object_type *o_ptr); |
1066 | 1066 | extern int set_cold_destroy(object_type *o_ptr); |
1067 | 1067 | extern int inven_damage(inven_func typ, int perc); |
1068 | -extern int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1069 | -extern int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1070 | -extern int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1071 | -extern int cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1068 | +extern HIT_POINT acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1069 | +extern HIT_POINT elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1070 | +extern HIT_POINT fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1071 | +extern HIT_POINT cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); | |
1072 | 1072 | extern bool rustproof(void); |
1073 | 1073 | extern bool curse_armor(void); |
1074 | 1074 | extern bool curse_weapon_object(bool force, object_type *o_ptr); |
@@ -244,7 +244,7 @@ static cptr desc_moan[] = | ||
244 | 244 | * @return なし |
245 | 245 | */ |
246 | 246 | static void touch_zap_player_aux(monster_type *m_ptr, bool immune, int flags_offset, int r_flags_offset, u32b aura_flag, |
247 | - int(*dam_func)(HIT_POINT dam, cptr kb_str, int monspell, bool aura), cptr message) | |
247 | + HIT_POINT(*dam_func)(HIT_POINT dam, cptr kb_str, int monspell, bool aura), cptr message) | |
248 | 248 | { |
249 | 249 | monster_race *r_ptr = &r_info[m_ptr->r_idx]; |
250 | 250 |
@@ -3913,18 +3913,19 @@ bool spell_okay(int spell, bool learned, bool study_pray, int use_realm) | ||
3913 | 3913 | */ |
3914 | 3914 | void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX use_realm) |
3915 | 3915 | { |
3916 | - int i, spell, exp_level, increment = 64; | |
3916 | + int i; | |
3917 | + SPELL_IDX spell; | |
3918 | + int exp_level, increment = 64; | |
3917 | 3919 | const magic_type *s_ptr; |
3918 | - cptr comment; | |
3919 | - char info[80]; | |
3920 | - char out_val[160]; | |
3921 | - byte line_attr; | |
3922 | - int need_mana; | |
3923 | - char ryakuji[5]; | |
3924 | - char buf[256]; | |
3920 | + cptr comment; | |
3921 | + char info[80]; | |
3922 | + char out_val[160]; | |
3923 | + byte line_attr; | |
3924 | + MANA_POINT need_mana; | |
3925 | + char ryakuji[5]; | |
3926 | + char buf[256]; | |
3925 | 3927 | bool max = FALSE; |
3926 | 3928 | |
3927 | - | |
3928 | 3929 | if (((use_realm <= REALM_NONE) || (use_realm > MAX_REALM)) && p_ptr->wizard) |
3929 | 3930 | msg_print(_("警告! print_spell が領域なしに呼ばれた", "Warning! print_spells called with null realm")); |
3930 | 3931 |
@@ -3945,10 +3946,8 @@ void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y | ||
3945 | 3946 | /* Dump the spells */ |
3946 | 3947 | for (i = 0; i < num; i++) |
3947 | 3948 | { |
3948 | - /* Access the spell */ | |
3949 | 3949 | spell = spells[i]; |
3950 | 3950 | |
3951 | - /* Access the spell */ | |
3952 | 3951 | if (!is_magic(use_realm)) |
3953 | 3952 | { |
3954 | 3953 | s_ptr = &technic_info[use_realm - MIN_TECHNIC][spell]; |
@@ -4361,16 +4360,11 @@ int inven_damage(inven_func typ, int perc) | ||
4361 | 4360 | msg_format(_("%s(%c)が%s壊れてしまった!", "%sour %s (%c) %s destroyed!"), |
4362 | 4361 | |
4363 | 4362 | #ifdef JP |
4364 | -o_name, index_to_label(i), | |
4365 | - ((o_ptr->number > 1) ? | |
4366 | - ((amt == o_ptr->number) ? "全部" : | |
4367 | - (amt > 1 ? "何個か" : "一個")) : "") ); | |
4363 | + o_name, index_to_label(i), ((o_ptr->number > 1) ? | |
4364 | + ((amt == o_ptr->number) ? "全部" : (amt > 1 ? "何個か" : "一個")) : "") ); | |
4368 | 4365 | #else |
4369 | - ((o_ptr->number > 1) ? | |
4370 | - ((amt == o_ptr->number) ? "All of y" : | |
4371 | - (amt > 1 ? "Some of y" : "One of y")) : "Y"), | |
4372 | - o_name, index_to_label(i), | |
4373 | - ((amt > 1) ? "were" : "was")); | |
4366 | + ((o_ptr->number > 1) ? ((amt == o_ptr->number) ? "All of y" : | |
4367 | + (amt > 1 ? "Some of y" : "One of y")) : "Y"), o_name, index_to_label(i), ((amt > 1) ? "were" : "was")); | |
4374 | 4368 | #endif |
4375 | 4369 | |
4376 | 4370 | #ifdef JP |
@@ -4414,7 +4408,7 @@ static int minus_ac(void) | ||
4414 | 4408 | { |
4415 | 4409 | object_type *o_ptr = NULL; |
4416 | 4410 | BIT_FLAGS flgs[TR_FLAG_SIZE]; |
4417 | - char o_name[MAX_NLEN]; | |
4411 | + char o_name[MAX_NLEN]; | |
4418 | 4412 | |
4419 | 4413 | |
4420 | 4414 | /* Pick a (possibly empty) inventory slot */ |
@@ -4458,7 +4452,6 @@ static int minus_ac(void) | ||
4458 | 4452 | |
4459 | 4453 | /* Calculate bonuses */ |
4460 | 4454 | p_ptr->update |= (PU_BONUS); |
4461 | - | |
4462 | 4455 | p_ptr->window |= (PW_EQUIP | PW_PLAYER); |
4463 | 4456 | |
4464 | 4457 | calc_android_exp(); |
@@ -4477,9 +4470,9 @@ static int minus_ac(void) | ||
4477 | 4470 | * @param aura オーラよるダメージが原因ならばTRUE |
4478 | 4471 | * @return 修正HPダメージ量 |
4479 | 4472 | */ |
4480 | -int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4473 | +HIT_POINT acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4481 | 4474 | { |
4482 | - int get_damage; | |
4475 | + HIT_POINT get_damage; | |
4483 | 4476 | int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3; |
4484 | 4477 | bool double_resist = IS_OPPOSE_ACID(); |
4485 | 4478 |
@@ -4527,9 +4520,9 @@ int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | ||
4527 | 4520 | * @param aura オーラよるダメージが原因ならばTRUE |
4528 | 4521 | * @return 修正HPダメージ量 |
4529 | 4522 | */ |
4530 | -int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4523 | +HIT_POINT elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4531 | 4524 | { |
4532 | - int get_damage; | |
4525 | + HIT_POINT get_damage; | |
4533 | 4526 | int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3; |
4534 | 4527 | bool double_resist = IS_OPPOSE_ELEC(); |
4535 | 4528 |
@@ -4576,9 +4569,9 @@ int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | ||
4576 | 4569 | * @param aura オーラよるダメージが原因ならばTRUE |
4577 | 4570 | * @return 修正HPダメージ量 |
4578 | 4571 | */ |
4579 | -int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4572 | +HIT_POINT fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4580 | 4573 | { |
4581 | - int get_damage; | |
4574 | + HIT_POINT get_damage; | |
4582 | 4575 | int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3; |
4583 | 4576 | bool double_resist = IS_OPPOSE_FIRE(); |
4584 | 4577 |
@@ -4625,9 +4618,9 @@ int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | ||
4625 | 4618 | * @param aura オーラよるダメージが原因ならばTRUE |
4626 | 4619 | * @return 修正HPダメージ量 |
4627 | 4620 | */ |
4628 | -int cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4621 | +HIT_POINT cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura) | |
4629 | 4622 | { |
4630 | - int get_damage; | |
4623 | + HIT_POINT get_damage; | |
4631 | 4624 | int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3; |
4632 | 4625 | bool double_resist = IS_OPPOSE_COLD(); |
4633 | 4626 |