Mercurial > mm7
changeset 2470:94cf712fc780
for_refactoring
author | Ritor1 |
---|---|
date | Mon, 18 Aug 2014 18:28:53 +0600 |
parents | 8516bb27d7f0 |
children | b61ebbb46ace |
files | Game.cpp MMT.cpp MMT.h RenderD3D11.cpp UI/UIMainMenu.cpp |
diffstat | 5 files changed, 29 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Game.cpp Mon Aug 18 13:11:39 2014 +0600 +++ b/Game.cpp Mon Aug 18 18:28:53 2014 +0600 @@ -5379,6 +5379,7 @@ bool new_sky = false; //new sky(need texture) int max_flight_height = 4000; //maximum altitude bool use_MMT = false; +bool for_refactoring = false; //----- (00462C94) -------------------------------------------------------- bool MM_Main(const wchar_t *pCmdLine)
--- a/MMT.cpp Mon Aug 18 13:11:39 2014 +0600 +++ b/MMT.cpp Mon Aug 18 18:28:53 2014 +0600 @@ -37,10 +37,19 @@ { pMediaPlayer->PlayFullscreenMovie(MOVIE_NWCLogo, true); if ( !pMediaPlayer->bStopBeforeSchedule ) - //pMediaPlayer->PlayFullscreenMovie(MOVIE_JVC, true);//Ritor1: crash + { + + if (for_refactoring) + { + MessageBoxA(nullptr, "Ritor1: MOVIE_JVC crash", "", 0); + __debugbreak(); + } + + //pMediaPlayer->PlayFullscreenMovie(MOVIE_JVC, true); //if ( !pMediaPlayer->bStopBeforeSchedule ) - if (!use_MMT) - pMediaPlayer->PlayFullscreenMovie(MOVIE_Intro, true); + if (!use_MMT) + pMediaPlayer->PlayFullscreenMovie(MOVIE_Intro, true); + } } } char pContainerName[64];
--- a/MMT.h Mon Aug 18 13:11:39 2014 +0600 +++ b/MMT.h Mon Aug 18 18:28:53 2014 +0600 @@ -5,4 +5,5 @@ void MMT_MenuMessageProc(); void DrawMMTCopyrightWindow(); -extern bool use_MMT; \ No newline at end of file +extern bool use_MMT; +extern bool for_refactoring; \ No newline at end of file
--- a/RenderD3D11.cpp Mon Aug 18 13:11:39 2014 +0600 +++ b/RenderD3D11.cpp Mon Aug 18 18:28:53 2014 +0600 @@ -231,13 +231,18 @@ unsigned int device_flags = 0;//D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT; #ifndef NODEBUG - device_flags |= D3D11_CREATE_DEVICE_DEBUG /*| D3D11_CREATE_DEVICE_DEBUGGABLE*/; - #endif + device_flags |= 0/*D3D11_CREATE_DEVICE_DEBUG | D3D11_CREATE_DEVICE_DEBUGGABLE*/; + #endif HRESULT (__stdcall *dll_D3D11CreateDeviceAndSwapChain)(IDXGIAdapter* pAdapter, D3D_DRIVER_TYPE DriverType, HMODULE Software, UINT Flags, CONST D3D_FEATURE_LEVEL* pFeatureLevels, UINT FeatureLevels, UINT SDKVersion, CONST DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IDXGISwapChain** ppSwapChain, ID3D11Device** ppDevice, D3D_FEATURE_LEVEL* pFeatureLevel, ID3D11DeviceContext** ppImmediateContext); dll_D3D11CreateDeviceAndSwapChain = (decltype(dll_D3D11CreateDeviceAndSwapChain))GetProcAddress(d3d_lib, "D3D11CreateDeviceAndSwapChain"); - ErrorD3D(dll_D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, device_flags, &requested_feature_level, 1, D3D11_SDK_VERSION, &swapChainDesc, &pSwapChain, &d3dd, &received_feature_level, &d3dc)); + ErrorD3D(dll_D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, device_flags, nullptr, 0, D3D11_SDK_VERSION, &swapChainDesc, &pSwapChain, &d3dd, &received_feature_level, &d3dc)); + if (received_feature_level < D3D_FEATURE_LEVEL_10_0) + { + MessageBoxA(nullptr, "Received Direct3D 9 or lower", "", 0); + __debugbreak(); + } /*if (fullscreen) { extern void ChangeResolution(int new_dith, int new_height, int new_bpp);
--- a/UI/UIMainMenu.cpp Mon Aug 18 13:11:39 2014 +0600 +++ b/UI/UIMainMenu.cpp Mon Aug 18 18:28:53 2014 +0600 @@ -15,6 +15,7 @@ #include "..\PaletteManager.h" #include "..\IconFrameTable.h" #include "..\texts.h" +#include"MMT.h" #include "..\mm7_data.h" #include "..\Game.h" @@ -207,7 +208,11 @@ unsigned __int16 *v5; // edi@3 unsigned int i; // ecx@3 - __debugbreak(); // Nomad: sub operates on 16 bit pixels, we have 32 bits. + if (for_refactoring) + { + MessageBoxA(nullptr, "Nomad: sub operates on 16 bit pixels, we have 32 bits.", "", 0); + __debugbreak(); + } v3 = pPixels; v4 = a1 | (a1 << 16);