Kentaro Shirakata
argra****@users*****
2007年 1月 9日 (火) 23:40:18 JST
Index: jnethack/sys/wince/bootstrp.mak diff -u jnethack/sys/wince/bootstrp.mak:1.2 jnethack/sys/wince/bootstrp.mak:1.3 --- jnethack/sys/wince/bootstrp.mak:1.2 Thu Sep 4 04:05:11 2003 +++ jnethack/sys/wince/bootstrp.mak Tue Jan 9 23:40:18 2007 @@ -230,8 +230,9 @@ all : $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ $(SRC)\monstr.c $(SRC)\vis_tab.c $(U)lev_comp.exe $(INCL)\vis_tab.h \ $(U)dgn_comp.exe $(U)uudecode.exe \ - $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) $(SRC)\tile.c \ + $(INCL)\jdata.h $(DAT)\jtrnsobj.dat \ + $(DAT)\data $(DAT)\jrumors $(DAT)\dungeon \ + $(DAT)\joracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) $(SRC)\tile.c \ $(SWINCE)\nethack.ico $(SWINCE)\tiles.bmp $(SWINCE)\mnsel.bmp \ $(SWINCE)\mnunsel.bmp $(SWINCE)\petmark.bmp $(SWINCE)\mnselcnt.bmp \ $(SWINCE)\keypad.bmp $(SWINCE)\menubar.bmp @@ -295,7 +296,7 @@ $(U)makedefs.c if not exist $(OBJ)\*.* echo creating directory $(OBJ) if not exist $(OBJ)\*.* mkdir $(OBJ) - $(CC) $(CFLAGSU) -Fo$@ $(U)makedefs.c + $(CC) $(CFLAGSU) -Fo$@ /DMSWIN_GRAPHICS $(U)makedefs.c # # date.h should be remade every time any of the source or include @@ -323,6 +324,9 @@ $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)makedefs -z +$(INCL)\jdata.h $(DAT)\jtrnsobj.dat: $(U)makedefs.exe + $(U)makedefs -j + #========================================== # uudecode utility and uuencoded targets #========================================== @@ -505,25 +509,25 @@ #$(DAT)\porthelp: $(NTSYS)\porthelp # copy $(NTSYS)\porthelp $@ >nul -$(DAT)\nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ - $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \ - $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon \ +$(DAT)\nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\joracles $(OPTIONS_FILE) \ + $(DAT)\quest.dat $(DAT)\jrumors $(DAT)\jhelp $(DAT)\jhh $(DAT)\jcmdhelp \ + $(DAT)\jhistory $(DAT)\jopthelp $(DAT)\jwizhelp $(DAT)\dungeon \ $(DAT)\license $(O)sp_lev.tag cd $(DAT) echo data >dlb.lst - echo oracles >>dlb.lst + echo joracles >>dlb.lst if exist options echo options >>dlb.lst if exist ttyoptions echo ttyoptions >>dlb.lst if exist guioptions echo guioptions >>dlb.lst if exist porthelp echo porthelp >>dlb.lst echo quest.dat >>dlb.lst - echo rumors >>dlb.lst - echo help >>dlb.lst - echo hh >>dlb.lst - echo cmdhelp >>dlb.lst - echo history >>dlb.lst - echo opthelp >>dlb.lst - echo wizhelp >>dlb.lst + echo jrumors >>dlb.lst + echo jhelp >>dlb.lst + echo jhh >>dlb.lst + echo jcmdhelp >>dlb.lst + echo jhistory >>dlb.lst + echo jopthelp >>dlb.lst + echo jwizhelp >>dlb.lst echo dungeon >>dlb.lst echo license >>dlb.lst for %%N in (*.lev) do echo %%N >>dlb.lst @@ -607,13 +611,13 @@ $(DAT)\data: $(UTIL)\makedefs.exe $(U)makedefs -d -$(DAT)\rumors: $(UTIL)\makedefs.exe $(DAT)\rumors.tru $(DAT)\rumors.fal +$(DAT)\jrumors: $(UTIL)\makedefs.exe $(DAT)\jrumors.tru $(DAT)\jrumors.fal $(U)makedefs -r $(DAT)\quest.dat: $(UTIL)\makedefs.exe $(DAT)\quest.txt $(U)makedefs -q -$(DAT)\oracles: $(UTIL)\makedefs.exe $(DAT)\oracles.txt +$(DAT)\joracles: $(UTIL)\makedefs.exe $(DAT)\joracles.txt $(U)makedefs -h $(DAT)\dungeon: $(UTIL)\makedefs.exe $(DAT)\dungeon.def Index: jnethack/sys/wince/celib.c diff -u jnethack/sys/wince/celib.c:1.1 jnethack/sys/wince/celib.c:1.2 --- jnethack/sys/wince/celib.c:1.1 Thu Mar 6 16:40:58 2003 +++ jnethack/sys/wince/celib.c Tue Jan 9 23:40:18 2007 @@ -436,11 +436,20 @@ char* __cdecl strrchr( const char *s, int c ) { +#if 0 /*JP*/ WCHAR wstr[1024]; WCHAR *w; w = wcsrchr(NH_A2W(s, wstr, 1024), c); if(w) return (char*)(s + (w - wstr)); else return NULL; +#else + int i; + for(i = strlen(s) - 1; i >= 0; i--) { + if (s[i] == c) + return (char *)(s + i); + } + return NULL; +#endif } int __cdecl _stricmp(const char* a, const char* b) Index: jnethack/sys/wince/mhcmd.c diff -u jnethack/sys/wince/mhcmd.c:1.2 jnethack/sys/wince/mhcmd.c:1.3 --- jnethack/sys/wince/mhcmd.c:1.2 Thu Sep 4 04:05:11 2003 +++ jnethack/sys/wince/mhcmd.c Tue Jan 9 23:40:18 2007 @@ -653,7 +653,10 @@ SelectObject(hDC, data->font[ -p_cell_data->image ]); DrawText(hDC, NH_A2W(p_cell_data->text, wbuf, BUFSZ), +/*JP strlen(p_cell_data->text), +*/ + -1, &cell_rt, DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX ); @@ -796,7 +799,10 @@ lgfnt.lfItalic = FALSE; // italic attribute option lgfnt.lfUnderline = FALSE; // underline attribute option lgfnt.lfStrikeOut = FALSE; // strikeout attribute option +/*JP lgfnt.lfCharSet = ANSI_CHARSET; // character set identifier +*/ + lgfnt.lfCharSet = SHIFTJIS_CHARSET; // character set identifier lgfnt.lfOutPrecision = OUT_DEFAULT_PRECIS; // output precision lgfnt.lfClipPrecision = CLIP_CHARACTER_PRECIS; // clipping precision lgfnt.lfQuality = DEFAULT_QUALITY; // output quality Index: jnethack/sys/wince/mhdlg.c diff -u jnethack/sys/wince/mhdlg.c:1.3 jnethack/sys/wince/mhdlg.c:1.4 --- jnethack/sys/wince/mhdlg.c:1.3 Wed Dec 10 12:50:19 2003 +++ jnethack/sys/wince/mhdlg.c Tue Jan 9 23:40:18 2007 @@ -74,7 +74,10 @@ /* get title text width */ SetRect(&text_rt, 0, 0, 100, 50); hdc = GetWindowDC(hWnd); +/*JP DrawText(hdc, wbuf, _tcslen(wbuf), &text_rt, +*/ + DrawText(hdc, wbuf, -1, &text_rt, DT_CALCRECT | DT_SINGLELINE | DT_NOPREFIX | DT_LEFT | DT_VCENTER ); ReleaseDC(hWnd, hdc); Index: jnethack/sys/wince/mhfont.c diff -u jnethack/sys/wince/mhfont.c:1.1 jnethack/sys/wince/mhfont.c:1.2 --- jnethack/sys/wince/mhfont.c:1.1 Thu Mar 6 16:40:59 2003 +++ jnethack/sys/wince/mhfont.c Tue Jan 9 23:40:18 2007 @@ -163,7 +163,10 @@ if( TranslateCharsetInfo((DWORD*)GetACP(), &cis, TCI_SRCCODEPAGE) ) return cis.ciCharset; else +/*JP return ANSI_CHARSET; +*/ + return SHIFTJIS_CHARSET; } void __cdecl font_table_cleanup(void) Index: jnethack/sys/wince/mhmap.c diff -u jnethack/sys/wince/mhmap.c:1.2 jnethack/sys/wince/mhmap.c:1.3 --- jnethack/sys/wince/mhmap.c:1.2 Thu Sep 4 04:05:11 2003 +++ jnethack/sys/wince/mhmap.c Tue Jan 9 23:40:18 2007 @@ -604,7 +604,10 @@ DrawText(hDC, NH_A2W(&ch, &wch, 1), +/*JP 1, +*/ + -1, &glyph_rect, DT_CENTER | DT_VCENTER | DT_NOPREFIX ); Index: jnethack/sys/wince/mhmenu.c diff -u jnethack/sys/wince/mhmenu.c:1.2 jnethack/sys/wince/mhmenu.c:1.3 --- jnethack/sys/wince/mhmenu.c:1.2 Thu Sep 4 04:05:11 2003 +++ jnethack/sys/wince/mhmenu.c Tue Jan 9 23:40:18 2007 @@ -590,7 +590,10 @@ if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ DrawText(hDC, NH_A2W(p1, wbuf, BUFSZ), +/*JP strlen(p1), +*/ + -1, &drawRect, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_EXPANDTABS | DT_SINGLELINE ); @@ -910,7 +913,10 @@ buf[1] = '\x0'; SetRect( &drawRect, x, lpdis->rcItem.top, lpdis->rcItem.right, lpdis->rcItem.bottom ); +/*JP DrawText(lpdis->hDC, NH_A2W(buf, wbuf, 2), 1, &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX); +*/ + DrawText(lpdis->hDC, NH_A2W(buf, wbuf, 2), -1, &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX); } x += tm.tmAveCharWidth + tm.tmOverhang + 5; } else { @@ -949,7 +955,10 @@ if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ DrawText(lpdis->hDC, NH_A2W(p1, wbuf, BUFSZ), +/*JP strlen(p1), +*/ + -1, &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE ); @@ -967,7 +976,10 @@ SetRect( &drawRect, x, lpdis->rcItem.top, lpdis->rcItem.right, lpdis->rcItem.bottom); DrawText(lpdis->hDC, NH_A2W(item->str, wbuf, BUFSZ), +/*JP strlen(item->str), +*/ + -1, &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE ); @@ -992,7 +1004,10 @@ /* calculate text rectangle */ SetRect( &drawRect, client_rt.left, lpdis->rcItem.top, client_rt.right, lpdis->rcItem.bottom ); +/*JP DrawText(lpdis->hDC, wbuf, _tcslen(wbuf), &drawRect, +*/ + DrawText(lpdis->hDC, wbuf, -1, &drawRect, DT_CALCRECT | DT_RIGHT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX ); /* erase text rectangle */ @@ -1005,7 +1020,10 @@ DeleteObject( bkBrush ); /* draw text */ +/*JP DrawText(lpdis->hDC, wbuf, _tcslen(wbuf), &drawRect, +*/ + DrawText(lpdis->hDC, wbuf, -1, &drawRect, DT_RIGHT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX ); } @@ -1356,7 +1374,10 @@ if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ DrawText(hdc, NH_A2W(p1, wbuf, BUFSZ), +/*JP strlen(p1), +*/ + -1, &tabRect, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_SINGLELINE ); Index: jnethack/sys/wince/mhmsgwnd.c diff -u jnethack/sys/wince/mhmsgwnd.c:1.1 jnethack/sys/wince/mhmsgwnd.c:1.2 --- jnethack/sys/wince/mhmsgwnd.c:1.1 Thu Mar 6 16:40:59 2003 +++ jnethack/sys/wince/mhmsgwnd.c Tue Jan 9 23:40:18 2007 @@ -503,12 +503,21 @@ oldFont = SelectObject(hdc, mswin_get_font(NHW_MESSAGE, data->window_text[i].attr, hdc, FALSE)); #ifdef MSG_WRAP_TEXT +/*JP DrawText(hdc, wbuf, wlen, &draw_rt, DT_NOPREFIX | DT_WORDBREAK | DT_CALCRECT); +*/ + DrawText(hdc, wbuf, -1, &draw_rt, DT_NOPREFIX | DT_WORDBREAK | DT_CALCRECT); draw_rt.top = y - (draw_rt.bottom - draw_rt.top); draw_rt.bottom = y; +/*JP DrawText(hdc, wbuf, wlen, &draw_rt, DT_NOPREFIX | DT_WORDBREAK); +*/ + DrawText(hdc, wbuf, -1, &draw_rt, DT_NOPREFIX | DT_WORDBREAK); #else +/*JP DrawText(hdc, wbuf, wlen, &draw_rt, DT_NOPREFIX ); +*/ + DrawText(hdc, wbuf, -1, &draw_rt, DT_NOPREFIX ); #endif SelectObject(hdc, oldFont); @@ -521,7 +530,10 @@ if( i==MSG_LINES-1 ) { draw_rt.left = client_rt.left; draw_rt.right = draw_rt.left + 2*data->xChar; +/*JP DrawText(hdc, TEXT("> "), 2, &draw_rt, DT_NOPREFIX ); +*/ + DrawText(hdc, TEXT("> "), -1, &draw_rt, DT_NOPREFIX ); y -= 2; draw_rt.left = client_rt.left; Index: jnethack/sys/wince/mhstatus.c diff -u jnethack/sys/wince/mhstatus.c:1.1 jnethack/sys/wince/mhstatus.c:1.2 --- jnethack/sys/wince/mhstatus.c:1.1 Thu Mar 6 16:40:59 2003 +++ jnethack/sys/wince/mhstatus.c Tue Jan 9 23:40:18 2007 @@ -118,7 +118,10 @@ DrawText(hdc, NH_A2W(data->window_text, wbuf, MAXWINDOWTEXT), +/*JP strlen(data->window_text), +*/ + -1, &rt, DT_LEFT | DT_NOPREFIX); @@ -181,14 +184,24 @@ Strcpy(text, plname); if('a' <= text[0] && text[0] <= 'z') text[0] += 'A'-'a'; +#if 1 /*JP*/ + if( is_kanji1(text, 9) ) + text[9] = '_'; +#endif text[10] = 0; +/*JP Sprintf(nb = eos(text)," the "); +*/ + Sprintf(nb = eos(text)," "); if (Upolyd) { char mbot[BUFSZ]; int k = 0; +/*JP Strcpy(mbot, mons[u.umonnum].mname); +*/ + Strcpy(mbot, jtrns_mon(mons[u.umonnum].mname)); while(mbot[k] != 0) { if ((k == 0 || (k > 0 && mbot[k-1] == ' ')) && 'a' <= mbot[k] && mbot[k] <= 'z') @@ -203,21 +216,44 @@ if (ACURR(A_STR) > 18) { if (ACURR(A_STR) > STR18(100)) +/*JP Sprintf(nb = eos(nb),"St:%2d ",ACURR(A_STR)-100); +*/ + Sprintf(nb = eos(nb),"強:%2d ",ACURR(A_STR)-100); else if (ACURR(A_STR) < STR18(100)) +/*JP Sprintf(nb = eos(nb), "St:18/%02d ",ACURR(A_STR)-18); +*/ + Sprintf(nb = eos(nb), "強:18/%02d ",ACURR(A_STR)-18); else +/*JP Sprintf(nb = eos(nb),"St:18/** "); +*/ + Sprintf(nb = eos(nb),"強:18/** "); } else +/*JP Sprintf(nb = eos(nb), "St:%-1d ",ACURR(A_STR)); +*/ + Sprintf(nb = eos(nb), "強:%-1d ",ACURR(A_STR)); Sprintf(nb = eos(nb), +/*JP "Dx:%-1d Co:%-1d In:%-1d Wi:%-1d Ch:%-1d", +*/ + "早:%-1d 耐:%-1d 知:%-1d 賢:%-1d 魅:%-1d ", ACURR(A_DEX), ACURR(A_CON), ACURR(A_INT), ACURR(A_WIS), ACURR(A_CHA)); +#if 0 /*JP*/ Sprintf(nb = eos(nb), (u.ualign.type == A_CHAOTIC) ? " Chaotic" : (u.ualign.type == A_NEUTRAL) ? " Neutral" : " Lawful"); +#else + Sprintf(nb = eos(nb), (u.ualign.type == A_CHAOTIC) ? "混沌" : + (u.ualign.type == A_NEUTRAL) ? "中立" : "秩序"); +#endif #ifdef SCORE_ON_BOTL if (flags.showscore) +/*JP Sprintf(nb = eos(nb), " S:%ld", botl_score()); +*/ + Sprintf(nb = eos(nb), "%ld点", botl_score()); #endif if( format==NHSTAT_LINES_4 || format==NHSTAT_LINES_2 ) strcat(text, "\r\n"); @@ -229,7 +265,10 @@ if(hp < 0) hp = 0; (void) describe_level(nb=eos(nb)); Sprintf(nb = eos(nb), +/*JP "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[COIN_CLASS], +*/ + "%c:%-2ld 体:%d(%d) 魔:%d(%d) 鎧:%-2d", oc_syms[COIN_CLASS], #ifndef GOLDOBJ u.ugold, #else @@ -241,21 +280,31 @@ Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); #ifdef EXP_ON_BOTL else if(flags.showexp) +/*JP Sprintf(nb = eos(nb), " Xp:%u/%-1ld", u.ulevel,u.uexp); +*/ + Sprintf(nb = eos(nb), " 経験:%u/%-1ld", u.ulevel,u.uexp); #endif else +/*JP Sprintf(nb = eos(nb), " Exp:%u", u.ulevel); +*/ + Sprintf(nb = eos(nb), " 経験:%u", u.ulevel); if( format==NHSTAT_LINES_4 ) strcat(text, "\r\n"); else strcat(text, " "); /* forth line */ if(flags.time) +/*JP Sprintf(nb = eos(nb), "T:%ld ", moves); +*/ + Sprintf(nb = eos(nb), "歩:%ld", moves); if(strcmp(hu_stat[u.uhs], " ")) { Strcat(text, hu_stat[u.uhs]); Sprintf(nb = eos(nb), " "); } +#if 0 /*JP*/ if(Confusion) Sprintf(nb = eos(nb), "Conf"); if(Sick) { if (u.usick_type & SICK_VOMITABLE) @@ -267,6 +316,19 @@ if(Stunned) Sprintf(nb = eos(nb), " Stun"); if(Hallucination) Sprintf(nb = eos(nb), " Hallu"); if(Slimed) Sprintf(nb = eos(nb), " Slime"); +#else + if(Confusion) Sprintf(nb = eos(nb), " 混乱"); + if(Sick) { + if (u.usick_type & SICK_VOMITABLE) + Sprintf(nb = eos(nb), " 食毒"); + if (u.usick_type & SICK_NONVOMITABLE) + Sprintf(nb = eos(nb), " 病気"); + } + if(Blind) Sprintf(nb = eos(nb), " 盲目"); + if(Stunned) Sprintf(nb = eos(nb), " 眩暈"); + if(Hallucination) Sprintf(nb = eos(nb), " 幻覚"); + if(Slimed) Sprintf(nb = eos(nb), " どろどろ"); +#endif if(cap > UNENCUMBERED) Sprintf(nb = eos(nb), " %s", enc_stat[cap]); } Index: jnethack/sys/wince/mhtxtbuf.c diff -u jnethack/sys/wince/mhtxtbuf.c:1.2 jnethack/sys/wince/mhtxtbuf.c:1.3 --- jnethack/sys/wince/mhtxtbuf.c:1.2 Wed Dec 10 12:50:19 2003 +++ jnethack/sys/wince/mhtxtbuf.c Tue Jan 9 23:40:18 2007 @@ -184,7 +184,10 @@ /* check if it fits */ SetRect( &rt_text, 0, 0, size_text.cx, size_text.cy ); +/*JP DrawText(hdcEdit, NH_A2W(buf, tbuf, p_buf_cur-buf), p_buf_cur-buf, &rt_text, DT_CALCRECT | DT_LEFT | DT_SINGLELINE | DT_NOCLIP); +*/ + DrawText(hdcEdit, NH_A2W(buf, tbuf, p_buf_cur-buf), -1, &rt_text, DT_CALCRECT | DT_LEFT | DT_SINGLELINE | DT_NOCLIP); if( (rt_text.right - rt_text.left)>=size_text.cx ) { /* Backtrack. Only backtrack if the last word caused the overflow - Index: jnethack/sys/wince/mswproc.c diff -u jnethack/sys/wince/mswproc.c:1.2 jnethack/sys/wince/mswproc.c:1.3 --- jnethack/sys/wince/mswproc.c:1.2 Thu Sep 4 04:05:11 2003 +++ jnethack/sys/wince/mswproc.c Tue Jan 9 23:40:18 2007 @@ -416,7 +416,10 @@ any.a_int = i+1; /* must be non-zero */ add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, "Quit", MENU_UNSELECTED); +/*JP Sprintf(pbuf, "Pick a role for your %s", plbuf); +*/ + Sprintf(pbuf, "%s職業を選択してください.", plbuf); end_menu(win, pbuf); n = select_menu(win, PICK_ONE, &selected); destroy_nhwindow(win); @@ -487,7 +490,10 @@ any.a_int = i+1; /* must be non-zero */ add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, "Quit", MENU_UNSELECTED); +/*JP Sprintf(pbuf, "Pick the race of your %s", plbuf); +*/ + Sprintf(pbuf, "%s種族を選択してください.", plbuf); end_menu(win, pbuf); n = select_menu(win, PICK_ONE, &selected); destroy_nhwindow(win); @@ -630,7 +636,10 @@ any.a_int = i+1; /* must be non-zero */ add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, "Quit", MENU_UNSELECTED); +/*JP Sprintf(pbuf, "Pick the alignment of your %s", plbuf); +*/ + Sprintf(pbuf, "%s属性を選択してください", plbuf); end_menu(win, pbuf); n = select_menu(win, PICK_ONE, &selected); destroy_nhwindow(win); @@ -652,7 +661,10 @@ { logDebug("mswin_askname()\n"); +/*JP if( mswin_getlin_window("who are you?", plname, PL_NSIZ)==IDCANCEL ) { +*/ + if( mswin_getlin_window("あなたのキャラクタの名前は?", plname, PL_NSIZ)==IDCANCEL ) { bail("bye-bye"); /* not reached */ }