Diff for /np2/win9x/np2.cpp between versions 1.24 and 1.29

version 1.24, 2003/11/04 15:44:59 version 1.29, 2003/11/14 07:37:29
Line 151  static void changescreen(BYTE newmode) { Line 151  static void changescreen(BYTE newmode) {
                 }                  }
                 else if (renewal & SCRNMODE_ROTATEMASK) {                  else if (renewal & SCRNMODE_ROTATEMASK) {
                         wlex = np2_winlocexallwin(hWndMain);                          wlex = np2_winlocexallwin(hWndMain);
                           winlocex_setholdwnd(wlex, hWndMain);
                 }                  }
                 soundmng_stop();                  soundmng_stop();
                 mousemng_disable(MOUSEPROC_WINUI);                  mousemng_disable(MOUSEPROC_WINUI);
Line 300  static int flagload(const char *ext, con Line 301  static int flagload(const char *ext, con
   
 // ---- proc  // ---- proc
   
   static void np2popup(HWND hWnd, LPARAM lp) {
   
           HMENU   mainmenu;
           HMENU   hMenu;
           POINT   pt;
   
           mainmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU);
           if (mainmenu == NULL) {
                   return;
           }
           hMenu = CreatePopupMenu();
           menu_addmenubar(hMenu, mainmenu);
           pt.x = LOWORD(lp);
           pt.y = HIWORD(lp);
           ClientToScreen(hWnd, &pt);
           TrackPopupMenu(hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWnd, NULL);
           DestroyMenu(hMenu);
   }
   
 LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {  LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
   
         PAINTSTRUCT     ps;          PAINTSTRUCT     ps;
Line 665  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 685  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                         break;                                          break;
   
                                 case IDM_NOSOUND:                                  case IDM_NOSOUND:
                                         xmenu_setsound(0);                                          xmenu_setsound(0x00);
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
                                         break;                                          break;
   
                                 case IDM_PC9801_14:                                  case IDM_PC9801_14:
                                         xmenu_setsound(1);                                          xmenu_setsound(0x01);
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
                                         break;                                          break;
   
                                 case IDM_PC9801_26K:                                  case IDM_PC9801_26K:
                                         {                                          xmenu_setsound(0x02);
                                                 BYTE    sw;                                          update |= SYS_UPDATECFG;
                                                 sw = np2cfg.SOUND_SW;  
                                                 if (sw & 4) {  
                                                         sw &= 6;  
                                                         sw ^= 2;  
                                                 }  
                                                 else {  
                                                         sw = 2;  
                                                 }  
                                                 xmenu_setsound(sw);  
                                                 update |= SYS_UPDATECFG;  
                                         }  
                                         break;                                          break;
   
                                 case IDM_PC9801_86:                                  case IDM_PC9801_86:
                                         {                                          xmenu_setsound(0x04);
                                                 BYTE    sw;                                          update |= SYS_UPDATECFG;
                                                 sw = np2cfg.SOUND_SW;  
                                                 if (sw & 2) {  
                                                         sw &= 6;  
                                                         sw ^= 4;  
                                                 }  
                                                 else if (!(sw & 4)) {  
                                                         sw = 4;  
                                                 }  
                                                 xmenu_setsound(sw);  
                                                 update |= SYS_UPDATECFG;  
                                         }  
                                         break;                                          break;
   
                                 case IDM_PC9801_118:                                  case IDM_PC9801_26_86:
                                         xmenu_setsound(8);                                          xmenu_setsound(0x06);
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
                                         break;                                          break;
   
                                 case IDM_CHIBIOTO:                                  case IDM_PC9801_86_CB:
                                         {                                          xmenu_setsound(0x14);
                                                 BYTE    sw;                                          update |= SYS_UPDATECFG;
                                                 sw = np2cfg.SOUND_SW;                                          break;
                                                 if (sw & 4) {  
                                                         sw &= 0x14;                                  case IDM_PC9801_118:
                                                         sw ^= 0x10;                                          xmenu_setsound(8);
                                                 }                                          update |= SYS_UPDATECFG;
                                                 else {  
                                                         sw = 0x14;  
                                                 }  
                                                 xmenu_setsound(sw);  
                                                 update |= SYS_UPDATECFG;  
                                         }  
                                         break;                                          break;
   
                                 case IDM_SPEAKBOARD:                                  case IDM_SPEAKBOARD:
Line 1085  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1077  LRESULT CALLBACK WndProc(HWND hWnd, UINT
   
                 case WM_RBUTTONDOWN:                  case WM_RBUTTONDOWN:
                         if (!mousemng_buttonevent(MOUSEMNG_RIGHTDOWN)) {                          if (!mousemng_buttonevent(MOUSEMNG_RIGHTDOWN)) {
                                 if (scrnmng_isfullscreen()) {                                  if (!scrnmng_isfullscreen()) {
                                         POINT   p;                                          np2popup(hWnd, lParam);
                                   }
                                   else {
                                           POINT p;
                                         if ((GetCursorPos(&p)) && (p.y >= 466) &&                                          if ((GetCursorPos(&p)) && (p.y >= 466) &&
                                                                                                 (np2oscfg.clk_x)) {                                                                                                  (np2oscfg.clk_x)) {
                                                 np2oscfg.clk_fnt++;                                                  np2oscfg.clk_fnt++;
Line 1111  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1106  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                         np2oscfg.wintype = 0;                                          np2oscfg.wintype = 0;
                                 }                                  }
                                 wlex = np2_winlocexallwin(hWnd);                                  wlex = np2_winlocexallwin(hWnd);
                                   winlocex_setholdwnd(wlex, hWnd);
                                 np2class_windowtype(hWnd, np2oscfg.wintype);                                  np2class_windowtype(hWnd, np2oscfg.wintype);
                                 winlocex_move(wlex);                                  winlocex_move(wlex);
                                 winlocex_destroy(wlex);                                  winlocex_destroy(wlex);
Line 1203  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1199  LRESULT CALLBACK WndProc(HWND hWnd, UINT
 }  }
   
   
   static void framereset(UINT cnt) {
   
           framecnt = 0;
           scrnmng_dispclock();
           keydisp_draw((BYTE)cnt);
           toolwin_draw((BYTE)cnt);
           viewer_allreload(FALSE);
           if (np2oscfg.DISPCLK & 3) {
                   if (sysmng_workclockrenewal()) {
                           sysmng_updatecaption(3);
                   }
           }
   }
   
 static void processwait(UINT cnt) {  static void processwait(UINT cnt) {
   
         if (timing_getcount() >= cnt) {          if (timing_getcount() >= cnt) {
                 timing_setcount(0);                  timing_setcount(0);
                 framecnt = 0;                  framereset(cnt);
                 scrnmng_dispclock();  
                 keydisp_draw((BYTE)cnt);  
                 toolwin_draw((BYTE)cnt);  
                 viewer_allreload(FALSE);  
                 if (np2oscfg.DISPCLK & 3) {  
                         if (sysmng_workclockrenewal()) {  
                                 sysmng_updatecaption(3);  
                         }  
                 }  
         }          }
         else {          else {
                 Sleep(1);                  Sleep(1);
Line 1235  int WINAPI WinMain(HINSTANCE hInstance,  Line 1236  int WINAPI WinMain(HINSTANCE hInstance, 
         UINT32          tick;          UINT32          tick;
 #endif  #endif
   
           _MEM_INIT();
   
         GetModuleFileName(NULL, modulefile, sizeof(modulefile));          GetModuleFileName(NULL, modulefile, sizeof(modulefile));
         dosio_init();          dosio_init();
         file_setcd(modulefile);          file_setcd(modulefile);
Line 1395  int WINAPI WinMain(HINSTANCE hInstance,  Line 1398  int WINAPI WinMain(HINSTANCE hInstance, 
         if (np2oscfg.MOUSE_SW) {                                                                                // ver0.30          if (np2oscfg.MOUSE_SW) {                                                                                // ver0.30
                 mousemng_enable(MOUSEPROC_SYSTEM);                  mousemng_enable(MOUSEPROC_SYSTEM);
         }          }
   //      mousemng_enable(MOUSEPROC_WINUI);
   //      mousemng_enable(MOUSEPROC_BG);
   
         commng_initialize();          commng_initialize();
         sysmng_initialize();          sysmng_initialize();
Line 1524  int WINAPI WinMain(HINSTANCE hInstance,  Line 1529  int WINAPI WinMain(HINSTANCE hInstance, 
                                                         else {                                                          else {
                                                                 timing_setcount(cnt - framecnt);                                                                  timing_setcount(cnt - framecnt);
                                                         }                                                          }
                                                         processwait(0);                                                          framereset(0);
                                                 }                                                  }
                                         }                                          }
                                         else {                                          else {
Line 1578  int WINAPI WinMain(HINSTANCE hInstance,  Line 1583  int WINAPI WinMain(HINSTANCE hInstance, 
         }          }
   
         TRACETERM();          TRACETERM();
           _MEM_USED("report.txt");
         dosio_term();          dosio_term();
   
         viewer_term();                                                                                          // ver0.30          viewer_term();                                                                                          // ver0.30

Removed from v.1.24  
changed lines
  Added in v.1.29


RetroPC.NET-CVS <cvs@retropc.net>