OSDN Git Service

BCC++ 5.5.1で英語版をコンパイルする場合の警告の除去.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 11 May 2003 10:06:47 +0000 (10:06 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 11 May 2003 10:06:47 +0000 (10:06 +0000)
src/cmd4.c
src/flavor.c
src/melee1.c
src/spells1.c

index 4297dbb..c209306 100644 (file)
@@ -9015,8 +9015,8 @@ static void do_cmd_knowledge_quests(void)
 static void do_cmd_knowledge_home(void)
 {
        FILE *fff;
-       
-       int i, x;
+
+       int i;
        char file_name[1024];
        store_type  *st_ptr;
        char o_name[MAX_NLEN];
@@ -9028,14 +9028,14 @@ static void do_cmd_knowledge_home(void)
        fff = my_fopen_temp(file_name, 1024);
        if (!fff) {
 #ifdef JP
-           msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name);
+               msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name);
 #else
-           msg_format("Failed to create temporary file %s.", file_name);
+               msg_format("Failed to create temporary file %s.", file_name);
 #endif
-           msg_print(NULL);
-           return;
+               msg_print(NULL);
+               return;
        }
-       
+
        if (fff)
        {
                /* Print all homes in the different towns */
@@ -9044,13 +9044,15 @@ static void do_cmd_knowledge_home(void)
                /* Home -- if anything there */
                if (st_ptr->stock_num)
                {
+#ifdef JP
+                       int x = 1;
+#endif
                        /* Header with name of the town */
 #ifdef JP
                        fprintf(fff, "  [ ²æ¤¬²È¤Î¥¢¥¤¥Æ¥à ]\n");
 #else
                        fprintf(fff, "  [Home Inventory]\n");
 #endif
-                               x = 1;
 
                        /* Dump all available items */
                        for (i = 0; i < st_ptr->stock_num; i++)
@@ -9084,10 +9086,10 @@ static void do_cmd_knowledge_home(void)
                        fprintf(fff, "\n\n");
                }
        }
-       
+
        /* Close the file */
        my_fclose(fff);
-       
+
        /* Display the file contents */
 #ifdef JP
        show_file(TRUE, file_name, "²æ¤¬²È¤Î¥¢¥¤¥Æ¥à", 0, 0);
@@ -9095,7 +9097,7 @@ static void do_cmd_knowledge_home(void)
        show_file(TRUE, file_name, "Home Inventory", 0, 0);
 #endif
 
-       
+
        /* Remove the file */
        fd_kill(file_name);
 }
index d0ef154..99a5977 100644 (file)
@@ -1357,6 +1357,10 @@ static flag_insc_table flag_insc_sust[] =
  */
 static char *inscribe_flags_aux(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
 {
+#ifndef JP
+       (void)kanji;
+#endif
+
        while (fi_ptr->english)
        {
                if (have_flag(flgs, fi_ptr->flag) &&
index 6576f5f..802800e 100644 (file)
@@ -165,8 +165,10 @@ bool make_attack_normal(int m_idx)
        bool touched = FALSE, fear = FALSE, alive = TRUE;
        bool explode = FALSE;
        bool do_silly_attack = (one_in_(2) && p_ptr->image);
-       int syouryaku = 0;
        int get_damage = 0;
+#ifdef JP
+       int abbreviate = 0;
+#endif
 
        /* Not allowed to attack */
        if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
@@ -273,11 +275,11 @@ bool make_attack_normal(int m_idx)
 
                                /* Message */
 #ifdef JP
-                               if (syouryaku)
+                               if (abbreviate)
                                    msg_format("·âÂष¤¿¡£");
                                else
                                    msg_format("%^s¤Ï·âÂव¤ì¤¿¡£", m_name);
-                               syouryaku = 1;/*£²²óÌܰʹߤϾÊά */
+                               abbreviate = 1;/*£²²óÌܰʹߤϾÊά */
 #else
                                msg_format("%^s is repelled.", m_name);
 #endif
@@ -448,7 +450,7 @@ bool make_attack_normal(int m_idx)
                                case RBM_CHARGE:
                                {
 #ifdef JP
-                                       syouryaku = -1;
+                                       abbreviate = -1;
                                        act = "¤ÏÀÁµá½ñ¤ò¤è¤³¤·¤¿¡£";
 #else
                                        act = "charges you.";
@@ -462,7 +464,7 @@ bool make_attack_normal(int m_idx)
                                case RBM_CRAWL:
                                {
 #ifdef JP
-                                       syouryaku = -1;
+                                       abbreviate = -1;
                                        act = "¤¬ÂΤξå¤òÇ礤²ó¤Ã¤¿¡£";
 #else
                                        act = "crawls on you.";
@@ -499,8 +501,8 @@ bool make_attack_normal(int m_idx)
 
                                case RBM_EXPLODE:
                                {
-                                       syouryaku = -1;
 #ifdef JP
+                                       abbreviate = -1;
                                        act = "¤ÏÇúȯ¤·¤¿¡£";
 #else
                                        act = "explodes.";
@@ -547,8 +549,8 @@ bool make_attack_normal(int m_idx)
 
                                case RBM_XXX4:
                                {
-                                       syouryaku = -1;
 #ifdef JP
+                                       abbreviate = -1;
                                        act = "¤¬ XXX4 ¤òȯ¼Í¤·¤¿¡£";
 #else
                                        act = "projects XXX4's at you.";
@@ -571,7 +573,9 @@ bool make_attack_normal(int m_idx)
 
                                case RBM_INSULT:
                                {
-                                       syouryaku = -1;
+#ifdef JP
+                                       abbreviate = -1;
+#endif
                                        act = desc_insult[randint0(m_ptr->r_idx == MON_DEBBY ? 10 : 8)];
                                        sound(SOUND_MOAN);
                                        break;
@@ -579,7 +583,9 @@ bool make_attack_normal(int m_idx)
 
                                case RBM_MOAN:
                                {
-                                       syouryaku = -1;
+#ifdef JP
+                                       abbreviate = -1;
+#endif
                                        act = desc_moan[randint0(4)];
                                        sound(SOUND_MOAN);
                                        break;
@@ -587,7 +593,9 @@ bool make_attack_normal(int m_idx)
 
                                case RBM_SHOW:
                                {
-                                       syouryaku = -1;
+#ifdef JP
+                                       abbreviate = -1;
+#endif
                                        if (m_ptr->r_idx == MON_JAIAN)
                                        {
 #ifdef JP
@@ -663,17 +671,19 @@ bool make_attack_normal(int m_idx)
                        {
                                if (do_silly_attack)
                                {
-                                       syouryaku = -1;
+#ifdef JP
+                                       abbreviate = -1;
+#endif
                                        act = silly_attacks[randint0(MAX_SILLY_ATTACK)];
                                }
 #ifdef JP
-                               if(syouryaku==0)
+                               if (abbreviate == 0)
                                    msg_format("%^s¤Ë%s", m_name, act);
-                               else if(syouryaku==1)
+                               else if (abbreviate == 1)
                                    msg_format("%s", act);
-                               else /*if(syouryaku==-1)*/
+                               else /* if (abbreviate == -1) */
                                    msg_format("%^s%s", m_name, act);
-                               syouryaku = 1;/*£²²óÌܰʹߤϾÊά */
+                               abbreviate = 1;/*£²²óÌܰʹߤϾÊά */
 #else
                                msg_format("%^s %s", m_name, act);
 #endif
@@ -2046,11 +2056,11 @@ msg_format("%s
 
                                        /* Message */
 #ifdef JP
-                                       if (syouryaku)
+                                       if (abbreviate)
                                            msg_format("%s¤«¤ï¤·¤¿¡£", (p_ptr->special_attack & ATTACK_SUIKEN) ? "´ñ̯¤ÊÆ°¤­¤Ç" : "");
                                        else
                                            msg_format("%s%^s¤Î¹¶·â¤ò¤«¤ï¤·¤¿¡£", (p_ptr->special_attack & ATTACK_SUIKEN) ? "´ñ̯¤ÊÆ°¤­¤Ç" : "", m_name);
-                                       syouryaku = 1;/*£²²óÌܰʹߤϾÊά */
+                                       abbreviate = 1;/*£²²óÌܰʹߤϾÊά */
 #else
                                        msg_format("%^s misses you.", m_name);
 #endif
index 5b04577..84515ad 100644 (file)
@@ -1287,7 +1287,8 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
        /* Scan all objects in the grid */
        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
-               object_type *o_ptr;
+               /* Acquire object */
+               object_type *o_ptr = &o_list[this_o_idx];
 
                bool is_art = FALSE;
                bool ignore = FALSE;
@@ -1300,9 +1301,6 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
                bool plural = (o_ptr->number > 1);
 #endif
 
-               /* Acquire object */
-               o_ptr = &o_list[this_o_idx];
-
                /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;