Skip to content

Commit 9d8ae19

Browse files
committed
Fix hung at startup for xrLC. And fix some warnings. Now it works with some reservations.
1 parent c1a83c5 commit 9d8ae19

File tree

8 files changed

+15
-35
lines changed

8 files changed

+15
-35
lines changed

src/utils/ETools/ETools.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ BOOL APIENTRY DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
99
switch (fdwReason)
1010
{
1111
case DLL_PROCESS_ATTACH:
12-
xrDebug::Initialize(false);
13-
Core.Initialize("XRayEditorTools", 0, FALSE);
12+
//xrDebug::Initialize(false);
13+
//Core.Initialize("XRayEditorTools", 0, FALSE);
1414
// FPU::m64r ();
1515
break;
1616
case DLL_THREAD_ATTACH: break;
1717
case DLL_THREAD_DETACH: break;
18-
case DLL_PROCESS_DETACH: Core._destroy(); break;
18+
case DLL_PROCESS_DETACH: break;//Core._destroy(); break;
1919
}
2020
return TRUE;
2121
}

src/utils/xrDXT/DXT.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "stdafx.h"
2-
#pragma warning(push)
3-
#pragma warning(disable : 4244)
4-
#pragma warning(disable : 4018)
52
#include "dxtlib.h"
63
#include <nvtt/nvtt.h>
7-
#pragma warning(pop)
84
#include "ETextureParams.h"
95
#include "dds.h"
106

src/utils/xrDXT/StdAfx.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
#pragma once
22

3-
#include "Common/Common.hpp"
4-
#include "xrCore/xrCore.h"
5-
#include <io.h>
6-
#include <fcntl.h>
7-
#include <sys/stat.h>
8-
93
#define ENGINE_API
104
#define XR_EPROPS_API
115
#define ECORE_API
126

13-
#define USE_NVTT
14-
15-
#ifndef MAKEFOURCC
16-
#define MAKEFOURCC(ch0, ch1, ch2, ch3)\
17-
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24))
18-
#endif // defined(MAKEFOURCC)
19-
20-
#pragma warning(disable : 4995)
7+
#include "Common/Common.hpp"
8+
#include "xrCore/xrCore.h"
9+
#include <fcntl.h>

src/utils/xrDXT/dds/ddsTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ enum nvSharpenFilterTypes
117117
kSharpenFilterCustom,
118118
};
119119

120-
typedef enum nvMipMapGeneration
120+
enum nvMipMapGeneration
121121
{
122122
kGenerateMipMaps = 30,
123123
kUseExistingMipMaps = 31,
124124
kNoMipMaps = 32,
125125
kCompleteMipMapChain = 33, // fill in missing MIP maps
126126
};
127127

128-
typedef enum nvMipFilterTypes
128+
enum nvMipFilterTypes
129129
{
130130
kMipFilterPoint,
131131
kMipFilterBox,

src/utils/xrDXT/dds/tPixel.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <dds/tVector.h>
66
#include <dds/nvErrorCodes.h>
77

8-
#pragma warning(disable : 4201)
9-
108
namespace nv
119
{
1210
// modulo value x between [lo,hi]

src/utils/xrLC/xrLC.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
#include "utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"
99
#include "xrCore/ModuleLookup.hpp"
1010

11-
#pragma comment(lib, "comctl32.lib")
1211
#pragma comment(lib, "d3dx9.lib")
13-
#pragma comment(lib, "IMAGEHLP.LIB")
14-
#pragma comment(lib, "winmm.LIB")
1512
#pragma comment(lib, "FreeImage.lib")
1613

1714
CBuild* pBuild = NULL;

src/utils/xrLC_Light/fitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void vfOptimizeParameters(xr_vector<xr_vector<REAL>>& A, xr_vector<xr_vector<REA
9595

9696
if (dPreviousFunctional < dFunctional)
9797
{
98-
std::transform(daDelta.begin(), daDelta.end(), daDelta.begin(), std::bind2nd(std::multiplies<REAL>(), -1));
98+
std::transform(daDelta.begin(), daDelta.end(), daDelta.begin(), std::bind2nd(std::multiplies<REAL>(), -1.f));
9999
std::transform(C.begin(), C.end(), daDelta.begin(), C.begin(), std::plus<REAL>());
100100
std::transform(D.begin(), D.end(), daDelta.begin(), D.begin(), std::plus<REAL>());
101101
}

src/utils/xrLC_Light/xrLC_Light.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
2121
{
2222
case DLL_PROCESS_ATTACH:
2323
{
24-
xrDebug::Initialize(false);
25-
bool init_log = (0 != xr_strcmp(Core.ApplicationName, "XRayEditorTools"));
26-
Core.Initialize("xrLC_Light", 0, FALSE);
27-
if (init_log)
28-
CreateLog();
24+
//xrDebug::Initialize(false);
25+
//bool init_log = (0 != xr_strcmp(Core.ApplicationName, "XRayEditorTools"));
26+
//Core.Initialize("xrLC_Light", 0, FALSE);
27+
//if (init_log)
28+
//CreateLog();
2929

3030
// FPU::m64r ();
3131
break;
@@ -35,7 +35,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
3535
case DLL_PROCESS_DETACH:
3636
if (inlc_global_data())
3737
destroy_global_data();
38-
Core._destroy();
38+
//Core._destroy();
3939
break;
4040
}
4141
return TRUE;

0 commit comments

Comments
 (0)