OSDN Git Service

BCC++ 5.5.1で警告封じオプション -w- を外した場合のコンパイル警告の除去.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 9 May 2003 02:19:57 +0000 (02:19 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 9 May 2003 02:19:57 +0000 (02:19 +0000)
* 使用されていない変数はコメントアウトではなく削除した.
* 英語版や他のプラットフォームとの互換をとるためにどうしても必要な部分の警告は
  除去できなかった.
* 他のコンパイラでは別の警告が残っている, もしくは新たに警告されるかもしれない.
* 警告を黙らせる必要も薄れたので, makefile.bccからは -w- を除去.

32 files changed:
src/avatar.c
src/birth.c
src/bldg.c
src/cmd4.c
src/cmd5.c
src/cmd6.c
src/dungeon.c
src/files.c
src/flavor.c
src/grid.c
src/hissatsu.c
src/main-win.c
src/makefile.bcc
src/melee1.c
src/melee2.c
src/mind.c
src/monster1.c
src/monster2.c
src/mspells1.c
src/mspells2.c
src/mspells3.c
src/object1.c
src/object2.c
src/racial.c
src/readdib.c
src/scores.c
src/spells1.c
src/spells3.c
src/util.c
src/wizard1.c
src/xtra1.c
src/xtra2.c

index d7a48ad..5ef28a1 100644 (file)
 cptr virtue[MAX_VIRTUE] =
 {
 #ifdef JP
-  "¾ð",
-#else
-  "Compassion",
-#endif
-
-#ifdef JP
-  "ÍÀ",
-#else
-  "Honour",
-#endif
-
-#ifdef JP
-  "Àµ",
-#else
-  "Justice",
-#endif
-
-#ifdef JP
-  "µ¾",
-#else
-  "Sacrifice",
-#endif
-
-#ifdef JP
-  "¼±",
-#else
-  "Knowledge",
-#endif
-
-#ifdef JP
-  "À¿",
-#else
-  "Faith",
-#endif
-
-#ifdef JP
-  "·¼",
-#else
-  "Enlightenment",
-#endif
-
-#ifdef JP
-  "Èë",
-#else
-  "Mysticism",
-#endif
-
-#ifdef JP
-  "±¿",
-#else
-  "Chance",
-#endif
-
-#ifdef JP
-"Á³",
-#else
-  "Nature",
-#endif
-
-#ifdef JP
-  "Ĵ",
-#else
-  "Harmony",
-#endif
-
-#ifdef JP
-  "³è",
-#else
-  "Vitality",
+       "¾ð",
+       "ÍÀ",
+       "Àµ",
+       "µ¾",
+       "¼±",
+       "À¿",
+       "·¼",
+       "Èë",
+       "±¿",
+       "Á³",
+       "Ĵ",
+       "³è",
+       "»à",
+       "Ǧ",
+       "Àá",
+       "¶Ð",
+       "ͦ",
+       "¸Ä",
+#else
+       "Compassion",
+       "Honour",
+       "Justice",
+       "Sacrifice",
+       "Knowledge",
+       "Faith",
+       "Enlightenment",
+       "Mysticism",
+       "Chance",
+       "Nature",
+       "Harmony",
+       "Vitality",
+       "Unlife",
+       "Patience",
+       "Temperance",
+       "Diligence",
+       "Valour",
+       "Individualism",
 #endif
-
-#ifdef JP
-  "»à",
-#else
-  "Unlife",
-#endif
-
-#ifdef JP
-  "Ǧ",
-#else
-  "Patience",
-#endif
-
-#ifdef JP
-  "Àá",
-#else
-  "Temperance",
-#endif
-
-#ifdef JP
-  "¶Ð",
-#else
-  "Diligence",
-#endif
-
-#ifdef JP
-  "ͦ",
-#else
-  "Valour",
-#endif
-
-#ifdef JP
-  "¸Ä",
-#else
-  "Individualism",
-#endif
-
 };
 
 
 bool compare_virtue(int type, int num, int tekitou)
 {
-  int vir;
-  if (virtue_number(type))
-    vir = p_ptr->virtues[virtue_number(type)-1];
-  else
-    vir = 0;
-
-  switch(tekitou)
-    {
-    case VIRTUE_LARGE:
-      if (vir > num) return TRUE;
-      else return FALSE;
-      break;
-    case VIRTUE_SMALL:
-      if (vir < num) return TRUE;
-      else return FALSE;
-      break;
-    default:
-      break;
-    }
-  return FALSE;
+       int vir;
+       if (virtue_number(type))
+               vir = p_ptr->virtues[virtue_number(type) - 1];
+       else
+               vir = 0;
+
+       switch (tekitou)
+       {
+       case VIRTUE_LARGE:
+               if (vir > num) return TRUE;
+               else return FALSE;
+       case VIRTUE_SMALL:
+               if (vir < num) return TRUE;
+               else return FALSE;
+       }
+
+       return FALSE;
 }
 
 
@@ -165,568 +93,501 @@ bool compare_virtue(int type, int num, int tekitou)
 
 int virtue_number(int type)
 {
- int i;
-
- /* Search */
- for (i = 0; i < 8; i++)
- {
-  if (p_ptr->vir_types[i] == type) return i+1;
- }
+       int i;
 
+       /* Search */
+       for (i = 0; i < 8; i++)
+       {
+               if (p_ptr->vir_types[i] == type) return i + 1;
+       }
 
- /* No match */
- return 0;
-
+       /* No match */
+       return 0;
 }
 
 /* Aux function */
 
 static void get_random_virtue(int which)
 {
-  int type = 0;
+       int type = 0;
 
-  /* Randomly choose a type */
-  while (!(type) || virtue_number(type))
-  {
-   switch (randint1(29))
-   {
-       case 1: case 2: case 3:
-             type = V_SACRIFICE;
-             break;
-       case 4: case 5: case 6:
-               type = V_COMPASSION;
-               break;
-       case 7: case 8: case 9: case 10: case 11: case 12:
-               type = V_VALOUR;
-               break;
-       case 13: case 14: case 15: case 16: case 17:
-               type = V_HONOUR;
-               break;
-       case 18: case 19: case 20: case 21:
-               type = V_JUSTICE;
-               break;
-       case 22: case 23:
-               type = V_TEMPERANCE;
-               break;
-       case 24: case 25:
-               type = V_HARMONY;
-               break;
-       case 26: case 27: case 28:
-               type = V_PATIENCE;
-               break;
-       default:
-               type = V_DILIGENCE;
-   }
-  }
-
-  /* Chosen */
-
-  p_ptr->vir_types[which] = type;
+       /* Randomly choose a type */
+       while (!(type) || virtue_number(type))
+       {
+               switch (randint1(29))
+               {
+               case 1: case 2: case 3:
+                       type = V_SACRIFICE;
+                       break;
+               case 4: case 5: case 6:
+                       type = V_COMPASSION;
+                       break;
+               case 7: case 8: case 9: case 10: case 11: case 12:
+                       type = V_VALOUR;
+                       break;
+               case 13: case 14: case 15: case 16: case 17:
+                       type = V_HONOUR;
+                       break;
+               case 18: case 19: case 20: case 21:
+                       type = V_JUSTICE;
+                       break;
+               case 22: case 23:
+                       type = V_TEMPERANCE;
+                       break;
+               case 24: case 25:
+                       type = V_HARMONY;
+                       break;
+               case 26: case 27: case 28:
+                       type = V_PATIENCE;
+                       break;
+               default:
+                       type = V_DILIGENCE;
+                       break;
+               }
+       }
 
+       /* Chosen */
+       p_ptr->vir_types[which] = type;
 }
 
-/* Select virtues & reset values for a new character */
-
-void get_virtues(void)
+static s16b get_realm_virtues(byte realm)
 {
-   int i = 0, j = 0;
-
-   /* Reset */
-   for (i = 0; i < 8; i++)
-   {
-     p_ptr->virtues[i]=0;
-     p_ptr->vir_types[i]=0;
-   }
-
-   i = 0;
-
-   /* Get pre-defined types */
-   /* 1 or more virtues based on class */
-   switch (p_ptr->pclass)
-   {
-    case CLASS_WARRIOR:
-    case CLASS_SAMURAI:
-      p_ptr->vir_types[i++] = V_VALOUR;
-      p_ptr->vir_types[i++] = V_HONOUR;
-      break;
-    case CLASS_MAGE:
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      p_ptr->vir_types[i++] = V_ENCHANT;
-      break;
-    case CLASS_PRIEST:
-      p_ptr->vir_types[i++] = V_FAITH;
-      p_ptr->vir_types[i++] = V_TEMPERANCE;
-      break;
-    case CLASS_ROGUE:
-      p_ptr->vir_types[i++] = V_HONOUR;
-      break;
-    case CLASS_RANGER:
-    case CLASS_ARCHER:
-      p_ptr->vir_types[i++] = V_NATURE;
-      p_ptr->vir_types[i++] = V_TEMPERANCE;
-      break;
-    case CLASS_PALADIN:
-      p_ptr->vir_types[i++] = V_JUSTICE;
-      p_ptr->vir_types[i++] = V_VALOUR;
-      p_ptr->vir_types[i++] = V_HONOUR;
-      p_ptr->vir_types[i++] = V_FAITH;
-      break;
-    case CLASS_WARRIOR_MAGE:
-    case CLASS_RED_MAGE:
-      p_ptr->vir_types[i++] = V_ENCHANT;
-      p_ptr->vir_types[i++] = V_VALOUR;
-      break;
-    case CLASS_CHAOS_WARRIOR:
-      p_ptr->vir_types[i++] = V_CHANCE;
-      p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-      break;
-    case CLASS_MONK:
-    case CLASS_FORCETRAINER:
-      p_ptr->vir_types[i++] = V_FAITH;
-      p_ptr->vir_types[i++] = V_HARMONY;
-      p_ptr->vir_types[i++] = V_TEMPERANCE;
-      p_ptr->vir_types[i++] = V_PATIENCE;
-      break;
-    case CLASS_MINDCRAFTER:
-    case CLASS_MIRROR_MASTER:
-      p_ptr->vir_types[i++] = V_HARMONY;
-      p_ptr->vir_types[i++] = V_ENLIGHTEN;
-      p_ptr->vir_types[i++] = V_PATIENCE;
-      break;
-    case CLASS_HIGH_MAGE:
-    case CLASS_SORCERER:
-      p_ptr->vir_types[i++] = V_ENLIGHTEN;
-      p_ptr->vir_types[i++] = V_ENCHANT;
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      break;
-    case CLASS_TOURIST:
-      p_ptr->vir_types[i++] = V_ENLIGHTEN;
-      p_ptr->vir_types[i++] = V_CHANCE;
-      break;
-    case CLASS_IMITATOR:
-      p_ptr->vir_types[i++] = V_CHANCE;
-      break;
-    case CLASS_BLUE_MAGE:
-      p_ptr->vir_types[i++] = V_CHANCE;
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      break;
-    case CLASS_BEASTMASTER:
-      p_ptr->vir_types[i++] = V_NATURE;
-      p_ptr->vir_types[i++] = V_CHANCE;
-      p_ptr->vir_types[i++] = V_VITALITY;
-      break;
-    case CLASS_MAGIC_EATER:
-      p_ptr->vir_types[i++] = V_ENCHANT;
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      break;
-    case CLASS_BARD:
-      p_ptr->vir_types[i++] = V_HARMONY;
-      p_ptr->vir_types[i++] = V_COMPASSION;
-      break;
-    case CLASS_CAVALRY:
-      p_ptr->vir_types[i++] = V_VALOUR;
-      p_ptr->vir_types[i++] = V_HARMONY;
-      break;
-    case CLASS_BERSERKER:
-      p_ptr->vir_types[i++] = V_VALOUR;
-      p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-      break;
-    case CLASS_SMITH:
-      p_ptr->vir_types[i++] = V_HONOUR;
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      break;
-    case CLASS_NINJA:
-      p_ptr->vir_types[i++] = V_PATIENCE;
-      p_ptr->vir_types[i++] = V_KNOWLEDGE;
-      p_ptr->vir_types[i++] = V_FAITH;
-      p_ptr->vir_types[i++] = V_UNLIFE;
-      break;
-
-   };
-
-
-   /* Get one virtue based on race */
-   switch (p_ptr->prace)
-   {
-   case RACE_HUMAN: case RACE_HALF_ELF: case RACE_DUNADAN:
-     p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-     break;
-   case RACE_ELF: case RACE_SPRITE: case RACE_ENT:
-     p_ptr->vir_types[i++] = V_NATURE;
-     break;
-   case RACE_HOBBIT: case RACE_HALF_OGRE:
-     p_ptr->vir_types[i++] = V_TEMPERANCE;
-     break;
-   case RACE_DWARF: case RACE_KLACKON: case RACE_ANDROID:
-     p_ptr->vir_types[i++] = V_DILIGENCE;
-     break;
-   case RACE_GNOME: case RACE_CYCLOPS:
-     p_ptr->vir_types[i++] = V_KNOWLEDGE;
-     break;
-   case RACE_HALF_ORC: case RACE_AMBERITE: case RACE_KOBOLD:
-     p_ptr->vir_types[i++] = V_HONOUR;
-     break;
-   case RACE_HALF_TROLL: case RACE_BARBARIAN:
-     p_ptr->vir_types[i++] = V_VALOUR;
-     break;
-   case RACE_HIGH_ELF: case RACE_KUTA:
-     p_ptr->vir_types[i++] = V_VITALITY;
-     break;
-   case RACE_HALF_GIANT: case RACE_GOLEM: case RACE_ANGEL: case RACE_DEMON:
-     p_ptr->vir_types[i++] = V_JUSTICE;
-     break;
-   case RACE_HALF_TITAN:
-     p_ptr->vir_types[i++] = V_HARMONY;
-     break;
-   case RACE_YEEK:
-     p_ptr->vir_types[i++] = V_SACRIFICE;
-     break;
-   case RACE_MIND_FLAYER:
-     p_ptr->vir_types[i++] = V_ENLIGHTEN;
-     break;
-   case RACE_DARK_ELF: case RACE_DRACONIAN: case RACE_S_FAIRY:
-     p_ptr->vir_types[i++] = V_ENCHANT;
-     break;
-   case RACE_NIBELUNG:
-     p_ptr->vir_types[i++] = V_PATIENCE;
-     break;
-   case RACE_IMP:
-     p_ptr->vir_types[i++] = V_FAITH;
-     break;
-   case RACE_ZOMBIE: case RACE_SKELETON:
-   case RACE_VAMPIRE: case RACE_SPECTRE:
-     p_ptr->vir_types[i++] = V_UNLIFE;
-     break;
-   case RACE_BEASTMAN:
-     p_ptr->vir_types[i++] = V_CHANCE;
-     break;
-   }     
-
-   /* Get a virtue for realm1 */
-   if (p_ptr->realm1)
-   {
-    switch(p_ptr->realm1)
-    {
-       case REALM_LIFE:
-        if (virtue_number(V_VITALITY))
-         p_ptr->vir_types[i++] = V_TEMPERANCE;
-        else p_ptr->vir_types[i++] = V_VITALITY;
-       break;
-       case REALM_SORCERY:
-        if (virtue_number(V_KNOWLEDGE))
-         p_ptr->vir_types[i++] = V_ENCHANT;
-        else p_ptr->vir_types[i++] = V_KNOWLEDGE;
-       break;
-       case REALM_NATURE:
-        if (virtue_number(V_NATURE))
-         p_ptr->vir_types[i++] = V_HARMONY;
-        else p_ptr->vir_types[i++] = V_NATURE;
-       break;
-       case REALM_CHAOS:
-        if (virtue_number(V_CHANCE))
-         p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-        else p_ptr->vir_types[i++] = V_CHANCE;
-       break;
-       case REALM_DEATH:
-        p_ptr->vir_types[i++] = V_UNLIFE;
-       break;
-       case REALM_TRUMP:
-        p_ptr->vir_types[i++] = V_KNOWLEDGE;
-       break;
-       case REALM_ARCANE:
-       break;
-       case REALM_ENCHANT:
-        if (virtue_number(V_ENCHANT))
-         p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-        else p_ptr->vir_types[i++] = V_ENCHANT;
-       break;
-       case REALM_DAEMON:
-        if (virtue_number(V_JUSTICE))
-         p_ptr->vir_types[i++] = V_FAITH;
-        else p_ptr->vir_types[i++] = V_JUSTICE;
-       break;
-       case REALM_CRUSADE:
-        if (virtue_number(V_JUSTICE))
-         p_ptr->vir_types[i++] = V_HONOUR;
-        else p_ptr->vir_types[i++] = V_JUSTICE;
-       break;
-     };
-    }
-
-   /* Get a virtue for realm2 */
-
-   if (p_ptr->realm2)
-   {
-    switch(p_ptr->realm2)
-    {
+       switch (realm)
+       {
        case REALM_LIFE:
-        if (virtue_number(V_VITALITY))
-         p_ptr->vir_types[i++] = V_TEMPERANCE;
-        else p_ptr->vir_types[i++] = V_VITALITY;
-       break;
+               if (virtue_number(V_VITALITY)) return V_TEMPERANCE;
+               else return V_VITALITY;
        case REALM_SORCERY:
-        if (virtue_number(V_ENCHANT))
-         p_ptr->vir_types[i++] = V_KNOWLEDGE;
-        else p_ptr->vir_types[i++] = V_ENCHANT;
-       break;
+               if (virtue_number(V_KNOWLEDGE)) return V_ENCHANT;
+               else return V_KNOWLEDGE;
        case REALM_NATURE:
-        if (virtue_number(V_NATURE))
-         p_ptr->vir_types[i++] = V_HARMONY;
-        else p_ptr->vir_types[i++] = V_NATURE;
-       break;
+               if (virtue_number(V_NATURE)) return V_HARMONY;
+               else return V_NATURE;
        case REALM_CHAOS:
-        if (virtue_number(V_CHANCE))
-         p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-        else p_ptr->vir_types[i++] = V_CHANCE;
-       break;
+               if (virtue_number(V_CHANCE)) return V_INDIVIDUALISM;
+               else return V_CHANCE;
        case REALM_DEATH:
-        p_ptr->vir_types[i++] = V_UNLIFE;
-       break;
+               return V_UNLIFE;
        case REALM_TRUMP:
-        p_ptr->vir_types[i++] = V_KNOWLEDGE;
-       break;
+               return V_KNOWLEDGE;
        case REALM_ARCANE:
-       break;
+               return 0;
        case REALM_ENCHANT:
-        if (virtue_number(V_ENCHANT))
-         p_ptr->vir_types[i++] = V_INDIVIDUALISM;
-        else p_ptr->vir_types[i++] = V_ENCHANT;
-       break;
+               if (virtue_number(V_ENCHANT)) return V_INDIVIDUALISM;
+               else return V_ENCHANT;
        case REALM_DAEMON:
-        if (virtue_number(V_JUSTICE))
-         p_ptr->vir_types[i++] = V_FAITH;
-        else p_ptr->vir_types[i++] = V_JUSTICE;
-       break;
+               if (virtue_number(V_JUSTICE)) return V_FAITH;
+               else return V_JUSTICE;
        case REALM_CRUSADE:
-        if (virtue_number(V_JUSTICE))
-         p_ptr->vir_types[i++] = V_HONOUR;
-        else p_ptr->vir_types[i++] = V_JUSTICE;
-       break;
-     };
-    }
-
-   /* Eliminate doubles */
-   for (i = 0; i < 8; i++)
-   {
-    for (j = i+1; j < 8; j++)
-    {
-     if ((p_ptr->vir_types[j] != 0)
-      && (p_ptr->vir_types[j] == p_ptr->vir_types[i]))
-       p_ptr->vir_types[j] = 0;
-    }
-   }
-
-   /* Fill in the blanks */
-
-   for (i = 0; i < 8; i++)
-   {
-    if (p_ptr->vir_types[i]==0) get_random_virtue(i);
-   }
+               if (virtue_number(V_JUSTICE)) return V_HONOUR;
+               else return V_JUSTICE;
+       };
+
+       return 0;
 }
 
-void chg_virtue(int virtue, int amount)
+/* Select virtues & reset values for a new character */
+
+void get_virtues(void)
 {
-    int i = 0;
+       int i = 0, j = 0;
+       s16b tmp_vir;
 
-    for (i = 0; i < 8; i++)
-    {
-       if (p_ptr->vir_types[i] == virtue)
+       /* Reset */
+       for (i = 0; i < 8; i++)
        {
-           if (amount > 0)
-           {
-               if ((amount + p_ptr->virtues[i] > 50) && one_in_(2))
-               {
-                   p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 50);
-                   return;
-               }
-               if ((amount + p_ptr->virtues[i] > 80) && one_in_(2))
-               {
-                   p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 80);
-                   return;
-               }
-               if ((amount + p_ptr->virtues[i] > 100) && one_in_(2))
-               {
-                   p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 100);
-                   return;
-               }
-               if (amount + p_ptr->virtues[i] > 125)
-                p_ptr->virtues[i] = 125;
-               else
-                p_ptr->virtues[i] = p_ptr->virtues[i] + amount;
-           }
-           else
-           {
-               if ((amount + p_ptr->virtues[i] < -50) && one_in_(2))
-               {
-                   p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -50);
-                   return;
-               }
-               if ((amount + p_ptr->virtues[i] < -80) && one_in_(2))
+               p_ptr->virtues[i] = 0;
+               p_ptr->vir_types[i] = 0;
+       }
+
+       i = 0;
+
+       /* Get pre-defined types */
+       /* 1 or more virtues based on class */
+       switch (p_ptr->pclass)
+       {
+       case CLASS_WARRIOR:
+       case CLASS_SAMURAI:
+               p_ptr->vir_types[i++] = V_VALOUR;
+               p_ptr->vir_types[i++] = V_HONOUR;
+               break;
+       case CLASS_MAGE:
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               p_ptr->vir_types[i++] = V_ENCHANT;
+               break;
+       case CLASS_PRIEST:
+               p_ptr->vir_types[i++] = V_FAITH;
+               p_ptr->vir_types[i++] = V_TEMPERANCE;
+               break;
+       case CLASS_ROGUE:
+               p_ptr->vir_types[i++] = V_HONOUR;
+               break;
+       case CLASS_RANGER:
+       case CLASS_ARCHER:
+               p_ptr->vir_types[i++] = V_NATURE;
+               p_ptr->vir_types[i++] = V_TEMPERANCE;
+               break;
+       case CLASS_PALADIN:
+               p_ptr->vir_types[i++] = V_JUSTICE;
+               p_ptr->vir_types[i++] = V_VALOUR;
+               p_ptr->vir_types[i++] = V_HONOUR;
+               p_ptr->vir_types[i++] = V_FAITH;
+               break;
+       case CLASS_WARRIOR_MAGE:
+       case CLASS_RED_MAGE:
+               p_ptr->vir_types[i++] = V_ENCHANT;
+               p_ptr->vir_types[i++] = V_VALOUR;
+               break;
+       case CLASS_CHAOS_WARRIOR:
+               p_ptr->vir_types[i++] = V_CHANCE;
+               p_ptr->vir_types[i++] = V_INDIVIDUALISM;
+               break;
+       case CLASS_MONK:
+       case CLASS_FORCETRAINER:
+               p_ptr->vir_types[i++] = V_FAITH;
+               p_ptr->vir_types[i++] = V_HARMONY;
+               p_ptr->vir_types[i++] = V_TEMPERANCE;
+               p_ptr->vir_types[i++] = V_PATIENCE;
+               break;
+       case CLASS_MINDCRAFTER:
+       case CLASS_MIRROR_MASTER:
+               p_ptr->vir_types[i++] = V_HARMONY;
+               p_ptr->vir_types[i++] = V_ENLIGHTEN;
+               p_ptr->vir_types[i++] = V_PATIENCE;
+               break;
+       case CLASS_HIGH_MAGE:
+       case CLASS_SORCERER:
+               p_ptr->vir_types[i++] = V_ENLIGHTEN;
+               p_ptr->vir_types[i++] = V_ENCHANT;
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               break;
+       case CLASS_TOURIST:
+               p_ptr->vir_types[i++] = V_ENLIGHTEN;
+               p_ptr->vir_types[i++] = V_CHANCE;
+               break;
+       case CLASS_IMITATOR:
+               p_ptr->vir_types[i++] = V_CHANCE;
+               break;
+       case CLASS_BLUE_MAGE:
+               p_ptr->vir_types[i++] = V_CHANCE;
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               break;
+       case CLASS_BEASTMASTER:
+               p_ptr->vir_types[i++] = V_NATURE;
+               p_ptr->vir_types[i++] = V_CHANCE;
+               p_ptr->vir_types[i++] = V_VITALITY;
+               break;
+       case CLASS_MAGIC_EATER:
+               p_ptr->vir_types[i++] = V_ENCHANT;
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               break;
+       case CLASS_BARD:
+               p_ptr->vir_types[i++] = V_HARMONY;
+               p_ptr->vir_types[i++] = V_COMPASSION;
+               break;
+       case CLASS_CAVALRY:
+               p_ptr->vir_types[i++] = V_VALOUR;
+               p_ptr->vir_types[i++] = V_HARMONY;
+               break;
+       case CLASS_BERSERKER:
+               p_ptr->vir_types[i++] = V_VALOUR;
+               p_ptr->vir_types[i++] = V_INDIVIDUALISM;
+               break;
+       case CLASS_SMITH:
+               p_ptr->vir_types[i++] = V_HONOUR;
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               break;
+       case CLASS_NINJA:
+               p_ptr->vir_types[i++] = V_PATIENCE;
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               p_ptr->vir_types[i++] = V_FAITH;
+               p_ptr->vir_types[i++] = V_UNLIFE;
+               break;
+       };
+
+       /* Get one virtue based on race */
+       switch (p_ptr->prace)
+       {
+       case RACE_HUMAN: case RACE_HALF_ELF: case RACE_DUNADAN:
+               p_ptr->vir_types[i++] = V_INDIVIDUALISM;
+               break;
+       case RACE_ELF: case RACE_SPRITE: case RACE_ENT:
+               p_ptr->vir_types[i++] = V_NATURE;
+               break;
+       case RACE_HOBBIT: case RACE_HALF_OGRE:
+               p_ptr->vir_types[i++] = V_TEMPERANCE;
+               break;
+       case RACE_DWARF: case RACE_KLACKON: case RACE_ANDROID:
+               p_ptr->vir_types[i++] = V_DILIGENCE;
+               break;
+       case RACE_GNOME: case RACE_CYCLOPS:
+               p_ptr->vir_types[i++] = V_KNOWLEDGE;
+               break;
+       case RACE_HALF_ORC: case RACE_AMBERITE: case RACE_KOBOLD:
+               p_ptr->vir_types[i++] = V_HONOUR;
+               break;
+       case RACE_HALF_TROLL: case RACE_BARBARIAN:
+               p_ptr->vir_types[i++] = V_VALOUR;
+               break;
+       case RACE_HIGH_ELF: case RACE_KUTA:
+               p_ptr->vir_types[i++] = V_VITALITY;
+               break;
+       case RACE_HALF_GIANT: case RACE_GOLEM: case RACE_ANGEL: case RACE_DEMON:
+               p_ptr->vir_types[i++] = V_JUSTICE;
+               break;
+       case RACE_HALF_TITAN:
+               p_ptr->vir_types[i++] = V_HARMONY;
+               break;
+       case RACE_YEEK:
+               p_ptr->vir_types[i++] = V_SACRIFICE;
+               break;
+       case RACE_MIND_FLAYER:
+               p_ptr->vir_types[i++] = V_ENLIGHTEN;
+               break;
+       case RACE_DARK_ELF: case RACE_DRACONIAN: case RACE_S_FAIRY:
+               p_ptr->vir_types[i++] = V_ENCHANT;
+               break;
+       case RACE_NIBELUNG:
+               p_ptr->vir_types[i++] = V_PATIENCE;
+               break;
+       case RACE_IMP:
+               p_ptr->vir_types[i++] = V_FAITH;
+               break;
+       case RACE_ZOMBIE: case RACE_SKELETON:
+       case RACE_VAMPIRE: case RACE_SPECTRE:
+               p_ptr->vir_types[i++] = V_UNLIFE;
+               break;
+       case RACE_BEASTMAN:
+               p_ptr->vir_types[i++] = V_CHANCE;
+               break;
+       }
+
+       /* Get a virtue for realms */
+       if (p_ptr->realm1)
+       {
+               tmp_vir = get_realm_virtues(p_ptr->realm1);
+               if (tmp_vir) p_ptr->vir_types[i++] = tmp_vir;
+       }
+       if (p_ptr->realm2)
+       {
+               tmp_vir = get_realm_virtues(p_ptr->realm2);
+               if (tmp_vir) p_ptr->vir_types[i++] = tmp_vir;
+       }
+
+       /* Eliminate doubles */
+       for (i = 0; i < 8; i++)
+       {
+               for (j = i + 1; j < 8; j++)
                {
-                   p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -80);
-                   return;
+                       if ((p_ptr->vir_types[j] != 0) && (p_ptr->vir_types[j] == p_ptr->vir_types[i]))
+                               p_ptr->vir_types[j] = 0;
                }
-               if ((amount + p_ptr->virtues[i] < -100) && one_in_(2))
+       }
+
+       /* Fill in the blanks */
+       for (i = 0; i < 8; i++)
+       {
+               if (p_ptr->vir_types[i] == 0) get_random_virtue(i);
+       }
+}
+
+void chg_virtue(int virtue, int amount)
+{
+       int i = 0;
+
+       for (i = 0; i < 8; i++)
+       {
+               if (p_ptr->vir_types[i] == virtue)
                {
-                   p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -100);
-                   return;
+                       if (amount > 0)
+                       {
+                               if ((amount + p_ptr->virtues[i] > 50) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 50);
+                                       return;
+                               }
+                               if ((amount + p_ptr->virtues[i] > 80) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 80);
+                                       return;
+                               }
+                               if ((amount + p_ptr->virtues[i] > 100) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MAX(p_ptr->virtues[i], 100);
+                                       return;
+                               }
+                               if (amount + p_ptr->virtues[i] > 125)
+                                       p_ptr->virtues[i] = 125;
+                               else
+                                       p_ptr->virtues[i] = p_ptr->virtues[i] + amount;
+                       }
+                       else
+                       {
+                               if ((amount + p_ptr->virtues[i] < -50) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -50);
+                                       return;
+                               }
+                               if ((amount + p_ptr->virtues[i] < -80) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -80);
+                                       return;
+                               }
+                               if ((amount + p_ptr->virtues[i] < -100) && one_in_(2))
+                               {
+                                       p_ptr->virtues[i] = MIN(p_ptr->virtues[i], -100);
+                                       return;
+                               }
+                               if (amount + p_ptr->virtues[i] < -125)
+                                       p_ptr->virtues[i] = -125;
+                               else
+                                       p_ptr->virtues[i] = p_ptr->virtues[i] + amount;
+                       }
+                       p_ptr->update |= (PU_BONUS);
+                       return;
                }
-               if (amount + p_ptr->virtues[i] < -125)
-                p_ptr->virtues[i] = -125;
-               else
-                p_ptr->virtues[i] = p_ptr->virtues[i] + amount;
-           }
-           p_ptr->update |= (PU_BONUS);
-           return;
        }
-    }
-
 }
 
 void set_virtue(int virtue, int amount)
 {
-    int i = 0;
+       int i = 0;
 
-    for (i = 0; i < 8; i++)
-    {
-       if (p_ptr->vir_types[i] == virtue)
+       for (i = 0; i < 8; i++)
        {
-           p_ptr->virtues[i] = amount;
-           return;
+               if (p_ptr->vir_types[i] == virtue)
+               {
+                       p_ptr->virtues[i] = amount;
+                       return;
+               }
        }
-    }
 }
 
-void dump_virtues(FILE * OutFile)
+void dump_virtues(FILE *OutFile)
 {
-    int v_nr = 0;
+       int v_nr = 0;
 
-    if (!OutFile) return;
+       if (!OutFile) return;
 
        for (v_nr = 0; v_nr < 8; v_nr++)
        {
                char v_name [20];
-
                int tester = p_ptr->virtues[v_nr];
 
                strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]);
 
-               if (p_ptr->vir_types[v_nr] == 0 || p_ptr->vir_types[v_nr] >
-                   MAX_VIRTUE)
+               if (p_ptr->vir_types[v_nr] == 0 || p_ptr->vir_types[v_nr] > MAX_VIRTUE)
 #ifdef JP
-                fprintf(OutFile, "¤ª¤Ã¤È¡£%s¤Î¾ðÊó¤Ê¤·¡£", v_name);
+                       fprintf(OutFile, "¤ª¤Ã¤È¡£%s¤Î¾ðÊó¤Ê¤·¡£", v_name);
 #else
-                fprintf(OutFile, "Oops. No info about %s.", v_name);
+                       fprintf(OutFile, "Oops. No info about %s.", v_name);
 #endif
 
                else if (tester < -100)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤ÎÂжË",
+                       fprintf(OutFile, "[%s]¤ÎÂжË",
 #else
-                 fprintf(OutFile, "You are the polar opposite of %s.",
+                       fprintf(OutFile, "You are the polar opposite of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < -80)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤ÎÂçŨ",
+                       fprintf(OutFile, "[%s]¤ÎÂçŨ",
 #else
-                 fprintf(OutFile, "You are an arch-enemy of %s.",
+                       fprintf(OutFile, "You are an arch-enemy of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < -60)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤Î¶¯Å¨",
+                       fprintf(OutFile, "[%s]¤Î¶¯Å¨",
 #else
-                 fprintf(OutFile, "You are a bitter enemy of %s.",
+                       fprintf(OutFile, "You are a bitter enemy of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < -40)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤ÎŨ",
+                       fprintf(OutFile, "[%s]¤ÎŨ",
 #else
-                 fprintf(OutFile, "You are an enemy of %s.",
+                       fprintf(OutFile, "You are an enemy of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < -20)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤Îºá¼Ô",
+                       fprintf(OutFile, "[%s]¤Îºá¼Ô",
 #else
-                 fprintf(OutFile, "You have sinned against %s.",
+                       fprintf(OutFile, "You have sinned against %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 0)
 #ifdef JP
-                 fprintf(OutFile, "[%s]¤ÎÌÂÆ»¼Ô",
+                       fprintf(OutFile, "[%s]¤ÎÌÂÆ»¼Ô",
 #else
-                 fprintf(OutFile, "You have strayed from the path of %s.",
+                       fprintf(OutFile, "You have strayed from the path of %s.",
 #endif
 
-                  v_name);
-               else if (tester == 0)                   
+                               v_name);
+               else if (tester == 0)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤ÎÃæΩ¼Ô",
+                       fprintf(OutFile,"[%s]¤ÎÃæΩ¼Ô",
 #else
-                 fprintf(OutFile,"You are neutral to %s.",
+                       fprintf(OutFile,"You are neutral to %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 20)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤Î¾®ÆÁ¼Ô",
+                       fprintf(OutFile,"[%s]¤Î¾®ÆÁ¼Ô",
 #else
-                 fprintf(OutFile,"You are somewhat virtuous in %s.",
+                       fprintf(OutFile,"You are somewhat virtuous in %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 40)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤ÎÃæÆÁ¼Ô",
+                       fprintf(OutFile,"[%s]¤ÎÃæÆÁ¼Ô",
 #else
-                 fprintf(OutFile,"You are virtuous in %s.",
+                       fprintf(OutFile,"You are virtuous in %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 60)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤Î¹âÆÁ¼Ô",
+                       fprintf(OutFile,"[%s]¤Î¹âÆÁ¼Ô",
 #else
-                 fprintf(OutFile,"You are very virtuous in %s.",
+                       fprintf(OutFile,"You are very virtuous in %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 80)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤ÎÇƼÔ",
+                       fprintf(OutFile,"[%s]¤ÎÇƼÔ",
 #else
-                 fprintf(OutFile,"You are a champion of %s.",
+                       fprintf(OutFile,"You are a champion of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else if (tester < 100)
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤Î°ÎÂç¤ÊÇƼÔ",
+                       fprintf(OutFile,"[%s]¤Î°ÎÂç¤ÊÇƼÔ",
 #else
-                 fprintf(OutFile,"You are a great champion of %s.",
+                       fprintf(OutFile,"You are a great champion of %s.",
 #endif
 
-                  v_name);
+                               v_name);
                else
 #ifdef JP
-                 fprintf(OutFile,"[%s]¤Î¶ñ¸½¼Ô",
+                       fprintf(OutFile,"[%s]¤Î¶ñ¸½¼Ô",
 #else
-                 fprintf(OutFile,"You are the living embodiment of %s.",
+                       fprintf(OutFile,"You are the living embodiment of %s.",
 #endif
 
-                  v_name);
+                               v_name);
 
            fprintf(OutFile, "\n");
        }
-
-
 }
-
index b851525..08ffbb0 100644 (file)
@@ -4831,10 +4831,8 @@ static bool get_stat_limits(void)
                switch ( c ){
                case 'Q':
                        birth_quit();
-                       break;
                case 'S':
-                       return (FALSE); 
-                       break;
+                       return FALSE;
                case ESCAPE:
                        break;
                case ' ':
@@ -5081,7 +5079,6 @@ static bool get_chara_limits(void)
                switch (c){
                case 'Q':
                        birth_quit();
-                       break;
                case 'S':
                        return (FALSE);
                case ESCAPE:
@@ -5234,7 +5231,6 @@ static char histpref_buf[240];
 
 void add_history_from_pref_line(cptr t)
 {
-       int  line_size = strlen(t);
        int  limit = (sizeof histpref_buf) - 1;
        int  i;
 
index 3139388..d9fd22f 100644 (file)
@@ -2381,49 +2381,33 @@ bool get_nightmare(int r_idx)
 void have_nightmare(int r_idx)
 {
        bool happened = FALSE;
-
-       int power = 100;
-
        monster_race *r_ptr = &r_info[r_idx];
-
+       int power = r_ptr->level + 10;
        char m_name[80];
        cptr desc = r_name + r_ptr->name;
 
-
-       power = r_ptr->level + 10;
-
-#ifdef JP
-       if (0)
-#else
+       /* Describe it */
+#ifndef JP
        if (!(r_ptr->flags1 & RF1_UNIQUE))
-#endif
-
-       {
-               /* Describe it */
                sprintf(m_name, "%s %s", (is_a_vowel(desc[0]) ? "an" : "a"), desc);
-
-               if (r_ptr->flags1 & RF1_FRIENDS)
-               {
-                       power /= 2;
-               }
-       }
        else
-       {
-               /* Describe it */
+#endif
                sprintf(m_name, "%s", desc);
 
-               power *= 2;
+       if (!(r_ptr->flags1 & RF1_UNIQUE))
+       {
+               if (r_ptr->flags1 & RF1_FRIENDS) power /= 2;
        }
+       else power *= 2;
 
        if (saving_throw(p_ptr->skill_sav * 100 / power))
        {
 #ifdef JP
-       msg_format("Ì´¤ÎÃæ¤Ç%s¤ËÄɤ¤¤«¤±¤é¤ì¤¿¡£", m_name);
+               msg_format("Ì´¤ÎÃæ¤Ç%s¤ËÄɤ¤¤«¤±¤é¤ì¤¿¡£", m_name);
 #else
-       msg_format("%^s chases you through your dreams.", m_name);
+               msg_format("%^s chases you through your dreams.", m_name);
 #endif
 
-
                /* Safe */
                return;
        }
@@ -2432,7 +2416,7 @@ void have_nightmare(int r_idx)
        {
                /* Something silly happens... */
 #ifdef JP
-msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
+               msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
 #else
                msg_format("You behold the %s visage of %s!",
 #endif
@@ -2451,7 +2435,7 @@ msg_format("%s%s
 
        /* Something frightening happens... */
 #ifdef JP
-msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
+       msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
 #else
        msg_format("You behold the %s visage of %s!",
 #endif
@@ -2460,7 +2444,7 @@ msg_format("%s%s
 
        r_ptr->r_flags2 |= RF2_ELDRITCH_HORROR;
 
-       switch(p_ptr->prace)
+       switch (p_ptr->prace)
        {
                /* Imps may make a saving throw */
                case RACE_IMP:
@@ -4454,7 +4438,6 @@ static void bldg_process_command(building_type *bldg, int i)
        int bact = bldg->actions[i];
        int bcost;
        bool paid = FALSE;
-       bool set_reward = FALSE;
        int amt;
 
        /* Flush messages XXX XXX XXX */
@@ -4491,12 +4474,10 @@ msg_print("
                return;
        }
 
-       if (!bcost) set_reward = TRUE;
-
        switch (bact)
        {
        case BACT_NOTHING:
-                               /* Do nothing */
+               /* Do nothing */
                break;
        case BACT_RESEARCH_ITEM:
                paid = identify_fully(FALSE);
index 0731d5e..4297dbb 100644 (file)
@@ -1732,8 +1732,6 @@ static s16b toggle_frequency(s16b current)
        case 10000: return 25000;
        default: return 0;
        }
-
-       return 0; /* Paranoia */
 }
 
 
@@ -6972,13 +6970,11 @@ static void do_cmd_knowledge_pets(void)
        /* Process the monsters (backwards) */
        for (i = m_max - 1; i >= 1; i--)
        {
-               monster_race *r_ptr;
                /* Access the monster */
                m_ptr = &m_list[i];
 
                /* Ignore "dead" monsters */
                if (!m_ptr->r_idx) continue;
-               r_ptr = &r_info[m_ptr->r_idx];
 
                /* Calculate "upkeep" for pets */
                if (is_pet(m_ptr))
index 7d44c17..91401dc 100644 (file)
@@ -149,21 +149,20 @@ static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm
 
        /* Get a spell from the user */
 
-       choice = (always_show_list || use_menu) ? ESCAPE:1;
+       choice = (always_show_list || use_menu) ? ESCAPE : 1;
        while (!flag)
        {
-               if( choice==ESCAPE ) choice = ' '; 
-               else if( !get_com(out_val, &choice, TRUE) )break; 
+               if (choice == ESCAPE) choice = ' '; 
+               else if (!get_com(out_val, &choice, TRUE))break;
 
                if (use_menu && choice != ' ')
                {
-                       switch(choice)
+                       switch (choice)
                        {
                                case '0':
                                {
                                        screen_load();
-                                       return (FALSE);
-                                       break;
+                                       return FALSE;
                                }
 
                                case '8':
@@ -329,7 +328,7 @@ static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm
 
 
        /* Abort if needed */
-       if (!flag) return (FALSE);
+       if (!flag) return FALSE;
 
        /* Save the choice */
        (*sn) = spell;
@@ -341,7 +340,7 @@ static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm
 #endif /* ALLOW_REPEAT -- TNB */
 
        /* Success */
-       return (TRUE);
+       return TRUE;
 }
 
 
@@ -383,13 +382,11 @@ void do_cmd_browse(void)
        int             item, sval, use_realm = 0, j, line;
        int             spell = -1;
        int             num = 0;
-       int             increment = 0;
 
        byte            spells[64];
        char            temp[62*4];
 
        object_type     *o_ptr;
-       magic_type      *s_ptr;
 
        cptr q, s;
 
@@ -455,11 +452,6 @@ s = "
        sval = o_ptr->sval;
 
        use_realm = tval2realm(o_ptr->tval);
-       if ((p_ptr->pclass != CLASS_SORCERER) && (p_ptr->pclass != CLASS_RED_MAGE) && is_magic(use_realm))
-       {
-               if (o_ptr->tval == REALM2_BOOK) increment = 32;
-               else if (o_ptr->tval != REALM1_BOOK) increment = 64;
-       }
 
        /* Track the object kind */
        object_kind_track(o_ptr->k_idx);
@@ -516,13 +508,13 @@ s = "
                                prt("No spells to browse.", 0, 0);
 #endif
                        (void)inkey();
-                       
+
 
                        /* Restore the screen */
                        screen_load();
 
                        return;
-               }                                 
+               }
 
                /* Clear lines, position cursor  (really should use strlen here) */
                Term_erase(14, 14, 255);
@@ -530,18 +522,8 @@ s = "
                Term_erase(14, 12, 255);
                Term_erase(14, 11, 255);
 
-               /* Access the spell */
-               if (!is_magic(use_realm))
-               {
-                       s_ptr = &technic_info[use_realm - MIN_TECHNIC][spell];
-               }
-               else
-               {
-                       s_ptr = &mp_ptr->info[use_realm - 1][spell];
-               }
-
-               roff_to_buf(spell_tips[technic2magic(use_realm)-1][spell] ,62, temp, sizeof(temp));
-               for(j=0, line = 11;temp[j];j+=(1+strlen(&temp[j])))
+               roff_to_buf(spell_tips[technic2magic(use_realm) - 1][spell], 62, temp, sizeof(temp));
+               for (j = 0, line = 11; temp[j]; j += 1 + strlen(&temp[j]))
                {
                        prt(&temp[j], line, 15);
                        line++;
@@ -1124,8 +1106,7 @@ static bool cast_life_spell(int spell)
                fire_ball_hide(GF_WOUNDS, dir, damroll(5+((plev - 5) / 3), 15), 0);
                break;
        case 21: /* Word of Recall */
-               if (!word_of_recall()) return FALSE;
-               break;
+               return word_of_recall();
        case 22: /* Alter Reality */
                alter_reality();
                break;
@@ -1265,7 +1246,6 @@ static bool cast_sorcery_spell(int spell)
                break;
        case 19: /* Teleport to town */
                return tele_town();
-               break;
        case 20: /* Self knowledge */
                (void)self_knowledge();
                break;
@@ -1278,8 +1258,7 @@ static bool cast_sorcery_spell(int spell)
                (void)teleport_player_level();
                break;
        case 22: /* Word of Recall */
-               if (!word_of_recall()) return FALSE;
-               break;
+               return word_of_recall();
        case 23: /* Dimension Door */
 #ifdef JP
 msg_print("¼¡¸µ¤ÎÈ⤬³«¤¤¤¿¡£ÌÜŪÃϤòÁª¤ó¤Ç²¼¤µ¤¤¡£");
@@ -1339,7 +1318,6 @@ static bool cast_nature_spell(int spell)
        int         dir;
        int         beam;
        int         plev = p_ptr->lev;
-       bool    no_trump = FALSE;
 
        if (p_ptr->pclass == CLASS_MAGE) beam = plev;
        else if (p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER) beam = plev + 10;
@@ -1450,7 +1428,13 @@ msg_print("
                break;
        case 14: /* Summon Animals */
                if (!(summon_specific(-1, py, px, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET))))
-                       no_trump = TRUE;
+               {
+#ifdef JP
+                       msg_print("ưʪ¤Ï¸½¤ì¤Ê¤«¤Ã¤¿¡£");
+#else
+                       msg_print("No animals arrive.");
+#endif
+               }
                break;
        case 15: /* Herbal Healing */
                (void)hp_player(500);
@@ -1561,14 +1545,6 @@ msg_format("
                msg_print(NULL);
        }
 
-       if (no_trump)
-#ifdef JP
-msg_print("ưʪ¤Ï¸½¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
-               msg_print("No animals arrive.");
-#endif
-
-
        return TRUE;
 }
 
@@ -1718,7 +1694,6 @@ msg_print("
                                sleep_monsters();
                                hp_player(300);
                        }
-                       break;
                }
                break;
        case 9: /* Chaos Bolt */
@@ -2279,7 +2254,6 @@ msg_print("
                        return ident_spell(FALSE);
                else
                        return identify_fully(FALSE);
-               break;
        case 27: /* Mimic vampire */
                (void)set_mimic(10+plev/2 + randint1(10+plev/2), MIMIC_VAMPIRE, FALSE);
                break;
@@ -2315,18 +2289,12 @@ take_hit(DAMAGE_USELIFE, 20 + randint1(30), "
 static bool cast_trump_spell(int spell, bool success)
 {
        int     dir;
-       int     beam;
        int     plev = p_ptr->lev;
        int     summon_lev = plev * 2 / 3 + randint1(plev/2);
        int     dummy = 0;
        bool    no_trump = FALSE;
        bool    unique_okay = FALSE;
 
-
-       if (p_ptr->pclass == CLASS_MAGE) beam = plev;
-       else if (p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER) beam = plev + 10;
-       else beam = plev / 2;
-
        if (summon_lev < 1) summon_lev = 1;
        if (!success || (randint1(50+plev) < plev/10)) unique_okay = TRUE;
        switch (spell)
@@ -2850,7 +2818,7 @@ msg_print("
                case 14: /* Word of Recall */
                        if (success)
                        {
-                               if (!word_of_recall()) return FALSE;
+                               return word_of_recall();
                        }
                        break;
                case 15: /* Banish */
@@ -3304,7 +3272,6 @@ static bool cast_arcane_spell(int spell)
        int     beam;
        int     plev = p_ptr->lev;
        int     dummy = 0;
-       bool    no_trump = FALSE;
 
        if (p_ptr->pclass == CLASS_MAGE) beam = plev;
        else if (p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER) beam = plev + 10;
@@ -3410,7 +3377,13 @@ msg_print("
                break;
        case 25: /* Conjure Elemental */
                if (!summon_specific(-1, py, px, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
-                       no_trump = TRUE;
+               {
+#ifdef JP
+                       msg_print("¥¨¥ì¥á¥ó¥¿¥ë¤Ï¸½¤ì¤Ê¤«¤Ã¤¿¡£");
+#else
+                       msg_print("No Elementals arrive.");
+#endif
+               }
                break;
        case 26: /* Teleport Level */
 #ifdef JP
@@ -3441,8 +3414,7 @@ msg_print("
                (void)detect_all(DETECT_RAD_DEFAULT);
                break;
        case 30: /* Word of Recall */
-               if (!word_of_recall()) return FALSE;
-               break;
+               return word_of_recall();
        case 31: /* Clairvoyance */
                chg_virtue(V_KNOWLEDGE, 1);
                chg_virtue(V_ENLIGHTEN, 1);
@@ -3457,13 +3429,6 @@ msg_print("
                msg_print(NULL);
        }
 
-       if (no_trump)
-#ifdef JP
-msg_print("¥¨¥ì¥á¥ó¥¿¥ë¤Ï¸½¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
-               msg_print("No Elementals arrive.");
-#endif
-
        return TRUE;
 }
 
@@ -3472,7 +3437,6 @@ static bool cast_enchant_spell(int spell)
 {
        int     plev = p_ptr->lev;
        int     dummy = 0;
-       bool    no_trump = FALSE;
 
        switch (spell)
        {
@@ -3537,7 +3501,6 @@ static bool cast_enchant_spell(int spell)
                break;
        case 15: /* Mana Branding */
                return choose_ele_attack();
-               break;
        case 16: /* Telepathy */
                (void)set_tim_esp(randint1(30) + 25, FALSE);
                break;
@@ -3564,14 +3527,18 @@ static bool cast_enchant_spell(int spell)
                if (summon_specific(-1, py, px, plev, SUMMON_GOLEM, PM_FORCE_PET))
                {
 #ifdef JP
-msg_print("¥´¡¼¥ì¥à¤òºî¤Ã¤¿¡£");
+                       msg_print("¥´¡¼¥ì¥à¤òºî¤Ã¤¿¡£");
 #else
-               msg_print("You make a golem.");
+                       msg_print("You make a golem.");
 #endif
                }
                else
                {
-                       no_trump = TRUE;
+#ifdef JP
+                       msg_print("¤¦¤Þ¤¯¥´¡¼¥ì¥à¤òºî¤ì¤Ê¤«¤Ã¤¿¡£");
+#else
+                       msg_print("No Golems arrive.");
+#endif
                }
                break;
        case 23: /* Magic armor */
@@ -3592,13 +3559,10 @@ msg_print("
                break;
        case 26: /* Total Knowledge */
                return identify_fully(FALSE);
-               break;
        case 27: /* Enchant Weapon */
                return enchant_spell(randint0(4) + 1, randint0(4) + 1, 0);
-               break;
        case 28: /* Enchant Armor */
                return enchant_spell(0, 0, randint0(3) + 2);
-               break;
        case 29: /* Brand Weapon */
                brand_weapon(randint0(18));
                break;
@@ -3618,20 +3582,12 @@ msg_print("
 #endif
                break;
        case 31: /* Immune */
-               return (choose_ele_immune(13 + randint1(13)));
-               break;
+               return choose_ele_immune(13 + randint1(13));
        default:
                msg_format("You cast an unknown Craft spell: %d.", spell);
                msg_print(NULL);
        }
 
-       if (no_trump)
-#ifdef JP
-msg_print("¤¦¤Þ¤¯¥´¡¼¥ì¥à¤òºî¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
-               msg_print("No Golems arrive.");
-#endif
-
        return TRUE;
 }
 
index 5a1895e..b2046a1 100644 (file)
@@ -6708,11 +6708,11 @@ msg_print("
        }
 }
 
-static bool select_magic_eater(bool only_browse)
+static int select_magic_eater(bool only_browse)
 {
        int ext=0;
        char choice;
-       bool flag, redraw, request_list;
+       bool flag, request_list;
        int tval = 0;
        int             ask = TRUE, i = 0;
        char            out_val[160];
@@ -6847,9 +6847,6 @@ static bool select_magic_eater(bool only_browse)
        /* Nothing chosen yet */
        flag = FALSE;
 
-       /* No redraw yet */
-       redraw = FALSE;
-
        /* Build a prompt */
 #ifdef JP
 (void) strnfmt(out_val, 78, "('*'¤Ç°ìÍ÷, ESC¤ÇÃæÃÇ) ¤É¤ÎËâÎϤò»È¤¤¤Þ¤¹¤«¡©");
@@ -6972,17 +6969,16 @@ static bool select_magic_eater(bool only_browse)
                        }
                }
 
-               if(!get_com(out_val, &choice, FALSE)) break; 
+               if (!get_com(out_val, &choice, FALSE)) break;
 
                if (use_menu && choice != ' ')
                {
-                       switch(choice)
+                       switch (choice)
                        {
                                case '0':
                                {
                                        screen_load();
-                                       return (FALSE);
-                                       break;
+                                       return 0;
                                }
 
                                case '8':
index edf05c1..c655072 100644 (file)
@@ -1446,15 +1446,15 @@ static void check_music(void)
        u32b need_mana;
 
        /* Music singed by player */
-       if(p_ptr->pclass != CLASS_BARD) return;
-       if(!p_ptr->magic_num1[0] && !p_ptr->magic_num1[1]) return;
+       if (p_ptr->pclass != CLASS_BARD) return;
+       if (!p_ptr->magic_num1[0] && !p_ptr->magic_num1[1]) return;
 
        spell = p_ptr->magic_num2[0];
        s_ptr = &technic_info[REALM_MUSIC - MIN_TECHNIC][spell];
 
        need_mana = mod_need_mana(s_ptr->smana, spell, REALM_MUSIC);
        need_mana *= 0x8000;
-       if (((u16b)(p_ptr->csp) < (need_mana / 0x10000)) || (p_ptr->anti_magic))
+       if (((u32b)p_ptr->csp < (need_mana / 0x10000)) || (p_ptr->anti_magic))
        {
                stop_singing();
                return;
@@ -1463,7 +1463,7 @@ static void check_music(void)
        {
                p_ptr->csp -= (u16b) (need_mana / 0x10000);
                need_mana = (need_mana & 0xffff);
-               if (p_ptr->csp_frac < need_mana)
+               if ((u32b)p_ptr->csp_frac < need_mana)
                {
                        p_ptr->csp--;
                        p_ptr->csp_frac += (u16b)(0x10000L - need_mana);
index 4aed456..6c9ea2e 100644 (file)
@@ -3384,7 +3384,6 @@ static void display_player_stat_info(void)
 
        object_type *o_ptr;
        u32b flgs[TR_FLAG_SIZE];
-       s16b k_idx;
 
        byte a;
        char c;
@@ -3518,9 +3517,6 @@ c_put_str(TERM_L_GREEN, "ǽ
                /* Access object */
                o_ptr = &inventory[i];
 
-               /* Object kind */
-               k_idx = o_ptr->k_idx;
-
                /* Acquire "known" flags */
                object_flags_known(o_ptr, flgs);
 
@@ -6848,7 +6844,6 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
        char    buf[1024];
        int     line, counter, test, numentries;
        int     line_num = 0;
-       bool    found = FALSE;
 
 
        /* Build the filename */
@@ -6876,14 +6871,12 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
                                if (buf[2] == '*')
                                {
                                        /* Default lines */
-                                       found = TRUE;
                                        break;
                                }
                                else if (buf[2] == 'M')
                                {
                                        if (r_info[entry].flags1 & RF1_MALE)
                                        {
-                                               found = TRUE;
                                                break;
                                        }
                                }
@@ -6891,7 +6884,6 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
                                {
                                        if (r_info[entry].flags1 & RF1_FEMALE)
                                        {
-                                               found = TRUE;
                                                break;
                                        }
                                }
@@ -6901,7 +6893,6 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
                                        /* Is it the right monster? */
                                        if (test == entry)
                                        {
-                                               found = TRUE;
                                                break;
                                        }
                                }
index e78fa69..d0ef154 100644 (file)
@@ -1652,7 +1652,9 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
        bool            aware = FALSE;
        bool            known = FALSE;
 
+#ifndef JP
        bool            append_name = FALSE;
+#endif
 
        bool            show_weapon = FALSE;
        bool            show_armour = FALSE;
@@ -1849,8 +1851,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = amulet_adj[indexx];
 
-                       if (aware) append_name = TRUE;
-
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤Î¥¢¥ß¥å¥ì¥Ã¥È" : "¥¢¥ß¥å¥ì¥Ã¥È";
@@ -1860,6 +1860,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Amulet~";
                        else
                                basenm = aware ? "& # Amulet~" : "& # Amulet~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -1876,8 +1878,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = ring_adj[indexx];
 
-                       if (aware) append_name = TRUE;
-
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤Î»ØÎØ" : "»ØÎØ";
@@ -1887,6 +1887,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Ring~";
                        else
                                basenm = aware ? "& # Ring~" : "& # Ring~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        if (!k_ptr->to_h && !k_ptr->to_d && (o_ptr->to_h || o_ptr->to_d)) show_weapon = TRUE;
@@ -1904,7 +1906,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = staff_adj[indexx];
 
-                       if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤Î¾ó" : "¾ó";
@@ -1914,6 +1915,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Staff~";
                        else
                                basenm = aware ? "& # Staff~" : "& # Staff~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -1924,7 +1927,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = wand_adj[indexx];
 
-                       if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware? "%¤ÎËâË¡ËÀ":"ËâË¡ËÀ";
@@ -1934,6 +1936,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Wand~";
                        else
                                basenm = aware ? "& # Wand~" : "& # Wand~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -1944,7 +1948,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = rod_adj[indexx];
 
-                       if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware? "%¤Î¥í¥Ã¥É":"¥í¥Ã¥É";
@@ -1954,6 +1957,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Rod~";
                        else
                                basenm = aware ? "& # Rod~" : "& # Rod~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -1963,7 +1968,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                {
                        /* Color the object */
                        modstr = scroll_adj[indexx];
-                       if (aware) append_name = TRUE;
+
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤Î´¬Êª" : "´¬Êª";
@@ -1973,6 +1978,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Scroll~";
                        else
                                basenm = aware ? "& Scroll~ titled \"#\"" : "& Scroll~ titled \"#\"";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -1983,7 +1990,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = potion_adj[indexx];
 
-                       if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤ÎÌô" : "Ìô";
@@ -1993,6 +1999,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Potion~";
                        else
                                basenm = aware ? "& # Potion~" : "& # Potion~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -2006,7 +2014,6 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                        /* Color the object */
                        modstr = food_adj[indexx];
 
-                       if (aware) append_name = TRUE;
                        if (((plain_descriptions) && (aware)) || o_ptr->ident & IDENT_STOREB)
 #ifdef JP
                                basenm = aware ? "%¤Î¥­¥Î¥³" : "¥­¥Î¥³";
@@ -2016,6 +2023,8 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                                basenm = "& Mushroom~";
                        else
                                basenm = aware ? "& # Mushroom~" : "& # Mushroom~";
+
+                       if (aware) append_name = TRUE;
 #endif
 
                        break;
@@ -2229,7 +2238,9 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
        {
                if (known && o_ptr->name1) basenm = a_name + a_info[o_ptr->name1].name;
                else basenm = get_object_name(o_ptr);
+#ifndef JP
                append_name = FALSE;
+#endif
        }
 
        /* Start dumping the result */
index b8fb1b7..d48de3a 100644 (file)
@@ -1018,7 +1018,6 @@ bool build_tunnel2(int x1, int y1, int x2, int y2, int type, int cutoff)
 {
        int x3, y3, dx, dy;
        int changex, changey;
-       int midval;
        int length;
        int i;
        bool retval, firstsuccede;
@@ -1050,9 +1049,8 @@ bool build_tunnel2(int x1, int y1, int x2, int y2, int type, int cutoff)
                        x3 = (x1 + x2) / 2;
                        y3 = (y1 + y2) / 2;
                }
-               /* cache midvalue */
+               /* cache c_ptr */
                c_ptr = &cave[y3][x3];
-               midval = cave[y3][x3].feat;
                if (is_solid_grid(c_ptr))
                {
                        /* move midpoint a bit to avoid problem. */
@@ -1083,7 +1081,6 @@ bool build_tunnel2(int x1, int y1, int x2, int y2, int type, int cutoff)
                        y3 += dy;
                        x3 += dx;
                        c_ptr = &cave[y3][x3];
-                       midval = cave[y3][x3].feat;
                }
 
                if (is_floor_grid(c_ptr))
index ba3662d..03a7c35 100644 (file)
@@ -108,7 +108,6 @@ cptr            p = "ɬ
                                {
                                        screen_load();
                                        return (FALSE);
-                                       break;
                                }
 
                                case '8':
index 82836f9..c6da125 100644 (file)
@@ -701,7 +701,7 @@ static byte special_key_list[] =
 #endif
 
 /* bg */
-static void delete_bg()
+static void delete_bg(void)
 {
        if (hBG != NULL)
        {
@@ -710,7 +710,7 @@ static void delete_bg()
        }
 }
 
-static int init_bg()
+static int init_bg(void)
 {
        char * bmfile = bg_bitmap_file;
 
@@ -729,15 +729,15 @@ static int init_bg()
        int i, j;
 
        delete_bg();
-       
+
        wnddc = GetDC(hwnd);
        dcimage = CreateCompatibleDC(wnddc);
        dcbg = CreateCompatibleDC(wnddc);
-       
+
        bmimage = LoadImage(NULL, "bg.bmp", LR_LOADFROMFILE, 0, 0, 0);
        if (!bmimage) quit("bg.bmp¤¬Æɤߤ³¤á¤Ê¤¤¡ª");
        bmimage_old = SelectObject(dcimage, bmimage);
-       
+
        CreateCompatibleBitmap();
 
        ReleaseDC(hwnd, wnddc);
@@ -1948,7 +1948,7 @@ static errr Term_xtra_win_react(void)
                term_data *td = &data[i];
 
                /* Update resized windows */
-               if ((td->cols != td->t.wid) || (td->rows != td->t.hgt))
+               if ((td->cols != (uint)td->t.wid) || (td->rows != (uint)td->t.hgt))
                {
                        /* Activate */
                        Term_activate(&td->t);
index 0e5a96c..40ff61c 100644 (file)
@@ -51,7 +51,7 @@ ANGBAND_RC = angband.rc
 #
 # Set any compiler options
 
-CCOPTS = -Od -jb -j1 -Hc -tW -lGn -e$(EXE_FILE) -w- \
+CCOPTS = -Od -jb -j1 -Hc -tW -lGn -e$(EXE_FILE) \
        -D_WIN32_WINNT=0x0400 -DWINVER=0x0400 \
        -DUSE_TRANSPARENCY $(JP_OPT)
 
index ce9914e..6576f5f 100644 (file)
@@ -155,8 +155,6 @@ bool make_attack_normal(int m_idx)
 
        object_type *o_ptr;
 
-       object_kind *k_ptr;
-
        char o_name[MAX_NLEN];
 
        char m_name[80];
@@ -166,7 +164,6 @@ bool make_attack_normal(int m_idx)
        bool blinked;
        bool touched = FALSE, fear = FALSE, alive = TRUE;
        bool explode = FALSE;
-       bool resist_drain = FALSE;
        bool do_silly_attack = (one_in_(2) && p_ptr->image);
        int syouryaku = 0;
        int get_damage = 0;
@@ -1027,7 +1024,6 @@ bool make_attack_normal(int m_idx)
                                                         */
                                                        if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
                                                        {
-                                                               k_ptr = &k_info[o_ptr->k_idx];
                                                                j_ptr->pval = o_ptr->pval / o_ptr->number;
                                                                o_ptr->pval -= j_ptr->pval;
                                                        }
@@ -1679,6 +1675,7 @@ bool make_attack_normal(int m_idx)
                                case RBE_EXP_VAMP:
                                {
                                        s32b d = damroll(60, 6) + (p_ptr->exp / 100) * MON_DRAIN_LIFE;
+                                       bool resist_drain;
 
                                        /* Obvious */
                                        obvious = TRUE;
@@ -1727,7 +1724,7 @@ bool make_attack_normal(int m_idx)
                                                if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
 
                                                /* Special message */
-                                               if ((m_ptr->ml) && (did_heal))
+                                               if (m_ptr->ml && did_heal)
                                                {
 #ifdef JP
 msg_format("%s¤ÏÂÎÎϤò²óÉü¤·¤¿¤è¤¦¤À¡£", m_name);
@@ -1742,8 +1739,6 @@ msg_format("%s
                                }
                                case RBE_DR_MANA:
                                {
-                                       bool did_heal = FALSE;
-
                                        /* Obvious */
                                        obvious = TRUE;
 
@@ -1757,8 +1752,6 @@ msg_format("%s
                                                p_ptr->csp_frac = 0;
                                        }
 
-                                       if (m_ptr->hp < m_ptr->maxhp) did_heal = TRUE;
-
                                        p_ptr->redraw |= (PR_MANA);
 
                                        break;
index 48f9038..40aeff7 100644 (file)
@@ -604,7 +604,6 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
        int i, y, x, y1, x1, best;
 
        cave_type *c_ptr;
-       bool use_sound = FALSE;
        bool use_scent = FALSE;
 
        monster_type *m_ptr = &m_list[m_idx];
@@ -640,7 +639,6 @@ static bool get_moves_aux(int m_idx, int *yp, int *xp, bool no_flow)
        /* If we can hear noises, advance towards them */
        if (c_ptr->cost)
        {
-               use_sound = TRUE;
                best = 999;
        }
 
index 195e9e0..419d97f 100644 (file)
@@ -588,7 +588,6 @@ void mindcraft_info(char *p, int use_mind, int power)
                                {
                                        if (!only_browse) screen_load();
                                        return (FALSE);
-                                       break;
                                }
 
                                case '8':
@@ -932,7 +931,6 @@ if (!b) msg_print("
                        return psychometry();
                else
                        return ident_spell(FALSE);
-               break;
        case 8:
                /* Mindwave */
 #ifdef JP
@@ -1407,8 +1405,7 @@ msg_format("There are too many mirrors to control!");
          return dimension_door();
        /* mirror of recall */
        case 17:
-         if(!word_of_recall())return FALSE;
-         break;
+               return word_of_recall();
        /* multi-shadow */
        case 18:
          set_multishadow(6+randint1(6),FALSE);
@@ -1676,7 +1673,6 @@ msg_print("
        }
        case 7:
                return ident_spell(FALSE);
-               break;
        case 8:
                set_tim_ffall(randint1(20) + 20, FALSE);
                break;
@@ -2300,6 +2296,4 @@ void do_cmd_mind_browse(void)
                  (void)inkey();
                }
        }
-
-       screen_load();
 }
index 9d4591d..c491d07 100644 (file)
@@ -134,7 +134,6 @@ static void roff_aux(int r_idx, int mode)
        monster_race    *r_ptr = &r_info[r_idx];
 
        bool            old = FALSE;
-       bool            sin = FALSE;
 
        int             m, n, r;
 
@@ -142,6 +141,8 @@ static void roff_aux(int r_idx, int mode)
 
 #ifdef JP
        char            jverb_buf[64];
+#else
+       bool            sin = FALSE;
 #endif
        int             msex = 0;
 
@@ -408,7 +409,6 @@ static void roff_aux(int r_idx, int mode)
        }
 
        /* Descriptions */
-       if (1)
        {
                char buf[2048];
 
@@ -809,7 +809,6 @@ else                            hooked_roff("
                hooked_roff("¤òÅݤ¹¤³¤È¤Ï");
 #endif
                /* Group some variables */
-               if (TRUE)
                {
                        long i, j;
 
@@ -2410,14 +2409,14 @@ if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) {vp[vn] = "
        /* Drops gold and/or items */
        if (drop_gold || drop_item)
        {
-               /* No "n" needed */
-               sin = FALSE;
-
                /* Intro */
 #ifdef JP
                hooked_roff(format("%^s¤Ï", wd_he[msex]));
 #else
                hooked_roff(format("%^s may carry", wd_he[msex]));
+
+               /* No "n" needed */
+               sin = FALSE;
 #endif
 
 
@@ -2431,9 +2430,8 @@ if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) {vp[vn] = "
                        hooked_roff("°ì¤Ä¤Î");
 #else
                        hooked_roff(" a");
-#endif
-
                        sin = TRUE;
+#endif
                }
 
                /* Two drops */
@@ -2477,9 +2475,8 @@ if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) {vp[vn] = "
                        p = "¾å¼Á¤Ê";
 #else
                        p = " good";
-#endif
-
                        sin = FALSE;
+#endif
                }
 
                /* Okay */
@@ -2495,8 +2492,8 @@ if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) {vp[vn] = "
                        /* Handle singular "an" */
 #ifndef JP
                        if (sin) hooked_roff("n");
-#endif
                        sin = FALSE;
+#endif
 
                        /* Dump "object(s)" */
                        if (p) hooked_roff(p);
@@ -2520,14 +2517,14 @@ if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) {vp[vn] = "
                /* Treasures */
                if (drop_gold)
                {
+#ifndef JP
                        /* Cancel prefix */
                        if (!p) sin = FALSE;
 
                        /* Handle singular "an" */
-#ifndef JP
                        if (sin) hooked_roff("n");
-#endif
                        sin = FALSE;
+#endif
 
                        /* Dump "treasure(s)" */
                        if (p) hooked_roff(p);
@@ -3100,16 +3097,13 @@ void roff_top(int r_idx)
        /* Reset the cursor */
        Term_gotoxy(0, 0);
 
+#ifndef JP
        /* A title (use "The" for non-uniques) */
-#ifdef JP
-       if (0)
-#else
        if (!(r_ptr->flags1 & RF1_UNIQUE))
-#endif
-
        {
                Term_addstr(-1, TERM_WHITE, "The ");
        }
+#endif
 
        /* Dump the name */
        Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
index a864d86..e8dfed2 100644 (file)
@@ -2947,7 +2947,6 @@ static int initial_r_appearance(int r_idx)
 bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
 {
        int                     i;
-       int rune_dam = 0;
 
        cave_type               *c_ptr;
 
@@ -3068,7 +3067,6 @@ msg_print("
 
                        /* Notice */
                        note_spot(y, x);
-                       rune_dam = 1000;
                }
                else return FALSE;
        }
index bb47224..b1e605e 100644 (file)
@@ -3540,7 +3540,6 @@ msg_format("%^s
 #endif
                                                teleport_away(m_idx, 10, FALSE);
                                                p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
-                                               break;
                                        }
                                        else
                                        {
@@ -3583,7 +3582,7 @@ msg_format("%^s
                                                        msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name);
 #else
                                                        char m_name_self[80];
-               
+
                                                        /* hisself */
                                                        monster_desc(m_name_self, m_ptr, 0x23);
 
index 8d0eb80..a6df04d 100644 (file)
@@ -3206,7 +3206,6 @@ bool monst_spell_monst(int m_idx)
                                        }
                                        teleport_away(m_idx, 10, FALSE);
                                        p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
-                                       break;
                                }
                                else
                                {
@@ -3215,7 +3214,7 @@ bool monst_spell_monst(int m_idx)
                                }
                                break;
                        }
-                                       
+
                        /* Something is wrong */
                        else return FALSE;
                }
index fa1f396..a7db86c 100644 (file)
@@ -473,7 +473,6 @@ cptr            p = "
                                {
                                        screen_load();
                                        return (FALSE);
-                                       break;
                                }
 
                                case '8':
index 775e219..35372a7 100644 (file)
@@ -1887,7 +1887,6 @@ return "
 #else
                        return "resist acid every 50+d50 turns";
 #endif
-                       break;
 
                case ESSENCE_TMP_RES_ELEC:
 #ifdef JP
@@ -1895,7 +1894,6 @@ return "
 #else
                        return "resist elec every 50+d50 turns";
 #endif
-                       break;
 
                case ESSENCE_TMP_RES_FIRE:
 #ifdef JP
@@ -1903,7 +1901,6 @@ return "
 #else
                        return "resist fire every 50+d50 turns";
 #endif
-                       break;
 
                case ESSENCE_TMP_RES_COLD:
 #ifdef JP
@@ -1911,7 +1908,6 @@ return "
 #else
                        return "resist cold every 50+d50 turns";
 #endif
-                       break;
 
                case TR_IMPACT:
 #ifdef JP
@@ -1919,7 +1915,6 @@ return "
 #else
                        return "earthquake every 100+d100 turns";
 #endif
-                       break;
                }
        }
 
@@ -2141,74 +2136,64 @@ return "
                        {
                        case EGO_AMU_IDENT:
 #ifdef JP
-return "´ÕÄê : 10 ¥¿¡¼¥óËè";
+                               return "´ÕÄê : 10 ¥¿¡¼¥óËè";
 #else
                                return "identify every 10 turns";
 #endif
-                               break;
                        case EGO_AMU_CHARM:
 #ifdef JP
-return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
+                               return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
 #else
                                return "charm monster every 200 turns";
 #endif
-                               break;
                        case EGO_AMU_JUMP:
 #ifdef JP
-return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
+                               return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
 #else
                                return "blink every 10+d10 turns";
 #endif
-                               break;
                        case EGO_AMU_TELEPORT:
 #ifdef JP
-return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
+                               return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
 #else
                                return "teleport every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_D_DOOR:
 #ifdef JP
-return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
+                               return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
 #else
                                return "dimension door every 200 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_FIRE_:
 #ifdef JP
-return "²Ð±ê¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "²Ð±ê¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist fire every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_COLD_:
 #ifdef JP
-return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist cold every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_ELEC_:
 #ifdef JP
-return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist elec every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_ACID_:
 #ifdef JP
-return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist acid every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_DETECTION:
 #ifdef JP
-return "Á´´¶ÃΠ: 55+d55¥¿¡¼¥óËè";
+                               return "Á´´¶ÃΠ: 55+d55¥¿¡¼¥óËè";
 #else
                                return "detect all floor every 55+d55 turns";
 #endif
-                               break;
                        }
                }
        }
@@ -5329,7 +5314,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
 {
        s16b this_o_idx, next_o_idx = 0;
 
-       char n1, n2, which = ' ';
+       char which = ' ';
 
        int j, k, i1, i2, e1, e2;
 
@@ -5590,10 +5575,6 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                /* Inventory screen */
                if (!command_wrk)
                {
-                       /* Extract the legal requests */
-                       n1 = I2A(i1);
-                       n2 = I2A(i2);
-
                        /* Redraw if needed */
                        if (command_see) get_item_label = show_inven(menu_line);
                }
@@ -5601,10 +5582,6 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                /* Equipment screen */
                else
                {
-                       /* Extract the legal requests */
-                       n1 = I2A(e1 - INVEN_RARM);
-                       n2 = I2A(e2 - INVEN_RARM);
-
                        /* Redraw if needed */
                        if (command_see) get_item_label = show_equip(menu_line);
                }
@@ -5986,7 +5963,6 @@ if (other_query_flag && !verify("
 #if 0
                        case '\n':
                        case '\r':
-#endif
                        {
                                /* Choose "default" inventory item */
                                if (!command_wrk)
@@ -6020,6 +5996,7 @@ if (other_query_flag && !verify("
                                done = TRUE;
                                break;
                        }
+#endif
 
                        case 'w':
                        {
@@ -7556,8 +7533,6 @@ static bool py_pickup_floor_aux(void)
 {
        s16b this_o_idx;
 
-       object_type *o_ptr;
-
        cptr q, s;
 
        int item;
@@ -7583,9 +7558,6 @@ static bool py_pickup_floor_aux(void)
                return (FALSE);
        }
 
-       /* Access the object */
-       o_ptr = &o_list[this_o_idx];
-
        /* Pick up the object */
        py_pickup_aux(this_o_idx);
 
index 204c9ec..37d0a39 100644 (file)
@@ -852,7 +852,6 @@ static s32b object_value_base(object_type *o_ptr)
                        else if (level < 40) return 2500+(level-30)*350L;
                        else if (level < 50) return 6000+(level-40)*800L;
                        else return 14000+(level-50)*2000L;
-                       break;
                }
 
                case TV_CAPTURE:
@@ -4896,11 +4895,10 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
        bool flag = FALSE;
        bool done = FALSE;
 
-       bool plural = FALSE;
-
-
+#ifndef JP
        /* Extract plural */
-       if (j_ptr->number != 1) plural = TRUE;
+       bool plural = (j_ptr->number != 1);
+#endif
 
        /* Describe object */
        object_desc(o_name, j_ptr, FALSE, 0);
@@ -7640,7 +7638,6 @@ static void add_essence(int mode)
                                {
                                        screen_load();
                                        return;
-                                       break;
                                }
 
                                case '8':
index dfc6da8..b455ca5 100644 (file)
@@ -838,7 +838,6 @@ static bool cmd_racial_power_aux(s32b command)
                {
                        int y = 0, x = 0, i;
                        cave_type       *c_ptr;
-                       monster_type    *m_ptr;
 
                        for (i = 0; i < 6; i++)
                        {
@@ -847,9 +846,6 @@ static bool cmd_racial_power_aux(s32b command)
                                x = px + ddx_ddd[dir];
                                c_ptr = &cave[y][x];
 
-                               /* Get the monster */
-                               m_ptr = &m_list[c_ptr->m_idx];
-
                                /* Hack -- attack monsters */
                                if (c_ptr->m_idx)
                                        py_attack(y, x, 0);
@@ -944,14 +940,14 @@ static bool cmd_racial_power_aux(s32b command)
                {
                        if (command == -3)
                        {
-                               int gain_sp;
 #ifdef JP
-                               if ((gain_sp = take_hit(DAMAGE_USELIFE, p_ptr->lev, "£È£Ð¤«¤é£Í£Ð¤Ø¤Î̵ËŤÊÊÑ´¹", -1)))
+                               int gain_sp = take_hit(DAMAGE_USELIFE, p_ptr->lev, "£È£Ð¤«¤é£Í£Ð¤Ø¤Î̵ËŤÊÊÑ´¹", -1) / 5;
 #else
-                               if ((gain_sp = take_hit(DAMAGE_USELIFE, p_ptr->lev, "thoughtless convertion from HP to SP", -1)))
+                               int gain_sp = take_hit(DAMAGE_USELIFE, p_ptr->lev, "thoughtless convertion from HP to SP", -1) / 5;
 #endif
+                               if (gain_sp)
                                {
-                                       p_ptr->csp += gain_sp / 5;
+                                       p_ptr->csp += gain_sp;
                                        if (p_ptr->csp > p_ptr->msp)
                                        {
                                                p_ptr->csp = p_ptr->msp;
@@ -967,7 +963,7 @@ static bool cmd_racial_power_aux(s32b command)
                        }
                        else if (command == -4)
                        {
-                               if (p_ptr->csp >= p_ptr->lev/5)
+                               if (p_ptr->csp >= p_ptr->lev / 5)
                                {
                                        p_ptr->csp -= p_ptr->lev / 5;
                                        hp_player(p_ptr->lev);
index ce69697..6e41c53 100644 (file)
@@ -72,7 +72,7 @@ static DWORD PASCAL lread(int fh, VOID FAR *pv, DWORD ul)
                ul -= MAXREAD;
                hp += MAXREAD;
        }
-       if (_lread(fh, (LPSTR)hp, (WORD)ul) != (WORD)ul)
+       if (_lread(fh, (LPSTR)hp, (WORD)ul) != ul)
                return 0;
        return ulT;
 }
@@ -108,7 +108,7 @@ static HPALETTE PASCAL NEAR MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
                lpRGB = (RGBQUAD FAR *)((LPSTR)lpInfo + lpInfo->biSize);
 
                /* copy colors from the color table to the LogPalette structure */
-               for (i = 0; i < lpInfo->biClrUsed; i++, lpRGB++)
+               for (i = 0; i < (WORD)lpInfo->biClrUsed; i++, lpRGB++)
                {
                        npPal->palPalEntry[i].peRed = lpRGB->rgbRed;
                        npPal->palPalEntry[i].peGreen = lpRGB->rgbGreen;
index ae5e9a5..0479951 100644 (file)
@@ -691,7 +691,7 @@ void show_highclass(void)
 {
 
        register int i = 0, j, m = 0;
-       int pr, pc, pa, clev/*, al*/;
+       int pr, clev/*, al*/;
        high_score the_score;
        char buf[1024], out_val[256];
 
@@ -728,8 +728,6 @@ msg_print("
                if (highscore_seek(j)) break;
                if (highscore_read(&the_score)) break;
                pr = atoi(the_score.p_r);
-               pc = atoi(the_score.p_c);
-               pa = atoi(the_score.p_a);
                clev = atoi(the_score.cur_lev);
 
 #ifdef JP
@@ -777,7 +775,7 @@ msg_print("
 void race_score(int race_num)
 {
        register int i = 0, j, m = 0;
-       int pr, pc, pa, clev, lastlev;
+       int pr, clev, lastlev;
        high_score the_score;
        char buf[1024], out_val[256], tmp_str[80];
 
@@ -824,8 +822,6 @@ msg_print("
                if (highscore_seek(j)) break;
                if (highscore_read(&the_score)) break;
                pr = atoi(the_score.p_r);
-               pc = atoi(the_score.p_c);
-               pa = atoi(the_score.p_a);
                clev = atoi(the_score.cur_lev);
 
                if (pr == race_num)
index b136351..3306a3e 100644 (file)
@@ -1291,11 +1291,15 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
 
                bool is_art = FALSE;
                bool ignore = FALSE;
-               bool plural = FALSE;
                bool do_kill = FALSE;
 
                cptr note_kill = NULL;
 
+#ifndef JP
+               /* Get the "plural"-ness */
+               bool plural = (o_ptr->number > 1);
+#endif
+
                /* Acquire object */
                o_ptr = &o_list[this_o_idx];
 
@@ -1305,9 +1309,6 @@ static bool project_o(int who, int r, int y, int x, int dam, int typ)
                /* Extract the flags */
                object_flags(o_ptr, flgs);
 
-               /* Get the "plural"-ness */
-               if (o_ptr->number > 1) plural = TRUE;
-
                /* Check for artifact */
                if ((artifact_p(o_ptr) || o_ptr->art_name)) is_art = TRUE;
 
index d610e6b..c3dd8a4 100644 (file)
@@ -1491,7 +1491,6 @@ take_hit(DAMAGE_NOESCAPE, 100 + randint1(150), "
 void fetch(int dir, int wgt, bool require_los)
 {
        int             ty, tx, i;
-       bool            flag;
        cave_type       *c_ptr;
        object_type     *o_ptr;
        char            o_name[MAX_NLEN];
@@ -1568,7 +1567,6 @@ msg_print("
                /* Use a direction */
                ty = py; /* Where to drop the item */
                tx = px;
-               flag = FALSE;
 
                do
                {
@@ -3518,7 +3516,6 @@ bool potion_smash_effect(int who, int y, int x, int k_idx)
        int     radius = 2;
        int     dt = 0;
        int     dam = 0;
-       bool    ident = FALSE;
        bool    angry = FALSE;
 
        object_kind *k_ptr = &k_info[k_idx];
@@ -3572,92 +3569,76 @@ bool potion_smash_effect(int who, int y, int x, int k_idx)
                case SV_POTION_SLOWNESS:
                        dt = GF_OLD_SLOW;
                        dam = 5;
-                       ident = TRUE;
                        angry = TRUE;
                        break;
                case SV_POTION_POISON:
                        dt = GF_POIS;
                        dam = 3;
-                       ident = TRUE;
                        angry = TRUE;
                        break;
                case SV_POTION_BLINDNESS:
                        dt = GF_DARK;
-                       ident = TRUE;
                        angry = TRUE;
                        break;
                case SV_POTION_CONFUSION: /* Booze */
                        dt = GF_OLD_CONF;
-                       ident = TRUE;
                        angry = TRUE;
                        break;
                case SV_POTION_SLEEP:
                        dt = GF_OLD_SLEEP;
                        angry = TRUE;
-                       ident = TRUE;
                        break;
                case SV_POTION_RUINATION:
                case SV_POTION_DETONATIONS:
                        dt = GF_SHARDS;
                        dam = damroll(25, 25);
                        angry = TRUE;
-                       ident = TRUE;
                        break;
                case SV_POTION_DEATH:
                        dt = GF_DEATH_RAY;    /* !! */
                        dam = k_ptr->level * 10;
                        angry = TRUE;
                        radius = 1;
-                       ident = TRUE;
                        break;
                case SV_POTION_SPEED:
                        dt = GF_OLD_SPEED;
-                       ident = TRUE;
                        break;
                case SV_POTION_CURE_LIGHT:
                        dt = GF_OLD_HEAL;
                        dam = damroll(2, 3);
-                       ident = TRUE;
                        break;
                case SV_POTION_CURE_SERIOUS:
                        dt = GF_OLD_HEAL;
                        dam = damroll(4, 3);
-                       ident = TRUE;
                        break;
                case SV_POTION_CURE_CRITICAL:
                case SV_POTION_CURING:
                        dt = GF_OLD_HEAL;
                        dam = damroll(6, 3);
-                       ident = TRUE;
                        break;
                case SV_POTION_HEALING:
                        dt = GF_OLD_HEAL;
                        dam = damroll(10, 10);
-                       ident = TRUE;
                        break;
                case SV_POTION_RESTORE_EXP:
                        dt = GF_STAR_HEAL;
                        dam = 0;
                        radius = 1;
-                       ident = TRUE;
                        break;
                case SV_POTION_LIFE:
                        dt = GF_STAR_HEAL;
                        dam = damroll(50, 50);
                        radius = 1;
-                       ident = TRUE;
                        break;
                case SV_POTION_STAR_HEALING:
                        dt = GF_OLD_HEAL;
                        dam = damroll(50, 50);
                        radius = 1;
-                       ident = TRUE;
                        break;
                case SV_POTION_RESTORE_MANA:   /* MANA */
                        dt = GF_MANA;
                        dam = damroll(10, 10);
                        radius = 1;
-                       ident = TRUE;
                        break;
                default:
                        /* Do nothing */  ;
index c0d44ef..cfa0968 100644 (file)
@@ -3549,7 +3549,6 @@ s16b get_quantity(cptr prompt, int max)
  */
 void pause_line(int row)
 {
-       int i;
        prt("", row, 0);
 #ifdef JP
        put_str("[ ²¿¤«¥­¡¼¤ò²¡¤·¤Æ²¼¤µ¤¤ ]", row, 26);
@@ -3557,7 +3556,7 @@ void pause_line(int row)
        put_str("[Press any key to continue]", row, 23);
 #endif
 
-       i = inkey();
+       (void)inkey();
        prt("", row, 0);
 }
 
@@ -4921,7 +4920,7 @@ void roff_to_buf(cptr str, int maxlen, char *tbuf, size_t bufsize)
 #endif
 
                /* Not enough buffer size */
-               if (write_pt + 3 >= bufsize) break;
+               if ((size_t)(write_pt + 3) >= bufsize) break;
 
                tbuf[write_pt++] = ch[0];
                line_len++;
index 7f56d61..fcdff19 100644 (file)
@@ -1229,7 +1229,6 @@ static void analyze_misc_magic(object_type *o_ptr, cptr *misc_list)
         */
 
 /*     if (cursed_p(o_ptr)) */
-       if (1)
        {
                if (have_flag(flgs, TR_TY_CURSE))
                {
@@ -1758,11 +1757,12 @@ static void spoil_mon_desc(cptr fname)
                if (r_ptr->flags7 & (RF7_KAGE)) continue;
 
                /* Get the "name" */
-/*             if (r_ptr->flags1 & (RF1_QUESTOR)) */
-               if (0)
+               /*
+               else if (r_ptr->flags1 & (RF1_QUESTOR))
                {
                        sprintf(nam, "[Q] %s", name);
                }
+               */
                else if (r_ptr->flags1 & (RF1_UNIQUE))
                {
                        sprintf(nam, "[U] %s", name);
@@ -1978,9 +1978,8 @@ static void roff_func(byte attr, cptr str)
 static void spoil_mon_info(cptr fname)
 {
        char buf[1024];
-       int msex, i, l, n=0;
-       bool breath, magic;
-       u32b flags1, flags2, flags3, flags4, flags5, flags6, flags7;
+       int i, l, n = 0;
+       u32b flags1;
 
        u16b why = 2;
        s16b *who;
@@ -2038,20 +2037,6 @@ static void spoil_mon_info(cptr fname)
 
                /* Extract the flags */
                flags1 = r_ptr->flags1;
-               flags2 = r_ptr->flags2;
-               flags3 = r_ptr->flags3;
-               flags4 = r_ptr->flags4;
-               flags5 = r_ptr->flags5;
-               flags6 = r_ptr->flags6;
-               flags7 = r_ptr->flags7;
-               breath = FALSE;
-               magic = FALSE;
-
-               /* Extract a gender (if applicable) */
-               if (flags1 & (RF1_FEMALE)) msex = 2;
-               else if (flags1 & (RF1_MALE)) msex = 1;
-               else msex = 0;
-
 
                /* Prefix */
                if (flags1 & (RF1_QUESTOR))
index 3f49c5a..fd475e8 100644 (file)
@@ -3011,7 +3011,10 @@ void calc_bonuses(void)
        bool            omoi = FALSE;
        bool            yoiyami = FALSE;
        bool            down_saving = FALSE;
-       bool            have_dd_s, have_dd_t, have_sw, have_kabe;
+#if 0
+       bool            have_dd_s = FALSE, have_dd_t = FALSE;
+#endif
+       bool            have_sw = FALSE, have_kabe = FALSE;
        bool            easy_2weapon = FALSE;
        s16b this_o_idx, next_o_idx = 0;
        player_race *tmp_rp_ptr;
@@ -5499,14 +5502,12 @@ msg_print("
                }
        }
 
-       have_dd_s = FALSE;
-       have_dd_t = FALSE;
-       have_sw = FALSE;
-       have_kabe = FALSE;
        for (i = 0; i < INVEN_PACK; i++)
        {
+#if 0
                if ((inventory[i].tval == TV_SORCERY_BOOK) && (inventory[i].sval == 2)) have_dd_s = TRUE;
                if ((inventory[i].tval == TV_TRUMP_BOOK) && (inventory[i].sval == 1)) have_dd_t = TRUE;
+#endif
                if ((inventory[i].tval == TV_NATURE_BOOK) && (inventory[i].sval == 2)) have_sw = TRUE;
                if ((inventory[i].tval == TV_ENCHANT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
        }
@@ -5520,8 +5521,10 @@ msg_print("
                /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
 
+#if 0
                if ((o_ptr->tval == TV_SORCERY_BOOK) && (o_ptr->sval == 3)) have_dd_s = TRUE;
                if ((o_ptr->tval == TV_TRUMP_BOOK) && (o_ptr->sval == 1)) have_dd_t = TRUE;
+#endif
                if ((o_ptr->tval == TV_NATURE_BOOK) && (o_ptr->sval == 2)) have_sw = TRUE;
                if ((o_ptr->tval == TV_ENCHANT_BOOK) && (o_ptr->sval == 2)) have_kabe = TRUE;
        }
index ff3cbbd..80ff4e6 100644 (file)
  */
 void check_experience(void)
 {
-       int             i;
        bool level_reward = FALSE;
        bool level_mutation = FALSE;
        bool level_inc_stat = FALSE;
        bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
 
 
-       /* Note current level */
-       i = p_ptr->lev;
-
        /* Hack -- lower limit */
        if (p_ptr->exp < 0) p_ptr->exp = 0;
 
@@ -3389,12 +3385,12 @@ static int target_set_aux(int y, int x, int mode, cptr info)
 
                                /* Remove the first object from the list. */
                                excise_object_idx(o_idx);
-       
+
                                /* Find end of the list. */
                                i = c_ptr->o_idx;
                                while (o_list[i].next_o_idx)
                                        i = o_list[i].next_o_idx;
-       
+
                                /* Add after the last object. */
                                o_list[i].next_o_idx = o_idx;
 
@@ -3402,8 +3398,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
                        }
                }
 
-               /* End this grid */
-               return query;
+               /* NOTREACHED */
        }
 #endif /* ALLOW_EASY_FLOOR */