Skip to content

Commit 62bb2af

Browse files
committed
Reduce differences between files.
1 parent 6177b7e commit 62bb2af

File tree

6 files changed

+456
-53
lines changed

6 files changed

+456
-53
lines changed

src/utils/xrAI/compiler_load.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ void xrLoad(LPCSTR name, bool draft_mode)
147147
IReader* THM = FS.r_open("$game_textures$", N);
148148
R_ASSERT2(THM, N);
149149

150+
// version
151+
//u32 version = 0;
152+
//R_ASSERT2(THM->r_chunk(THM_CHUNK_VERSION, &version), N);
153+
//if (version != THM_CURRENT_VERSION) FATAL("Unsupported version of THM file.");
154+
150155
// analyze thumbnail information
151156
BT.THM.Load(*THM);
152157
BOOL bLOD = FALSE;
@@ -169,8 +174,8 @@ void xrLoad(LPCSTR name, bool draft_mode)
169174
if ((w != BT.dwWidth) || (h != BT.dwHeight))
170175
{
171176
Msg("! THM doesn't correspond to the texture: %dx%d -> %dx%d", BT.dwWidth, BT.dwHeight, w, h);
172-
BT.dwWidth = w;
173-
BT.dwHeight = h;
177+
BT.dwWidth = BT.THM.width = w;
178+
BT.dwHeight = BT.THM.height = h;
174179
}
175180
BT.Vflip();
176181
}

src/utils/xrLC/Build_Load.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,12 @@ void CBuild::Load(const b_params& Params, const IReader& _in_FS)
323323
R_ASSERT2(THM, th_name);
324324

325325
// version
326-
u32 version = 0;
327-
R_ASSERT2(THM->r_chunk(THM_CHUNK_VERSION, &version), th_name);
328-
// if( version!=THM_CURRENT_VERSION ) FATAL ("Unsupported version of THM file.");
326+
//u32 version = 0;
327+
//R_ASSERT2(THM->r_chunk(THM_CHUNK_VERSION, &version), th_name);
328+
//if (version != THM_CURRENT_VERSION) FATAL("Unsupported version of THM file.");
329329

330330
// analyze thumbnail information
331-
R_ASSERT2(THM->find_chunk(THM_CHUNK_TEXTUREPARAM), th_name);
332-
THM->r(&BT.THM.fmt, sizeof(STextureParams::ETFormat));
333-
BT.THM.flags.assign(THM->r_u32());
334-
BT.THM.border_color = THM->r_u32();
335-
BT.THM.fade_color = THM->r_u32();
336-
BT.THM.fade_amount = THM->r_u32();
337-
BT.THM.mip_filter = THM->r_u32();
338-
BT.THM.width = THM->r_u32();
339-
BT.THM.height = THM->r_u32();
331+
BT.THM.Load(*THM);
340332
BOOL bLOD = FALSE;
341333
if (N[0] == 'l' && N[1] == 'o' && N[2] == 'd' && N[3] == '\\')
342334
bLOD = TRUE;
@@ -347,8 +339,7 @@ void CBuild::Load(const b_params& Params, const IReader& _in_FS)
347339
BT.bHasAlpha = BT.THM.HasAlphaChannel();
348340
if (!bLOD)
349341
{
350-
if (BT.bHasAlpha || BT.THM.flags.test(STextureParams::flImplicitLighted) ||
351-
g_build_options.b_radiosity)
342+
if (BT.bHasAlpha || BT.THM.flags.test(STextureParams::flImplicitLighted) || g_build_options.b_radiosity)
352343
{
353344
Logger.clMsg("- loading: %s", N);
354345
u32 w = 0, h = 0;
@@ -357,8 +348,7 @@ void CBuild::Load(const b_params& Params, const IReader& _in_FS)
357348
R_ASSERT2(BT.pSurface, "Can't load surface");
358349
if ((w != BT.dwWidth) || (h != BT.dwHeight))
359350
{
360-
Msg("! THM doesn't correspond to the texture: %dx%d -> %dx%d", BT.dwWidth, BT.dwHeight, w,
361-
h);
351+
Msg("! THM doesn't correspond to the texture: %dx%d -> %dx%d", BT.dwWidth, BT.dwHeight, w, h);
362352
BT.dwWidth = BT.THM.width = w;
363353
BT.dwHeight = BT.THM.height = h;
364354
}

src/utils/xrLC/xrLC.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
<ClInclude Include="..\..\common\NvMender2003\NVMeshMender.h" />
169169
<ClInclude Include="..\..\common\NvMender2003\remove_isolated_verts.h" />
170170
<ClInclude Include="..\Shader_xrLC.h" />
171+
<ClInclude Include="..\xrLC_Light\ETextureParams.h" />
171172
<ClInclude Include="..\xrLC_Light\itterate_adjacents.h" />
172173
<ClInclude Include="ArbitraryList.h" />
173174
<ClInclude Include="Build.h" />
@@ -246,6 +247,7 @@
246247
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
247248
</ClCompile>
248249
<ClCompile Include="..\..\xrEngine\xrLoadSurface.cpp" />
250+
<ClCompile Include="..\xrLC_Light\ETextureParams.cpp" />
249251
<ClCompile Include="Build.cpp" />
250252
<ClCompile Include="Build_Load.cpp" />
251253
<ClCompile Include="fmesh.cpp" />

src/utils/xrLC/xrLC.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
<ClInclude Include="..\xrLC_Light\itterate_adjacents.h">
125125
<Filter>%2a%2a%2a COMPILER %2a%2a%2a</Filter>
126126
</ClInclude>
127+
<ClInclude Include="..\xrLC_Light\ETextureParams.h">
128+
<Filter>External</Filter>
129+
</ClInclude>
127130
</ItemGroup>
128131
<ItemGroup>
129132
<ClCompile Include="StdAfx.cpp">
@@ -261,5 +264,8 @@
261264
<ClCompile Include="net.cpp">
262265
<Filter>%2a%2a%2a COMPILER %2a%2a%2a\net</Filter>
263266
</ClCompile>
267+
<ClCompile Include="..\xrLC_Light\ETextureParams.cpp">
268+
<Filter>External</Filter>
269+
</ClCompile>
264270
</ItemGroup>
265271
</Project>

0 commit comments

Comments
 (0)