Skip to content

Commit 0c84242

Browse files
author
nitrocaster
committed
Remove commented/disabled/unused code.
1 parent a543940 commit 0c84242

File tree

8 files changed

+3
-466
lines changed

8 files changed

+3
-466
lines changed

src/utils/xrCompress/xrCompress.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
#include "stdafx.h"
22
#include "xrCompress.h"
33

4-
//typedef void DUMMY_STUFF (const void*,const u32&,void*);
5-
//XRCORE_API DUMMY_STUFF *g_temporary_stuff;
6-
//XRCORE_API DUMMY_STUFF *g_dummy_stuff;
7-
8-
//# define TRIVIAL_ENCRYPTOR_ENCODER
9-
//# define TRIVIAL_ENCRYPTOR_DECODER
10-
11-
//# undef TRIVIAL_ENCRYPTOR_ENCODER
12-
//# undef TRIVIAL_ENCRYPTOR_DECODER
13-
144
xrCompressor::xrCompressor()
155
:fs_pack_writer(NULL),bFast(false),files_list(NULL),folders_list(NULL),bStoreFiles(false),pPackHeader(NULL),config_ltx(NULL)
166
{
@@ -24,9 +14,6 @@ xrCompressor::xrCompressor()
2414
dwTimeStart = 0;
2515

2616
XRP_MAX_SIZE = 1024*1024*640; // bytes (640Mb)
27-
28-
// g_temporary_stuff = &trivial_encryptor::decode;
29-
// g_dummy_stuff = &trivial_encryptor::encode;
3017
}
3118

3219
xrCompressor::~xrCompressor()
@@ -338,12 +325,6 @@ void xrCompressor::OpenPack(LPCSTR tgt_folder, int num)
338325
filesALIAS = 0;
339326

340327
dwTimeStart = timeGetTime();
341-
342-
//write pack header without compression
343-
// DUMMY_STUFF* _dummy_stuff_subst = NULL;
344-
// _dummy_stuff_subst = g_dummy_stuff;
345-
// g_dummy_stuff = NULL;
346-
347328
if(config_ltx && config_ltx->section_exist("header"))
348329
{
349330
CMemoryWriter W;

src/utils/xrLC/xrLC.cpp

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
#include "utils/xrLC_Light/xrLC_GlobalData.h"
88
#include "utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"
99

10-
//#pragma comment(linker,"/STACK:0x800000,0x400000")
11-
//#pragma comment(linker,"/HEAP:0x70000000,0x10000000")
12-
1310
#pragma comment(lib,"comctl32.lib")
1411
#pragma comment(lib,"d3dx9.lib")
1512
#pragma comment(lib,"IMAGEHLP.LIB")
@@ -20,16 +17,6 @@
2017
#pragma comment(lib,"xrLC_Light.lib")
2118
#pragma comment(lib, "xrLCUtil.lib")
2219

23-
#define PROTECTED_BUILD
24-
25-
#ifdef PROTECTED_BUILD
26-
# define TRIVIAL_ENCRYPTOR_ENCODER
27-
# define TRIVIAL_ENCRYPTOR_DECODER
28-
# include "xrEngine/trivial_encryptor.h"
29-
# undef TRIVIAL_ENCRYPTOR_ENCODER
30-
# undef TRIVIAL_ENCRYPTOR_DECODER
31-
#endif // PROTECTED_BUILD
32-
3320
CBuild* pBuild = NULL;
3421
u32 version = 0;
3522
ILevelCompilerLogger& Logger = LevelCompilerLoggerWindow();
@@ -100,16 +87,7 @@ void Startup(LPSTR lpCmdLine)
10087
xr_sprintf(temp, "%s - Levels Compiler", name);
10188
Logger.Initialize(temp);
10289
// Faster FPU
103-
SetPriorityClass (GetCurrentProcess(),NORMAL_PRIORITY_CLASS);
104-
/*
105-
u32 dwMin = 1800*(1024*1024);
106-
u32 dwMax = 1900*(1024*1024);
107-
if (0==SetProcessWorkingSetSize(GetCurrentProcess(),dwMin,dwMax))
108-
{
109-
clMsg("*** Failed to expand working set");
110-
};
111-
*/
112-
90+
SetPriorityClass (GetCurrentProcess(),NORMAL_PRIORITY_CLASS);
11391
// Load project
11492
string_path prjName;
11593
FS.update_path (prjName,"$game_levels$",strconcat(sizeof(prjName),prjName,name,"\\build.prj"));
@@ -172,20 +150,11 @@ void Startup(LPSTR lpCmdLine)
172150
Logger.Destroy();
173151
}
174152

175-
//typedef void DUMMY_STUFF (const void*,const u32&,void*);
176-
//XRCORE_API DUMMY_STUFF *g_temporary_stuff;
177-
//XRCORE_API DUMMY_STUFF *g_dummy_stuff;
178-
179-
180-
181153
int APIENTRY WinMain(HINSTANCE hInst,
182154
HINSTANCE hPrevInstance,
183155
LPSTR lpCmdLine,
184156
int nCmdShow)
185157
{
186-
// g_temporary_stuff = &trivial_encryptor::decode;
187-
// g_dummy_stuff = &trivial_encryptor::encode;
188-
189158
// Initialize debugging
190159
xrDebug::Initialize (false);
191160
Core._initialize ("xrLC");

src/xrCore/FS.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#include <sys\stat.h>
1111
#pragma warning(default:4995)
1212

13-
//typedef void DUMMY_STUFF (const void*,const u32&,void*);
14-
//XRCORE_API DUMMY_STUFF *g_dummy_stuff = 0;
15-
1613
#ifdef M_BORLAND
1714
# define O_SEQUENTIAL 0
1815
#endif // M_BORLAND

src/xrCore/LocatorAPI.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
const u32 BIG_FILE_READER_WINDOW_SIZE = 1024*1024;
1919

20-
//typedef void DUMMY_STUFF (const void*,const u32&,void*);
21-
//XRCORE_API DUMMY_STUFF *g_temporary_stuff = 0;
22-
2320
# pragma warning(push)
2421
# pragma warning(disable:4995)
2522
# include <malloc.h>
@@ -305,8 +302,6 @@ IReader* open_chunk(void* ptr, u32 ID)
305302
{
306303
BYTE* dest;
307304
unsigned dest_sz;
308-
// if (g_temporary_stuff)
309-
// g_temporary_stuff (src_data,dwSize,src_data);
310305
_decompressLZ(&dest, &dest_sz, src_data, dwSize);
311306
xr_free(src_data);
312307
return xr_new<CTempReader>(dest, dest_sz, 0);
@@ -377,16 +372,6 @@ void CLocatorAPI::LoadArchive(archive& A, LPCSTR entrypoint)
377372
}
378373
if (entrypoint)
379374
xr_strcpy(fs_entry_point, sizeof(fs_entry_point), entrypoint);
380-
381-
382-
// DUMMY_STUFF *g_temporary_stuff_subst = NULL;
383-
//
384-
// if(strstr(A.path.c_str(),".xdb"))
385-
// {
386-
// g_temporary_stuff_subst = g_temporary_stuff;
387-
// g_temporary_stuff = NULL;
388-
// }
389-
390375
// Read FileSystem
391376
A.open();
392377
IReader* hdr = open_chunk(A.hSrcFile, 1);
@@ -424,9 +409,6 @@ void CLocatorAPI::LoadArchive(archive& A, LPCSTR entrypoint)
424409
Register(full, A.vfs_idx, crc, ptr, size_real, size_compr, 0);
425410
}
426411
hdr->close();
427-
428-
// if(g_temporary_stuff_subst)
429-
// g_temporary_stuff = g_temporary_stuff_subst;
430412
}
431413

432414
void CLocatorAPI::archive::open()
@@ -469,20 +451,13 @@ void CLocatorAPI::ProcessArchive(LPCSTR _path)
469451

470452
// Read header
471453
BOOL bProcessArchiveLoading = TRUE;
472-
473-
// DUMMY_STUFF *g_temporary_stuff_subst = NULL;
474-
// g_temporary_stuff_subst = g_temporary_stuff;
475-
// g_temporary_stuff = NULL;
476-
477454
IReader* hdr = open_chunk(A.hSrcFile, CFS_HeaderChunkID);
478455
if (hdr)
479456
{
480457
A.header = xr_new<CInifile>(hdr, "archive_header");
481458
hdr->close();
482459
bProcessArchiveLoading = A.header->r_bool("header", "auto_load");
483460
}
484-
// g_temporary_stuff = g_temporary_stuff_subst;
485-
486461
if (bProcessArchiveLoading || strstr(Core.Params, "-auto_load_arch"))
487462
LoadArchive(A);
488463
else

0 commit comments

Comments
 (0)