| version 1.1.1.1, 2003/10/16 17:59:18 | version 1.7, 2003/10/27 15:06:31 | 
| Line 1 | Line 1 | 
 | #include        "compiler.h" | #include        "compiler.h" | 
 | #include        <time.h> | #include        <time.h> | 
 | #include        <winnls32.h> | #include        <winnls32.h> | 
 | #include        "resource.h" |  | 
 | #include        "strres.h" | #include        "strres.h" | 
 |  | #include        "parts.h" | 
 |  | #include        "resource.h" | 
 | #include        "np2.h" | #include        "np2.h" | 
 | #include        "np2arg.h" | #include        "np2arg.h" | 
 | #include        "dosio.h" | #include        "dosio.h" | 
| Line 51  static const char szClassName[] = "NP2-M | Line 52  static const char szClassName[] = "NP2-M | 
 |  |  | 
 |  |  | 
 | NP2OSCFG        np2oscfg = { | NP2OSCFG        np2oscfg = { | 
| CW_USEDEFAULT, CW_USEDEFAULT, 1, 1, 0, 2, | CW_USEDEFAULT, CW_USEDEFAULT, 0, 2, | 
 | KEY_UNKNOWN, 0, | KEY_UNKNOWN, 0, | 
 | 0, 0, 0, {1, 2, 2, 1}, | 0, 0, 0, {1, 2, 2, 1}, | 
 | 0}; | 0}; | 
| Line 565  LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 566  LRESULT CALLBACK WndProc(HWND hWnd, UINT | 
 | HBITMAP             hbmp; | HBITMAP             hbmp; | 
 | BITMAP              bmp; | BITMAP              bmp; | 
 | HINSTANCE   hinst; | HINSTANCE   hinst; | 
| int                     sx = 640 + np2oscfg.paddingx; | int                     sx = 640; | 
| int                     sy = 400 + np2oscfg.paddingy; | int                     sy = 400; | 
 |  |  | 
 | hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); | hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); | 
 | #if 1 | #if 1 | 
| Line 734  static void processwait(UINT waitcnt) { | Line 735  static void processwait(UINT waitcnt) { | 
 | else { | else { | 
 | Sleep(1); | Sleep(1); | 
 | } | } | 
 |  | sysmng_updatecaption(); | 
 | } | } | 
 |  |  | 
 |  |  | 
| Line 754  int WINAPI WinMain(HINSTANCE hInstance, | Line 756  int WINAPI WinMain(HINSTANCE hInstance, | 
 | np2arg_analize(lpszCmdLine);                            // タイミング修正       // ver0.29 | np2arg_analize(lpszCmdLine);                            // タイミング修正       // ver0.29 | 
 | initload(); | initload(); | 
 |  |  | 
| srand((unsigned)time(NULL)); | rand_setseed((unsigned)time(NULL)); | 
|  |  | 
| //      np2arg_analize(lpszCmdLine); |  | 
 |  |  | 
 | if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { | if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { | 
 | ShowWindow(hwndorg, SW_RESTORE); | ShowWindow(hwndorg, SW_RESTORE); | 
| Line 930  int WINAPI WinMain(HINSTANCE hInstance, | Line 930  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); | 
 | 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 { |