X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Finit1.c;h=672f163b852766ae07b9085df163448413e522be;hb=68ddc35396267518d96092da65013a9f4901acc9;hp=e8aa679e4df786f5b245a5f14c24c785176d359d;hpb=4298e5c3d360216738f452e5595ce430016e2d28;p=hengband%2Fhengband.git diff --git a/src/init1.c b/src/init1.c index e8aa679e4..672f163b8 100644 --- a/src/init1.c +++ b/src/init1.c @@ -963,8 +963,8 @@ static cptr d_info_flags1[] = "CAVE", "CAVERN", "ARCADE", - "XXX", - "XXX", + "LAKE_ACID", + "LAKE_POISONOUS", "XXX", "FORGET", "LAKE_WATER", @@ -980,8 +980,8 @@ static cptr d_info_flags1[] = "NO_MELEE", "CHAMELEON", "DARKNESS", - "XXX", - "XXX" + "ACID_RIVER", + "POISONOUS_RIVER" }; @@ -2600,27 +2600,24 @@ static bool grab_one_ego_item_flag(ego_item_type *e_ptr, cptr what) errr parse_e_info(char *buf, header *head) { int i; - char *s, *t; /* Current entry */ static ego_item_type *e_ptr = NULL; - /* Just before the first record */ error_idx = -1; /* Just before the first line */ error_line = -1; - /* Process 'N' for "New/Number/Name" */ if (buf[0] == 'N') { /* Find the colon before the name */ s = my_strchr(buf+2, ':'); - /* Verify that colon */ + /* Verify that colon */ if (!s) return (1); /* Nuke the colon, advance to the name */ @@ -2848,7 +2845,6 @@ static errr grab_one_spell_flag(monster_race *r_ptr, cptr what) errr parse_r_info(char *buf, header *head) { int i; - char *s, *t; /* Current entry */ @@ -3004,7 +3000,7 @@ errr parse_r_info(char *buf, header *head) { int id, ds, dd; /* Find the next empty blow slot (if any) */ - for (i = 0; i < 6; i++) if (r_ptr->reinforce_id[i] == 0) break; + for (i = 0; i < A_MAX; i++) if (r_ptr->reinforce_id[i] == 0) break; /* Oops, no more slots */ if (i == 6) return (1); @@ -3254,13 +3250,11 @@ static errr grab_one_spell_monster_flag(dungeon_info_type *d_ptr, cptr what) errr parse_d_info(char *buf, header *head) { int i; - char *s, *t; /* Current entry */ static dungeon_info_type *d_ptr = NULL; - /* Process 'N' for "New/Number/Name" */ if (buf[0] == 'N') { @@ -3594,7 +3588,7 @@ struct dungeon_grid IDX trap; /* Trap */ BIT_FLAGS cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */ s16b special; /* Reserved for special terrain info */ - int random; /* Number of the random effect */ + int random; /* Number of the random effect */ }; @@ -3612,7 +3606,6 @@ static errr parse_line_feature(char *buf) int num; char *zz[9]; - if (init_flags & INIT_ONLY_BUILDINGS) return (0); /* Tokenize the line */ @@ -3919,7 +3912,6 @@ static void drop_here(object_type *j_ptr, POSITION y, POSITION x) cave_type *c_ptr = &cave[y][x]; object_type *o_ptr; - /* Get new object */ OBJECT_IDX o_idx = o_pop(); /* Access new object */ @@ -3928,7 +3920,6 @@ static void drop_here(object_type *j_ptr, POSITION y, POSITION x) /* Structure copy */ object_copy(o_ptr, j_ptr); - /* Locate */ o_ptr->iy = y; o_ptr->ix = x; @@ -4002,15 +3993,14 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in for (*x = xmin, i = 0; ((*x < xmax) && (i < len)); (*x)++, s++, i++) { - /* Access the grid */ cave_type *c_ptr = &cave[*y][*x]; int idx = s[0]; - IDX object_index = letter[idx].object; - IDX monster_index = letter[idx].monster; + OBJECT_IDX object_index = letter[idx].object; + MONSTER_IDX monster_index = letter[idx].monster; int random = letter[idx].random; - IDX artifact_index = letter[idx].artifact; + ARTIFACT_IDX artifact_index = letter[idx].artifact; /* Lay down a floor */ c_ptr->feat = conv_dungeon_feat(letter[idx].feature); @@ -4120,10 +4110,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in } else if (object_index) { - /* Get local object */ object_type *o_ptr = &object_type_body; - - /* Create the item */ object_prep(o_ptr, object_index); if (o_ptr->tval == TV_GOLD) @@ -4149,8 +4136,6 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in object_type *q_ptr = &forge; object_prep(q_ptr, k_idx); - - /* Drop it in the dungeon */ drop_here(q_ptr, *y, *x); } else @@ -4309,7 +4294,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in /* Place player in a quest level */ if (p_ptr->inside_quest) { - int py, px; + POSITION py, px; /* Delete the monster (if any) */ delete_monster(p_ptr->y, p_ptr->x); @@ -4468,8 +4453,8 @@ static cptr process_dungeon_file_expr(char **sp, char *fp) /* Analyze */ if (*s == b1) { - const char *p; - const char *t; + cptr p; + cptr t; /* Skip b1 */ s++; @@ -4839,8 +4824,6 @@ errr process_dungeon_file(cptr name, int ymin, int xmin, int ymax, int xmax) msg_print(NULL); } - - /* Close the file */ my_fclose(fp); return (err); } @@ -4950,8 +4933,6 @@ void write_r_info_txt(void) r_info_blow_effect[b_ptr->effect], b_ptr->d_dice, b_ptr->d_side); } - - /* Extract the flags */ for (fc = 0, j = 0; j < 32 * 3; j++) { /* Check this flag */