diff --git a/src/xrEngine/Device_Initialize.cpp b/src/xrEngine/Device_Initialize.cpp index 1fb6bf557c3..05e3c1274d9 100644 --- a/src/xrEngine/Device_Initialize.cpp +++ b/src/xrEngine/Device_Initialize.cpp @@ -32,7 +32,7 @@ void CRenderDevice::initialize_editor() } #endif // #ifdef INGAME_EDITOR -PROTECT_API void CRenderDevice::Initialize() +void CRenderDevice::Initialize() { Log("Initializing Engine..."); TimerGlobal.Start(); diff --git a/src/xrEngine/Device_create.cpp b/src/xrEngine/Device_create.cpp index 655d526a000..ff5203af461 100644 --- a/src/xrEngine/Device_create.cpp +++ b/src/xrEngine/Device_create.cpp @@ -3,7 +3,6 @@ #include "Render.h" #include "dedicated_server_only.h" #include "xrCDB/xrXRC.h" -#include "securom_api.h" extern XRCDB_API BOOL* cdb_bDebug; @@ -20,9 +19,8 @@ void CRenderDevice::_SetupStates() GlobalEnv.Render->SetupStates(); } -PROTECT_API void CRenderDevice::Create() +void CRenderDevice::Create() { - SECUROM_MARKER_SECURITY_ON(4); if (b_is_Ready) return; // prevent double call Statistic = xr_new(); @@ -52,5 +50,4 @@ PROTECT_API void CRenderDevice::Create() Statistic->OnDeviceCreate(); dwFrame = 0; PreCache(0, false, false); - SECUROM_MARKER_SECURITY_OFF(4); } diff --git a/src/xrEngine/Engine.cpp b/src/xrEngine/Engine.cpp index 7d8ddb7ea66..02316e51f46 100644 --- a/src/xrEngine/Engine.cpp +++ b/src/xrEngine/Engine.cpp @@ -24,7 +24,7 @@ CEngine::~CEngine() extern void msCreate(LPCSTR name); -PROTECT_API void CEngine::Initialize(void) +void CEngine::Initialize(void) { Engine.Sheduler.Initialize(); #ifdef DEBUG diff --git a/src/xrEngine/EngineAPI.cpp b/src/xrEngine/EngineAPI.cpp index be19e4df414..ff88e42a1c6 100644 --- a/src/xrEngine/EngineAPI.cpp +++ b/src/xrEngine/EngineAPI.cpp @@ -6,7 +6,6 @@ #include "EngineAPI.h" #include "xrCDB/xrXRC.h" #include "xrScriptEngine/script_engine.hpp" -#include "securom_api.h" extern xr_token* vid_quality_token; @@ -48,23 +47,15 @@ ENGINE_API int g_current_renderer = 0; bool is_enough_address_space_available() { SYSTEM_INFO system_info; - - SECUROM_MARKER_HIGH_SECURITY_ON(12) - - GetSystemInfo(&system_info); - - SECUROM_MARKER_HIGH_SECURITY_OFF(12) - - return (*(u32*)&system_info.lpMaximumApplicationAddress) > 0x90000000; + GetSystemInfo(&system_info); + return (*(u32*)&system_info.lpMaximumApplicationAddress) > 0x90000000; } #ifndef DEDICATED_SERVER void CEngineAPI::InitializeNotDedicated() { - SECUROM_MARKER_HIGH_SECURITY_ON(2) - - LPCSTR r2_name = "xrRender_R2.dll"; + LPCSTR r2_name = "xrRender_R2.dll"; LPCSTR r3_name = "xrRender_R3.dll"; LPCSTR r4_name = "xrRender_R4.dll"; @@ -111,8 +102,6 @@ void CEngineAPI::InitializeNotDedicated() else g_current_renderer = 2; } - - SECUROM_MARKER_HIGH_SECURITY_OFF(2) } #endif // DEDICATED_SERVER diff --git a/src/xrEngine/Environment_misc.cpp b/src/xrEngine/Environment_misc.cpp index d1b4cc3e015..3719cfd41f1 100644 --- a/src/xrEngine/Environment_misc.cpp +++ b/src/xrEngine/Environment_misc.cpp @@ -10,8 +10,6 @@ #include "Common/object_broker.h" #include "xrServerEntities/LevelGameDef.h" -#include "securom_api.h" - void CEnvModifier::load(IReader* fs, u32 version) { use_flags.one(); @@ -537,9 +535,7 @@ void CEnvironment::mods_unload() void CEnvironment::load_level_specific_ambients() { - SECUROM_MARKER_PERFORMANCE_ON(13) - - const shared_str level_name = g_pGameLevel->name(); + const shared_str level_name = g_pGameLevel->name(); string_path path; strconcat(sizeof(path), path, "environment\\ambients\\", level_name.c_str(), ".ltx"); @@ -571,8 +567,6 @@ void CEnvironment::load_level_specific_ambients() } xr_delete(level_ambients); - - SECUROM_MARKER_PERFORMANCE_OFF(13) } CEnvDescriptor* CEnvironment::create_descriptor(shared_str const& identifier, CInifile* config) diff --git a/src/xrEngine/IGame_Level.cpp b/src/xrEngine/IGame_Level.cpp index 720a8b03af0..892cd97725a 100644 --- a/src/xrEngine/IGame_Level.cpp +++ b/src/xrEngine/IGame_Level.cpp @@ -12,8 +12,6 @@ #include "xr_object.h" #include "Feel_Sound.h" -#include "securom_api.h" - ENGINE_API IGame_Level* g_pGameLevel = NULL; extern BOOL g_bLoaded; @@ -82,10 +80,8 @@ static void __stdcall build_callback(Fvector* V, int Vcnt, CDB::TRI* T, int Tcnt bool IGame_Level::Load(u32 dwNum) { - SECUROM_MARKER_PERFORMANCE_ON(10) - - // Initialize level data - pApp->Level_Set(dwNum); + // Initialize level data + pApp->Level_Set(dwNum); string_path temp; if (!FS.exist(temp, "$level$", "level.ltx")) Debug.fatal(DEBUG_INFO, "Can't find level configuration file '%s'.", temp); @@ -137,10 +133,7 @@ bool IGame_Level::Load(u32 dwNum) #endif Device.seqFrame.Add(this); - - SECUROM_MARKER_PERFORMANCE_OFF(10) - - return true; + return true; } #ifndef _EDITOR diff --git a/src/xrEngine/XR_IOConsole.cpp b/src/xrEngine/XR_IOConsole.cpp index 1cf08f20be4..06b4071a945 100644 --- a/src/xrEngine/XR_IOConsole.cpp +++ b/src/xrEngine/XR_IOConsole.cpp @@ -15,8 +15,6 @@ #include "Include/xrRender/UIRender.h" -#include "securom_api.h" - static float const UI_BASE_WIDTH = 1024.0f; static float const UI_BASE_HEIGHT = 768.0f; static float const LDIST = 0.05f; @@ -650,8 +648,6 @@ void CConsole::ExecuteCommand(LPCSTR cmd_str, bool record_cmd) void CConsole::Show() { - SECUROM_MARKER_HIGH_SECURITY_ON(11) - if (bVisible) { return; @@ -669,8 +665,6 @@ void CConsole::Show() m_editor->IR_Capture(); Device.seqRender.Add(this, 1); Device.seqFrame.Add(this); - - SECUROM_MARKER_HIGH_SECURITY_OFF(11) } extern CInput* pInput; diff --git a/src/xrEngine/dedicated_server_only.h b/src/xrEngine/dedicated_server_only.h index a12c099b729..d349945b51c 100644 --- a/src/xrEngine/dedicated_server_only.h +++ b/src/xrEngine/dedicated_server_only.h @@ -5,15 +5,4 @@ //#define DEDICATED_SERVER_ONLY -#ifdef DEDICATED_SERVER_ONLY -# define PROTECT_API -#else// #ifdef DEDICATED_SERVER_ONLY -# define PROTECT_API XR_EXPORT -#endif // #ifdef DEDICATED_SERVER_ONLY - -#ifdef BENCHMARK_BUILD -# undef PROTECT_API -# define PROTECT_API -#endif // #ifdef BENCHMARK_BUILD - #endif // #ifndef DEDICATED_SERVER_ONLY_H_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/securom_api.h b/src/xrEngine/securom_api.h deleted file mode 100644 index 0d35d31cb52..00000000000 --- a/src/xrEngine/securom_api.h +++ /dev/null @@ -1,180 +0,0 @@ -//***************************************************************************************** -// Copyright (c) 2005 Sony DADC -// All rights reserved. -// -// $FileName : securom_api.h -// $ProjectName : SDK -// $Created : 02.03.2005 12:14 -// -// Content: -// -//***************************************************************************************** - -#ifndef SECUROM_SDK_H -#define SECUROM_SDK_H - -#undef USE_SECUROM_MARKERS_API - -#ifdef DEDICATED_SERVER - #undef USE_SECUROM_MARKERS_API -#endif // DEDICATED_SERVER - -#ifdef _EDITOR - #undef USE_SECUROM_MARKERS_API -#endif // _EDITOR - -#ifndef USE_SECUROM_MARKERS_API - - #define SECUROM_MARKER_PERFORMANCE_ON(id) - #define SECUROM_MARKER_PERFORMANCE_OFF(id) - - #define SECUROM_MARKER_SECURITY_ON(id) - #define SECUROM_MARKER_SECURITY_OFF(id) - - #define SECUROM_MARKER_HIGH_SECURITY_ON(id) - #define SECUROM_MARKER_HIGH_SECURITY_OFF(id) - -#else // USE_SECUROM_MARKERS_API - -#include -#include - -#if 0 -static BOOL SecuROM_Tripwire() -{ - char event_name[50]; - - sprintf(event_name, "v7_%04d", (GetCurrentProcessId() ^ 0x19EA3FD3) ); - - if(HANDLE S7hnd = OpenEventA(EVENT_MODIFY_STATE, FALSE, event_name)) - { - CloseHandle(S7hnd); - return TRUE; - } - - return FALSE; -} -#endif // 0 - -#define SECUROM_MARKER_PERFORMANCE_ON(id) { { __asm _emit 0xEB __asm _emit 0x0E __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x01 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } -#define SECUROM_MARKER_PERFORMANCE_OFF(id) { __asm _emit 0xEB __asm _emit 0x0E __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x02 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } } - -#define SECUROM_MARKER_SECURITY_ON(id) { { __asm _emit 0xEB __asm _emit 0x0E __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x11 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } -#define SECUROM_MARKER_SECURITY_OFF(id) { __asm _emit 0xEB __asm _emit 0x0E __asm __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x12 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } } - -#define SECUROM_MARKER_HIGH_SECURITY_ON(id) { { __asm _emit 0xEB __asm _emit 0x0E __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x21 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } -#define SECUROM_MARKER_HIGH_SECURITY_OFF(id) { __asm _emit 0xEB __asm _emit 0x0E __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' __asm _emit 0x22 __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) } } - - -#define SECUROM_MARKER_VM_CALL(id, code, data) { __asm _emit 0xEB __asm _emit 0x18 \ - __asm _emit 'M' __asm _emit 'a' __asm _emit '0' __asm _emit 'W' __asm _emit 'y' __asm _emit 'G' __asm _emit '1' __asm _emit 'k' __asm _emit 'm' \ - __asm _emit 0x31 \ - __asm _emit (id & 0xFF) __asm _emit ((id >> 8) & 0xFF) __asm _emit ((id >> 16) & 0xFF) __asm _emit ((id >> 24) & 0xFF) \ - __asm push offset code \ - __asm push offset data } - - -static unsigned char MACRO_ADD[] = -{ - 0xEC,0xAF,0xCA,0x36,0xB7,0x0D,0x59,0xC1,0xFA,0xA7,0x71,0xB1,0x23,0xC5,0x8E,0x65,0xD1,0x36,0x03,0x12, - 0x7A,0x2C,0x31,0x3A,0x3E,0x14,0x5D,0xD2,0x0C,0x51,0x66,0xC7,0xE1,0x60,0x98,0x6A,0x16,0x9D,0xA8,0x80, - 0xE4,0x7A,0x94,0xB2,0xA2,0xF5,0x6E,0x27,0xF5,0x0A,0x3F,0xC5,0xFF,0x20,0x4C,0xB8,0xC5,0x72,0x71,0x9A, - 0xA9,0xA0,0xDD,0x4F,0x68,0x53,0xB1,0xFA,0x26,0x14,0x85,0x94,0x21,0x14,0x80,0x5C,0x70,0xBA,0xC5,0xF6, - 0x58,0xDB,0xAE,0xE5,0x8D,0xCD,0xDC,0x6A,0x9C,0x11,0xFC,0x6D,0x33,0x17,0xFB,0xF2,0x30,0xF2,0xE0,0xD3, - 0xE3,0x92,0xAC,0x46,0xC7,0x86,0x9B,0x6E,0x74,0x5D,0xB1,0x05,0xB9,0xFA,0x75,0x9F,0x84,0x57,0x2A,0x40, - 0x72,0xE7,0xC9,0xCB -}; - -static unsigned char MACRO_SUB[] = -{ - 0xEC,0xAF,0xCA,0x36,0xB7,0x0D,0x59,0xC1,0xFA,0xA7,0x71,0xB1,0x23,0xC5,0x8E,0x65,0xD1,0x36,0x03,0x12, - 0x7A,0x2C,0x31,0x3A,0x3E,0x14,0x5D,0xD2,0x0C,0x51,0x66,0xC7,0xE1,0x60,0x98,0x6A,0x16,0x9D,0xA8,0x80, - 0xE4,0x7A,0x94,0xB2,0xA2,0xF5,0x6E,0x27,0xF5,0x0A,0x3F,0xC5,0xFF,0x20,0x4C,0xB8,0xC5,0x72,0x71,0x9A, - 0xA9,0xA0,0xDD,0x4F,0x68,0x53,0xB1,0xFA,0x26,0x14,0x85,0x94,0x21,0x14,0x80,0x5C,0x70,0xBA,0xC5,0xF6, - 0x58,0xDB,0xAE,0xE5,0x8D,0xCD,0xDC,0x6A,0x9C,0x11,0xFC,0x6D,0x33,0x17,0xFB,0xF2,0x22,0xEC,0xB5,0xFD, - 0x75,0xCA,0x2B,0x55,0xCC,0x2B,0xBE,0xFC,0xC6,0x73,0x3C,0xEF,0xFD,0xD7,0x8B,0x86,0x69,0x4A,0x6A,0x80, - 0xF0,0x6E,0xA7,0x09 -}; - -static unsigned char MACRO_IF_EQL[] = -{ - 0xEC,0xAF,0xAA,0x93,0x2D,0x04,0xA3,0x8F,0x8A,0x10,0x67,0x91,0xC9,0xE1,0xDA,0x2C,0x31,0x1D,0x82,0xE2, - 0x07,0xF9,0xE8,0x24,0x75,0xE9,0x9D,0x54,0x70,0x36,0x4F,0xFF,0xDD,0x4A,0x82,0x14,0x88,0x48,0x74,0x51, - 0x3F,0xBA,0x51,0x98,0xE9,0x1D,0x27,0xB1,0x7B,0x97,0x27,0x46,0x9A,0x46,0x64,0xD4,0xEF,0x92,0xF0,0x05, - 0x5E,0x79,0xED,0x8D,0x34,0x52,0x8A,0x90,0xE9,0xBA,0x3C,0xBE,0x8B,0xE5,0xCA,0x28,0xB0,0x92,0xDE,0x4C, - 0xD8,0x31,0xCE,0xCE,0x8E,0x22,0x78,0xF8,0x7C,0xCE,0xF6,0x4E,0x84,0xD0,0xEE,0xB5,0x0B,0x8E,0x53,0xD5, - 0xCE,0x7C,0x4F,0x2F,0xFA,0xF6,0xBF,0xC8,0x70,0x5A,0x0E,0x00,0xDB,0x93,0x44,0x83,0xF4,0xFC,0xEB,0x2F, - 0x31,0x1D,0x02,0x23,0x9E,0x8A,0xB5,0x13,0x68,0x48,0x3D,0x76,0x01,0xFE,0x40,0x78,0x2C,0xB7,0x09,0x39, - 0xCF,0xA4,0x58,0x87,0x72,0xF8,0xA0,0xBC,0xE9,0xA3,0xD0,0xC0,0x78,0x80,0xFA,0xDC,0x05,0x9A,0x0C,0x40, - 0x9C,0xB6,0x62,0xD4,0x6E,0xA0,0x18,0x9A,0xEE,0x85,0x4A,0xB0,0x63,0xD3,0x2A,0x84,0xCA,0x3C,0x55,0xA9, - 0xD2,0x18,0xAE,0x4D,0x40,0x80,0xE5,0x7A,0x95,0x33,0x90,0xF2,0xF6,0x06,0xD9,0x65,0x4D,0x2B,0x95,0x29, - 0x02,0xB9,0xF9,0xA6,0x05,0x56,0x13,0x2B,0x9F,0x69,0xFA,0xF1,0xBB,0x28,0xA6,0x71,0x40,0x11,0xD7,0x86, - 0x04,0xEE,0xB6,0xEE,0xBA,0xC6,0x45,0x07,0x75,0xEC,0xC5,0xD0,0x7D,0x8C,0xC5,0x51,0x63,0xB4,0xEA,0x51, - 0x63,0xB4,0xEA,0xD6,0x61,0xB1,0xE1,0xBF,0xD4,0x5E,0xAD,0x7D,0xD5,0x03,0x53,0x50,0x9C,0x68,0x1B,0xA5, - 0xB4,0xF8,0x66,0x1E,0xC6,0x76,0x19,0xA9,0x2F,0x54,0xE6,0xC1,0x41,0x47,0xF1,0x1A,0x37,0x47,0x78,0xC5, - 0x40,0x7A,0x28,0xA6,0xF1,0x44,0x14,0x8E,0x88,0x15,0xAE,0xF0,0x91,0x0F,0x6A,0xE3,0x9D,0x9B,0x71,0x99, - 0x02,0x34,0xE8,0x5F,0x02,0xB5,0x6F,0x45,0x2A,0x5A,0xEF,0x4B,0xD2,0x7A,0xEF,0x4B,0x53,0x58,0x73,0xA4, - 0x1A,0x1B,0x15,0xE8,0x04,0xC2,0xC3,0x65,0xA5,0x0B,0x16,0xCC,0x26,0xF0,0x26,0xDB,0xCA,0x4A,0x37,0x03, - 0x79,0x64,0x0D,0x2A,0xBA,0x57,0x61,0xBD,0xFC,0xE7,0x0D,0xCD,0x72,0xF9,0xDE,0xAB,0x87,0x54,0x8F,0x0E, - 0x26,0xD5,0x8A,0x78,0x15,0x6C,0x4B,0xDB,0x15,0x6C,0x4B,0xDB,0x15,0x6C,0x4B,0xDB,0x95,0x12,0xF0,0xF9, - 0x1D,0x10,0x9F,0xC3,0xA8,0x84,0xB0,0x47,0x58,0x67,0x94,0x58,0x6D,0x8A,0xFE,0x64,0xDA,0x71,0xCF,0x2D, - 0xDA,0xD3,0x6D,0x83,0xE2,0x07,0x1F,0x47,0xB7,0x1B,0xAF,0x88,0x21,0xDE,0x8C,0x98,0x52,0xA8,0x70,0x32, - 0x92,0x80,0x1B,0x00,0xFD,0x49,0x32,0xF0,0x1E,0xB8,0xDB,0x65,0x33,0x93,0x93,0x8E,0xA0,0x97,0xEF,0xA7, - 0xE3,0xD2,0x84,0x49,0x2C,0xE0,0xD9,0xC0,0x59,0xF8,0xCD,0x62,0x83,0xEF,0x7B,0x55,0x5D,0x6B,0x7F -}; - -#pragma pack(push, 1) -typedef struct -{ - void *code_ptr; - - union - { - struct - { - DWORD Param1; - DWORD Param2; - DWORD Param3; - DWORD Param4; - DWORD Param5; - DWORD Param6; - }std; - struct - { - DWORD dest; - DWORD src; - DWORD Param3; - DWORD Param4; - DWORD Param5; - DWORD Param6; - }arithmetic; - struct - { - DWORD compare_me; - DWORD with_value; - DWORD if_equal; - DWORD if_not_equal; - DWORD Param5; - DWORD Param6; - }cmp; - }; - - -} VirtualMachine_t; -#pragma pack(pop) - -#define SET_LABEL_ADDR(param, label_addr) \ - { \ - DWORD addr; \ - __asm { mov addr, offset label_addr } \ - param = addr; \ - } - -#endif // USE_SECUROM_MARKERS_API - -#endif // SECUROM_SDK_H - - - - - diff --git a/src/xrEngine/x_ray.cpp b/src/xrEngine/x_ray.cpp index 59443cc40f3..473d0dc1978 100644 --- a/src/xrEngine/x_ray.cpp +++ b/src/xrEngine/x_ray.cpp @@ -27,8 +27,6 @@ #include #include "xrSASH.h" - -#include "securom_api.h" #include "xrScriptEngine/script_engine.hpp" //--------------------------------------------------------------------- @@ -72,10 +70,8 @@ static int start_year = 1999; // 1999 #define DEFAULT_MODULE_HASH "3CAABCFCFF6F3A810019C6A72180F166" static char szEngineHash[33] = DEFAULT_MODULE_HASH; -PROTECT_API char* ComputeModuleHash(char* pszHash) +char* ComputeModuleHash(char* pszHash) { - SECUROM_MARKER_HIGH_SECURITY_ON(3) - char szModuleFileName[MAX_PATH]; HANDLE hModuleHandle = NULL, hFileMapping = NULL; LPVOID lpvMapping = NULL; @@ -122,9 +118,6 @@ PROTECT_API char* ComputeModuleHash(char* pszHash) UnmapViewOfFile(lpvMapping); CloseHandle(hFileMapping); CloseHandle(hModuleHandle); - - SECUROM_MARKER_HIGH_SECURITY_OFF(3) - return pszHash; } #endif // DEDICATED_SERVER @@ -220,7 +213,7 @@ struct path_excluder_predicate xr_auth_strings_t const* m_ignore; }; -PROTECT_API void InitSettings() +void InitSettings() { #ifndef DEDICATED_SERVER Msg("EH: %s\n", ComputeModuleHash(szEngineHash)); @@ -254,10 +247,8 @@ PROTECT_API void InitSettings() pGameIni = xr_new(fname, TRUE); CHECK_OR_EXIT(0 != pGameIni->section_count(), make_string("Cannot find file %s.\nReinstalling application may fix this problem.", fname)); } -PROTECT_API void InitConsole() +void InitConsole() { - SECUROM_MARKER_SECURITY_ON(5) - #ifdef DEDICATED_SERVER { Console = xr_new(); @@ -277,11 +268,9 @@ PROTECT_API void InitConsole() sscanf(strstr(Core.Params, "-ltx ") + 5, "%[^ ] ", c_name); xr_strcpy(Console->ConfigFile, c_name); } - - SECUROM_MARKER_SECURITY_OFF(5) } -PROTECT_API void InitInput() +void InitInput() { BOOL bCaptureInput = !strstr(Core.Params, "-i"); @@ -292,12 +281,12 @@ void destroyInput() xr_delete(pInput); } -PROTECT_API void InitSound1() +void InitSound1() { CSound_manager_interface::_create(0); } -PROTECT_API void InitSound2() +void InitSound2() { CSound_manager_interface::_create(1); } @@ -621,9 +610,6 @@ BOOL IsOutOfVirtualMemory() { #define VIRT_ERROR_SIZE 256 #define VIRT_MESSAGE_SIZE 512 - - SECUROM_MARKER_HIGH_SECURITY_ON(1) - MEMORYSTATUSEX statex; DWORD dwPageFileInMB = 0; DWORD dwPhysMemInMB = 0; @@ -653,9 +639,6 @@ BOOL IsOutOfVirtualMemory() return 0; MessageBox(NULL, pszMessage, pszError, MB_OK | MB_ICONHAND); - - SECUROM_MARKER_HIGH_SECURITY_OFF(1) - return 1; } @@ -1242,7 +1225,7 @@ void CApplication::destroy_loading_shaders() //u32 calc_progress_color(u32, u32, int, int); -PROTECT_API void CApplication::LoadDraw() +void CApplication::LoadDraw() { if (g_appLoaded) return; Device.dwFrame += 1; @@ -1318,8 +1301,6 @@ void CApplication::Level_Append(LPCSTR folder) void CApplication::Level_Scan() { - SECUROM_MARKER_PERFORMANCE_ON(8) - for (u32 i = 0; i < Levels.size(); i++) { xr_free(Levels[i].folder); @@ -1335,8 +1316,6 @@ void CApplication::Level_Scan() Level_Append((*folder)[i]); FS.file_list_close(folder); - - SECUROM_MARKER_PERFORMANCE_OFF(8) } void gen_logo_name(string_path& dest, LPCSTR level_name, int num) @@ -1354,8 +1333,6 @@ void gen_logo_name(string_path& dest, LPCSTR level_name, int num) void CApplication::Level_Set(u32 L) { - SECUROM_MARKER_PERFORMANCE_ON(9) - if (L >= Levels.size()) return; FS.get_path("$level$")->_set(Levels[L].folder); @@ -1389,16 +1366,11 @@ void CApplication::Level_Set(u32 L) m_pRender->setLevelLogo(path); CheckCopyProtection(); - - SECUROM_MARKER_PERFORMANCE_OFF(9) } int CApplication::Level_ID(LPCSTR name, LPCSTR ver, bool bSet) { int result = -1; - - SECUROM_MARKER_SECURITY_ON(7) - CLocatorAPI::archives_it it = FS.m_archives.begin(); CLocatorAPI::archives_it it_e = FS.m_archives.end(); bool arch_res = false; @@ -1437,9 +1409,6 @@ int CApplication::Level_ID(LPCSTR name, LPCSTR ver, bool bSet) if (arch_res) g_pGamePersistent->OnAssetsChanged(); - - SECUROM_MARKER_SECURITY_OFF(7) - return result; } diff --git a/src/xrGame/UIDialogHolder.h b/src/xrGame/UIDialogHolder.h index 6c0d013e266..d4296e4148b 100644 --- a/src/xrGame/UIDialogHolder.h +++ b/src/xrGame/UIDialogHolder.h @@ -22,7 +22,7 @@ class recvItem{ Flags8 m_flags; }; -class PROTECT_API CDialogHolder :public pureFrame +class CDialogHolder :public pureFrame { //dialogs xr_vector m_input_receivers;