Mercurial > mm7
changeset 2560:44d9df75dc13
Слияние
author | Ritor1 |
---|---|
date | Thu, 14 May 2015 19:16:21 +0600 |
parents | 6ab1273bc507 (current diff) 91c75d202d30 (diff) |
children | 98057834c9a0 |
files | Engine/Graphics/Render.cpp |
diffstat | 5 files changed, 58 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/Engine/Engine.cpp Thu May 14 19:16:08 2015 +0600 +++ b/Engine/Engine.cpp Thu May 14 19:16:21 2015 +0600 @@ -2094,8 +2094,6 @@ //----- (00464479) -------------------------------------------------------- void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows() { - int v0; // esi@9 - if (pMouse) pMouse->SetCursorBitmap("MICON1"); @@ -2113,13 +2111,15 @@ pSoundList->_4A9D79(0); uCurrentlyLoadedLevelType = LEVEL_null; pSpriteFrameTable->ResetSomeSpriteFlags(); - v0 = uNumVisibleWindows; pParty->armageddon_timer = 0; - while (v0 > 0) + + while (uNumVisibleWindows > 0) { - pWindowList[pVisibleWindowsIdxs[v0--] - 1]->Release(); - delete pWindowList[pVisibleWindowsIdxs[v0--] - 1]; - pWindowList[pVisibleWindowsIdxs[v0--] - 1] = nullptr; + pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]->Release(); + delete pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]; + pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1] = nullptr; + + uNumVisibleWindows--; } }
--- a/Engine/Graphics/Render.cpp Thu May 14 19:16:08 2015 +0600 +++ b/Engine/Graphics/Render.cpp Thu May 14 19:16:21 2015 +0600 @@ -1250,28 +1250,49 @@ } } - for (int i = 0; i < 4; i++) - { - delete[] this->pAvailableDevices[i].pDriverName; - this->pAvailableDevices[i].pDriverName = nullptr; - - delete[] this->pAvailableDevices[i].pDeviceDesc; - this->pAvailableDevices[i].pDeviceDesc = nullptr; - - delete[] this->pAvailableDevices[i].pDDraw4DevDesc; - this->pAvailableDevices[i].pDDraw4DevDesc = nullptr; - - delete this->pAvailableDevices[i].pDirectDrawGUID; - this->pAvailableDevices[i].pDirectDrawGUID = nullptr; - - delete[] this->pAvailableDevices[i].pName; - this->pAvailableDevices[i].pName = nullptr; - - delete[] this->pAvailableDevices[i].pDescription; - this->pAvailableDevices[i].pDescription = nullptr; - - delete this->pAvailableDevices[i].pGUID; - this->pAvailableDevices[i].pGUID = nullptr; + for (int i = 0; i < 4; i++) + { + if (this->pAvailableDevices[i].pDriverName) + { + delete[] this->pAvailableDevices[i].pDriverName; + this->pAvailableDevices[i].pDriverName = nullptr; + } + + if (this->pAvailableDevices[i].pDeviceDesc) + { + delete[] this->pAvailableDevices[i].pDeviceDesc; + this->pAvailableDevices[i].pDeviceDesc = nullptr; + } + + if (this->pAvailableDevices[i].pDDraw4DevDesc) + { + delete[] this->pAvailableDevices[i].pDDraw4DevDesc; + this->pAvailableDevices[i].pDDraw4DevDesc = nullptr; + } + + if (this->pAvailableDevices[i].pDirectDrawGUID) + { + delete this->pAvailableDevices[i].pDirectDrawGUID; + this->pAvailableDevices[i].pDirectDrawGUID = nullptr; + } + + if (this->pAvailableDevices[i].pName) + { + delete[] this->pAvailableDevices[i].pName; + this->pAvailableDevices[i].pName = nullptr; + } + + if (this->pAvailableDevices[i].pDescription) + { + delete[] this->pAvailableDevices[i].pDescription; + this->pAvailableDevices[i].pDescription = nullptr; + } + + if (this->pAvailableDevices[i].pGUID) + { + delete this->pAvailableDevices[i].pGUID; + this->pAvailableDevices[i].pGUID = nullptr; + } } delete[] this->pAvailableDevices;
--- a/Engine/Graphics/RenderStruct.h Thu May 14 19:16:08 2015 +0600 +++ b/Engine/Graphics/RenderStruct.h Thu May 14 19:16:21 2015 +0600 @@ -105,6 +105,12 @@ #pragma pack(push, 1) struct RenderD3D__DevInfo { + inline RenderD3D__DevInfo(): + bIsDeviceCompatible(false), pName(nullptr), pDescription(nullptr), + pGUID(nullptr), uCaps(0), pDriverName(nullptr), pDeviceDesc(nullptr), + pDDraw4DevDesc(nullptr), pDirectDrawGUID(nullptr), uVideoMem(0) + {} + unsigned int bIsDeviceCompatible; char *pName; char *pDescription;
--- a/Engine/Objects/Player.cpp Thu May 14 19:16:08 2015 +0600 +++ b/Engine/Objects/Player.cpp Thu May 14 19:16:21 2015 +0600 @@ -8118,7 +8118,7 @@ v34 = 5; player->PlaySound(SPEECH_50, 0); } - if (shotting_laser) + else if (shotting_laser) v34 = 7; else {
--- a/GUI/UI/UIPopup.cpp Thu May 14 19:16:08 2015 +0600 +++ b/GUI/UI/UIPopup.cpp Thu May 14 19:16:21 2015 +0600 @@ -55,7 +55,7 @@ popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, Title); popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); - popup_window.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, content, 0, 0, 0); + popup_window.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, content, 0, popup_window.uFrameY + popup_window.uFrameHeight, 0); } //----- (004151D9) --------------------------------------------------------