--- np2/win9xc/np2.cpp 2003/10/18 10:00:29 1.2 +++ np2/win9xc/np2.cpp 2003/10/26 08:59:53 1.6 @@ -1,8 +1,9 @@ #include "compiler.h" #include #include -#include "resource.h" #include "strres.h" +#include "parts.h" +#include "resource.h" #include "np2.h" #include "np2arg.h" #include "dosio.h" @@ -754,9 +755,7 @@ int WINAPI WinMain(HINSTANCE hInstance, np2arg_analize(lpszCmdLine); // タイミング修正 // ver0.29 initload(); - srand((unsigned)time(NULL)); - -// np2arg_analize(lpszCmdLine); + rand_setseed((unsigned)time(NULL)); if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { ShowWindow(hwndorg, SW_RESTORE); @@ -930,21 +929,29 @@ int WINAPI WinMain(HINSTANCE hInstance, } else { // auto skip if (!waitcnt) { + UINT cnt; joy_flash(); mouse_callback(); pccore_exec(framecnt == 0); framecnt++; - if (timing_getcount() < framecnt) { + cnt = timing_getcount(); + if (framecnt > cnt) { waitcnt = framecnt; if (framemax > 1) { framemax--; } } else if (framecnt >= framemax) { - waitcnt = framecnt; if (framemax < 12) { framemax++; } + if (cnt >= 12) { + timing_reset(); + } + else { + timing_setcount(cnt - framecnt); + } + processwait(0); } } else {