Skip to content

Commit

Permalink
Remove commented/disabled/unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 29, 2016
1 parent a543940 commit 0c84242
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 466 deletions.
19 changes: 0 additions & 19 deletions src/utils/xrCompress/xrCompress.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#include "stdafx.h"
#include "xrCompress.h"

//typedef void DUMMY_STUFF (const void*,const u32&,void*);
//XRCORE_API DUMMY_STUFF *g_temporary_stuff;
//XRCORE_API DUMMY_STUFF *g_dummy_stuff;

//# define TRIVIAL_ENCRYPTOR_ENCODER
//# define TRIVIAL_ENCRYPTOR_DECODER

//# undef TRIVIAL_ENCRYPTOR_ENCODER
//# undef TRIVIAL_ENCRYPTOR_DECODER

xrCompressor::xrCompressor()
:fs_pack_writer(NULL),bFast(false),files_list(NULL),folders_list(NULL),bStoreFiles(false),pPackHeader(NULL),config_ltx(NULL)
{
Expand All @@ -24,9 +14,6 @@ xrCompressor::xrCompressor()
dwTimeStart = 0;

XRP_MAX_SIZE = 1024*1024*640; // bytes (640Mb)

// g_temporary_stuff = &trivial_encryptor::decode;
// g_dummy_stuff = &trivial_encryptor::encode;
}

xrCompressor::~xrCompressor()
Expand Down Expand Up @@ -338,12 +325,6 @@ void xrCompressor::OpenPack(LPCSTR tgt_folder, int num)
filesALIAS = 0;

dwTimeStart = timeGetTime();

//write pack header without compression
// DUMMY_STUFF* _dummy_stuff_subst = NULL;
// _dummy_stuff_subst = g_dummy_stuff;
// g_dummy_stuff = NULL;

if(config_ltx && config_ltx->section_exist("header"))
{
CMemoryWriter W;
Expand Down
33 changes: 1 addition & 32 deletions src/utils/xrLC/xrLC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#include "utils/xrLC_Light/xrLC_GlobalData.h"
#include "utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"

//#pragma comment(linker,"/STACK:0x800000,0x400000")
//#pragma comment(linker,"/HEAP:0x70000000,0x10000000")

#pragma comment(lib,"comctl32.lib")
#pragma comment(lib,"d3dx9.lib")
#pragma comment(lib,"IMAGEHLP.LIB")
Expand All @@ -20,16 +17,6 @@
#pragma comment(lib,"xrLC_Light.lib")
#pragma comment(lib, "xrLCUtil.lib")

#define PROTECTED_BUILD

#ifdef PROTECTED_BUILD
# define TRIVIAL_ENCRYPTOR_ENCODER
# define TRIVIAL_ENCRYPTOR_DECODER
# include "xrEngine/trivial_encryptor.h"
# undef TRIVIAL_ENCRYPTOR_ENCODER
# undef TRIVIAL_ENCRYPTOR_DECODER
#endif // PROTECTED_BUILD

CBuild* pBuild = NULL;
u32 version = 0;
ILevelCompilerLogger& Logger = LevelCompilerLoggerWindow();
Expand Down Expand Up @@ -100,16 +87,7 @@ void Startup(LPSTR lpCmdLine)
xr_sprintf(temp, "%s - Levels Compiler", name);
Logger.Initialize(temp);
// Faster FPU
SetPriorityClass (GetCurrentProcess(),NORMAL_PRIORITY_CLASS);
/*
u32 dwMin = 1800*(1024*1024);
u32 dwMax = 1900*(1024*1024);
if (0==SetProcessWorkingSetSize(GetCurrentProcess(),dwMin,dwMax))
{
clMsg("*** Failed to expand working set");
};
*/

SetPriorityClass (GetCurrentProcess(),NORMAL_PRIORITY_CLASS);
// Load project
string_path prjName;
FS.update_path (prjName,"$game_levels$",strconcat(sizeof(prjName),prjName,name,"\\build.prj"));
Expand Down Expand Up @@ -172,20 +150,11 @@ void Startup(LPSTR lpCmdLine)
Logger.Destroy();
}

//typedef void DUMMY_STUFF (const void*,const u32&,void*);
//XRCORE_API DUMMY_STUFF *g_temporary_stuff;
//XRCORE_API DUMMY_STUFF *g_dummy_stuff;



int APIENTRY WinMain(HINSTANCE hInst,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// g_temporary_stuff = &trivial_encryptor::decode;
// g_dummy_stuff = &trivial_encryptor::encode;

// Initialize debugging
xrDebug::Initialize (false);
Core._initialize ("xrLC");
Expand Down
3 changes: 0 additions & 3 deletions src/xrCore/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#include <sys\stat.h>
#pragma warning(default:4995)

//typedef void DUMMY_STUFF (const void*,const u32&,void*);
//XRCORE_API DUMMY_STUFF *g_dummy_stuff = 0;

#ifdef M_BORLAND
# define O_SEQUENTIAL 0
#endif // M_BORLAND
Expand Down
25 changes: 0 additions & 25 deletions src/xrCore/LocatorAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

const u32 BIG_FILE_READER_WINDOW_SIZE = 1024*1024;

//typedef void DUMMY_STUFF (const void*,const u32&,void*);
//XRCORE_API DUMMY_STUFF *g_temporary_stuff = 0;

# pragma warning(push)
# pragma warning(disable:4995)
# include <malloc.h>
Expand Down Expand Up @@ -305,8 +302,6 @@ IReader* open_chunk(void* ptr, u32 ID)
{
BYTE* dest;
unsigned dest_sz;
// if (g_temporary_stuff)
// g_temporary_stuff (src_data,dwSize,src_data);
_decompressLZ(&dest, &dest_sz, src_data, dwSize);
xr_free(src_data);
return xr_new<CTempReader>(dest, dest_sz, 0);
Expand Down Expand Up @@ -377,16 +372,6 @@ void CLocatorAPI::LoadArchive(archive& A, LPCSTR entrypoint)
}
if (entrypoint)
xr_strcpy(fs_entry_point, sizeof(fs_entry_point), entrypoint);


// DUMMY_STUFF *g_temporary_stuff_subst = NULL;
//
// if(strstr(A.path.c_str(),".xdb"))
// {
// g_temporary_stuff_subst = g_temporary_stuff;
// g_temporary_stuff = NULL;
// }

// Read FileSystem
A.open();
IReader* hdr = open_chunk(A.hSrcFile, 1);
Expand Down Expand Up @@ -424,9 +409,6 @@ void CLocatorAPI::LoadArchive(archive& A, LPCSTR entrypoint)
Register(full, A.vfs_idx, crc, ptr, size_real, size_compr, 0);
}
hdr->close();

// if(g_temporary_stuff_subst)
// g_temporary_stuff = g_temporary_stuff_subst;
}

void CLocatorAPI::archive::open()
Expand Down Expand Up @@ -469,20 +451,13 @@ void CLocatorAPI::ProcessArchive(LPCSTR _path)

// Read header
BOOL bProcessArchiveLoading = TRUE;

// DUMMY_STUFF *g_temporary_stuff_subst = NULL;
// g_temporary_stuff_subst = g_temporary_stuff;
// g_temporary_stuff = NULL;

IReader* hdr = open_chunk(A.hSrcFile, CFS_HeaderChunkID);
if (hdr)
{
A.header = xr_new<CInifile>(hdr, "archive_header");
hdr->close();
bProcessArchiveLoading = A.header->r_bool("header", "auto_load");
}
// g_temporary_stuff = g_temporary_stuff_subst;

if (bProcessArchiveLoading || strstr(Core.Params, "-auto_load_arch"))
LoadArchive(A);
else
Expand Down
Loading

0 comments on commit 0c84242

Please sign in to comment.