# HG changeset patch
# User Ritor1
# Date 1399876070 -21600
# Node ID 14c05b8762180921c4e0d62298ec9ca64a617672
# Parent d6bba1e6249d8aaa0f0ea539aea2afa638d56d01
sqrt(float, double)
diff -r d6bba1e6249d -r 14c05b876218 Build/Visual Studio 2010/World of Might and Magic.vcxproj
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj Sat Apr 19 23:56:01 2014 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj Mon May 12 12:27:50 2014 +0600
@@ -198,6 +198,7 @@
+
@@ -208,6 +209,7 @@
true
+
@@ -244,6 +246,7 @@
+
@@ -268,6 +271,7 @@
+
@@ -451,6 +455,7 @@
+
@@ -481,6 +486,7 @@
+
@@ -500,6 +506,7 @@
+
diff -r d6bba1e6249d -r 14c05b876218 Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters Sat Apr 19 23:56:01 2014 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters Mon May 12 12:27:50 2014 +0600
@@ -527,6 +527,9 @@
+
+
+
@@ -631,6 +634,7 @@
lib\OpenAL\lib\x86
+
@@ -952,6 +956,9 @@
+
+
+
diff -r d6bba1e6249d -r 14c05b876218 Build/Visual Studio 2010/World of Might and Magic.vcxproj.user
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj.user Sat Apr 19 23:56:01 2014 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj.user Mon May 12 12:27:50 2014 +0600
@@ -1,9 +1,9 @@
п»ї
- $(OutDir)
+ ..\..\..\MM_VII
WindowsLocalDebugger
- -novideo, -nomarg
+ -nomarg
$(OutDir)$(TargetName)$(TargetExt)
\ No newline at end of file
diff -r d6bba1e6249d -r 14c05b876218 MMT.cpp
--- a/MMT.cpp Sat Apr 19 23:56:01 2014 +0600
+++ b/MMT.cpp Mon May 12 12:27:50 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 )
{
diff -r d6bba1e6249d -r 14c05b876218 MediaPlayer.cpp
--- a/MediaPlayer.cpp Sat Apr 19 23:56:01 2014 +0600
+++ b/MediaPlayer.cpp Mon May 12 12:27:50 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) */
diff -r d6bba1e6249d -r 14c05b876218 Spells.cpp
--- a/Spells.cpp Sat Apr 19 23:56:01 2014 +0600
+++ b/Spells.cpp Mon May 12 12:27:50 2014 +0600
@@ -401,7 +401,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;
@@ -413,7 +413,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);
}
diff -r d6bba1e6249d -r 14c05b876218 UI/UIPopup.cpp
--- a/UI/UIPopup.cpp Sat Apr 19 23:56:01 2014 +0600
+++ b/UI/UIPopup.cpp Mon May 12 12:27:50 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