diff mm7_2.cpp @ 922:d4ca429eecd4

Some debug functions implemented.
author Nomad
date Wed, 01 May 2013 11:39:41 +0200
parents 34ed2d5e7cfb
children 851697c5c2f2
line wrap: on
line diff
--- a/mm7_2.cpp	Tue Apr 30 20:08:42 2013 +0600
+++ b/mm7_2.cpp	Wed May 01 11:39:41 2013 +0200
@@ -6825,8 +6825,52 @@
         GUI_HandleHotkey(wParam);
     }
     return DefWindowProcA(hWnd, Msg, wParam, lParam);
+
+    case WM_COMMAND:
+    {
+      switch (wParam)
+      {
+        case 101:
+        case 40001:
+        {
+          v38 = 0;
+          v37 = 0;
+          v36 = 2;
+          v35 = ::hWnd;
+          SendMessageA(::hWnd, WM_DESTROY, v37, v38);
+        }
+        return 0;
+
+        case 103:
+          pRenderer->SavePCXScreenshot();
+        return 0;
+
+        case 104:
+          pRenderer->ChangeBetweenWinFullscreenModes();
+          if ( pArcomageGame->bGameInProgress )
+            pArcomageGame->field_F6 = 1;
+        return 0;
+
+        case 40007:
+          pParty->SetGold(pParty->uNumGold + 10000);
+        return 0;
+
+        case 40008:
+          GivePartyExp(20000);
+        return 0;
+
+        case 40013:
+          pParty->SetGold(0);
+        return 0;
+
+        case 40059:
+          for (uint i = 0; i < 4; ++i)
+            pParty->pPlayers[i].uSkillPoints = 50;
+        return 0;
+      }
+    }
+    return DefWindowProcA(hWnd, Msg, wParam, lParam);
   };
-  
 
   if ( Msg > WM_SYSCOMMAND )
   {
@@ -7067,33 +7111,7 @@
         //goto _def_wnd_proc;
         return DefWindowProcA(hWnd, Msg, wParam, lParam);
       }
-      if ( Msg != WM_COMMAND )
-        //goto _def_wnd_proc;
         return DefWindowProcA(hWnd, Msg, wParam, lParam);
-      if ( wParam != 101 )
-      {
-        if ( wParam == 103 )
-        {
-          pRenderer->SavePCXScreenshot();
-          return 0;
-        }
-        if ( wParam == 104 )
-        {
-          pRenderer->ChangeBetweenWinFullscreenModes();
-          if ( pArcomageGame->bGameInProgress )
-            pArcomageGame->field_F6 = 1;
-          return 0;
-        }
-        if ( wParam != 40001 )
-          return DefWindowProcA(hWnd, Msg, wParam, lParam);
-      }
-      v38 = 0;
-      v37 = 0;
-      v36 = 2;
-      v35 = ::hWnd;
-//LABEL_104:
-      SendMessageA(::hWnd, WM_DESTROY, v37, v38);
-      return 0;
     }
     if ( dword_506E68 != -1 )
     {