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