OSDN Git Service

patch src/
[jnethack/source.git] / src / pager.c
index 0a4fc87..20a2e98 100644 (file)
@@ -52,8 +52,13 @@ const char *new_str;
         return 0;
 
     space_left = BUFSZ - strlen(buf) - 1;
+#if 0 /*JP*/
     (void) strncat(buf, " or ", space_left);
     (void) strncat(buf, new_str, space_left - 4);
+#else
+    (void) strncat(buf, "\82Ü\82½\82Í", space_left);
+    (void) strncat(buf, new_str, space_left - 6);
+#endif
     return 1;
 }
 
@@ -67,13 +72,26 @@ char *outbuf;
     /* include race with role unless polymorphed */
     race[0] = '\0';
     if (!Upolyd)
+/*JP
         Sprintf(race, "%s ", urace.adj);
+*/
+        Sprintf(race, "%s", urace.adj);
+#if 0 /*JP*/
     Sprintf(outbuf, "%s%s%s called %s",
             /* being blinded may hide invisibility from self */
             (Invis && (senseself() || !Blind)) ? "invisible " : "", race,
             mons[u.umonnum].mname, plname);
+#else
+    Sprintf(outbuf, "%s%s%s\82Æ\82¢\82¤\96¼\82Ì%s",
+            (Invis && (senseself() || !Blind)) ? "\8ep\82Ì\8c©\82¦\82È\82¢" : "", race,
+            plname,
+            mons[u.umonnum].mname);
+#endif
     if (u.usteed)
+/*JP
         Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed));
+*/
+        Sprintf(eos(outbuf), "\81C%s\82É\8fæ\82Á\82Ä\82¢\82é", y_monnam(u.usteed));
     return outbuf;
 }
 
@@ -135,15 +153,32 @@ int x, y, glyph;
         Strcpy(buf, something); /* sanity precaution */
 
     if (levl[x][y].typ == STONE || levl[x][y].typ == SCORR)
+/*JP
         Strcat(buf, " embedded in stone");
+*/
+        Strcat(buf, "\81C\8aâ\82É\96\84\82ß\82±\82Ü\82ê\82Ä\82¢\82é");
     else if (IS_WALL(levl[x][y].typ) || levl[x][y].typ == SDOOR)
+/*JP
         Strcat(buf, " embedded in a wall");
+*/
+        Strcat(buf, "\81C\95Ç\82É\96\84\82ß\82±\82Ü\82ê\82Ä\82¢\82é");
     else if (closed_door(x, y))
+/*JP
         Strcat(buf, " embedded in a door");
+*/
+        Strcat(buf, "\81C\94à\82É\96\84\82ß\82±\82Ü\82ê\82Ä\82¢\82é");
     else if (is_pool(x, y))
+      /*JP 3.4.3 \82±\82Ì\95\94\95ª\82Í\95¨\91Ì\82É\82µ\82©\8eg\82í\82ê\82È\82¢ */
+/*JP
         Strcat(buf, " in water");
+*/
+        Strcat(buf, "\81C\90\85\92\86\82É\82 \82é");
     else if (is_lava(x, y))
+#if 0 /*JP*/
         Strcat(buf, " in molten lava"); /* [can this ever happen?] */
+#else
+        Strcat(buf, "\81C\97n\8aâ\82Ì\92\86\82É\82 \82é");        /* [can this ever happen?] */
+#endif
     return;
 }
 
@@ -161,6 +196,7 @@ int x, y;
     else
         name = distant_monnam(mtmp, ARTICLE_NONE, monnambuf);
 
+#if 0 /*JP*/
     Sprintf(buf, "%s%s%s",
             (mtmp->mx != x || mtmp->my != y)
                 ? ((mtmp->isshk && accurate) ? "tail of " : "tail of a ")
@@ -171,11 +207,26 @@ int x, y;
                     ? "peaceful "
                     : "",
             name);
+#else
+    Sprintf(buf, "%s%s%s",
+            (mtmp->mtame && accurate) ? "\8eè\82È\82¸\82¯\82ç\82ê\82½" :
+            (mtmp->mpeaceful && accurate) ? "\97F\8dD\93I\82È" : "",
+            name,
+            (mtmp->mx != x || mtmp->my != y) ?
+            ((mtmp->isshk && accurate)
+             ? "\82Ì\90K\94ö" : "\82Ì\90K\94ö") : "");
+#endif
     if (u.ustuck == mtmp)
         Strcat(buf, (Upolyd && sticks(youmonst.data))
+/*JP
                      ? ", being held" : ", holding you");
+*/
+                     ? "\81C\82 \82È\82½\82ª\92Í\82Ü\82¦\82Ä\82¢\82é" : "\81C\82 \82È\82½\82ð\92Í\82Ü\82¦\82Ä\82¢\82é");
     if (mtmp->mleashed)
+/*JP
         Strcat(buf, ", leashed to you");
+*/
+        Strcat(buf, "\81C\95R\82Å\8c\8b\82Î\82ê\82Ä\82¢\82é");
 
     if (mtmp->mtrapped && cansee(mtmp->mx, mtmp->my)) {
         struct trap *t = t_at(mtmp->mx, mtmp->my);
@@ -183,7 +234,10 @@ int x, y;
 
         /* newsym lets you know of the trap, so mention it here */
         if (tt == BEAR_TRAP || tt == PIT || tt == SPIKED_PIT || tt == WEB)
+/*JP
             Sprintf(eos(buf), ", trapped in %s",
+*/
+            Sprintf(eos(buf), ", %s\82É\95ß\82Ü\82Á\82Ä\82¢\82é",
                     an(defsyms[trap_to_defsym(tt)].explanation));
     }
 
@@ -193,48 +247,72 @@ int x, y;
         monbuf[0] = '\0';
         if (how_seen != 0 && how_seen != MONSEEN_NORMAL) {
             if (how_seen & MONSEEN_NORMAL) {
+/*JP
                 Strcat(monbuf, "normal vision");
+*/
+                Strcat(monbuf, "\92Ê\8fí\82Ì\8e\8b\8ao");
                 how_seen &= ~MONSEEN_NORMAL;
                 /* how_seen can't be 0 yet... */
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_SEEINVIS) {
+/*JP
                 Strcat(monbuf, "see invisible");
+*/
+                Strcat(monbuf, "\8c©\82¦\82È\82¢\82à\82Ì\82ð\8c©\82é\8e\8b\8ao");
                 how_seen &= ~MONSEEN_SEEINVIS;
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_INFRAVIS) {
+/*JP
                 Strcat(monbuf, "infravision");
+*/
+                Strcat(monbuf, "\90Ô\8aO\90ü\82ª\8c©\82¦\82é\8e\8b\8ao");
                 how_seen &= ~MONSEEN_INFRAVIS;
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_TELEPAT) {
+/*JP
                 Strcat(monbuf, "telepathy");
+*/
+                Strcat(monbuf, "\83e\83\8c\83p\83V\81[");
                 how_seen &= ~MONSEEN_TELEPAT;
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_XRAYVIS) {
                 /* Eyes of the Overworld */
+/*JP
                 Strcat(monbuf, "astral vision");
+*/
+                Strcat(monbuf, "\90¸\90_\82É\82æ\82é\8e\8b\8ao");
                 how_seen &= ~MONSEEN_XRAYVIS;
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_DETECT) {
+/*JP
                 Strcat(monbuf, "monster detection");
+*/
+                Strcat(monbuf, "\89ö\95¨\82ð\94­\8c©\82·\82é\94\\97Í");
                 how_seen &= ~MONSEEN_DETECT;
                 if (how_seen)
                     Strcat(monbuf, ", ");
             }
             if (how_seen & MONSEEN_WARNMON) {
                 if (Hallucination)
+/*JP
                     Strcat(monbuf, "paranoid delusion");
+*/
+                    Strcat(monbuf, "\95Î\8e·\93I\96Ï\91z");
                 else
+/*JP
                     Sprintf(eos(monbuf), "warned of %s",
+*/
+                    Sprintf(eos(monbuf), "%s\82ð\8cx\8d\90\82µ\82Ä\82¢\82é",
                             makeplural(mtmp->data->mname));
                 how_seen &= ~MONSEEN_WARNMON;
                 if (how_seen)
@@ -300,8 +378,13 @@ char *buf, *monbuf;
         }
     } else if (u.uswallow) {
         /* all locations when swallowed other than the hero are the monster */
+#if 0 /*JP*/
         Sprintf(buf, "interior of %s",
                 Blind ? "a monster" : a_monnam(u.ustuck));
+#else
+        Sprintf(buf, "%s\82Ì\93à\95\94",
+                Blind ? "\89ö\95¨" : a_monnam(u.ustuck));
+#endif
         pm = u.ustuck->data;
     } else if (glyph_is_monster(glyph)) {
         bhitpos.x = x;
@@ -317,40 +400,70 @@ char *buf, *monbuf;
 
         Strcpy(buf, defsyms[trap_to_defsym(tnum)].explanation);
     } else if (!glyph_is_cmap(glyph)) {
+/*JP
         Strcpy(buf, "unexplored area");
+*/
+        Strcpy(buf, "\96¢\92T\8dõ\82Ì\8fê\8f\8a");
     } else
         switch (glyph_to_cmap(glyph)) {
         case S_altar:
+/*JP
             Sprintf(buf, "%s %saltar",
+*/
+            Sprintf(buf, "%s%s\8dÕ\92d",
                     /* like endgame high priests, endgame high altars
                        are only recognizable when immediately adjacent */
                     (Is_astralevel(&u.uz) && distu(x, y) > 2)
+/*JP
                         ? "aligned"
+*/
+                        ? "\91®\90«\82Ì"
                         : align_str(
                               Amask2align(levl[x][y].altarmask & ~AM_SHRINE)),
                     ((levl[x][y].altarmask & AM_SHRINE)
                      && (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)))
+/*JP
                         ? "high "
+*/
+                        ? "\8d\82\88Ê\82Ì"
                         : "");
             break;
         case S_ndoor:
             if (is_drawbridge_wall(x, y) >= 0)
+/*JP
                 Strcpy(buf, "open drawbridge portcullis");
+*/
+                Strcpy(buf,"\8aJ\82¢\82Ä\82¢\82é\92µ\82Ë\8b´");
             else if ((levl[x][y].doormask & ~D_TRAPPED) == D_BROKEN)
+/*JP
                 Strcpy(buf, "broken door");
+*/
+                Strcpy(buf,"\89ó\82ê\82½\94à");
             else
+/*JP
                 Strcpy(buf, "doorway");
+*/
+                Strcpy(buf,"\8fo\93ü\82è\8cû");
             break;
         case S_cloud:
             Strcpy(buf,
+/*JP
                    Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud");
+*/
+                   Is_airlevel(&u.uz) ? "\93Ü\82Á\82Ä\82¢\82é\8fê\8f\8a" : "\96¶/\8fö\8bC\82Ì\89_");
             break;
         case S_stone:
             if (!levl[x][y].seenv) {
+/*JP
                 Strcpy(buf, "unexplored");
+*/
+                Strcpy(buf, "\96¢\92T\8dõ");
                 break;
             } else if (levl[x][y].typ == STONE || levl[x][y].typ == SCORR) {
+/*JP
                 Strcpy(buf, "stone");
+*/
+                Strcpy(buf, "\90Î");
                 break;
             }
             /*else FALLTHRU*/
@@ -388,7 +501,11 @@ boolean user_typed_name, without_asking;
 
     fp = dlb_fopen(DATAFILE, "r");
     if (!fp) {
+#if 0 /*JP*/
         pline("Cannot open data file!");
+#else
+        pline("\83f\81[\83^\83t\83@\83C\83\8b\82ð\8aJ\82¯\82È\82¢\81I");
+#endif
         return;
     }
 
@@ -513,10 +630,16 @@ boolean user_typed_name, without_asking;
             return;
         }
 
+/*JP
         if (user_typed_name || without_asking || yn("More info?") == 'y') {
+*/
+        if (user_typed_name || without_asking || yn("\8fÚ\8d×\82ð\8c©\82é\81H") == 'y') {
             if (dlb_fseek(fp, (long) txt_offset + entry_offset, SEEK_SET)
                 < 0) {
+/*JP
                 pline("? Seek error on 'data' file!");
+*/
+                pline("'data'\83t\83@\83C\83\8b\82Ì\83V\81[\83N\83G\83\89\81[\81I");
                 (void) dlb_fclose(fp);
                 return;
             }
@@ -534,7 +657,10 @@ boolean user_typed_name, without_asking;
             destroy_nhwindow(datawin);
         }
     } else if (user_typed_name)
+/*JP
         pline("I don't have any information on those things.");
+*/
+        pline("\82»\82ñ\82È\96¼\91O\82Í\95·\82¢\82½\82±\82Æ\82ª\82È\82¢\81D");
 
     (void) dlb_fclose(fp);
 }
@@ -556,7 +682,10 @@ const char **firstmatch;
     int skipped_venom = 0;
     boolean hit_trap;
     const char *x_str;
+/*JP
     static const char *mon_interior = "the interior of a monster";
+*/
+    static const char *mon_interior = "\89ö\95¨\82Ì\93à\95\94";
 
     if (looked) {
         int oc;
@@ -613,7 +742,11 @@ const char **firstmatch;
                    && cc.x == u.ux && cc.y == u.uy)
                 : (sym == def_monsyms[S_HUMAN].sym && !flags.showrace))
         && !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd)
+#if 0 /*JP*/
         found += append_str(out_str, "you"); /* tack on "or you" */
+#else
+        found += append_str(out_str, "\82 \82È\82½"); /* tack on "or you" */
+#endif
 
     /* Now check for objects */
     for (i = 1; i < MAXOCLASSES; i++) {
@@ -662,6 +795,7 @@ const char **firstmatch;
             /* alt_i is now 3 or more and no longer of interest */
         }
         if (sym == (looked ? showsyms[i] : defsyms[i].sym) && *x_str) {
+#if 0 /*JP*//*\93ú\96{\8cê\82É\82Í\8aÖ\8cW\82È\82¢*/
             /* avoid "an unexplored", "an stone", "an air", "a water",
                "a floor of a room", "a dark part of a room";
                article==2 => "the", 1 => "an", 0 => (none) */
@@ -670,14 +804,22 @@ const char **firstmatch;
                               || strcmp(x_str, "air") == 0
                               || strcmp(x_str, "water") == 0);
 
+#endif
             if (!found) {
                 if (is_cmap_trap(i)) {
+/*JP
                     Sprintf(out_str, "%sa trap", prefix);
+*/
+                    Sprintf(out_str, "%sã©", prefix);
                     hit_trap = TRUE;
                 } else {
+#if 0 /*JP*/
                     Sprintf(out_str, "%s%s", prefix,
                             article == 2 ? the(x_str)
                             : article == 1 ? an(x_str) : x_str);
+#else
+                    Sprintf(out_str, "%s%s", prefix, x_str);
+#endif
                 }
                 *firstmatch = x_str;
                 found++;
@@ -688,9 +830,13 @@ const char **firstmatch;
                        && (i != S_vibrating_square || Inhell
                            || (looked && glyph_is_trap(glyph)
                                && glyph_to_trap(glyph) == VIBRATING_SQUARE))) {
+#if 0 /*JP*/
                 found += append_str(out_str, (article == 2) ? the(x_str)
                                              : (article == 1) ? an(x_str)
                                                : x_str);
+#else
+                found += append_str(out_str, x_str);
+#endif
                 if (is_cmap_trap(i))
                     hit_trap = TRUE;
             }
@@ -734,11 +880,17 @@ const char **firstmatch;
     /* handle optional boulder symbol as a special case */
     if (iflags.bouldersym && sym == iflags.bouldersym) {
         if (!found) {
+/*JP
             *firstmatch = "boulder";
+*/
+            *firstmatch = "\8aâ";
             Sprintf(out_str, "%s%s", prefix, an(*firstmatch));
             found++;
         } else {
+/*JP
             found += append_str(out_str, "boulder");
+*/
+            found += append_str(out_str, "\8aâ");
         }
     }
 
@@ -778,7 +930,10 @@ const char **firstmatch;
 #define LOOK_VERBOSE 3     /* ':' -- show more info w/o asking */
 
 /* also used by getpos hack in do_name.c */
+/*JP
 const char what_is_an_unknown_object[] = "an unknown object";
+*/
+const char what_is_an_unknown_object[] = "\93ä\82Ì\95¨\91Ì";
 
 int
 do_look(mode, click_cc)
@@ -890,7 +1045,10 @@ coord *click_cc;
           }
         case '?':
             from_screen = FALSE;
+/*JP
             getlin("Specify what? (type the word)", out_str);
+*/
+            getlin("\89½\82ð\92²\82×\82é\81H(\95\8e\9a\82ð\93ü\82ê\82Ä\82Ë)", out_str);
             if (out_str[0] == '\0' || out_str[0] == '\033')
                 return 0;
 
@@ -935,10 +1093,17 @@ coord *click_cc;
         if (from_screen || clicklook) {
             if (from_screen) {
                 if (flags.verbose)
+#if 0 /*JP*/
                     pline("Please move the cursor to %s.",
                           what_is_an_unknown_object);
+#else
+                    pline("\83J\81[\83\\83\8b\82ð\95¨\91Ì\82É\88Ú\93®\82µ\82Ä\82­\82¾\82³\82¢\81D");
+#endif
                 else
+/*JP
                     pline("Pick an object.");
+*/
+                    pline("\95¨\91Ì\82ð\8ew\92è\82µ\82Ä\82­\82¾\82³\82¢\81D");
 
                 ans = getpos(&cc, quick, what_is_an_unknown_object);
                 if (ans < 0 || cc.x < 0) {
@@ -969,7 +1134,10 @@ coord *click_cc;
                           (boolean) (ans == LOOK_VERBOSE));
             }
         } else {
+/*JP
             pline("I've never heard of such things.");
+*/
+            pline("\82»\82ñ\82È\96¼\91O\82Í\95·\82¢\82½\82±\82Æ\82ª\82È\82¢\81D");
         }
 
     } while (from_screen && !quick && ans != LOOK_ONCE && !clicklook);
@@ -1100,6 +1268,7 @@ doidtrap()
                     break;
             }
             tt = what_trap(tt);
+#if 0 /*JP*/
             pline("That is %s%s%s.",
                   an(defsyms[trap_to_defsym(tt)].explanation),
                   !trap->madeby_u
@@ -1113,9 +1282,23 @@ doidtrap()
                            ? " dug"
                            : " set",
                   !trap->madeby_u ? "" : " by you");
+#else
+            pline("\82»\82ê\82Í%s%s\82¾\81D",
+                  !trap->madeby_u
+                     ? ""
+                     : (tt == WEB)
+                        ? "\82 \82È\82½\82ª\92£\82Á\82½"
+                        : (tt == HOLE || tt == PIT)
+                           ? "\82 \82È\82½\82ª\8c@\82Á\82½"
+                           : "\82 \82È\82½\82ª\8ed\8a|\82¯\82½",
+                  defsyms[trap_to_defsym(tt)].explanation);
+#endif
             return 0;
         }
+/*JP
     pline("I can't see a trap there.");
+*/
+    pline("\82»\82±\82É\82Íã©\82Í\82Ý\82 \82½\82ç\82È\82¢\81D");
     return 0;
 }
 
@@ -1130,7 +1313,11 @@ char *cbuf;
 
     fp = dlb_fopen(CMDHELPFILE, "r");
     if (!fp) {
+#if 0 /*JP*/
         pline("Cannot open data file!");
+#else
+        pline("\83f\81[\83^\83t\83@\83C\83\8b\82ð\8aJ\82¯\82È\82¢\81I");
+#endif
         return 0;
     }
 
@@ -1174,7 +1361,10 @@ dowhatdoes()
 #if defined(UNIX) || defined(VMS)
     introff();
 #endif
+/*JP
     q = yn_function("What command?", (char *) 0, '\0');
+*/
+    q = yn_function("\82Ç\82¤\82¢\82¤\83R\83}\83\93\83h\81H", (char *) 0, '\0');
 #if defined(UNIX) || defined(VMS)
     intron();
 #endif
@@ -1182,7 +1372,10 @@ dowhatdoes()
     if (reslt)
         pline1(reslt);
     else
+/*JP
         pline("I've never heard of such commands.");
+*/
+        pline("\82»\82ñ\82È\83R\83}\83\93\83h\82Í\95·\82¢\82½\82±\82Æ\82ª\82È\82¢\81D");
     return 0;
 }
 
@@ -1218,6 +1411,7 @@ docontact()
 
 /* data for help_menu() */
 static const char *help_menu_items[] = {
+#if 0 /*JP*/
     /*  0*/ "About NetHack (version information).",
     /*  1*/ "Long description of the game and commands.",
     /*  2*/ "List of game commands.",
@@ -1237,6 +1431,27 @@ static const char *help_menu_items[] = {
 #define WIZHLP_SLOT 11
 #endif
     "List of wizard-mode commands.", "", (char *) 0
+#else /*JP*/
+    /*  0*/ "NetHack\82É\82Â\82¢\82Ä(\83o\81[\83W\83\87\83\93\8fî\95ñ)",
+    /*  1*/ "\83Q\81[\83\80\82¨\82æ\82Ñ\83R\83}\83\93\83h\82Ì\89ð\90à(\92·\95¶)",
+    /*  2*/ "\83R\83}\83\93\83h\88ê\97\97",
+    /*  3*/ "NetHack\82Ì\8aÈ\92P\82È\97ð\8ej",
+    /*  4*/ "\89æ\96Ê\82É\95\\8e¦\82³\82ê\82é\95\8e\9a\82Ì\90à\96¾",
+    /*  5*/ "\82±\82Ì\83L\81[\82ª\89½\82ð\88Ó\96¡\82·\82é\82©\82Ì\90à\96¾",
+    /*  6*/ "\83Q\81[\83\80\82Ì\83I\83v\83V\83\87\83\93\88ê\97\97",
+    /*  7*/ "\83Q\81[\83\80\82Ì\83I\83v\83V\83\87\83\93\88ê\97\97(\92·\95¶)",
+    /*  8*/ "\8ag\92£\83R\83}\83\93\83h\88ê\97\97",
+    /*  9*/ "NetHack\82Ì\83\89\83C\83Z\83\93\83X",
+    /* 10*/ "\83T\83|\81[\83g\8fî\95ñ",
+#ifdef PORT_HELP
+    "%s\82É\93Á\97L\82Ì\83w\83\8b\83v\82¨\82æ\82Ñ\83R\83}\83\93\83h",
+#define PORT_HELP_ID 100
+#define WIZHLP_SLOT 12
+#else
+#define WIZHLP_SLOT 11
+#endif
+    "\83E\83B\83U\81[\83h\83\82\81[\83h\82Ì\83R\83}\83\93\83h\88ê\97\97", "", (char *) 0
+#endif /*JP*/
 };
 
 STATIC_OVL boolean
@@ -1271,7 +1486,10 @@ int *sel;
             add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
                      help_menu_items[i], MENU_UNSELECTED);
         }
+/*JP
     end_menu(tmpwin, "Select one item:");
+*/
+    end_menu(tmpwin, "\91I\82ñ\82Å\82­\82¾\82³\82¢\81F");
     n = select_menu(tmpwin, PICK_ONE, &selected);
     destroy_nhwindow(tmpwin);
     if (n > 0) {