changeset 2376:bcd7fadbf7d2

Слияние
author Ritor1
date Mon, 12 May 2014 12:28:06 +0600
parents 14c05b876218 (diff) bbf8a522dcec (current diff)
children 6eb63623cbe8
files Spells.cpp UI/UIPopup.cpp
diffstat 7 files changed, 33 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj	Mon May 12 01:55:23 2014 +0200
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj	Mon May 12 12:28:06 2014 +0600
@@ -198,6 +198,7 @@
     <ClCompile Include="..\..\ObjectList.cpp" />
     <ClCompile Include="..\..\OSAPI.cpp" />
     <ClCompile Include="..\..\OSWindow.cpp" />
+    <ClCompile Include="..\..\OurMath.cpp" />
     <ClCompile Include="..\..\Outdoor.cpp" />
     <ClCompile Include="..\..\Overlays.cpp" />
     <ClCompile Include="..\..\PaletteManager.cpp" />
@@ -208,6 +209,7 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\..\Random.cpp" />
+    <ClCompile Include="..\..\Registry.cpp" />
     <ClCompile Include="..\..\Render.cpp" />
     <ClCompile Include="..\..\SaveLoad.cpp" />
     <ClCompile Include="..\..\Spells.cpp" />
@@ -244,6 +246,7 @@
     <ClCompile Include="..\..\Viewport.cpp" />
     <ClCompile Include="..\..\Vis.cpp" />
     <ClCompile Include="..\..\Weather.cpp" />
+    <ClCompile Include="..\..\ZlibWrapper.cpp" />
     <ClCompile Include="..\..\_deleted.cpp" />
   </ItemGroup>
   <ItemGroup>
@@ -268,6 +271,7 @@
     <ClInclude Include="..\..\FrameTableInc.h" />
     <ClInclude Include="..\..\Game.h" />
     <ClInclude Include="..\..\GammaControl.h" />
+    <ClInclude Include="..\..\GUIButton.h" />
     <ClInclude Include="..\..\GUIFont.h" />
     <ClInclude Include="..\..\GUIProgressBar.h" />
     <ClInclude Include="..\..\GUIWindow.h" />
@@ -451,6 +455,7 @@
     <ClInclude Include="..\..\Player.h" />
     <ClInclude Include="..\..\PlayerFrameTable.h" />
     <ClInclude Include="..\..\Random.h" />
+    <ClInclude Include="..\..\Registry.h" />
     <ClInclude Include="..\..\Render.h" />
     <ClInclude Include="..\..\resource.h" />
     <ClInclude Include="..\..\SaveLoad.h" />
@@ -481,6 +486,7 @@
     <ClInclude Include="..\..\Viewport.h" />
     <ClInclude Include="..\..\Vis.h" />
     <ClInclude Include="..\..\Weather.h" />
+    <ClInclude Include="..\..\ZlibWrapper.h" />
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\lib\legacy_dx\d3dvec.inl" />
@@ -500,6 +506,7 @@
     </CustomBuild>
     <None Include="..\..\lib\swig\swigwin-2.0.11\UIControlModule.swig" />
     <None Include="..\..\Player.swig" />
+    <None Include="..\..\README.md" />
   </ItemGroup>
   <ItemGroup>
     <Library Include="..\..\lib\OpenAL\lib\OpenAL\OpenAL32.lib" />
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters	Mon May 12 01:55:23 2014 +0200
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters	Mon May 12 12:28:06 2014 +0600
@@ -527,6 +527,9 @@
     <ClInclude Include="..\..\MediaPlayer.h" />
     <ClInclude Include="..\..\stuff.h" />
     <ClInclude Include="..\..\OpenALSoundProvider.h" />
+    <ClInclude Include="..\..\ZlibWrapper.h" />
+    <ClInclude Include="..\..\GUIButton.h" />
+    <ClInclude Include="..\..\Registry.h" />
   </ItemGroup>
   <ItemGroup>
     <Filter Include="lib">
@@ -631,6 +634,7 @@
     <None Include="..\..\lib\OpenAL\lib\x86\swscale-2.def">
       <Filter>lib\OpenAL\lib\x86</Filter>
     </None>
+    <None Include="..\..\README.md" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\Actor.cpp" />
@@ -952,6 +956,9 @@
     </ClCompile>
     <ClCompile Include="..\..\MMT.cpp" />
     <ClCompile Include="..\..\MediaPlayer.cpp" />
+    <ClCompile Include="..\..\ZlibWrapper.cpp" />
+    <ClCompile Include="..\..\OurMath.cpp" />
+    <ClCompile Include="..\..\Registry.cpp" />
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\NewUI\Core\UIControlModule.swig">
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj.user	Mon May 12 01:55:23 2014 +0200
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj.user	Mon May 12 12:28:06 2014 +0600
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
+    <LocalDebuggerWorkingDirectory>..\..\..\MM_VII</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerCommandArguments>-novideo, -nomarg</LocalDebuggerCommandArguments>
+    <LocalDebuggerCommandArguments>-nomarg</LocalDebuggerCommandArguments>
     <LocalDebuggerCommand>$(OutDir)$(TargetName)$(TargetExt)</LocalDebuggerCommand>
   </PropertyGroup>
 </Project>
\ No newline at end of file
--- a/MMT.cpp	Mon May 12 01:55:23 2014 +0200
+++ b/MMT.cpp	Mon May 12 12:28:06 2014 +0600
@@ -44,7 +44,7 @@
   free(tex.pPixels);
   tex.pPixels = 0;
   MainMenuUI_LoadFontsAndSomeStuff();
-  DrawMMTCopyrightWindow();
+  DrawMMTCopyrightWindow();//   
 
   pRenderer->EndScene();
   pRenderer->Present();
@@ -187,10 +187,14 @@
 
   pIcons_LOD->_inlined_sub2();
 
+  //  
+  //WINDOW_MainMenu   GUIWindow.h
   pWindow_MMT_MainMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0);
+
+  // 
   //Texture* MMT_MM6      = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
 
-  sprintf(pContainerName, "data\\New_Icons/%s", "mm6_button_oval.png");
+  sprintf(pContainerName, "data\\New_Icons/%s", "mm6_button_oval.png");// png  
   Texture* MMT_MM6 = LoadPNG(pContainerName);
 								
   Texture* MMT_MM7      = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
@@ -206,9 +210,9 @@
 
   pTexture_PCX.Release();
 
-  sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");
+  sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");// pcx  
   pTexture_PCX.LoadPCXFile(pContainerName, 0);
-  SetCurrentMenuID(MENU_MMT_MAIN_MENU);
+  SetCurrentMenuID(MENU_MMT_MAIN_MENU);//  enum MENU_STATE  GUIWindows.h
   SetForegroundWindow(window->GetApiHandle());
   SendMessageW(window->GetApiHandle(), WM_ACTIVATEAPP, 1, 0);
   while (GetCurrentMenuID() == MENU_MMT_MAIN_MENU )
@@ -233,7 +237,7 @@
       pRenderer->BeginScene();
       pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
 
-      MMT_MenuMessageProc();
+      MMT_MenuMessageProc();//     
       GUI_UpdateWindows();
 
       if ( !pModalWindow )// ???
@@ -286,6 +290,8 @@
   GUI_UpdateWindows();
   pRenderer->EndScene();
   pRenderer->Present();
+
+  // 
   pTexture_PCX.Release();
   if ( pGUIWindow2 )
   {
--- a/MediaPlayer.cpp	Mon May 12 01:55:23 2014 +0200
+++ b/MediaPlayer.cpp	Mon May 12 12:28:06 2014 +0600
@@ -489,9 +489,9 @@
 	  // ,          
       sample_rate_half = (sample_rate + 1) / 2;	                    //22050
       if (dec_ctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT)
-         root = 2.0 / (sqrt(frame_len) * 32768.0);
+         root = 2.0 / (sqrt(float(frame_len)) * 32768.0);
       else
-         root = frame_len / (sqrt(frame_len) * 32768.0);
+         root = frame_len / (sqrt(float(frame_len)) * 32768.0);
       for (i = 0; i < 96; i++) 
 	  {
          /* constant is result of 0.066399999/log10(M_E) */
--- a/Spells.cpp	Mon May 12 01:55:23 2014 +0200
+++ b/Spells.cpp	Mon May 12 12:28:06 2014 +0600
@@ -399,7 +399,7 @@
     v11 = pParty->vPosition.y - fromy;
     v12 = (pParty->vPosition.z + pParty->sEyelevel) - fromz;
   }
-  v13 = sqrt(v10 * v10 + v11 * v11 + v12 * v12);
+  v13 = sqrt(long double(v10 * v10 + v11 * v11 + v12 * v12));
   if ( v13 <= 1.0 )
   {
     v55 = 1;
@@ -411,7 +411,7 @@
     v55 = (int)v13;
     ySquared = v11 * v11;
     xSquared = v10 * v10;
-    v14 = (int)sqrt(xSquared + ySquared);
+    v14 = (int)sqrt(long double(xSquared + ySquared));
     yaw = stru_5C6E00->Atan2((int)v10, (int)v11);
     pitch = stru_5C6E00->Atan2(v14, (int)v12);
   }
--- a/UI/UIPopup.cpp	Mon May 12 01:55:23 2014 +0200
+++ b/UI/UIPopup.cpp	Mon May 12 12:28:06 2014 +0600
@@ -2032,4 +2032,6 @@
     return Color16(255, 255, 155);
   if ( a1 < 100 )
     return Color16(192, 192, 240);
+  else
+    __debugbreak();
 }
\ No newline at end of file