OSDN Git Service

[Fix] #40416 Resolved the compilation error when English resource is used
authorHourier <hourier@users.sourceforge.jp>
Sun, 31 May 2020 15:24:55 +0000 (00:24 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 31 May 2020 15:24:55 +0000 (00:24 +0900)
src/combat/monster-attack-describer.c
src/combat/monster-attack-monster.c
src/combat/monster-attack-util.c
src/combat/monster-eating.c

index 3abb82d..708a6d4 100644 (file)
@@ -154,7 +154,9 @@ void describe_monster_attack_method(monap_type *monap_ptr)
         break;
     }
     case RBM_CHARGE: {
+#ifdef JP
         monap_ptr->abbreviate = -1;
+#endif
         monap_ptr->act = _("は請求書をよこした。", "charges you.");
         monap_ptr->touched = TRUE;
 
@@ -163,7 +165,9 @@ void describe_monster_attack_method(monap_type *monap_ptr)
         break;
     }
     case RBM_CRAWL: {
+#ifdef JP
         monap_ptr->abbreviate = -1;
+#endif
         monap_ptr->act = _("が体の上を這い回った。", "crawls on you.");
         monap_ptr->touched = TRUE;
         sound(SOUND_SLIME);
@@ -180,7 +184,9 @@ void describe_monster_attack_method(monap_type *monap_ptr)
         break;
     }
     case RBM_EXPLODE: {
+#ifdef JP
         monap_ptr->abbreviate = -1;
+#endif
         monap_ptr->act = _("は爆発した。", "explodes.");
         monap_ptr->explode = TRUE;
         break;
@@ -200,7 +206,9 @@ void describe_monster_attack_method(monap_type *monap_ptr)
         break;
     }
     case RBM_XXX4: {
+#ifdef JP
         monap_ptr->abbreviate = -1;
+#endif
         monap_ptr->act = _("が XXX4 を発射した。", "projects XXX4's at you.");
         break;
     }
index 08c43dd..a7dd0ca 100644 (file)
@@ -169,13 +169,13 @@ static void describe_silly_melee(mam_type *mam_ptr)
     strfmt(temp, mam_ptr->act, mam_ptr->t_name);
     msg_format("%^sは%s", mam_ptr->m_name, temp);
 #else
-    if (do_silly_attack) {
+    if (mam_ptr->do_silly_attack) {
         mam_ptr->act = silly_attacks[randint0(MAX_SILLY_ATTACK)];
-        strfmt(temp, "%s %s.", mam_ptr->act, t_name);
+        strfmt(temp, "%s %s.", mam_ptr->act, mam_ptr->t_name);
     } else
-        strfmt(temp, mam_ptr->act, t_name);
+        strfmt(temp, mam_ptr->act, mam_ptr->t_name);
 
-    msg_format("%^s %s", m_name, temp);
+    msg_format("%^s %s", mam_ptr->m_name, temp);
 #endif
 }
 
index 755e0bf..edad70b 100644 (file)
@@ -9,11 +9,13 @@
 
 monap_type *initialize_monap_type(player_type *target_ptr, monap_type *monap_ptr, MONSTER_IDX m_idx)
 {
+#ifdef JP
+    monap_ptr->abbreviate = 0;
+#endif
     monap_ptr->m_idx = m_idx;
     floor_type *floor_ptr = target_ptr->current_floor_ptr;
     monap_ptr->m_ptr = &floor_ptr->m_list[m_idx];
     monap_ptr->act = NULL;
-    monap_ptr->abbreviate = 0;
     monap_ptr->touched = FALSE;
     monap_ptr->explode = FALSE;
     monap_ptr->do_silly_attack = one_in_(2) && target_ptr->image;
index e5f161a..9bfdbe2 100644 (file)
@@ -126,7 +126,7 @@ void process_eat_item(player_type *target_ptr, monap_type *monap_ptr)
 #ifdef JP
         msg_format("%s(%c)を%s盗まれた!", monap_ptr->o_name, index_to_label(i_idx), ((monap_ptr->o_ptr->number > 1) ? "一つ" : ""));
 #else
-        msg_format("%sour %s (%c) was stolen!", ((o_ptr->number > 1) ? "One of y" : "Y"), monap_ptr->o_name, index_to_label(i_idx));
+        msg_format("%sour %s (%c) was stolen!", ((monap_ptr->o_ptr->number > 1) ? "One of y" : "Y"), monap_ptr->o_name, index_to_label(i_idx));
 #endif
         chg_virtue(target_ptr, V_SACRIFICE, 1);
         o_idx = o_pop(target_ptr->current_floor_ptr);
@@ -154,7 +154,7 @@ void process_eat_food(player_type *target_ptr, monap_type *monap_ptr)
 #ifdef JP
         msg_format("%s(%c)を%s食べられてしまった!", monap_ptr->o_name, index_to_label(i_idx), ((monap_ptr->o_ptr->number > 1) ? "一つ" : ""));
 #else
-        msg_format("%sour %s (%c) was eaten!", ((o_ptr->number > 1) ? "One of y" : "Y"), monap_ptr->o_name, index_to_label(i_idx));
+        msg_format("%sour %s (%c) was eaten!", ((monap_ptr->o_ptr->number > 1) ? "One of y" : "Y"), monap_ptr->o_name, index_to_label(i_idx));
 #endif
         inven_item_increase(target_ptr, i_idx, -1);
         inven_item_optimize(target_ptr, i_idx);