|
|
| version 1.5, 2003/10/21 11:22:05 | version 1.11, 2003/10/26 08:59:53 |
|---|---|
| Line 5 | Line 5 |
| #endif | #endif |
| #include "resource.h" | #include "resource.h" |
| #include "strres.h" | #include "strres.h" |
| #include "parts.h" | |
| #include "np2.h" | #include "np2.h" |
| #include "np2arg.h" | #include "np2arg.h" |
| #include "cputype.h" | |
| #include "dosio.h" | #include "dosio.h" |
| #include "extromio.h" | #include "extromio.h" |
| #include "commng.h" | #include "commng.h" |
| Line 55 static char szClassName[] = "NP2-MainWi | Line 57 static char szClassName[] = "NP2-MainWi |
| HWND hWndMain; | HWND hWndMain; |
| HINSTANCE hInst; | HINSTANCE hInst; |
| HINSTANCE hPrev; | HINSTANCE hPrev; |
| int mmxflag; | |
| NP2OSCFG np2oscfg = { | NP2OSCFG np2oscfg = { |
| "Neko Project II", "NP2", | "Neko Project II", "NP2", |
| Line 66 static char szClassName[] = "NP2-MainWi | Line 69 static char szClassName[] = "NP2-MainWi |
| {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 | {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 |
| {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 | {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 |
| 0xffffff, 0xffbf6a, 0, 0, | 0xffffff, 0xffbf6a, 0, 0, |
| 0, 1, 0, 9801, 0, 0, 0, 0}; // ver0.34 | 0, 1, 0, 9801, 0, 0, 0, 0, 0}; // ver0.38 |
| char fddfolder[MAX_PATH]; | char fddfolder[MAX_PATH]; |
| char hddfolder[MAX_PATH]; | char hddfolder[MAX_PATH]; |
| Line 217 static int flagsave(const char *ext) { | Line 220 static int flagsave(const char *ext) { |
| return(ret); | return(ret); |
| } | } |
| static void flagdelete(const char *ext) { | |
| char path[MAX_PATH]; | |
| getstatfilename(path, ext, sizeof(path)); | |
| file_delete(path); | |
| } | |
| static int flagload(const char *ext, const char *title, BOOL force) { | static int flagload(const char *ext, const char *title, BOOL force) { |
| int ret; | int ret; |
| Line 810 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 821 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| if (LOWORD(wParam) != WA_INACTIVE) { | if (LOWORD(wParam) != WA_INACTIVE) { |
| np2break &= ~NP2BREAK_MAIN; | np2break &= ~NP2BREAK_MAIN; |
| scrnmng_update(); | scrnmng_update(); |
| keystat_allrelease(); | |
| mouse_running(MOUSE_CONT_M); | mouse_running(MOUSE_CONT_M); |
| } | } |
| else { | else { |
| Line 1071 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 1083 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| } | } |
| static void processwait(WORD cnt) { | static void processwait(UINT cnt) { |
| if (timing_getcount() >= cnt) { | if (timing_getcount() >= cnt) { |
| timing_setcount(0); | timing_setcount(0); |
| Line 1105 int WINAPI WinMain(HINSTANCE hInstance, | Line 1117 int WINAPI WinMain(HINSTANCE hInstance, |
| GetModuleFileName(NULL, modulefile, sizeof(modulefile)); | GetModuleFileName(NULL, modulefile, sizeof(modulefile)); |
| dosio_init(); | dosio_init(); |
| file_setcd(modulefile); | file_setcd(modulefile); |
| np2arg_analize(lpszCmdLine); // タイミング修正 // ver0.29 | np2arg_analize(lpszCmdLine); |
| initload(); | initload(); |
| srand((unsigned)time(NULL)); | rand_setseed((unsigned)time(NULL)); |
| np2arg_analize(lpszCmdLine); | |
| CopyMemory(szClassName, np2oscfg.winid, 3); | CopyMemory(szClassName, np2oscfg.winid, 3); |
| Line 1124 int WINAPI WinMain(HINSTANCE hInstance, | Line 1134 int WINAPI WinMain(HINSTANCE hInstance, |
| hInst = hInstance; | hInst = hInstance; |
| hPrev = hPreInst; | hPrev = hPreInst; |
| mmxflag = (havemmx())?0:MMXFLAG_NOTSUPPORT; | |
| mmxflag += (np2oscfg.disablemmx)?MMXFLAG_DISABLE:0; | |
| TRACEINIT(); | TRACEINIT(); |
| if (np2oscfg.KEYBOARD >= KEY_TYPEMAX) { // ver0.28 | if (np2oscfg.KEYBOARD >= KEY_TYPEMAX) { // ver0.28 |
| Line 1369 int WINAPI WinMain(HINSTANCE hInstance, | Line 1381 int WINAPI WinMain(HINSTANCE hInstance, |
| } | } |
| else { // auto skip | else { // auto skip |
| if (!waitcnt) { | if (!waitcnt) { |
| UINT cnt; | |
| joy_flash(); | joy_flash(); |
| mouse_callback(); | mouse_callback(); |
| pccore_exec(framecnt == 0); | pccore_exec(framecnt == 0); |
| dclock_callback(); | dclock_callback(); |
| framecnt++; | framecnt++; |
| if (timing_getcount() < framecnt) { | cnt = timing_getcount(); |
| if (framecnt > cnt) { | |
| waitcnt = framecnt; | waitcnt = framecnt; |
| if (framemax > 1) { | if (framemax > 1) { |
| framemax--; | framemax--; |
| } | } |
| } | } |
| else if (framecnt >= framemax) { | else if (framecnt >= framemax) { |
| waitcnt = framecnt; | |
| if (framemax < 12) { | if (framemax < 12) { |
| framemax++; | framemax++; |
| } | } |
| if (cnt >= 12) { | |
| timing_reset(); | |
| } | |
| else { | |
| timing_setcount(cnt - framecnt); | |
| } | |
| processwait(0); | |
| } | } |
| } | } |
| else { | else { |
| Line 1413 int WINAPI WinMain(HINSTANCE hInstance, | Line 1433 int WINAPI WinMain(HINSTANCE hInstance, |
| flagsave(np2resume); | flagsave(np2resume); |
| } | } |
| else { | else { |
| // DeleteFile(file_getcd(np2resume)); | flagdelete(np2resume); |
| } | } |
| #ifdef USE_ROMEO | #ifdef USE_ROMEO |