OSDN Git Service

[Refactor] #37353 do_cmd_throw()を整理。 / Refactor do_cmd_throw().
authorDeskull <deskull@users.sourceforge.jp>
Sun, 9 Sep 2018 04:18:49 +0000 (13:18 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 9 Sep 2018 04:18:49 +0000 (13:18 +0900)
src/cmd2.c
src/dungeon.c
src/externs.h
src/mind.c
src/mutation.c

index 58ca7ce..f7867a6 100644 (file)
@@ -32,13 +32,8 @@ bool confirm_leave_level(bool down_stair)
                                                ((q_ptr->status != QUEST_STATUS_STAGE_COMPLETED) ||
                                                 (down_stair && (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))))))
        {
-#ifdef JP
-               msg_print("この階を一度去ると二度と戻って来られません。");
-               if (get_check("本当にこの階を去りますか?")) return TRUE;
-#else
-               msg_print("You can't come back here once you leave this floor.");
-               if (get_check("Really leave this floor? ")) return TRUE;
-#endif
+               msg_print(_("この階を一度去ると二度と戻って来られません。", "You can't come back here once you leave this floor."));
+               if (get_check(_("本当にこの階を去りますか?", "Really leave this floor? "))) return TRUE;
        }
        else
        {
@@ -3498,7 +3493,7 @@ static bool item_tester_hook_boomerang(object_type *o_ptr)
 
 
 /*!
- * @brief æ\8a\95å°\84å\87¦ç\90\86ã\81®ã\82µã\83\96ルーチン /
+ * @brief æ\8a\95å°\84å\87¦ç\90\86ã\83¡ã\82¤ã\83³ルーチン /
  * Throw an object from the pack or floor.
  * @param mult 威力の倍率
  * @param boomerang ブーメラン処理ならばTRUE
@@ -3513,7 +3508,7 @@ static bool item_tester_hook_boomerang(object_type *o_ptr)
  * the item to be destroyed?  Should it do any damage at all?
  * </pre>
  */
-bool do_cmd_throw_aux(int mult, bool boomerang, OBJECT_IDX shuriken)
+bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
 {
        DIRECTION dir;
        OBJECT_IDX item;
@@ -4073,17 +4068,6 @@ bool do_cmd_throw_aux(int mult, bool boomerang, OBJECT_IDX shuriken)
 }
 
 
-/*!
- * @brief 投射処理のメインルーチン /
- * Throw an object from the pack or floor.
- * @return なし
- */
-void do_cmd_throw(void)
-{
-       do_cmd_throw_aux(1, FALSE, -1);
-}
-
-
 #ifdef TRAVEL
 /*
  * Hack: travel command
index ccd704a..f95e2a5 100644 (file)
@@ -4573,10 +4573,7 @@ static void process_command(void)
                /* Throw an item */
                case 'v':
                {
-                       if (!p_ptr->wild_mode)
-                       {
-                               do_cmd_throw();
-                       }
+                       if (!p_ptr->wild_mode) do_cmd_throw(1, FALSE, -1);
                        break;
                }
 
index 59a7458..a7d62f3 100644 (file)
@@ -734,8 +734,7 @@ extern void do_cmd_run(void);
 extern void do_cmd_rest(void);
 extern void do_cmd_fire(void);
 extern void do_cmd_fire_aux(int item, object_type *j_ptr);
-extern void do_cmd_throw(void);
-extern bool do_cmd_throw_aux(int mult, bool boomerang, OBJECT_IDX shuriken);
+extern bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken);
 #ifdef TRAVEL
 extern void do_cmd_travel(void);
 #endif
index 3a56610..b5ecca8 100644 (file)
@@ -1738,7 +1738,7 @@ static bool cast_ninja_spell(int spell)
                        }
 
                        /* Gives a multiplier of 2 at first, up to 3 at 40th */
-                       do_cmd_throw_aux(1, FALSE, slot);
+                       do_cmd_throw(1, FALSE, slot);
 
                        p_ptr->energy_use = 100;
                }
index aa4ec13..44845c7 100644 (file)
@@ -2515,7 +2515,7 @@ bool mutation_power_aux(u32b power)
                /* XXX_XXX_XXX Hack!  MUT1_LAUNCHER is negative, see above */
                case 3: /* MUT1_LAUNCHER */
                        /* Gives a multiplier of 2 at first, up to 3 at 40th */
-                       if (!do_cmd_throw_aux(2 + lvl / 40, FALSE, -1)) return FALSE;
+                       if (!do_cmd_throw(2 + lvl / 40, FALSE, -1)) return FALSE;
                        break;
 
                default: