JNetHackのソースをいじくったものを置いておくための場所
Révision | 9cb23ea26fe57ac2161c5fbc52707dda1120d471 (tree) |
---|---|
l'heure | 2018-01-22 03:42:21 |
Auteur | SHIRAKATA Kentaro <argrath@ub32...> |
Commiter | SHIRAKATA Kentaro |
eliminate warnings
@@ -240,7 +240,9 @@ int rx, ry, *resp; | ||
240 | 240 | { |
241 | 241 | char buf[BUFSZ]; |
242 | 242 | boolean more_corpses; |
243 | +#if 0 /*JP*/ | |
243 | 244 | struct permonst *mptr; |
245 | +#endif | |
244 | 246 | struct obj *corpse = sobj_at(CORPSE, rx, ry), |
245 | 247 | *statue = sobj_at(STATUE, rx, ry); |
246 | 248 |
@@ -986,7 +986,11 @@ boolean vis; /* whether the action can be seen */ | ||
986 | 986 | char *hittee; /* target's name: "you" or mon_nam(mdef) */ |
987 | 987 | { |
988 | 988 | struct permonst *old_uasmon; |
989 | +#if 0 /*JP*/ | |
989 | 990 | const char *verb, *fakename; |
991 | +#else | |
992 | + const char *verb; | |
993 | +#endif | |
990 | 994 | boolean youattack = (magr == &youmonst), youdefend = (mdef == &youmonst), |
991 | 995 | resisted = FALSE, do_stun, do_confuse, result; |
992 | 996 | int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2; |
@@ -926,7 +926,9 @@ int propidx; /* special cases can have negative values */ | ||
926 | 926 | static NEARDATA const char because_of[] = "%sによって"; |
927 | 927 | |
928 | 928 | if (propidx >= 0) { |
929 | +#if 0 /*JP*/ | |
929 | 930 | char *p; |
931 | +#endif | |
930 | 932 | struct obj *obj = (struct obj *) 0; |
931 | 933 | int innate = is_innate(propidx); |
932 | 934 |
@@ -1819,7 +1819,9 @@ boolean at_stairs, falling, portal; | ||
1819 | 1819 | #endif |
1820 | 1820 | }; |
1821 | 1821 | const char *mesg; |
1822 | +#if 0 /*JP*/ | |
1822 | 1823 | char buf[BUFSZ]; |
1824 | +#endif | |
1823 | 1825 | int which = rn2(4); |
1824 | 1826 | |
1825 | 1827 | if (Hallucination) |
@@ -1393,7 +1393,9 @@ struct obj *obj; | ||
1393 | 1393 | int mnum; |
1394 | 1394 | char *buf; |
1395 | 1395 | { |
1396 | +#if 0 /*JP*/ | |
1396 | 1397 | char buf2[BUFSZ]; |
1398 | +#endif | |
1397 | 1399 | int r = tin_variety(obj, TRUE); |
1398 | 1400 | |
1399 | 1401 | if (obj && buf) { |
@@ -718,7 +718,11 @@ register struct monst *mtmp; | ||
718 | 718 | |
719 | 719 | if (!rn2(10) && !mtmp->mcan) { |
720 | 720 | int numseen, numhelp; |
721 | +#if 0 /*JP*/ | |
721 | 722 | char buf[BUFSZ], genericwere[BUFSZ]; |
723 | +#else | |
724 | + char genericwere[BUFSZ]; | |
725 | +#endif | |
722 | 726 | |
723 | 727 | /*JP |
724 | 728 | Strcpy(genericwere, "creature"); |
@@ -1080,9 +1080,11 @@ boolean with_price; | ||
1080 | 1080 | boolean known, cknown, bknown, lknown; |
1081 | 1081 | int omndx = obj->corpsenm; |
1082 | 1082 | char prefix[PREFIX]; |
1083 | +#if 0 /*JP*/ | |
1083 | 1084 | char tmpbuf[PREFIX + 1]; /* for when we have to add something at |
1084 | 1085 | the start of prefix instead of the |
1085 | 1086 | end (Strcat is used on the end) */ |
1087 | +#endif | |
1086 | 1088 | register char *bp = xname(obj); |
1087 | 1089 | #if 1 /*JP*//*順序入れ替えに使う*/ |
1088 | 1090 | char preprefix[PREFIX]; |
@@ -3034,15 +3036,15 @@ struct obj *no_wish; | ||
3034 | 3036 | int eroded, eroded2, erodeproof; |
3035 | 3037 | int halfeaten, mntmp, contents; |
3036 | 3038 | int islit, unlabeled, ishistoric, isdiluted, trapped; |
3039 | +#if 0 /*JP*/ | |
3037 | 3040 | int tmp, tinv, tvariety; |
3041 | +#else | |
3042 | + int tvariety; | |
3043 | +#endif | |
3038 | 3044 | int wetness; |
3039 | 3045 | struct fruit *f; |
3040 | 3046 | int ftype = context.current_fruit; |
3041 | 3047 | char fruitbuf[BUFSZ]; |
3042 | -#if 1 /*JP*/ | |
3043 | - char buf[BUFSZ]; | |
3044 | - char pfx[BUFSZ]; | |
3045 | -#endif | |
3046 | 3048 | /* Fruits may not mess up the ability to wish for real objects (since |
3047 | 3049 | * you can leave a fruit in a bones file and it will be added to |
3048 | 3050 | * another person's game), so they must be checked for last, after |
@@ -541,7 +541,11 @@ int psflags; | ||
541 | 541 | You("鱗の鎧と一体化した."); |
542 | 542 | } else { /* dragon scale mail */ |
543 | 543 | /* d.scale mail first reverts to scales */ |
544 | +#if 0 /*JP*/ | |
544 | 545 | char *p, *dsmail; |
546 | +#else | |
547 | + char *dsmail; | |
548 | +#endif | |
545 | 549 | |
546 | 550 | /* similar to noarmor(invent.c), |
547 | 551 | shorten to "<color> scale mail" */ |
@@ -1183,7 +1187,11 @@ drop_weapon(alone) | ||
1183 | 1187 | int alone; |
1184 | 1188 | { |
1185 | 1189 | struct obj *otmp; |
1190 | +#if 0 /*JP*/ | |
1186 | 1191 | const char *what, *which, *whichtoo; |
1192 | +#else | |
1193 | + const char *which, *whichtoo; | |
1194 | +#endif | |
1187 | 1195 | boolean candropwep, candropswapwep; |
1188 | 1196 | |
1189 | 1197 | if (uwep) { |
@@ -268,7 +268,9 @@ boolean talk; | ||
268 | 268 | { |
269 | 269 | long old = Blinded; |
270 | 270 | boolean u_could_see, can_see_now; |
271 | +#if 0 /*JP*/ | |
271 | 272 | const char *eyes; |
273 | +#endif | |
272 | 274 | |
273 | 275 | /* we need to probe ahead in case the Eyes of the Overworld |
274 | 276 | are or will be overriding blindness */ |
@@ -1947,7 +1947,11 @@ int buflen, rolenum, racenum, gendnum, alignnum; | ||
1947 | 1947 | */ |
1948 | 1948 | const char *defprompt = "適当にキャラクターを選んでよいですか?[ynaq] "; |
1949 | 1949 | int num_post_attribs = 0; |
1950 | +#if 0 /*JP*/ | |
1950 | 1951 | char tmpbuf[BUFSZ], *p; |
1952 | +#else | |
1953 | + char tmpbuf[BUFSZ]; | |
1954 | +#endif | |
1951 | 1955 | |
1952 | 1956 | if (buflen < QBUFSZ) |
1953 | 1957 | return (char *) defprompt; |
@@ -2690,7 +2690,11 @@ const char *fmt; /* "%s %ld %s %s", doname(obj), amt, plur(amt), arg */ | ||
2690 | 2690 | long amt; |
2691 | 2691 | const char *arg; |
2692 | 2692 | { |
2693 | +#if 0 /*JP*/ | |
2693 | 2694 | char *obj_name, fmtbuf[BUFSZ]; |
2695 | +#else | |
2696 | + char *obj_name; | |
2697 | +#endif | |
2694 | 2698 | boolean was_unknown = !obj->dknown; |
2695 | 2699 | |
2696 | 2700 | obj->dknown = TRUE; |
@@ -3451,7 +3455,11 @@ xchar x, y; | ||
3451 | 3455 | } |
3452 | 3456 | } else { |
3453 | 3457 | char qbuf[BUFSZ], qsfx[BUFSZ]; |
3458 | +#if 0 /*JP*/ | |
3454 | 3459 | boolean short_funds = (offer > shkmoney), one; |
3460 | +#else | |
3461 | + boolean short_funds = (offer > shkmoney); | |
3462 | +#endif | |
3455 | 3463 | |
3456 | 3464 | if (short_funds) |
3457 | 3465 | offer = shkmoney; |
@@ -100,8 +100,10 @@ register struct monst *mtmp; | ||
100 | 100 | register struct obj *fgold = g_at(u.ux, u.uy); |
101 | 101 | register struct obj *ygold; |
102 | 102 | register long tmp; |
103 | +#if 0 /*JP*/ | |
103 | 104 | struct monst *who; |
104 | 105 | const char *whose, *what; |
106 | +#endif | |
105 | 107 | |
106 | 108 | /* skip lesser coins on the floor */ |
107 | 109 | while (fgold && fgold->otyp != GOLD_PIECE) |
@@ -110,7 +110,9 @@ int how; | ||
110 | 110 | /* PANICKED, TRICKED, QUIT, ESCAPED, ASCENDED */ |
111 | 111 | "", "", "", "", "" |
112 | 112 | }; |
113 | +#if 0 /*JP*/ | |
113 | 114 | unsigned l; |
115 | +#endif | |
114 | 116 | char *kname = killer.name; |
115 | 117 | |
116 | 118 | buf[0] = '\0'; /* so strncat() can find the end */ |
@@ -826,7 +828,11 @@ boolean so; | ||
826 | 828 | { |
827 | 829 | boolean second_line = TRUE; |
828 | 830 | char linebuf[BUFSZ]; |
831 | +#if 0 /*JP*/ | |
829 | 832 | char *bp, hpbuf[24], linebuf3[BUFSZ]; |
833 | +#else | |
834 | + char *bp, hpbuf[24]; | |
835 | +#endif | |
830 | 836 | int hppos, lngr; |
831 | 837 | #if 1 /*JP*/ |
832 | 838 | char who[BUFSZ]; |
@@ -719,7 +719,9 @@ register struct monst *mon; | ||
719 | 719 | */ |
720 | 720 | if (mw_tmp && mwelded(mw_tmp)) { |
721 | 721 | if (canseemon(mon)) { |
722 | +#if 0 /*JP*/ | |
722 | 723 | char welded_buf[BUFSZ]; |
724 | +#endif | |
723 | 725 | const char *mon_hand = mbodypart(mon, HAND); |
724 | 726 | |
725 | 727 | if (bimanual(mw_tmp)) |
@@ -483,7 +483,9 @@ struct obj *obj; | ||
483 | 483 | const char *verb; /* "rub",&c */ |
484 | 484 | { |
485 | 485 | const char *what; |
486 | +#if 0 /*JP*/ | |
486 | 487 | boolean more_than_1; |
488 | +#endif | |
487 | 489 | |
488 | 490 | if (obj == uwep) |
489 | 491 | return TRUE; /* nothing to do if already wielding it */ |
@@ -100,7 +100,11 @@ dowrite(pen) | ||
100 | 100 | register struct obj *pen; |
101 | 101 | { |
102 | 102 | register struct obj *paper; |
103 | +#if 0 /*JP*/ | |
103 | 104 | char namebuf[BUFSZ], *nm, *bp; |
105 | +#else | |
106 | + char namebuf[BUFSZ], *nm; | |
107 | +#endif | |
104 | 108 | register struct obj *new_obj; |
105 | 109 | int basecost, actualcost; |
106 | 110 | int curseval; |
@@ -500,7 +500,7 @@ int ch2; | ||
500 | 500 | |
501 | 501 | attrs[0] = attrs[1] = attr; |
502 | 502 | |
503 | - WriteConsoleOutputAttribute(hConOut,&attrs,2, | |
503 | + WriteConsoleOutputAttribute(hConOut,(WORD *)(&attrs),2, | |
504 | 504 | cursor,&acount); |
505 | 505 | WriteConsoleOutputCharacter(hConOut,buf,2, |
506 | 506 | cursor,&ccount); |