--- np2/win9x/np2.cpp 2005/02/16 09:31:55 1.58 +++ np2/win9x/np2.cpp 2005/03/20 23:48:02 1.62 @@ -51,7 +51,7 @@ #define OPENING_WAIT 1500 #endif -static OEMCHAR szClassName[] = OEMTEXT("NP2-MainWindow"); +static TCHAR szClassName[] = _T("NP2-MainWindow"); HWND hWndMain; HINSTANCE hInst; HINSTANCE hPrev; @@ -291,7 +291,8 @@ static int flagload(const OEMCHAR *ext, id = IDYES; ret = statsave_check(path, buf, NELEMENTS(buf)); if (ret & (~STATFLAG_DISKCHG)) { - MessageBox(hWndMain, OEMTEXT("Couldn't restart"), title, MB_OK | MB_ICONSTOP); + MessageBox(hWndMain, _T("Couldn't restart"), title, + MB_OK | MB_ICONSTOP); id = IDNO; } else if ((!force) && (ret & STATFLAG_DISKCHG)) { @@ -1080,7 +1081,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT GetClientRect(hWnd, &rect); width = rect.right - rect.left; height = rect.bottom - rect.top; - hbmp = LoadBitmap(hinst, OEMTEXT("NP2BMP")); + hbmp = LoadBitmap(hinst, _T("NP2BMP")); GetObject(hbmp, sizeof(BITMAP), &bmp); hbrush = (HBRUSH)SelectObject(hdc, GetStockObject(BLACK_BRUSH)); @@ -1283,7 +1284,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT } else if (sstpconfirm_exit()) { winuienter(); - if (MessageBox(hWnd, OEMTEXT("Sure?"), OEMTEXT("Exit"), + if (MessageBox(hWnd, _T("Sure?"), _T("Exit"), MB_ICONQUESTION | MB_YESNO) == IDYES) { b = TRUE; } @@ -1407,7 +1408,7 @@ int WINAPI WinMain(HINSTANCE hInstance, GetModuleFileName(NULL, modulefile, NELEMENTS(modulefile)); dosio_init(); file_setcd(modulefile); - np2arg_analize(lpszCmdLine); + np2arg_analize(); initload(); toolwin_readini(); kdispwin_readini(); @@ -1416,7 +1417,9 @@ int WINAPI WinMain(HINSTANCE hInstance, rand_setseed((unsigned)time(NULL)); - CopyMemory(szClassName, np2oscfg.winid, 3 * sizeof(OEMCHAR)); + szClassName[0] = (TCHAR)np2oscfg.winid[0]; + szClassName[1] = (TCHAR)np2oscfg.winid[1]; + szClassName[2] = (TCHAR)np2oscfg.winid[2]; if ((hWnd = FindWindow(szClassName, NULL)) != NULL) { sstpmsg_running(); @@ -1540,7 +1543,7 @@ int WINAPI WinMain(HINSTANCE hInstance, scrnmode ^= SCRNMODE_FULLSCREEN; if (scrnmng_create(scrnmode) != SUCCESS) { if (sstpmsg_dxerror()) { - MessageBox(hWnd, OEMTEXT("Couldn't create DirectDraw Object"), + MessageBox(hWnd, _T("Couldn't create DirectDraw Object"), np2oscfg.titles, MB_OK | MB_ICONSTOP); } return(FALSE); @@ -1588,7 +1591,9 @@ int WINAPI WinMain(HINSTANCE hInstance, id = flagload(str_sav, str_resume, FALSE); if (id == IDYES) { - for (i=0; i<4; i++) np2arg.disk[i] = NULL; + for (i=0; i<4; i++) { + np2arg.disk[i] = NULL; + } } else if (id == IDCANCEL) { DestroyWindow(hWnd); @@ -1609,8 +1614,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // リセットしてから… コマンドラインのディスク挿入。 for (i=0; i<4; i++) { if (np2arg.disk[i]) { - milstr_ncpy(diskdrv_fname[i], np2arg.disk[i], NELEMENTS(diskdrv_fname[0])); - diskdrv_delay[i] = 1; + diskdrv_readyfdd((REG8)i, np2arg.disk[i], 0); } }