changeset 748:daecb0225226

Menu completed
author Nomad
date Fri, 22 Mar 2013 22:36:26 +0200
parents 585490c29945
children f39fbeb65b28
files mm7_2.cpp
diffstat 1 files changed, 140 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_2.cpp	Fri Mar 22 21:50:41 2013 +0200
+++ b/mm7_2.cpp	Fri Mar 22 22:36:26 2013 +0200
@@ -9446,11 +9446,11 @@
   uint uWinCenteredPosY = (uDesktopHeight - uTotalWinHeight) / 2;
 
   uWindowX = ReadWindowsRegistryInt("window X", uWinCenteredPosX);
-  uWindowX = 0;
+  uWindowX = uDesktopWidth / 2 - 640 / 2;
   WriteWindowsRegistryInt("window X", uWindowX);
 
   uWindowY = ReadWindowsRegistryInt("window Y", uWinCenteredPosY);
-  uWindowY = 0;
+  uWindowY = uDesktopHeight / 2 - 480 / 2;
   WriteWindowsRegistryInt("window Y", uWindowY);
 
   hWnd = CreateWindowExW(0, wcxw.lpszClassName, L"Might and MagicŪ VII",
@@ -9464,7 +9464,144 @@
   SetWindowTextW(hWnd, L"Might and MagicŪ VII");
 
   HMENU menu = CreateMenu();
-  AppendMenuW(menu, MF_ENABLED | MF_STRING, 0x101, L"Open level...");
+  {
+    HMENU file = CreatePopupMenu();
+    AppendMenuW(menu, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)file, L"&File");
+    {
+      AppendMenuW(file, MF_ENABLED | MF_STRING, 40001, L"Exit");
+    }
+
+    HMENU debug = CreatePopupMenu();
+    AppendMenuW(menu, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug, L"&Debug");
+    {
+      HMENU debug_party = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_party, L"&Party");
+      {
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40007, L"Give Gold (10 000)");
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40008, L"Give Exp (20 000)");
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40059, L"Give Skills (50 each)");
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40013, L"Remove Gold");
+
+        HMENU debug_party_setconditions = CreatePopupMenu();
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_party_setconditions, L"Set Condition");
+        {
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40044, L"Afraid");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40043, L"Asleep");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40037, L"Curse");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40036, L"Disease1");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40035, L"Disease2");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40034, L"Disease3");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40041, L"Dead");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40039, L"Drunk");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40042, L"Eradicated");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40038, L"Insane");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40045, L"Paralyzed");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40033, L"Poison1");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40032, L"Poison2");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40031, L"Poison3");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40029, L"&Stone");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40040, L"Unconscious");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40030, L"Weak");
+          AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40073, L"Zombie");
+        }
+
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40006, L"Set Food (20)");
+
+        HMENU debug_party_alignment = CreatePopupMenu();
+        AppendMenuW(debug_party, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_party_alignment, L"Alignment");
+        {
+          AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING, 40062, L"Good");
+          AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING | MF_CHECKED, 40063, L"Neutral");
+          AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING, 40064, L"Evil");
+        }
+      }
+
+      HMENU debug_time = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_time, L"&Time");
+      {
+        AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40009, L"Add 1 Day");
+        AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40010, L"Add 1 Week");
+        AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40011, L"Add 1 Month");
+        AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40012, L"Add 1 Year");
+      }
+
+      HMENU debug_items = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_items, L"&Items");
+      {
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40015, L"Generate level &1 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40016, L"Generate level &2 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40017, L"Generate level &3 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40018, L"Generate level &4 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40019, L"Generate level &5 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40020, L"Generate level &6 item");
+        AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40061, L"Generate special item");
+      }
+
+      HMENU debug_graphics = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_graphics, L"&Graphics");
+      {
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40023, L"Lighting Mode");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40024, L"Lighting Geometry");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40104, L"Lights Off");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40105, L"Colored Lights");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40025, L"Debug Lights");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40101, L"Debug Decals");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40027, L"HWID Portals");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40047, L"SWID Portals");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40051, L"OD Frustum");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40054, L"SWOD Constant Redraw");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40055, L"SWOD Lit Rasterizer");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40056, L"Party Light off");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40060, L"SWOD Nice Lighting off");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40067, L"HWOD Additive Fog Lights");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40072, L"HWID Nice Lighting");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40048, L"Wireframe");
+        AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING, 40049, L"Fog");
+      }
+
+      HMENU debug_misc = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_misc, L"&Misc");
+      {
+        AppendMenuW(debug_misc, MF_ENABLED | MF_STRING, 40066, L"Object Viewcone Culling");
+        AppendMenuW(debug_misc, MF_ENABLED | MF_STRING, 40068, L"Red Tint");
+        AppendMenuW(debug_misc, MF_ENABLED | MF_STRING, 40071, L"Display Secrets");
+        AppendMenuW(debug_misc, MF_ENABLED | MF_STRING, 40102, L"Massive Bloodsplat");
+        AppendMenuW(debug_misc, MF_ENABLED | MF_STRING, 40103, L"Underwater Gravity");
+      }
+      
+      HMENU debug_eax = CreatePopupMenu();
+      AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_eax, L"EAX Environs");
+      {
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40074, L"NONE");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40075, L"GENERIC");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40076, L"PADDEDCELL");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40077, L"ROOM");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40078, L"BATHROOM");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40079, L"LIVINGROOM");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40080, L"STONEROOM");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40081, L"AUDITORIUM");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40082, L"CONCERTHALL");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40083, L"CAVE");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40084, L"ARENA");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40085, L"HANGAR");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40086, L"CARPETEDHALLWAY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40087, L"HALLWAY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40088, L"STONECORRIDOR");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40089, L"ALLEY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40090, L"FOREST");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40091, L"CITY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40092, L"MOUNTAINS");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40093, L"QUARRY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40094, L"PLAIN");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40095, L"PARKINGLOT");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40096, L"SEWERPIPE");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40097, L"UNDERWATER");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40098, L"DRUGGED");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40099, L"DIZZY");
+        AppendMenuW(debug_eax, MF_ENABLED | MF_STRING, 40100, L"PSICHOTIC");
+      }
+    }
+  }
   SetMenu(hWnd, menu);
   
   SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);