|
|
| version 1.5, 2003/12/05 19:42:03 | version 1.14, 2004/02/21 20:48:53 |
|---|---|
| Line 29 | Line 29 |
| #include "fddfile.h" | #include "fddfile.h" |
| #include "font.h" | #include "font.h" |
| #include "timing.h" | #include "timing.h" |
| #include "statsave.h" | #include "keystat.h" |
| #include "vramhdl.h" | #include "vramhdl.h" |
| #include "menubase.h" | #include "menubase.h" |
| #include "sysmenu.h" | #include "sysmenu.h" |
| Line 42 static const TCHAR szAppCaption[] = STRL | Line 42 static const TCHAR szAppCaption[] = STRL |
| static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow"); | static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow"); |
| NP2OSCFG np2oscfg = {0, 2, 0, 0, | NP2OSCFG np2oscfg = {0, 0, 0, 0, |
| #if !defined(GX_DLL) | #if !defined(GX_DLL) |
| CW_USEDEFAULT, CW_USEDEFAULT, | CW_USEDEFAULT, CW_USEDEFAULT, |
| #endif | #endif |
| #if defined(WIN32_PLATFORM_PSPC) | #if defined(WIN32_PLATFORM_PSPC) |
| 0, 0, | 0, 0, |
| #endif | #endif |
| }; | 0}; |
| HWND hWndMain; | HWND hWndMain; |
| HINSTANCE hInst; | HINSTANCE hInst; |
| HINSTANCE hPrev; | HINSTANCE hPrev; |
| Line 109 static int flagload(const char *ext, con | Line 109 static int flagload(const char *ext, con |
| getstatfilename(path, ext, sizeof(path)); | getstatfilename(path, ext, sizeof(path)); |
| id = DID_YES; | id = DID_YES; |
| ret = statsave_check(path, buf, sizeof(buf)); | ret = statsave_check(path, buf, sizeof(buf)); |
| if (ret & (~NP2FLAG_DISKCHG)) { | if (ret & (~STATFLAG_DISKCHG)) { |
| menumbox("Couldn't restart", title, MBOX_OK | MBOX_ICONSTOP); | menumbox("Couldn't restart", title, MBOX_OK | MBOX_ICONSTOP); |
| id = DID_NO; | id = DID_NO; |
| } | } |
| else if ((!force) && (ret & NP2FLAG_DISKCHG)) { | else if ((!force) && (ret & STATFLAG_DISKCHG)) { |
| SPRINTF(buf2, "Conflict!\n\n%s\nContinue?", buf); | SPRINTF(buf2, "Conflict!\n\n%s\nContinue?", buf); |
| id = menumbox(buf2, title, MBOX_YESNOCAN | MBOX_ICONQUESTION); | id = menumbox(buf2, title, MBOX_YESNOCAN | MBOX_ICONQUESTION); |
| } | } |
| Line 232 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 232 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| #if !defined(GX_DLL) | #if !defined(GX_DLL) |
| case WM_MOVE: | case WM_MOVE: |
| #if !defined(_WIN32_WCE) | |
| if (!(GetWindowLong(hWnd, GWL_STYLE) & | if (!(GetWindowLong(hWnd, GWL_STYLE) & |
| (WS_MAXIMIZE | WS_MINIMIZE))) { | (WS_MAXIMIZE | WS_MINIMIZE))) |
| #endif | |
| { | |
| RECT rc; | |
| GetWindowRect(hWnd, &rc); | GetWindowRect(hWnd, &rc); |
| np2oscfg.winx = rc.left; | np2oscfg.winx = rc.left; |
| np2oscfg.winy = rc.top; | np2oscfg.winy = rc.top; |
| Line 265 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 269 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| if (sysrunning) { | if (sysrunning) { |
| if (LOWORD(wParam) != WA_INACTIVE) { | if (LOWORD(wParam) != WA_INACTIVE) { |
| GXResume(); | GXResume(); |
| #if defined(WIN32_PLATFORM_PSPC) | #if defined(GX_DLL) |
| scrnmng_enable(TRUE); | scrnmng_enable(TRUE); |
| #endif | #endif |
| scrndraw_redraw(); | scrndraw_redraw(); |
| Line 275 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 279 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| else { | else { |
| sysrunning &= ~SYSRUNNING_FORE; | sysrunning &= ~SYSRUNNING_FORE; |
| soundmng_disable(SNDPROC_MAIN); | soundmng_disable(SNDPROC_MAIN); |
| #if defined(WIN32_PLATFORM_PSPC) | #if defined(GX_DLL) |
| scrnmng_enable(FALSE); | scrnmng_enable(FALSE); |
| #endif | #endif |
| GXSuspend(); | GXSuspend(); |
| Line 304 static void processwait(UINT cnt) { | Line 308 static void processwait(UINT cnt) { |
| timing_setcount(0); | timing_setcount(0); |
| framereset(cnt); | framereset(cnt); |
| } | } |
| #if !defined(_WIN32_WCE) | |
| else { | else { |
| Sleep(1); | Sleep(1); |
| } | } |
| #endif | |
| } | } |
| Line 372 int WINAPI WinMain(HINSTANCE hInstance, | Line 378 int WINAPI WinMain(HINSTANCE hInstance, |
| TRACEINIT(); | TRACEINIT(); |
| inputmng_init(); | inputmng_init(); |
| keystat_reset(); | keystat_initialize(); |
| // if (!hPreInst) { | // if (!hPreInst) { |
| np2.style = CS_HREDRAW | CS_VREDRAW; | np2.style = CS_HREDRAW | CS_VREDRAW; |