変愚蛮怒のメインリポジトリです
Revision | a55fcffc6673dd5b7a79f87233961be0f4533b83 (tree) |
---|---|
Time | 2017-12-02 18:41:58 |
Author | Deskull <desull@user...> |
Commiter | Deskull |
@@ -2512,7 +2512,7 @@ void do_cmd_walk(bool pickup) | ||
2512 | 2512 | } |
2513 | 2513 | |
2514 | 2514 | /* Get a "repeated" direction */ |
2515 | - if (get_rep_dir(&dir,FALSE)) | |
2515 | + if (get_rep_dir(&dir, FALSE)) | |
2516 | 2516 | { |
2517 | 2517 | /* Take a turn */ |
2518 | 2518 | p_ptr->energy_use = 100; |
@@ -1505,7 +1505,7 @@ extern bool target_set(int mode); | ||
1505 | 1505 | extern void target_set_prepare_look(void); |
1506 | 1506 | extern bool get_aim_dir(DIRECTION *dp); |
1507 | 1507 | extern bool get_hack_dir(int *dp); |
1508 | -extern bool get_rep_dir(int *dp, bool under); | |
1508 | +extern bool get_rep_dir(DIRECTION *dp, bool under); | |
1509 | 1509 | extern bool get_rep_dir2(int *dp); |
1510 | 1510 | extern void gain_level_reward(int chosen_reward); |
1511 | 1511 | extern bool tgt_pt(POSITION *x, POSITION *y); |
@@ -3071,10 +3071,10 @@ errr parse_r_info(char *buf, header *head) | ||
3071 | 3071 | if (*t == 'd') *t++ = '\0'; |
3072 | 3072 | |
3073 | 3073 | /* Save the method */ |
3074 | - r_ptr->blow[i].method = n1; | |
3074 | + r_ptr->blow[i].method = (BLOW_METHOD)n1; | |
3075 | 3075 | |
3076 | 3076 | /* Save the effect */ |
3077 | - r_ptr->blow[i].effect = n2; | |
3077 | + r_ptr->blow[i].effect = (BLOW_EFFECT)n2; | |
3078 | 3078 | |
3079 | 3079 | /* Extract the damage dice and sides */ |
3080 | 3080 | r_ptr->blow[i].d_dice = atoi(s); |
@@ -4230,13 +4230,13 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in | ||
4230 | 4230 | if (num < 9) return (PARSE_ERROR_TOO_FEW_ARGUMENTS); |
4231 | 4231 | |
4232 | 4232 | q_ptr->type = atoi(zz[2]); |
4233 | - q_ptr->num_mon = atoi(zz[3]); | |
4234 | - q_ptr->cur_num = atoi(zz[4]); | |
4235 | - q_ptr->max_num = atoi(zz[5]); | |
4236 | - q_ptr->level = atoi(zz[6]); | |
4233 | + q_ptr->num_mon = (MONSTER_NUMBER)atoi(zz[3]); | |
4234 | + q_ptr->cur_num = (MONSTER_NUMBER)atoi(zz[4]); | |
4235 | + q_ptr->max_num = (MONSTER_NUMBER)atoi(zz[5]); | |
4236 | + q_ptr->level = (DEPTH)atoi(zz[6]); | |
4237 | 4237 | q_ptr->r_idx = (IDX)atoi(zz[7]); |
4238 | 4238 | q_ptr->k_idx = (IDX)atoi(zz[8]); |
4239 | - q_ptr->dungeon = atoi(zz[9]); | |
4239 | + q_ptr->dungeon = (DUNGEON_IDX)atoi(zz[9]); | |
4240 | 4240 | |
4241 | 4241 | if (num > 10) |
4242 | 4242 | q_ptr->flags = atoi(zz[10]); |
@@ -1978,7 +1978,7 @@ static errr init_object_alloc(void) | ||
1978 | 1978 | z = y + aux[x]; |
1979 | 1979 | |
1980 | 1980 | /* Load the entry */ |
1981 | - table[z].index = i; | |
1981 | + table[z].index = (KIND_OBJECT_IDX)i; | |
1982 | 1982 | table[z].level = (DEPTH)x; |
1983 | 1983 | table[z].prob1 = (PROB)p; |
1984 | 1984 | table[z].prob2 = (PROB)p; |
@@ -2047,7 +2047,7 @@ static errr init_alloc(void) | ||
2047 | 2047 | p = (100 / r_ptr->rarity); |
2048 | 2048 | |
2049 | 2049 | /* Load the entry */ |
2050 | - alloc_race_table[i].index = elements[i].index; | |
2050 | + alloc_race_table[i].index = (KIND_OBJECT_IDX)elements[i].index; | |
2051 | 2051 | alloc_race_table[i].level = (DEPTH)x; |
2052 | 2052 | alloc_race_table[i].prob1 = (PROB)p; |
2053 | 2053 | alloc_race_table[i].prob2 = (PROB)p; |
@@ -3579,7 +3579,8 @@ static errr rd_savefile_new_aux(void) | ||
3579 | 3579 | } |
3580 | 3580 | else |
3581 | 3581 | { |
3582 | - rd_byte(&q_ptr->complev); | |
3582 | + rd_byte(&tmp8u); | |
3583 | + q_ptr->complev = tmp8u; | |
3583 | 3584 | } |
3584 | 3585 | if(h_older_than(2, 1, 2, 2)) |
3585 | 3586 | { |
@@ -3615,7 +3616,8 @@ static errr rd_savefile_new_aux(void) | ||
3615 | 3616 | if (q_ptr->k_idx) |
3616 | 3617 | a_info[q_ptr->k_idx].gen_flags |= TRG_QUESTITEM; |
3617 | 3618 | |
3618 | - rd_byte(&q_ptr->flags); | |
3619 | + rd_byte(&tmp8u); | |
3620 | + q_ptr->flags = tmp8u; | |
3619 | 3621 | |
3620 | 3622 | if (z_older_than(10, 3, 11)) |
3621 | 3623 | { |
@@ -3634,7 +3636,8 @@ static errr rd_savefile_new_aux(void) | ||
3634 | 3636 | } |
3635 | 3637 | else |
3636 | 3638 | { |
3637 | - rd_byte(&q_ptr->dungeon); | |
3639 | + rd_byte(&tmp8u); | |
3640 | + q_ptr->dungeon = tmp8u; | |
3638 | 3641 | } |
3639 | 3642 | /* Mark uniques */ |
3640 | 3643 | if (q_ptr->status == QUEST_STATUS_TAKEN || q_ptr->status == QUEST_STATUS_UNTAKEN) |
@@ -3631,8 +3631,8 @@ int scan_floor(int *items, POSITION y, POSITION x, int mode) | ||
3631 | 3631 | */ |
3632 | 3632 | COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width) |
3633 | 3633 | { |
3634 | - COMMAND_CODE i; | |
3635 | - int j, k, l, m; | |
3634 | + COMMAND_CODE i, m; | |
3635 | + int j, k, l; | |
3636 | 3636 | int col, len; |
3637 | 3637 | |
3638 | 3638 | object_type *o_ptr; |
@@ -635,7 +635,7 @@ typedef struct alloc_entry alloc_entry; | ||
635 | 635 | |
636 | 636 | struct alloc_entry |
637 | 637 | { |
638 | - IDX index; /* The actual index */ | |
638 | + KIND_OBJECT_IDX index; /* The actual index */ | |
639 | 639 | |
640 | 640 | DEPTH level; /* Base dungeon level */ |
641 | 641 | PROB prob1; /* Probability, pass 1 */ |
@@ -745,16 +745,17 @@ void strip_name(char *buf, KIND_OBJECT_IDX k_idx) | ||
745 | 745 | * This function returns the k_idx of an object type, or zero if failed |
746 | 746 | * List up to 50 choices in three columns |
747 | 747 | */ |
748 | -static IDX wiz_create_itemtype(void) | |
748 | +static KIND_OBJECT_IDX wiz_create_itemtype(void) | |
749 | 749 | { |
750 | - int i, num, max_num; | |
751 | - int col, row; | |
750 | + KIND_OBJECT_IDX i; | |
751 | + int num, max_num; | |
752 | + TERM_POSITION col, row; | |
752 | 753 | OBJECT_TYPE_VALUE tval; |
753 | 754 | |
754 | 755 | cptr tval_desc; |
755 | 756 | char ch; |
756 | 757 | |
757 | - int choice[80]; | |
758 | + KIND_OBJECT_IDX choice[80]; | |
758 | 759 | |
759 | 760 | char buf[160]; |
760 | 761 |
@@ -4235,9 +4235,9 @@ bool get_aim_dir(DIRECTION *dp) | ||
4235 | 4235 | * This function tracks and uses the "global direction", and uses |
4236 | 4236 | * that as the "desired direction", to which "confusion" is applied. |
4237 | 4237 | */ |
4238 | -bool get_rep_dir(int *dp, bool under) | |
4238 | +bool get_rep_dir(DIRECTION *dp, bool under) | |
4239 | 4239 | { |
4240 | - int dir; | |
4240 | + DIRECTION dir; | |
4241 | 4241 | cptr prompt; |
4242 | 4242 | |
4243 | 4243 | /* Initialize */ |