Remove dependencies.
This commit is contained in:
parent
e44006a588
commit
af3a777a11
@ -11,6 +11,16 @@ namespace Components
|
|||||||
{
|
{
|
||||||
Utils::Hook Exception::SetFilterHook;
|
Utils::Hook Exception::SetFilterHook;
|
||||||
|
|
||||||
|
__declspec(noreturn) void Exception::ErrorLongJmp(jmp_buf _Buf, int _Value)
|
||||||
|
{
|
||||||
|
if (!*reinterpret_cast<DWORD*>(0x1AD7EB4))
|
||||||
|
{
|
||||||
|
TerminateProcess(GetCurrentProcess(), 1337);
|
||||||
|
}
|
||||||
|
|
||||||
|
longjmp(_Buf, _Value);
|
||||||
|
}
|
||||||
|
|
||||||
LONG WINAPI Exception::ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo)
|
LONG WINAPI Exception::ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo)
|
||||||
{
|
{
|
||||||
// Pass on harmless errors
|
// Pass on harmless errors
|
||||||
@ -85,6 +95,8 @@ namespace Components
|
|||||||
SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
|
SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//Utils::Hook(0x4B241F, Exception::ErrorLongJmp, HOOK_CALL).Install()->Quick();
|
||||||
|
|
||||||
Command::Add("mapTest", [](Command::Params params)
|
Command::Add("mapTest", [](Command::Params params)
|
||||||
{
|
{
|
||||||
std::string command;
|
std::string command;
|
||||||
|
@ -16,6 +16,7 @@ namespace Components
|
|||||||
private:
|
private:
|
||||||
static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo);
|
static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo);
|
||||||
static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
||||||
|
static __declspec(noreturn) void ErrorLongJmp(jmp_buf _Buf, int _Value);
|
||||||
|
|
||||||
static Utils::Hook SetFilterHook;
|
static Utils::Hook SetFilterHook;
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@ namespace Components
|
|||||||
symmetric_CTR FastFiles::CurrentCTR;
|
symmetric_CTR FastFiles::CurrentCTR;
|
||||||
std::vector<std::string> FastFiles::ZonePaths;
|
std::vector<std::string> FastFiles::ZonePaths;
|
||||||
|
|
||||||
unsigned char FastFiles::ZoneKey[] =
|
unsigned char FastFiles::ZoneKey[1191] =
|
||||||
{
|
{
|
||||||
0x30,0x82,0x04,0xA3,0x02,0x01,0x00,0x02,0x82,0x01,0x01,
|
0x30,0x82,0x04,0xA3,0x02,0x01,0x00,0x02,0x82,0x01,0x01,
|
||||||
0x00,0xBD,0x7E,0xD6,0xE2,0xE9,0x1C,0xB1,0x08,0x68,0xA2,
|
0x00,0xBD,0x7E,0xD6,0xE2,0xE9,0x1C,0xB1,0x08,0x68,0xA2,
|
||||||
|
@ -17,6 +17,8 @@ namespace Components
|
|||||||
|
|
||||||
static void LoadLocalizeZones(Game::XZoneInfo *zoneInfo, unsigned int zoneCount, int sync);
|
static void LoadLocalizeZones(Game::XZoneInfo *zoneInfo, unsigned int zoneCount, int sync);
|
||||||
|
|
||||||
|
static unsigned char ZoneKey[1191];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union Key
|
union Key
|
||||||
{
|
{
|
||||||
@ -31,7 +33,6 @@ namespace Components
|
|||||||
|
|
||||||
static Key CurrentKey;
|
static Key CurrentKey;
|
||||||
static symmetric_CTR CurrentCTR;
|
static symmetric_CTR CurrentCTR;
|
||||||
static unsigned char ZoneKey[];
|
|
||||||
static std::vector<std::string> ZonePaths;
|
static std::vector<std::string> ZonePaths;
|
||||||
static const char* GetZoneLocation(const char* file);
|
static const char* GetZoneLocation(const char* file);
|
||||||
static void LoadInitialZones(Game::XZoneInfo *zoneInfo, unsigned int zoneCount, int sync);
|
static void LoadInitialZones(Game::XZoneInfo *zoneInfo, unsigned int zoneCount, int sync);
|
||||||
|
@ -6,6 +6,7 @@ namespace Components
|
|||||||
std::vector<std::pair<std::string, std::string>> Maps::DependencyList;
|
std::vector<std::pair<std::string, std::string>> Maps::DependencyList;
|
||||||
std::vector<std::string> Maps::CurrentDependencies;
|
std::vector<std::string> Maps::CurrentDependencies;
|
||||||
|
|
||||||
|
bool Maps::IsSPMap;
|
||||||
std::vector<Maps::DLC> Maps::DlcPacks;
|
std::vector<Maps::DLC> Maps::DlcPacks;
|
||||||
std::vector<Game::XAssetEntry> Maps::EntryPool;
|
std::vector<Game::XAssetEntry> Maps::EntryPool;
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ namespace Components
|
|||||||
{
|
{
|
||||||
if (!zoneInfo) return;
|
if (!zoneInfo) return;
|
||||||
|
|
||||||
|
Maps::IsSPMap = false;
|
||||||
Maps::CurrentMainZone = zoneInfo->name;
|
Maps::CurrentMainZone = zoneInfo->name;
|
||||||
|
|
||||||
Maps::CurrentDependencies.clear();
|
Maps::CurrentDependencies.clear();
|
||||||
@ -138,19 +140,8 @@ namespace Components
|
|||||||
|
|
||||||
Game::GameMap_Data** Maps::GetWorldData()
|
Game::GameMap_Data** Maps::GetWorldData()
|
||||||
{
|
{
|
||||||
bool handleAsSp = false;
|
|
||||||
|
|
||||||
for (auto dependency : Maps::DependencyList)
|
|
||||||
{
|
|
||||||
if (dependency.second == "iw4x_dependencies_mp" && std::regex_match(Maps::CurrentMainZone, std::regex(dependency.first)))
|
|
||||||
{
|
|
||||||
handleAsSp = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Game::XAssetType type = Game::XAssetType::ASSET_TYPE_GAME_MAP_MP;
|
Game::XAssetType type = Game::XAssetType::ASSET_TYPE_GAME_MAP_MP;
|
||||||
if (Utils::String::StartsWith(Maps::CurrentMainZone, "mp_") || handleAsSp)
|
if (Utils::String::StartsWith(Maps::CurrentMainZone, "mp_") || Maps::IsSPMap)
|
||||||
{
|
{
|
||||||
type = Game::XAssetType::ASSET_TYPE_GAME_MAP_SP;
|
type = Game::XAssetType::ASSET_TYPE_GAME_MAP_SP;
|
||||||
}
|
}
|
||||||
@ -499,31 +490,6 @@ namespace Components
|
|||||||
//Maps::AddDependency("gulag", "mp_subbase");
|
//Maps::AddDependency("gulag", "mp_subbase");
|
||||||
//Maps::AddDependency("invasion", "mp_rust");
|
//Maps::AddDependency("invasion", "mp_rust");
|
||||||
Maps::AddDependency("co_hunted", "mp_storm");
|
Maps::AddDependency("co_hunted", "mp_storm");
|
||||||
Maps::AddDependency("mp_nuked", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_bloc", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_cargoship", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_cross_fire", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_bog_sh", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_killhouse", "iw4x_dependencies_mp");
|
|
||||||
|
|
||||||
Maps::AddDependency("^(?!mp_).*", "iw4x_dependencies_mp"); // All maps not starting with "mp_"
|
|
||||||
|
|
||||||
Maps::AddDependency("mp_bloc_sh", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_cargoship_sh", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_firingrange", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_shipment_long", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_firingrange", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_rust_long", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_ambush_sh", "iw4x_dependencies_mp");
|
|
||||||
|
|
||||||
Maps::AddDependency("mp_shipment", "mp_shipment_long");
|
|
||||||
Maps::AddDependency("mp_shipment", "iw4x_dependencies_mp");
|
|
||||||
|
|
||||||
// Testing
|
|
||||||
Maps::AddDependency("mp_trainingground", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_shootingrange", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("mp_cqbtraining", "iw4x_dependencies_mp");
|
|
||||||
Maps::AddDependency("zm_asylum_sh", "iw4x_dependencies_mp");
|
|
||||||
|
|
||||||
#if defined(DEBUG) && defined(ENABLE_DXSDK)
|
#if defined(DEBUG) && defined(ENABLE_DXSDK)
|
||||||
Command::Add("dumpmap", [] (Command::Params)
|
Command::Add("dumpmap", [] (Command::Params)
|
||||||
|
@ -10,6 +10,7 @@ namespace Components
|
|||||||
const char* GetName() { return "Maps"; };
|
const char* GetName() { return "Maps"; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void HandleAsSPMap() { IsSPMap = true; }
|
||||||
static void AddDependency(std::string expression, std::string zone);
|
static void AddDependency(std::string expression, std::string zone);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -21,6 +22,7 @@ namespace Components
|
|||||||
std::vector<std::string> maps;
|
std::vector<std::string> maps;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool IsSPMap;
|
||||||
static std::vector<DLC> DlcPacks;
|
static std::vector<DLC> DlcPacks;
|
||||||
static std::vector<Game::XAssetEntry> EntryPool;
|
static std::vector<Game::XAssetEntry> EntryPool;
|
||||||
|
|
||||||
|
@ -1344,6 +1344,8 @@ namespace Components
|
|||||||
|
|
||||||
if (patch)
|
if (patch)
|
||||||
{
|
{
|
||||||
|
Maps::HandleAsSPMap();
|
||||||
|
|
||||||
Zones::LoadFxElemDefArrayHook.Install();
|
Zones::LoadFxElemDefArrayHook.Install();
|
||||||
Zones::LoadFxElemDefHook.Install();
|
Zones::LoadFxElemDefHook.Install();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user