From 338d7aae15f317e30cfecf4d314ba572f1d44293 Mon Sep 17 00:00:00 2001 From: deskull Date: Fri, 22 Mar 2019 13:15:08 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#39076=20"/*=20Paranoia=20*/"=20?= =?utf8?q?=E3=82=92=E5=89=8A=E9=99=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd-activate.c | 4 ---- src/cmd2.c | 2 -- src/cmd4.c | 2 -- src/dungeon.c | 6 +----- src/effects.c | 6 ------ src/files.c | 2 -- src/floor-generate.c | 2 -- src/floor-save.c | 6 ------ src/geometry.c | 2 -- src/grid.c | 6 +----- src/init1.c | 12 ------------ src/init2.c | 4 ---- src/load.c | 7 ------- src/main-win.c | 22 ---------------------- src/monster-status.c | 2 -- src/monster2.c | 10 ---------- src/mspells1.c | 2 +- src/mspells3.c | 2 +- src/object1.c | 6 +----- src/object2.c | 6 ------ src/player-move.c | 4 +--- src/rooms-vault.c | 2 -- src/rooms.c | 6 ------ src/save.c | 6 ------ src/spells-status.c | 2 -- src/spells1.c | 4 +--- src/spells2.c | 2 -- src/spells3.c | 12 ------------ src/store.c | 4 ---- src/util.c | 17 ----------------- src/wild.c | 8 +------- src/wizard2.c | 4 ---- src/z-rand.c | 2 -- src/z-virt.c | 2 -- 34 files changed, 8 insertions(+), 178 deletions(-) diff --git a/src/cmd-activate.c b/src/cmd-activate.c index 7e42524b5..4cdacc741 100644 --- a/src/cmd-activate.c +++ b/src/cmd-activate.c @@ -646,8 +646,6 @@ static bool activate_dragon_breath(object_type *o_ptr) n++; } } - - /* Paranoia */ if (n == 0) return FALSE; /* Stop speaking */ @@ -673,8 +671,6 @@ bool activate_artifact(object_type *o_ptr) DIRECTION dir; concptr name = k_name + k_info[o_ptr->k_idx].name; const activation_type* const act_ptr = find_activation_info(o_ptr); - - /* Paranoia */ if (!act_ptr) { /* Maybe forgot adding information to activation_info table ? */ msg_print("Activation information is not found."); diff --git a/src/cmd2.c b/src/cmd2.c index 6bf9d8d43..6865f70c9 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -2201,8 +2201,6 @@ void do_cmd_rest(void) } } - - /* Paranoia */ if (command_arg > 9999) command_arg = 9999; if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE); diff --git a/src/cmd4.c b/src/cmd4.c index 7037d25d5..fb12f8888 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -5203,8 +5203,6 @@ static void do_cmd_knowledge_artifacts(void) for (k = 0; k < n; k++) { artifact_type *a_ptr = &a_info[who[k]]; - - /* Paranoia */ strcpy(base_name, _("未知の伝説のアイテム", "Unknown Artifact")); /* Obtain the base object type */ diff --git a/src/dungeon.c b/src/dungeon.c index f1f1ca179..c406c63db 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -581,11 +581,7 @@ static void pattern_teleport(void) { return; } - - /* Paranoia */ if (command_arg < min_level) command_arg = (COMMAND_ARG)min_level; - - /* Paranoia */ if (command_arg > max_level) command_arg = (COMMAND_ARG)max_level; /* Accept request */ @@ -6088,7 +6084,7 @@ void prevent_turn_overflow(void) rollback_turns = TURNS_PER_TICK * TOWN_DAWN * rollback_days; if (current_world_ptr->game_turn > rollback_turns) current_world_ptr->game_turn -= rollback_turns; - else current_world_ptr->game_turn = 1; /* Paranoia */ + else current_world_ptr->game_turn = 1; if (current_floor_ptr->generated_turn > rollback_turns) current_floor_ptr->generated_turn -= rollback_turns; else current_floor_ptr->generated_turn = 1; if (old_battle > rollback_turns) old_battle -= rollback_turns; diff --git a/src/effects.c b/src/effects.c index fb1cdf116..e12585251 100644 --- a/src/effects.c +++ b/src/effects.c @@ -3166,8 +3166,6 @@ bool inc_stat(int stat) { /* Approximate gain value */ gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2; - - /* Paranoia */ if (gain < 1) gain = 1; /* Apply the bonus */ @@ -3251,8 +3249,6 @@ bool dec_stat(int stat, int amount, int permanent) /* and one-half of the stat bonus times the percentage, with a */ /* minimum damage of half the percentage. -CWS */ loss = (((cur-18) / 2 + 1) / 2 + 1); - - /* Paranoia */ if (loss < 1) loss = 1; /* Randomize the loss */ @@ -3863,8 +3859,6 @@ int take_hit(int damage_type, HIT_POINT damage, concptr hit_from, int monspell) char tmp[1024]; int warning = (p_ptr->mhp * hitpoint_warn / 10); - - /* Paranoia */ if (p_ptr->is_dead) return 0; if (p_ptr->sutemi) damage *= 2; diff --git a/src/files.c b/src/files.c index 3a75f5038..e4d66cbb0 100644 --- a/src/files.c +++ b/src/files.c @@ -1929,8 +1929,6 @@ static concptr likert(int x, int y) static char dummy[20] = "", dummy2[20] = ""; memset(dummy, 0, strlen(dummy)); memset(dummy2, 0, strlen(dummy2)); - - /* Paranoia */ if (y <= 0) y = 1; if(show_actual_value) diff --git a/src/floor-generate.c b/src/floor-generate.c index f4dcd2ce0..37937c28c 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -207,8 +207,6 @@ static bool alloc_stairs(IDX feat, int num, int walls) if ((current_floor_ptr->dun_level < d_info[p_ptr->dungeon_idx].maxdepth-1) && !quest_number(current_floor_ptr->dun_level+1)) shaft_num = (randint1(num)+1)/2; } - - /* Paranoia */ else return FALSE; diff --git a/src/floor-save.c b/src/floor-save.c index c2a466abe..0f124adc3 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -195,8 +195,6 @@ saved_floor_type *get_sf_ptr(FLOOR_IDX floor_id) static void kill_saved_floor(saved_floor_type *sf_ptr) { char floor_savefile[1024]; - - /* Paranoia */ if (!sf_ptr) return; /* Already empty */ @@ -565,8 +563,6 @@ static void place_pet(void) m_ptr->fx = cx; m_ptr->ml = TRUE; m_ptr->mtimed[MTIMED_CSLEEP] = 0; - - /* Paranoia */ m_ptr->hold_o_idx = 0; m_ptr->target_y = 0; @@ -1439,8 +1435,6 @@ void stair_creation(void) /* Extract current floor data */ sf_ptr = get_sf_ptr(p_ptr->floor_id); - - /* Paranoia */ if (!sf_ptr) { /* No floor id? -- Create now! */ diff --git a/src/geometry.c b/src/geometry.c index 31e4f1b33..06b216819 100644 --- a/src/geometry.c +++ b/src/geometry.c @@ -14,8 +14,6 @@ DIRECTION coords_to_dir(POSITION y, POSITION x) dy = y - p_ptr->y; dx = x - p_ptr->x; - - /* Paranoia */ if (ABS(dx) > 1 || ABS(dy) > 1) return (0); return d[dx + 1][dy + 1]; diff --git a/src/grid.c b/src/grid.c index e8bf85f98..8d67b82cf 100644 --- a/src/grid.c +++ b/src/grid.c @@ -109,8 +109,6 @@ void place_random_stairs(POSITION y, POSITION x) bool up_stairs = TRUE; bool down_stairs = TRUE; grid_type *g_ptr; - - /* Paranoia */ g_ptr = ¤t_floor_ptr->grid_array[y][x]; if (!is_floor_grid(g_ptr) || g_ptr->o_idx) return; @@ -484,9 +482,7 @@ static bool possible_doorway(POSITION y, POSITION x) * @return なし */ void try_door(POSITION y, POSITION x) -{ - /* Paranoia */ - if (!in_bounds(y, x)) return; +{ if (!in_bounds(y, x)) return; /* Ignore walls */ if (cave_have_flag_bold(y, x, FF_WALL)) return; diff --git a/src/init1.c b/src/init1.c index 712969fff..043b22e9c 100644 --- a/src/init1.c +++ b/src/init1.c @@ -1736,8 +1736,6 @@ errr parse_f_info(char *buf, header *head) int j; byte s_attr; char char_tmp[F_LIT_MAX]; - - /* Paranoia */ if (buf[1] != ':') return (1); if (!buf[2]) return (1); if (buf[3] != ':') return (1); @@ -1748,8 +1746,6 @@ errr parse_f_info(char *buf, header *head) /* Extract the color */ s_attr = color_char_to_attr(buf[4]); - - /* Paranoia */ if (s_attr > 127) return (1); /* Save the standard values */ @@ -2190,8 +2186,6 @@ errr parse_k_info(char *buf, header *head) { char sym; byte tmp; - - /* Paranoia */ if (buf[1] != ':') return (1); if (!buf[2]) return (1); if (buf[3] != ':') return (1); @@ -2202,8 +2196,6 @@ errr parse_k_info(char *buf, header *head) /* Extract the attr */ tmp = color_char_to_attr(buf[4]); - - /* Paranoia */ if (tmp > 127) return (1); /* Save the values */ @@ -2939,8 +2931,6 @@ errr parse_r_info(char *buf, header *head) { char sym; byte tmp; - - /* Paranoia */ if (buf[1] != ':') return (1); if (!buf[2]) return (1); if (buf[3] != ':') return (1); @@ -2951,8 +2941,6 @@ errr parse_r_info(char *buf, header *head) /* Extract the attr */ tmp = color_char_to_attr(buf[4]); - - /* Paranoia */ if (tmp > 127) return (1); /* Save the values */ diff --git a/src/init2.c b/src/init2.c index 385255cbb..09d76f23e 100644 --- a/src/init2.c +++ b/src/init2.c @@ -1386,8 +1386,6 @@ static errr init_object_alloc(void) /* Group by level */ num[i] += num[i-1]; } - - /* Paranoia */ if (!num[0]) quit(_("町のアイテムがない!", "No town objects!")); /*** Initialize object allocation info ***/ @@ -1545,8 +1543,6 @@ static errr init_alloc(void) /* Group by level */ num[i] += num[i-1]; } - - /* Paranoia */ if (!num[0]) quit(_("町のモンスターがない!", "No town monsters!")); /*** Initialize monster allocation info ***/ diff --git a/src/load.c b/src/load.c index f5982f565..18a982ec3 100644 --- a/src/load.c +++ b/src/load.c @@ -584,8 +584,6 @@ static void rd_item_old(object_type *o_ptr) add_flag(o_ptr->art_flags, TR_DEC_MANA); } } - - /* Paranoia */ if (object_is_fixed_artifact(o_ptr)) { artifact_type *a_ptr; @@ -596,8 +594,6 @@ static void rd_item_old(object_type *o_ptr) /* Verify that artifact */ if (!a_ptr->name) o_ptr->name1 = 0; } - - /* Paranoia */ if (object_is_ego(o_ptr)) { ego_item_type *e_ptr; @@ -792,7 +788,6 @@ static void rd_item(object_type *o_ptr) } else { - /* Paranoia */ add_flag(o_ptr->art_flags, TR_LITE_M1); } } @@ -4011,8 +4006,6 @@ errr rd_savefile_new(void) /* Drop permissions */ safe_setuid_drop(); - - /* Paranoia */ if (!fff) return (-1); /* Call the sub-function */ diff --git a/src/main-win.c b/src/main-win.c index 5a62975e0..a4489a98a 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -1033,8 +1033,6 @@ static void term_getsize(term_data *td) { RECT rc; TERM_LEN wid, hgt; - - /* Paranoia */ if (td->cols < 1) td->cols = 1; if (td->rows < 1) td->rows = 1; @@ -1081,8 +1079,6 @@ static void save_prefs_aux(int i) RECT rc; WINDOWPLACEMENT lpwndpl; - - /* Paranoia */ if (!td->w) return; /* Make section name */ @@ -3003,8 +2999,6 @@ static errr Term_pict_win(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, c HDC hdc; HDC hdcSrc; HBITMAP hbmSrcOld; - - /* Paranoia */ if (!use_graphics) { /* Erase the grids */ @@ -3804,7 +3798,6 @@ static void process_menus(WORD wCmd) { if (game_in_progress && character_generated) { - /* Paranoia */ if (!can_save) { plog(_("今はセーブすることは出来ません。", "You may not do that right now.")); @@ -3833,7 +3826,6 @@ static void process_menus(WORD wCmd) { if (game_in_progress && character_generated) { - /* Paranoia */ if (!can_save) { plog(_("今は終了できません。", "You may not do that right now.")); @@ -4148,7 +4140,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_NO_GRAPHICS: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4172,7 +4163,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_OLD_GRAPHICS: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4196,7 +4186,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_NEW_GRAPHICS: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4220,7 +4209,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_NEW2_GRAPHICS: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4245,8 +4233,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_BIGTILE: { td = &data[0]; - - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4270,7 +4256,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_MUSIC: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4291,7 +4276,6 @@ static void process_menus(WORD wCmd) case IDM_OPTIONS_SOUND: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4313,7 +4297,6 @@ static void process_menus(WORD wCmd) /* bg */ case IDM_OPTIONS_BG: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -4337,7 +4320,6 @@ static void process_menus(WORD wCmd) /* bg */ case IDM_OPTIONS_OPEN_BG: { - /* Paranoia */ if (!inkey_flag) { plog("You may not do that right now."); @@ -5786,11 +5768,7 @@ int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, TranslateMessage(&msg); DispatchMessage(&msg); } - - /* Paranoia */ quit(NULL); - - /* Paranoia */ return (0); } diff --git a/src/monster-status.c b/src/monster-status.c index 5c4be8ff7..7c9111d0f 100644 --- a/src/monster-status.c +++ b/src/monster-status.c @@ -835,8 +835,6 @@ void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx) monster_race *r_ptr; monster_race *s_ptr; int new_exp; - - /* Paranoia */ if (m_idx <= 0 || s_idx <= 0) return; m_ptr = ¤t_floor_ptr->m_list[m_idx]; diff --git a/src/monster2.c b/src/monster2.c index 3b8a8db27..9fca75deb 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -308,8 +308,6 @@ void delete_monster_idx(MONSTER_IDX i) void delete_monster(POSITION y, POSITION x) { grid_type *g_ptr; - - /* Paranoia */ if (!in_bounds(y, x)) return; /* Check the grid */ @@ -2450,8 +2448,6 @@ void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx) r_ptr = &r_info[r_idx]; chameleon_change_m_idx = 0; - - /* Paranoia */ if (!r_idx) return; } @@ -2631,11 +2627,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I /* Verify location */ if (!in_bounds(y, x)) return (FALSE); - - /* Paranoia */ if (!r_idx) return (FALSE); - - /* Paranoia */ if (!r_ptr->name) return (FALSE); if (!(mode & PM_IGNORE_TERRAIN)) @@ -3656,8 +3648,6 @@ bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int t bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode) { POSITION x, y; - - /* Paranoia */ /* if (!r_idx) return; */ /* Prevent illegal monsters */ diff --git a/src/mspells1.c b/src/mspells1.c index a8354377f..e0ff77733 100644 --- a/src/mspells1.c +++ b/src/mspells1.c @@ -1687,7 +1687,7 @@ bool make_attack_spell(MONSTER_IDX m_idx) break; default: - return FALSE; /* Paranoia */ + return FALSE; } /* Abort if no spell was chosen */ diff --git a/src/mspells3.c b/src/mspells3.c index 0bfc643f7..e36e41d76 100644 --- a/src/mspells3.c +++ b/src/mspells3.c @@ -1520,7 +1520,7 @@ bool do_cmd_cast_learned(void) void learn_spell(int monspell) { if (p_ptr->action != ACTION_LEARN) return; - if (monspell < 0) return; /* Paranoia */ + if (monspell < 0) return; if (p_ptr->magic_num2[monspell]) return; if (p_ptr->confused || p_ptr->blind || p_ptr->image || p_ptr->stun || p_ptr->paralyzed) return; if (randint1(p_ptr->lev + 70) > monster_powers[monspell].level + 40) diff --git a/src/object1.c b/src/object1.c index 8214d6155..a3e5001b0 100644 --- a/src/object1.c +++ b/src/object1.c @@ -2379,7 +2379,7 @@ COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode) /* Prepare an index --(-- */ sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]); } - else /* Paranoia */ + else { /* Prepare an index --(-- */ sprintf(tmp_val, "%c)", index_to_label(i)); @@ -2777,8 +2777,6 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode) } } } - - /* Paranoia */ msg_print(NULL); /* Not done */ @@ -3773,8 +3771,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode) } } - - /* Paranoia */ msg_print(NULL); diff --git a/src/object2.c b/src/object2.c index ad78356c0..da7c7d56d 100644 --- a/src/object2.c +++ b/src/object2.c @@ -4661,8 +4661,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION /* Add new object */ if (!comb) k++; - - /* Paranoia */ if (k > 99) continue; /* Calculate score */ @@ -5335,8 +5333,6 @@ s16b inven_carry(object_type *o_ptr) } } - - /* Paranoia */ if (inven_cnt > INVEN_PACK) return (-1); /* Find an empty slot */ @@ -5437,8 +5433,6 @@ INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt) /* Get the item to take off */ o_ptr = &inventory[item]; - - /* Paranoia */ if (amt <= 0) return (-1); /* Verify */ diff --git a/src/player-move.c b/src/player-move.c index 7622dbaa4..524ad4f20 100644 --- a/src/player-move.c +++ b/src/player-move.c @@ -910,7 +910,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap) monster_type *m_ptr; monster_type *riding_m_ptr = ¤t_floor_ptr->m_list[p_ptr->riding]; - monster_race *riding_r_ptr = &r_info[p_ptr->riding ? riding_m_ptr->r_idx : 0]; /* Paranoia */ + monster_race *riding_r_ptr = &r_info[p_ptr->riding ? riding_m_ptr->r_idx : 0]; GAME_TEXT m_name[MAX_NLEN]; @@ -2274,8 +2274,6 @@ void do_cmd_travel(void) /* Travel till 255 steps */ travel.run = 255; - - /* Paranoia */ travel.dir = 0; /* Decides first direction */ diff --git a/src/rooms-vault.c b/src/rooms-vault.c index 35d5cf513..8243b68a7 100644 --- a/src/rooms-vault.c +++ b/src/rooms-vault.c @@ -1210,8 +1210,6 @@ bool build_type10(void) case 8: build_elemental_vault(x0, y0, xsize, ysize); break; #endif /* ALLOW_CAVERNS_AND_LAKES */ /* I know how to add a few more... give me some time. */ - - /* Paranoia */ default: return FALSE; } diff --git a/src/rooms.c b/src/rooms.c index e55474207..bd5abfa97 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -1221,8 +1221,6 @@ bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int feat2 = feat_deep_lava; feat3 = feat_shallow_lava; break; - - /* Paranoia */ default: return FALSE; } @@ -2101,8 +2099,6 @@ static bool room_build(EFFECT_ID typ) case ROOM_T_ARCADE: return build_type16(); case ROOM_T_FIXED: return build_type17(); } - - /* Paranoia */ return FALSE; } @@ -2240,8 +2236,6 @@ bool generate_rooms(void) if (rand < prob_list[room_type]) break; else rand -= prob_list[room_type]; } - - /* Paranoia */ if (room_type >= ROOM_T_MAX) room_type = ROOM_T_NORMAL; /* Increase the number of rooms of that type we should build. */ diff --git a/src/save.c b/src/save.c index f8558254c..0838b2ccd 100644 --- a/src/save.c +++ b/src/save.c @@ -1719,11 +1719,7 @@ bool load_player(void) concptr what = "generic"; - - /* Paranoia */ current_world_ptr->game_turn = 0; - - /* Paranoia */ p_ptr->is_dead = FALSE; @@ -1837,8 +1833,6 @@ bool load_player(void) /* Message (below) */ if (err) what = _("セーブファイルを解析出来ません。", "Cannot parse savefile"); } - - /* Paranoia */ if (!err) { /* Invalid current_world_ptr->game_turn */ diff --git a/src/spells-status.c b/src/spells-status.c index 46dee7266..a4e2a7bcf 100644 --- a/src/spells-status.c +++ b/src/spells-status.c @@ -433,8 +433,6 @@ bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr) { if (o_ptr == &inventory[inv]) break; } - - /* Paranoia */ if (inv > INVEN_FEET) return FALSE; object_copy(&forge, o_ptr); diff --git a/src/spells1.c b/src/spells1.c index dcd2fe8f1..fff3b7a61 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -3966,8 +3966,6 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI strcpy(killer, _("ç½ ", "a trap")); break; } - - /* Paranoia */ strcpy(m_name, killer); } @@ -4891,7 +4889,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell); - if (p_ptr->chp < 1) p_ptr->chp = 1; /* Paranoia */ + if (p_ptr->chp < 1) p_ptr->chp = 1; } break; } diff --git a/src/spells2.c b/src/spells2.c index 2e3070188..b05718f26 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -5138,8 +5138,6 @@ bool rodeo(player_type *creature_ptr) { msg_format(_("%sに振り落とされた!", "You have thrown off by %s."), m_name); rakuba(1, TRUE); - - /* Paranoia */ /* 落馬処理に失敗してもとにかく乗馬解除 */ creature_ptr->riding = 0; } diff --git a/src/spells3.c b/src/spells3.c index fe05a6eec..e27f18cbd 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -50,8 +50,6 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode) bool look = TRUE; monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx]; - - /* Paranoia */ if (!monster_is_valid(m_ptr)) return (FALSE); oy = m_ptr->fy; @@ -157,8 +155,6 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, POSITION dis = 2; bool look = TRUE; monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx]; - - /* Paranoia */ if(!m_ptr->r_idx) return; /* "Skill" test */ @@ -954,11 +950,7 @@ bool reset_recall(void) { /* Extract request */ dummy = atoi(tmp_val); - - /* Paranoia */ if (dummy < 1) dummy = 1; - - /* Paranoia */ if (dummy > max_dlv[select_dungeon]) dummy = max_dlv[select_dungeon]; if (dummy < d_info[select_dungeon].mindepth) dummy = d_info[select_dungeon].mindepth; @@ -2418,8 +2410,6 @@ bool recharge(int power) /* All staffs, unstacked wands. */ else recharge_strength = (100 + power - lev - (8 * o_ptr->pval)) / 15; - - /* Paranoia */ if (recharge_strength < 0) recharge_strength = 0; /* Back-fire */ @@ -3489,8 +3479,6 @@ bool eat_magic(int power) { /* All staffs, wands. */ recharge_strength = (100 + power - lev) / 15; - - /* Paranoia */ if (recharge_strength < 0) recharge_strength = 0; /* Back-fire */ diff --git a/src/store.c b/src/store.c index 042e1f41e..2356d9b9e 100644 --- a/src/store.c +++ b/src/store.c @@ -3842,8 +3842,6 @@ static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j) return (TRUE); } } - - /* Paranoia */ msg_print(NULL); /* Assume failure */ @@ -4016,8 +4014,6 @@ static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final) { sprintf(buf, "%s ", pmt); } - - /* Paranoia */ msg_print(NULL); /* Ask until done */ diff --git a/src/util.c b/src/util.c index 1191503fe..679c40f73 100644 --- a/src/util.c +++ b/src/util.c @@ -1139,8 +1139,6 @@ void text_to_ascii(char *buf, concptr str) { /* Skip the backslash */ str++; - - /* Paranoia */ if (!(*str)) break; /* Macro Trigger */ @@ -2809,8 +2807,6 @@ void msg_print(concptr msg) /* No message */ if (!msg) return; - - /* Paranoia */ if (n > 1000) return; /* Copy it */ @@ -3570,8 +3566,6 @@ bool askfor(char *buf, int len) bool get_string(concptr prompt, char *buf, int len) { bool res; - - /* Paranoia */ msg_print(NULL); /* Display prompt */ @@ -3618,8 +3612,6 @@ bool get_check_strict(concptr prompt, BIT_FLAGS mode) handle_stuff(); num_more = 0; } - - /* Paranoia */ msg_print(NULL); if (!rogue_like_commands) @@ -3721,7 +3713,6 @@ bool get_check_strict(concptr prompt, BIT_FLAGS mode) */ bool get_com(concptr prompt, char *command, bool z_escape) { - /* Paranoia */ msg_print(NULL); /* Display a prompt */ @@ -3799,8 +3790,6 @@ QUANTITY get_quantity(concptr prompt, QUANTITY max) /* Use that prompt */ prompt = tmp; } - - /* Paranoia */ msg_print(NULL); /* Display prompt */ @@ -4540,8 +4529,6 @@ void request_command(int shopping) continue; } - - /* Paranoia */ if (!cmd) continue; @@ -4777,8 +4764,6 @@ int get_keymap_dir(char ch) } } } - - /* Paranoia */ if (d == 5) d = 0; /* Return direction */ @@ -5274,8 +5259,6 @@ size_t my_strcpy(char *buf, concptr src, size_t bufsize) size_t len = strlen(src); size_t ret = len; - - /* Paranoia */ if (bufsize == 0) return ret; /* Truncate */ diff --git a/src/wild.c b/src/wild.c index 8b1a5e48b..9badd59c9 100644 --- a/src/wild.c +++ b/src/wild.c @@ -37,8 +37,6 @@ static void set_floor_and_wall_aux(s16b feat_type[100], feat_prob prob[DUNGEON_F lim[0] = prob[0].percent; for (i = 1; i < DUNGEON_FEAT_PROB_NUM; i++) lim[i] = lim[i - 1] + prob[i].percent; - - /* Paranoia */ if (lim[DUNGEON_FEAT_PROB_NUM - 1] < 100) lim[DUNGEON_FEAT_PROB_NUM - 1] = 100; for (i = 0; i < 100; i++) @@ -786,8 +784,6 @@ errr parse_line_wilderness(char *buf, int ymin, int xmin, int ymax, int xmax, in /* Unused */ (void)ymin; (void)ymax; - - /* Paranoia */ if (!(buf[0] == 'W')) return (PARSE_ERROR_GENERIC); switch (buf[2]) @@ -1004,13 +1000,11 @@ static void init_terrain_table(int terrain, s16b feat_global, concptr fmt, ...) check++; } - else /* Paranoia */ + else { plog_fmt("Format error"); } } - - /* Paranoia */ if (cur < MAX_FEAT_IN_TERRAIN) { plog_fmt("Too few parameters"); diff --git a/src/wizard2.c b/src/wizard2.c index 9075cae3d..c39522419 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -1080,8 +1080,6 @@ static void wiz_quantity_item(object_type *o_ptr) { /* Extract */ tmp_int = atoi(tmp_val); - - /* Paranoia */ if (tmp_int < 1) tmp_int = 1; if (tmp_int > 99) tmp_int = 99; @@ -1351,8 +1349,6 @@ static void do_cmd_wiz_jump(void) p_ptr->dungeon_idx = tmp_dungeon_type; } - - /* Paranoia */ if (command_arg < d_info[p_ptr->dungeon_idx].mindepth) command_arg = 0; if (command_arg > d_info[p_ptr->dungeon_idx].maxdepth) command_arg = (COMMAND_ARG)d_info[p_ptr->dungeon_idx].maxdepth; diff --git a/src/z-rand.c b/src/z-rand.c index 7ddd76f50..f160e549b 100644 --- a/src/z-rand.c +++ b/src/z-rand.c @@ -293,8 +293,6 @@ s16b randnor(int mean, int stand) s16b low = 0; s16b high = RANDNOR_NUM; - - /* Paranoia */ if (stand < 1) return (s16b)(mean); /* Roll for probability */ diff --git a/src/z-virt.c b/src/z-virt.c index 72303a92b..0858bdb3c 100644 --- a/src/z-virt.c +++ b/src/z-virt.c @@ -79,8 +79,6 @@ vptr rpanic(huge len) /* Attempt to crash before icky things happen */ core("Out of Memory!"); - - /* Paranoia */ return ((vptr)(NULL)); } -- 2.11.0